From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 08:40: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 7460F106566C; Sun, 1 Apr 2012 08:40:53 +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 5DC8C8FC0C; Sun, 1 Apr 2012 08:40: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 q318erih040878; Sun, 1 Apr 2012 08:40:53 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q318erWg040876; Sun, 1 Apr 2012 08:40:53 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201204010840.q318erWg040876@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 1 Apr 2012 08:40: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: r233755 - stable/9/lib/libcam 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, 01 Apr 2012 08:40:54 -0000 Author: jh Date: Sun Apr 1 08:40:52 2012 New Revision: 233755 URL: http://svn.freebsd.org/changeset/base/233755 Log: MFC r232450: Use snprintf(3) constantly when generating CAM error messages. PR: bin/57088 Modified: stable/9/lib/libcam/camlib.c Directory Properties: stable/9/lib/libcam/ (props changed) Modified: stable/9/lib/libcam/camlib.c ============================================================================== --- stable/9/lib/libcam/camlib.c Sun Apr 1 08:14:50 2012 (r233754) +++ stable/9/lib/libcam/camlib.c Sun Apr 1 08:40:52 2012 (r233755) @@ -121,7 +121,8 @@ cam_get_device(const char *path, char *d if (path == NULL) { - sprintf(cam_errbuf, "%s: device pathname was NULL", func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: device pathname was NULL", func_name); return(-1); } @@ -143,7 +144,8 @@ cam_get_device(const char *path, char *d } if (*tmpstr == '\0') { - sprintf(cam_errbuf, "%s: no text after slash", func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: no text after slash", func_name); free(newpath); return(-1); } @@ -170,9 +172,9 @@ cam_get_device(const char *path, char *d * If we only have 1, we don't have a valid device name. */ if (strlen(tmpstr) < 2) { - sprintf(cam_errbuf, - "%s: must have both device name and unit number", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: must have both device name and unit number", + func_name); free(newpath); return(-1); } @@ -182,9 +184,9 @@ cam_get_device(const char *path, char *d * has probably given us all numbers. Point out the error. */ if (isdigit(*tmpstr)) { - sprintf(cam_errbuf, - "%s: device name cannot begin with a number", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: device name cannot begin with a number", + func_name); free(newpath); return(-1); } @@ -195,8 +197,8 @@ cam_get_device(const char *path, char *d * or he gave us a device name/number format we don't recognize. */ if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { - sprintf(cam_errbuf, "%s: unable to find device unit number", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: unable to find device unit number", func_name); free(newpath); return(-1); } @@ -324,8 +326,9 @@ cam_open_btl(path_id_t path_id, target_i PERIPH_MATCH_LUN | PERIPH_MATCH_NAME; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - sprintf(cam_errbuf, "%s: CAMIOCOMMAND ioctl failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: CAMIOCOMMAND ioctl failed\n" + "%s: %s", func_name, func_name, strerror(errno)); goto btl_bailout; } @@ -335,23 +338,26 @@ cam_open_btl(path_id_t path_id, target_i if ((ccb.ccb_h.status != CAM_REQ_CMP) || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { - sprintf(cam_errbuf, "%s: CAM error %#x, CDM error %d " - "returned from XPT_DEV_MATCH ccb", func_name, - ccb.ccb_h.status, ccb.cdm.status); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: CAM error %#x, CDM error %d " + "returned from XPT_DEV_MATCH ccb", func_name, + ccb.ccb_h.status, ccb.cdm.status); goto btl_bailout; } if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { - sprintf(cam_errbuf, "%s: CDM reported more than one" - " passthrough device at %d:%d:%d!!\n", - func_name, path_id, target_id, target_lun); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: CDM reported more than one" + " passthrough device at %d:%d:%d!!\n", + func_name, path_id, target_id, target_lun); goto btl_bailout; } if (ccb.cdm.num_matches == 0) { - sprintf(cam_errbuf, "%s: no passthrough device found at" - " %d:%d:%d", func_name, path_id, target_id, - target_lun); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: no passthrough device found at" + " %d:%d:%d", func_name, path_id, target_id, + target_lun); goto btl_bailout; } @@ -372,8 +378,9 @@ cam_open_btl(path_id_t path_id, target_i break; /* NOTREACHED */ } default: - sprintf(cam_errbuf, "%s: asked for a peripheral match, but" - " got a bus or device match", func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: asked for a peripheral match, but" + " got a bus or device match", func_name); goto btl_bailout; break; /* NOTREACHED */ } @@ -446,7 +453,7 @@ cam_lookup_pass(const char *dev_name, in "your kernel\n%s: or %s%d doesn't exist", func_name, func_name, dev_name, unit); } - snprintf(cam_errbuf, sizeof(cam_errbuf), + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: CAMGETPASSTHRU ioctl failed\n" "%s: %s%s", func_name, func_name, strerror(errno), (errno == ENOENT) ? tmpstr : ""); @@ -464,8 +471,9 @@ cam_lookup_pass(const char *dev_name, in * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - sprintf(cam_errbuf, "%s: device %s%d does not exist!", - func_name, dev_name, unit); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: device %s%d does not exist!", + func_name, dev_name, unit); return(NULL); } @@ -495,9 +503,10 @@ cam_real_open_device(const char *path, i if (device == NULL) { if ((device = (struct cam_device *)malloc( sizeof(struct cam_device))) == NULL) { - sprintf(cam_errbuf, "%s: device structure malloc" - " failed\n%s: %s", func_name, func_name, - strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: device structure malloc" + " failed\n%s: %s", func_name, func_name, + strerror(errno)); return(NULL); } device->fd = -1; @@ -553,8 +562,9 @@ cam_real_open_device(const char *path, i * because we just opened it above. The only way this * ioctl can fail is if the ccb size is wrong. */ - sprintf(cam_errbuf, "%s: CAMGETPASSTHRU ioctl failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: CAMGETPASSTHRU ioctl failed\n" + "%s: %s", func_name, func_name, strerror(errno)); goto crod_bailout; } @@ -565,8 +575,8 @@ cam_real_open_device(const char *path, i * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - sprintf(cam_errbuf, "%s: passthrough device does not exist!", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: passthrough device does not exist!", func_name); goto crod_bailout; } @@ -579,8 +589,9 @@ cam_real_open_device(const char *path, i ccb.ccb_h.func_code = XPT_PATH_INQ; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - sprintf(cam_errbuf, "%s: Path Inquiry CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: Path Inquiry CCB failed\n" + "%s: %s", func_name, func_name, strerror(errno)); goto crod_bailout; } strlcpy(device->sim_name, ccb.cpi.dev_name, sizeof(device->sim_name)); @@ -593,8 +604,9 @@ cam_real_open_device(const char *path, i */ ccb.ccb_h.func_code = XPT_GDEV_TYPE; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - sprintf(cam_errbuf, "%s: Get Device Type CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: Get Device Type CCB failed\n" + "%s: %s", func_name, func_name, strerror(errno)); goto crod_bailout; } device->pd_type = SID_TYPE(&ccb.cgd.inq_data); @@ -616,8 +628,9 @@ cam_real_open_device(const char *path, i ccb.cts.type = CTS_TYPE_CURRENT_SETTINGS; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - sprintf(cam_errbuf, "%s: Get Transfer Settings CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: Get Transfer Settings CCB failed\n" + "%s: %s", func_name, func_name, strerror(errno)); goto crod_bailout; } if (ccb.cts.protocol == XPORT_SPI) { @@ -696,7 +709,8 @@ cam_device_dup(struct cam_device *device struct cam_device *newdev; if (device == NULL) { - sprintf(cam_errbuf, "%s: device is NULL", func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: device is NULL", func_name); return(NULL); } @@ -721,14 +735,14 @@ cam_device_copy(struct cam_device *src, char *func_name = "cam_device_copy"; if (src == NULL) { - sprintf(cam_errbuf, "%s: source device struct was NULL", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: source device struct was NULL", func_name); return; } if (dst == NULL) { - sprintf(cam_errbuf, "%s: destination device struct was NULL", - func_name); + snprintf(cam_errbuf, CAM_ERRBUF_SIZE, + "%s: destination device struct was NULL", func_name); return; } From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 15:05:16 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 13FFE1065672; Sun, 1 Apr 2012 15:05:16 +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 F33418FC12; Sun, 1 Apr 2012 15:05: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 q31F5Fd1054852; Sun, 1 Apr 2012 15:05:15 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31F5Fk4054850; Sun, 1 Apr 2012 15:05:15 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201204011505.q31F5Fk4054850@svn.freebsd.org> From: Kevin Lo Date: Sun, 1 Apr 2012 15:05: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: r233759 - stable/9/usr.bin/bc 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, 01 Apr 2012 15:05:16 -0000 Author: kevlo Date: Sun Apr 1 15:05:15 2012 New Revision: 233759 URL: http://svn.freebsd.org/changeset/base/233759 Log: MFC r233121: Repair function when used with large scales Submitted by: AIDA Shinra Modified: stable/9/usr.bin/bc/bc.library Directory Properties: stable/9/usr.bin/ (props changed) Modified: stable/9/usr.bin/bc/bc.library ============================================================================== --- stable/9/usr.bin/bc/bc.library Sun Apr 1 09:38:22 2012 (r233758) +++ stable/9/usr.bin/bc/bc.library Sun Apr 1 15:05:15 2012 (r233759) @@ -48,7 +48,7 @@ define e(x) { t = scale scale = 0 if (x > 0) scale = (0.435*x)/1 - scale = scale + t + 1 + scale = scale + t + length(scale + t) + 1 w = 0 if (x < 0) { @@ -120,7 +120,8 @@ define l(x) { f = f*2 } - scale = t + length(f) + length(t + length(f)) + 1 + scale = 0 + scale = t + length(f) + length((1.05*(t+length(f))/1)) + 1 u = (x - 1)/(x + 1) s = u*u scale = t + 2 From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 20:53: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 26427106566B; Sun, 1 Apr 2012 20:53:36 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 102288FC16; Sun, 1 Apr 2012 20:53: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 q31KrZbu065524; Sun, 1 Apr 2012 20:53:35 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31KrZHE065521; Sun, 1 Apr 2012 20:53:35 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204012053.q31KrZHE065521@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 1 Apr 2012 20:53:35 +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: r233761 - stable/9/usr.sbin/daemon 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, 01 Apr 2012 20:53:36 -0000 Author: trociny Date: Sun Apr 1 20:53:35 2012 New Revision: 233761 URL: http://svn.freebsd.org/changeset/base/233761 Log: MFC r229667, r230541, r230869, r231909, r231910, r231911, r231912: r229667, r230541, r230869 (ghelmer): Change the notes about the pidfile to include Doug's preference for pre-creating the pidfile with appropriate owner and permissions. Requested by dougb r231909: The pidfile_open(3) is going to be fixed to set close-on-exec in order not to leak the descriptor after exec(3). This raises the issue for daemon(3) of the pidfile lock to be lost when the child process executes. To solve this and also to have the pidfile cleaned up when the program exits, if a pidfile is specified, spawn a child to exec the command and wait in the parent keeping the pidfile locked until the child process exits and remove the file. Reported by: Andrey Zonov Suggested by: pjd Reviewed by: pjd r231910: If the supervising process receives SIGTERM, forward it to the spawned process. Normally it will cause the child to exit followed by the termination of the supervisor after removing the pidfile. This looks like desirable behavior, because termination of a supervisor usually supposes termination of its charge. Also it will fix the issue with stale pid files after reboot due to init kills a supervisor before its child exits. r231911: Add -r option to restart the program if it has been terminated. Suggested by: Andrey Zonov r231912: If permitted protect the supervisor against pageout kill. Suggested by: Andrey Zonov Modified: stable/9/usr.sbin/daemon/daemon.8 stable/9/usr.sbin/daemon/daemon.c Directory Properties: stable/9/usr.sbin/daemon/ (props changed) Modified: stable/9/usr.sbin/daemon/daemon.8 ============================================================================== --- stable/9/usr.sbin/daemon/daemon.8 Sun Apr 1 18:22:48 2012 (r233760) +++ stable/9/usr.sbin/daemon/daemon.8 Sun Apr 1 20:53:35 2012 (r233761) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2007 +.Dd February 19, 2012 .Dt DAEMON 8 .Os .Sh NAME @@ -59,13 +59,40 @@ Write the ID of the created process into using the .Xr pidfile 3 functionality. -Note, that the file will be created shortly before the process is -actually executed, and will remain after the process exits (although -it will be removed if the execution fails). +The program is executed in a spawned child process while the +.Nm +waits until it terminates to keep the +.Ar file +locked and removes it after the process exits. +The +.Ar file +owner is the user who runs the +.Nm +regardless of whether the +.Fl u +option is used or not. +.It Fl r +Supervise and restart the program if it has been terminated. .It Fl u Ar user Login name of the user to execute the program under. Requires adequate superuser privileges. .El +.Pp +If the +.Fl p +or +.Fl r +option is specified the program is executed in a spawned child process. +The +.Nm +waits until it terminates to keep the pid file locked and removes it +after the process exits or restarts the program. +In this case if the monitoring +.Nm +receives software termination signal (SIGTERM) it forwards it to the +spawned process. +Normally it will cause the child to exit followed by the termination +of the supervising process after removing the pidfile. .Sh EXIT STATUS The .Nm Modified: stable/9/usr.sbin/daemon/daemon.c ============================================================================== --- stable/9/usr.sbin/daemon/daemon.c Sun Apr 1 18:22:48 2012 (r233760) +++ stable/9/usr.sbin/daemon/daemon.c Sun Apr 1 20:53:35 2012 (r233761) @@ -32,30 +32,37 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include -#include #include #include +#include +#include #include #include #include +static void dummy_sighandler(int); static void restrict_process(const char *); +static int wait_child(pid_t pid, sigset_t *mask); static void usage(void); int main(int argc, char *argv[]) { struct pidfh *pfh = NULL; - int ch, nochdir, noclose, errcode; + sigset_t mask, oldmask; + int ch, nochdir, noclose, restart; const char *pidfile, *user; - pid_t otherpid; + pid_t otherpid, pid; nochdir = noclose = 1; + restart = 0; pidfile = user = NULL; - while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { + while ((ch = getopt(argc, argv, "-cfp:ru:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -66,6 +73,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'r': + restart = 1; + break; case 'u': user = optarg; break; @@ -79,14 +89,12 @@ main(int argc, char *argv[]) if (argc == 0) usage(); - if (user != NULL) - restrict_process(user); - + pfh = NULL; /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently */ - if (pidfile) { + if (pidfile != NULL) { pfh = pidfile_open(pidfile, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) { @@ -100,22 +108,87 @@ main(int argc, char *argv[]) if (daemon(nochdir, noclose) == -1) err(1, NULL); - /* Now that we are the child, write out the pid */ - if (pidfile) + /* + * If the pidfile or restart option is specified the daemon + * executes the command in a forked process and wait on child + * exit to remove the pidfile or restart the command. Normally + * we don't want the monitoring daemon to be terminated + * leaving the running process and the stale pidfile, so we + * catch SIGTERM and forward it to the children expecting to + * get SIGCHLD eventually. + */ + pid = -1; + if (pidfile != NULL || restart) { + /* + * Restore default action for SIGTERM in case the + * parent process decided to ignore it. + */ + if (signal(SIGTERM, SIG_DFL) == SIG_ERR) + err(1, "signal"); + /* + * Because SIGCHLD is ignored by default, setup dummy handler + * for it, so we can mask it. + */ + if (signal(SIGCHLD, dummy_sighandler) == SIG_ERR) + err(1, "signal"); + /* + * Block interesting signals. + */ + sigemptyset(&mask); + sigaddset(&mask, SIGTERM); + sigaddset(&mask, SIGCHLD); + if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) + err(1, "sigprocmask"); + /* + * Try to protect against pageout kill. Ignore the + * error, madvise(2) will fail only if a process does + * not have superuser privileges. + */ + (void)madvise(NULL, 0, MADV_PROTECT); +restart: + /* + * Spawn a child to exec the command, so in the parent + * we could wait for it to exit and remove pidfile. + */ + pid = fork(); + if (pid == -1) { + pidfile_remove(pfh); + err(1, "fork"); + } + } + if (pid <= 0) { + if (pid == 0) { + /* Restore old sigmask in the child. */ + if (sigprocmask(SIG_SETMASK, &oldmask, NULL) == -1) + err(1, "sigprocmask"); + } + /* Now that we are the child, write out the pid. */ pidfile_write(pfh); - execvp(argv[0], argv); + if (user != NULL) + restrict_process(user); - /* - * execvp() failed -- unlink pidfile if any, and - * report the error - */ - errcode = errno; /* Preserve errcode -- unlink may reset it */ - if (pidfile) - pidfile_remove(pfh); + execvp(argv[0], argv); + + /* + * execvp() failed -- report the error. The child is + * now running, so the exit status doesn't matter. + */ + err(1, "%s", argv[0]); + } + setproctitle("%s[%d]", argv[0], pid); + if (wait_child(pid, &mask) == 0 && restart) { + sleep(1); + goto restart; + } + pidfile_remove(pfh); + exit(0); /* Exit status does not matter. */ +} - /* The child is now running, so the exit status doesn't matter. */ - errc(1, errcode, "%s", argv[0]); +static void +dummy_sighandler(int sig __unused) +{ + /* Nothing to do. */ } static void @@ -131,6 +204,34 @@ restrict_process(const char *user) errx(1, "failed to set user environment"); } +static int +wait_child(pid_t pid, sigset_t *mask) +{ + int terminate, signo; + + terminate = 0; + for (;;) { + if (sigwait(mask, &signo) == -1) { + warn("sigwaitinfo"); + return (-1); + } + switch (signo) { + case SIGCHLD: + return (terminate); + case SIGTERM: + terminate = 1; + if (kill(pid, signo) == -1) { + warn("kill"); + return (-1); + } + continue; + default: + warnx("sigwaitinfo: invalid signal: %d", signo); + return (-1); + } + } +} + static void usage(void) { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 20:56: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 587951065670; Sun, 1 Apr 2012 20:56:08 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 422498FC17; Sun, 1 Apr 2012 20:56: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 q31Ku8NG065647; Sun, 1 Apr 2012 20:56:08 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31Ku8uY065644; Sun, 1 Apr 2012 20:56:08 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204012056.q31Ku8uY065644@svn.freebsd.org> From: Mikolaj Golub Date: Sun, 1 Apr 2012 20:56: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: r233762 - stable/8/usr.sbin/daemon 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, 01 Apr 2012 20:56:08 -0000 Author: trociny Date: Sun Apr 1 20:56:07 2012 New Revision: 233762 URL: http://svn.freebsd.org/changeset/base/233762 Log: MFC r208190, r229667, r230541, r230869, r231909, r231910, r231911, r231912: r208190 (ivoras): Slightly improve wording. r229667, r230541, r230869 (ghelmer): Change the notes about the pidfile to include Doug's preference for pre-creating the pidfile with appropriate owner and permissions. Requested by dougb r231909: The pidfile_open(3) is going to be fixed to set close-on-exec in order not to leak the descriptor after exec(3). This raises the issue for daemon(3) of the pidfile lock to be lost when the child process executes. To solve this and also to have the pidfile cleaned up when the program exits, if a pidfile is specified, spawn a child to exec the command and wait in the parent keeping the pidfile locked until the child process exits and remove the file. Reported by: Andrey Zonov Suggested by: pjd Reviewed by: pjd r231910: If the supervising process receives SIGTERM, forward it to the spawned process. Normally it will cause the child to exit followed by the termination of the supervisor after removing the pidfile. This looks like desirable behavior, because termination of a supervisor usually supposes termination of its charge. Also it will fix the issue with stale pid files after reboot due to init kills a supervisor before its child exits. r231911: Add -r option to restart the program if it has been terminated. Suggested by: Andrey Zonov r231912: If permitted protect the supervisor against pageout kill. Suggested by: Andrey Zonov Modified: stable/8/usr.sbin/daemon/daemon.8 stable/8/usr.sbin/daemon/daemon.c Directory Properties: stable/8/usr.sbin/daemon/ (props changed) Modified: stable/8/usr.sbin/daemon/daemon.8 ============================================================================== --- stable/8/usr.sbin/daemon/daemon.8 Sun Apr 1 20:53:35 2012 (r233761) +++ stable/8/usr.sbin/daemon/daemon.8 Sun Apr 1 20:56:07 2012 (r233762) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2007 +.Dd February 19, 2012 .Dt DAEMON 8 .Os .Sh NAME @@ -59,12 +59,40 @@ Write the ID of the created process into using the .Xr pidfile 3 functionality. -Note, that the file will be created shortly before the process is -actually executed, and will remain after the process exits (although -it will be removed if the execution fails). +The program is executed in a spawned child process while the +.Nm +waits until it terminates to keep the +.Ar file +locked and removes it after the process exits. +The +.Ar file +owner is the user who runs the +.Nm +regardless of whether the +.Fl u +option is used or not. +.It Fl r +Supervise and restart the program if it has been terminated. .It Fl u Ar user -Run the program with the rights of user specified, requires privilege. +Login name of the user to execute the program under. +Requires adequate superuser privileges. .El +.Pp +If the +.Fl p +or +.Fl r +option is specified the program is executed in a spawned child process. +The +.Nm +waits until it terminates to keep the pid file locked and removes it +after the process exits or restarts the program. +In this case if the monitoring +.Nm +receives software termination signal (SIGTERM) it forwards it to the +spawned process. +Normally it will cause the child to exit followed by the termination +of the supervising process after removing the pidfile. .Sh EXIT STATUS The .Nm Modified: stable/8/usr.sbin/daemon/daemon.c ============================================================================== --- stable/8/usr.sbin/daemon/daemon.c Sun Apr 1 20:53:35 2012 (r233761) +++ stable/8/usr.sbin/daemon/daemon.c Sun Apr 1 20:56:07 2012 (r233762) @@ -32,30 +32,37 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include -#include #include #include +#include +#include #include #include #include +static void dummy_sighandler(int); static void restrict_process(const char *); +static int wait_child(pid_t pid, sigset_t *mask); static void usage(void); int main(int argc, char *argv[]) { struct pidfh *pfh = NULL; - int ch, nochdir, noclose, errcode; + sigset_t mask, oldmask; + int ch, nochdir, noclose, restart; const char *pidfile, *user; - pid_t otherpid; + pid_t otherpid, pid; nochdir = noclose = 1; + restart = 0; pidfile = user = NULL; - while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { + while ((ch = getopt(argc, argv, "-cfp:ru:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -66,6 +73,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'r': + restart = 1; + break; case 'u': user = optarg; break; @@ -79,14 +89,12 @@ main(int argc, char *argv[]) if (argc == 0) usage(); - if (user != NULL) - restrict_process(user); - + pfh = NULL; /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently */ - if (pidfile) { + if (pidfile != NULL) { pfh = pidfile_open(pidfile, 0600, &otherpid); if (pfh == NULL) { if (errno == EEXIST) { @@ -100,22 +108,87 @@ main(int argc, char *argv[]) if (daemon(nochdir, noclose) == -1) err(1, NULL); - /* Now that we are the child, write out the pid */ - if (pidfile) + /* + * If the pidfile or restart option is specified the daemon + * executes the command in a forked process and wait on child + * exit to remove the pidfile or restart the command. Normally + * we don't want the monitoring daemon to be terminated + * leaving the running process and the stale pidfile, so we + * catch SIGTERM and forward it to the children expecting to + * get SIGCHLD eventually. + */ + pid = -1; + if (pidfile != NULL || restart) { + /* + * Restore default action for SIGTERM in case the + * parent process decided to ignore it. + */ + if (signal(SIGTERM, SIG_DFL) == SIG_ERR) + err(1, "signal"); + /* + * Because SIGCHLD is ignored by default, setup dummy handler + * for it, so we can mask it. + */ + if (signal(SIGCHLD, dummy_sighandler) == SIG_ERR) + err(1, "signal"); + /* + * Block interesting signals. + */ + sigemptyset(&mask); + sigaddset(&mask, SIGTERM); + sigaddset(&mask, SIGCHLD); + if (sigprocmask(SIG_SETMASK, &mask, &oldmask) == -1) + err(1, "sigprocmask"); + /* + * Try to protect against pageout kill. Ignore the + * error, madvise(2) will fail only if a process does + * not have superuser privileges. + */ + (void)madvise(NULL, 0, MADV_PROTECT); +restart: + /* + * Spawn a child to exec the command, so in the parent + * we could wait for it to exit and remove pidfile. + */ + pid = fork(); + if (pid == -1) { + pidfile_remove(pfh); + err(1, "fork"); + } + } + if (pid <= 0) { + if (pid == 0) { + /* Restore old sigmask in the child. */ + if (sigprocmask(SIG_SETMASK, &oldmask, NULL) == -1) + err(1, "sigprocmask"); + } + /* Now that we are the child, write out the pid. */ pidfile_write(pfh); - execvp(argv[0], argv); + if (user != NULL) + restrict_process(user); - /* - * execvp() failed -- unlink pidfile if any, and - * report the error - */ - errcode = errno; /* Preserve errcode -- unlink may reset it */ - if (pidfile) - pidfile_remove(pfh); + execvp(argv[0], argv); + + /* + * execvp() failed -- report the error. The child is + * now running, so the exit status doesn't matter. + */ + err(1, "%s", argv[0]); + } + setproctitle("%s[%d]", argv[0], pid); + if (wait_child(pid, &mask) == 0 && restart) { + sleep(1); + goto restart; + } + pidfile_remove(pfh); + exit(0); /* Exit status does not matter. */ +} - /* The child is now running, so the exit status doesn't matter. */ - errc(1, errcode, "%s", argv[0]); +static void +dummy_sighandler(int sig __unused) +{ + /* Nothing to do. */ } static void @@ -131,6 +204,34 @@ restrict_process(const char *user) errx(1, "failed to set user environment"); } +static int +wait_child(pid_t pid, sigset_t *mask) +{ + int terminate, signo; + + terminate = 0; + for (;;) { + if (sigwait(mask, &signo) == -1) { + warn("sigwaitinfo"); + return (-1); + } + switch (signo) { + case SIGCHLD: + return (terminate); + case SIGTERM: + terminate = 1; + if (kill(pid, signo) == -1) { + warn("kill"); + return (-1); + } + continue; + default: + warnx("sigwaitinfo: invalid signal: %d", signo); + return (-1); + } + } +} + static void usage(void) { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 20:57: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 B8C381065673; Sun, 1 Apr 2012 20:57:04 +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 8A8FC8FC1A; Sun, 1 Apr 2012 20:57: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 q31Kv4iT065708; Sun, 1 Apr 2012 20:57:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31Kv4dv065706; Sun, 1 Apr 2012 20:57:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204012057.q31Kv4dv065706@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 1 Apr 2012 20:57: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: r233763 - 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, 01 Apr 2012 20:57:04 -0000 Author: kib Date: Sun Apr 1 20:57:04 2012 New Revision: 233763 URL: http://svn.freebsd.org/changeset/base/233763 Log: MFC r232828: ELF image can have several PT_NOTE program headers. Look for the ELF brand note in each header, instead of using only first one. Modified: stable/9/sys/kern/imgact_elf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/imgact_elf.c ============================================================================== --- stable/9/sys/kern/imgact_elf.c Sun Apr 1 20:56:07 2012 (r233762) +++ stable/9/sys/kern/imgact_elf.c Sun Apr 1 20:57:04 2012 (r233763) @@ -1534,32 +1534,14 @@ __elfN(putnote)(void *dst, size_t *off, *off += roundup2(note.n_descsz, sizeof(Elf_Size)); } -/* - * Try to find the appropriate ABI-note section for checknote, - * fetch the osreldate for binary from the ELF OSABI-note. Only the - * first page of the image is searched, the same as for headers. - */ static boolean_t -__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, - int32_t *osrel) +__elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel, const Elf_Phdr *pnote) { const Elf_Note *note, *note0, *note_end; - const Elf_Phdr *phdr, *pnote; - const Elf_Ehdr *hdr; const char *note_name; int i; - pnote = NULL; - hdr = (const Elf_Ehdr *)imgp->image_header; - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - - for (i = 0; i < hdr->e_phnum; i++) { - if (phdr[i].p_type == PT_NOTE) { - pnote = &phdr[i]; - break; - } - } - if (pnote == NULL || pnote->p_offset >= PAGE_SIZE || pnote->p_offset + pnote->p_filesz >= PAGE_SIZE) return (FALSE); @@ -1598,6 +1580,31 @@ nextnote: } /* + * Try to find the appropriate ABI-note section for checknote, + * fetch the osreldate for binary from the ELF OSABI-note. Only the + * first page of the image is searched, the same as for headers. + */ +static boolean_t +__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel) +{ + const Elf_Phdr *phdr; + const Elf_Ehdr *hdr; + int i; + + hdr = (const Elf_Ehdr *)imgp->image_header; + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + + for (i = 0; i < hdr->e_phnum; i++) { + if (phdr[i].p_type == PT_NOTE && + __elfN(parse_notes)(imgp, checknote, osrel, &phdr[i])) + return (TRUE); + } + return (FALSE); + +} + +/* * Tell kern_execve.c about it, with a little help from the linker. */ static struct execsw __elfN(execsw) = { From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 21:08: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 AA6AC1065764; Sun, 1 Apr 2012 21:08:56 +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 9567C8FC17; Sun, 1 Apr 2012 21:08: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 q31L8unP066118; Sun, 1 Apr 2012 21:08:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31L8u63066116; Sun, 1 Apr 2012 21:08:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204012108.q31L8u63066116@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 1 Apr 2012 21:08: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: r233764 - stable/8/sys/ufs/ffs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 21:08:56 -0000 Author: kib Date: Sun Apr 1 21:08:56 2012 New Revision: 233764 URL: http://svn.freebsd.org/changeset/base/233764 Log: MFC r233607: Update comment. Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vfsops.c Sun Apr 1 20:57:04 2012 (r233763) +++ stable/8/sys/ufs/ffs/ffs_vfsops.c Sun Apr 1 21:08:56 2012 (r233764) @@ -1364,7 +1364,7 @@ loop: MNT_VNODE_FOREACH(vp, mp, mvp) { /* - * Depend on the mntvnode_slock to keep things stable enough + * Depend on the vnode interlock to keep things stable enough * for a quick test. Since there might be hundreds of * thousands of vnodes, we cannot afford even a subroutine * call unless there's a good chance that we have work to do. From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 21:13:14 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 82BFA1065687; Sun, 1 Apr 2012 21:13:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAB208FC14; Sun, 1 Apr 2012 21:13: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 q31LDDq8066307; Sun, 1 Apr 2012 21:13:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31LDDgB066304; Sun, 1 Apr 2012 21:13:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204012113.q31LDDgB066304@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 1 Apr 2012 21:13: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: r233765 - stable/8/sys/fs/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: Sun, 01 Apr 2012 21:13:14 -0000 Author: kib Date: Sun Apr 1 21:13:13 2012 New Revision: 233765 URL: http://svn.freebsd.org/changeset/base/233765 Log: MFC r233101: Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client behaviour on error from write RPC back to behaviour of old nfs client. When set to not zero, the pages for which write failed are kept dirty. Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c stable/8/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clbio.c Sun Apr 1 21:08:56 2012 (r233764) +++ stable/8/sys/fs/nfsclient/nfs_clbio.c Sun Apr 1 21:13:13 2012 (r233765) @@ -63,6 +63,7 @@ extern int ncl_numasync; extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON]; extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON]; extern int newnfs_directio_enable; +extern int newnfs_keep_dirty_on_error; int ncl_pbuf_freecnt = -1; /* start out unlimited */ @@ -338,9 +339,11 @@ ncl_putpages(struct vop_putpages_args *a pmap_qremove(kva, npages); relpbuf(bp, &ncl_pbuf_freecnt); - vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); - if (must_commit) - ncl_clearcommit(vp->v_mount); + if (error == 0 || !newnfs_keep_dirty_on_error) { + vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid); + if (must_commit) + ncl_clearcommit(vp->v_mount); + } return rtvals[0]; } Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 1 21:08:56 2012 (r233764) +++ stable/8/sys/fs/nfsclient/nfs_clvnops.c Sun Apr 1 21:13:13 2012 (r233765) @@ -222,6 +222,10 @@ int newnfs_directio_enable = 0; SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &newnfs_directio_enable, 0, "Enable NFS directio"); +int newnfs_keep_dirty_on_error; +SYSCTL_INT(_vfs_newnfs, OID_AUTO, nfs_keep_dirty_on_error, CTLFLAG_RW, + &newnfs_keep_dirty_on_error, 0, "Retry pageout if error returned"); + /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while From owner-svn-src-stable@FreeBSD.ORG Sun Apr 1 21:35: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 36D20106566C; Sun, 1 Apr 2012 21:35:35 +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 098988FC15; Sun, 1 Apr 2012 21:35: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 q31LZYmT067044; Sun, 1 Apr 2012 21:35:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q31LZYPF067042; Sun, 1 Apr 2012 21:35:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204012135.q31LZYPF067042@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 1 Apr 2012 21:35: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: r233766 - 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: Sun, 01 Apr 2012 21:35:35 -0000 Author: kib Date: Sun Apr 1 21:35:34 2012 New Revision: 233766 URL: http://svn.freebsd.org/changeset/base/233766 Log: MFC r232828: ELF image can have several PT_NOTE program headers. Look for the ELF brand note in each header, instead of using only first one. Modified: stable/8/sys/kern/imgact_elf.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/imgact_elf.c ============================================================================== --- stable/8/sys/kern/imgact_elf.c Sun Apr 1 21:13:13 2012 (r233765) +++ stable/8/sys/kern/imgact_elf.c Sun Apr 1 21:35:34 2012 (r233766) @@ -1395,32 +1395,14 @@ __elfN(putnote)(void *dst, size_t *off, *off += roundup2(note.n_descsz, sizeof(Elf_Size)); } -/* - * Try to find the appropriate ABI-note section for checknote, - * fetch the osreldate for binary from the ELF OSABI-note. Only the - * first page of the image is searched, the same as for headers. - */ static boolean_t -__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, - int32_t *osrel) +__elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel, const Elf_Phdr *pnote) { const Elf_Note *note, *note0, *note_end; - const Elf_Phdr *phdr, *pnote; - const Elf_Ehdr *hdr; const char *note_name; int i; - pnote = NULL; - hdr = (const Elf_Ehdr *)imgp->image_header; - phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); - - for (i = 0; i < hdr->e_phnum; i++) { - if (phdr[i].p_type == PT_NOTE) { - pnote = &phdr[i]; - break; - } - } - if (pnote == NULL || pnote->p_offset >= PAGE_SIZE || pnote->p_offset + pnote->p_filesz >= PAGE_SIZE) return (FALSE); @@ -1459,6 +1441,31 @@ nextnote: } /* + * Try to find the appropriate ABI-note section for checknote, + * fetch the osreldate for binary from the ELF OSABI-note. Only the + * first page of the image is searched, the same as for headers. + */ +static boolean_t +__elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote, + int32_t *osrel) +{ + const Elf_Phdr *phdr; + const Elf_Ehdr *hdr; + int i; + + hdr = (const Elf_Ehdr *)imgp->image_header; + phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff); + + for (i = 0; i < hdr->e_phnum; i++) { + if (phdr[i].p_type == PT_NOTE && + __elfN(parse_notes)(imgp, checknote, osrel, &phdr[i])) + return (TRUE); + } + return (FALSE); + +} + +/* * Tell kern_execve.c about it, with a little help from the linker. */ static struct execsw __elfN(execsw) = { From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 07:18:31 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 E54E7106566C; Mon, 2 Apr 2012 07:18:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D02D88FC14; Mon, 2 Apr 2012 07:18: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 q327IVIP086321; Mon, 2 Apr 2012 07:18:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q327IVAW086319; Mon, 2 Apr 2012 07:18:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201204020718.q327IVAW086319@svn.freebsd.org> From: Xin LI Date: Mon, 2 Apr 2012 07:18:31 +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: r233769 - stable/9/sys/fs/tmpfs 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, 02 Apr 2012 07:18:32 -0000 Author: delphij Date: Mon Apr 2 07:18:31 2012 New Revision: 233769 URL: http://svn.freebsd.org/changeset/base/233769 Log: MFC r227802: Improve the way to calculate available pages in tmpfs: - Don't deduct wired pages from total usable counts because it does not make any sense. To make things worse, on systems where swap size is smaller than physical memory and use a lot of wired pages (e.g. ZFS), tmpfs can suddenly have free space of 0 because of this; - Count cached pages as available; [1] - Don't count inactive pages as available, technically we could but that might be too aggressive; [1] [1] Suggested by kib@ Modified: stable/9/sys/fs/tmpfs/tmpfs.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs.h Mon Apr 2 02:22:22 2012 (r233768) +++ stable/9/sys/fs/tmpfs/tmpfs.h Mon Apr 2 07:18:31 2012 (r233769) @@ -502,11 +502,8 @@ int tmpfs_truncate(struct vnode *, off_t static __inline size_t tmpfs_mem_info(void) { - size_t size; - size = swap_pager_avail + cnt.v_free_count + cnt.v_inactive_count; - size -= size > cnt.v_wire_count ? cnt.v_wire_count : size; - return size; + return (swap_pager_avail + cnt.v_free_count + cnt.v_cache_count); } /* Returns the maximum size allowed for a tmpfs file system. This macro From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 10:24: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 4C29D106566B; Mon, 2 Apr 2012 10:24:51 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 375DC8FC08; Mon, 2 Apr 2012 10:24: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 q32AOpUU092190; Mon, 2 Apr 2012 10:24:51 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32AOppg092188; Mon, 2 Apr 2012 10:24:51 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201204021024.q32AOppg092188@svn.freebsd.org> From: Ivan Voras Date: Mon, 2 Apr 2012 10:24: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: r233772 - stable/9/etc 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, 02 Apr 2012 10:24:51 -0000 Author: ivoras Date: Mon Apr 2 10:24:50 2012 New Revision: 233772 URL: http://svn.freebsd.org/changeset/base/233772 Log: Merge r233506: MySQL port 3306 in /etc/services Modified: stable/9/etc/services Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/services ============================================================================== --- stable/9/etc/services Mon Apr 2 07:51:30 2012 (r233771) +++ stable/9/etc/services Mon Apr 2 10:24:50 2012 (r233772) @@ -2219,6 +2219,8 @@ iscsi-target 3260/tcp # iSCSI port iscsi-target 3260/udp # iSCSI port ccmail 3264/tcp #cc:mail/lotus ccmail 3264/udp #cc:mail/lotus +mysql 3306/tcp #MySQL +mysql 3306/udp #MySQL dec-notes 3333/tcp #DEC Notes dec-notes 3333/udp #DEC Notes rdp 3389/tcp #Microsoft Remote Desktop Protocol From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 11:27:21 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 BB858106564A; Mon, 2 Apr 2012 11:27:21 +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 6998A8FC1C; Mon, 2 Apr 2012 11:27: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 q32BRLHS096018; Mon, 2 Apr 2012 11:27:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32BRLbE096015; Mon, 2 Apr 2012 11:27:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204021127.q32BRLbE096015@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 2 Apr 2012 11:27: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: r233775 - in stable/9/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 11:27:21 -0000 Author: kib Date: Mon Apr 2 11:27:20 2012 New Revision: 233775 URL: http://svn.freebsd.org/changeset/base/233775 Log: MFC r233168: If we ever allow for managed fictitious pages, the pages shall be excluded from superpage promotions. At least one of the reason is that pv_table is sized for non-fictitious pages only. Consistently check for the page to be non-fictitious before accesing superpage pv list. MFC note: erronous chunks from r233168 which were fixed in r233185 are not included into the merge. Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Apr 2 10:50:42 2012 (r233774) +++ stable/9/sys/amd64/amd64/pmap.c Mon Apr 2 11:27:20 2012 (r233775) @@ -2338,7 +2338,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t mtx_assert(&vm_page_queue_mtx, MA_OWNED); pmap_pvh_free(&m->md, pmap, va); - if (TAILQ_EMPTY(&m->md.pv_list)) { + if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -2799,6 +2799,8 @@ pmap_remove_all(vm_page_t m) ("pmap_remove_all: page %p is not managed", m)); free = NULL; vm_page_lock_queues(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); @@ -2808,6 +2810,7 @@ pmap_remove_all(vm_page_t m) (void)pmap_demote_pde(pmap, pde, va); PMAP_UNLOCK(pmap); } +small_mappings: while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -3286,7 +3289,8 @@ validate: } if ((origpte & PG_MANAGED) != 0 && TAILQ_EMPTY(&om->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list)) + ((om->flags & PG_FICTITIOUS) != 0 || + TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) vm_page_aflag_clear(om, PGA_WRITEABLE); if (invlva) pmap_invalidate_page(pmap, va); @@ -3299,7 +3303,8 @@ validate: * populated, then attempt promotion. */ if ((mpte == NULL || mpte->wire_count == NPTEPG) && - pg_ps_enabled && vm_reserv_level_iffullpop(m) == 0) + pg_ps_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) pmap_promote_pde(pmap, pde, va); vm_page_unlock_queues(); @@ -3919,7 +3924,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p if (loops >= 16) break; } - if (!rv && loops < 16) { + if (!rv && loops < 16 && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { @@ -3951,7 +3956,10 @@ pmap_page_wired_mappings(vm_page_t m) return (count); vm_page_lock_queues(); count = pmap_pvh_wired_mappings(&m->md, count); - count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); + if ((m->flags & PG_FICTITIOUS) == 0) { + count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), + count); + } vm_page_unlock_queues(); return (count); } @@ -3993,7 +4001,8 @@ pmap_page_is_mapped(vm_page_t m) return (FALSE); vm_page_lock_queues(); rv = !TAILQ_EMPTY(&m->md.pv_list) || - !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); + ((m->flags & PG_FICTITIOUS) == 0 && + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); vm_page_unlock_queues(); return (rv); } @@ -4066,9 +4075,10 @@ pmap_remove_pages(pmap_t pmap) m, (uintmax_t)m->phys_addr, (uintmax_t)tpte)); - KASSERT(m < &vm_page_array[vm_page_array_size], - ("pmap_remove_pages: bad tpte %#jx", - (uintmax_t)tpte)); + KASSERT((m->flags & PG_FICTITIOUS) != 0 || + m < &vm_page_array[vm_page_array_size], + ("pmap_remove_pages: bad tpte %#jx", + (uintmax_t)tpte)); pte_clear(pte); @@ -4110,7 +4120,8 @@ pmap_remove_pages(pmap_t pmap) } else { pmap_resident_count_dec(pmap, 1); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list)) { + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -4161,7 +4172,8 @@ pmap_is_modified(vm_page_t m) return (FALSE); vm_page_lock_queues(); rv = pmap_is_modified_pvh(&m->md) || - pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))); + ((m->flags & PG_FICTITIOUS) == 0 && + pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); vm_page_unlock_queues(); return (rv); } @@ -4232,7 +4244,8 @@ pmap_is_referenced(vm_page_t m) ("pmap_is_referenced: page %p is not managed", m)); vm_page_lock_queues(); rv = pmap_is_referenced_pvh(&m->md) || - pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))); + ((m->flags & PG_FICTITIOUS) == 0 && + pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); vm_page_unlock_queues(); return (rv); } @@ -4289,6 +4302,8 @@ pmap_remove_write(vm_page_t m) (m->aflags & PGA_WRITEABLE) == 0) return; vm_page_lock_queues(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { pmap = PV_PMAP(pv); @@ -4299,6 +4314,7 @@ pmap_remove_write(vm_page_t m) (void)pmap_demote_pde(pmap, pde, va); PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4347,8 +4363,10 @@ pmap_ts_referenced(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_ts_referenced: page %p is not managed", m)); - pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); vm_page_lock_queues(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; + pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, pvn) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4379,6 +4397,7 @@ pmap_ts_referenced(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pvf = pv; do { @@ -4433,6 +4452,8 @@ pmap_clear_modify(vm_page_t m) if ((m->aflags & PGA_WRITEABLE) == 0) return; vm_page_lock_queues(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { pmap = PV_PMAP(pv); @@ -4465,6 +4486,7 @@ pmap_clear_modify(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4499,6 +4521,8 @@ pmap_clear_reference(vm_page_t m) KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("pmap_clear_reference: page %p is not managed", m)); vm_page_lock_queues(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { pmap = PV_PMAP(pv); @@ -4522,6 +4546,7 @@ pmap_clear_reference(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Apr 2 10:50:42 2012 (r233774) +++ stable/9/sys/i386/i386/pmap.c Mon Apr 2 11:27:20 2012 (r233775) @@ -2459,7 +2459,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t mtx_assert(&vm_page_queue_mtx, MA_OWNED); pmap_pvh_free(&m->md, pmap, va); - if (TAILQ_EMPTY(&m->md.pv_list)) { + if (TAILQ_EMPTY(&m->md.pv_list) && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -2933,6 +2933,8 @@ pmap_remove_all(vm_page_t m) free = NULL; vm_page_lock_queues(); sched_pin(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { va = pv->pv_va; @@ -2942,6 +2944,7 @@ pmap_remove_all(vm_page_t m) (void)pmap_demote_pde(pmap, pde, va); PMAP_UNLOCK(pmap); } +small_mappings: while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -3457,7 +3460,8 @@ validate: } if ((origpte & PG_MANAGED) != 0 && TAILQ_EMPTY(&om->md.pv_list) && - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list)) + ((om->flags & PG_FICTITIOUS) != 0 || + TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) vm_page_aflag_clear(om, PGA_WRITEABLE); if (invlva) pmap_invalidate_page(pmap, va); @@ -3470,7 +3474,8 @@ validate: * populated, then attempt promotion. */ if ((mpte == NULL || mpte->wire_count == NPTEPG) && - pg_ps_enabled && vm_reserv_level_iffullpop(m) == 0) + pg_ps_enabled && (m->flags & PG_FICTITIOUS) == 0 && + vm_reserv_level_iffullpop(m) == 0) pmap_promote_pde(pmap, pde, va); sched_unpin(); @@ -4110,7 +4115,7 @@ pmap_page_exists_quick(pmap_t pmap, vm_p if (loops >= 16) break; } - if (!rv && loops < 16) { + if (!rv && loops < 16 && (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH(pv, &pvh->pv_list, pv_list) { if (PV_PMAP(pv) == pmap) { @@ -4142,7 +4147,10 @@ pmap_page_wired_mappings(vm_page_t m) return (count); vm_page_lock_queues(); count = pmap_pvh_wired_mappings(&m->md, count); - count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count); + if ((m->flags & PG_FICTITIOUS) == 0) { + count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), + count); + } vm_page_unlock_queues(); return (count); } @@ -4186,7 +4194,8 @@ pmap_page_is_mapped(vm_page_t m) return (FALSE); vm_page_lock_queues(); rv = !TAILQ_EMPTY(&m->md.pv_list) || - !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); + ((m->flags & PG_FICTITIOUS) == 0 && + !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list)); vm_page_unlock_queues(); return (rv); } @@ -4259,9 +4268,10 @@ pmap_remove_pages(pmap_t pmap) m, (uintmax_t)m->phys_addr, (uintmax_t)tpte)); - KASSERT(m < &vm_page_array[vm_page_array_size], - ("pmap_remove_pages: bad tpte %#jx", - (uintmax_t)tpte)); + KASSERT((m->flags & PG_FICTITIOUS) != 0 || + m < &vm_page_array[vm_page_array_size], + ("pmap_remove_pages: bad tpte %#jx", + (uintmax_t)tpte)); pte_clear(pte); @@ -4303,7 +4313,8 @@ pmap_remove_pages(pmap_t pmap) } else { pmap->pm_stats.resident_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - if (TAILQ_EMPTY(&m->md.pv_list)) { + if (TAILQ_EMPTY(&m->md.pv_list) && + (m->flags & PG_FICTITIOUS) == 0) { pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); if (TAILQ_EMPTY(&pvh->pv_list)) vm_page_aflag_clear(m, PGA_WRITEABLE); @@ -4356,7 +4367,8 @@ pmap_is_modified(vm_page_t m) return (FALSE); vm_page_lock_queues(); rv = pmap_is_modified_pvh(&m->md) || - pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))); + ((m->flags & PG_FICTITIOUS) == 0 && + pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); vm_page_unlock_queues(); return (rv); } @@ -4429,7 +4441,8 @@ pmap_is_referenced(vm_page_t m) ("pmap_is_referenced: page %p is not managed", m)); vm_page_lock_queues(); rv = pmap_is_referenced_pvh(&m->md) || - pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))); + ((m->flags & PG_FICTITIOUS) == 0 && + pmap_is_referenced_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)))); vm_page_unlock_queues(); return (rv); } @@ -4489,6 +4502,8 @@ pmap_remove_write(vm_page_t m) return; vm_page_lock_queues(); sched_pin(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { va = pv->pv_va; @@ -4499,6 +4514,7 @@ pmap_remove_write(vm_page_t m) (void)pmap_demote_pde(pmap, pde, va); PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4556,6 +4572,8 @@ pmap_ts_referenced(vm_page_t m) pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); vm_page_lock_queues(); sched_pin(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, pvn) { va = pv->pv_va; pmap = PV_PMAP(pv); @@ -4586,6 +4604,7 @@ pmap_ts_referenced(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { pvf = pv; do { @@ -4642,6 +4661,8 @@ pmap_clear_modify(vm_page_t m) return; vm_page_lock_queues(); sched_pin(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { va = pv->pv_va; @@ -4679,6 +4700,7 @@ pmap_clear_modify(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); @@ -4720,6 +4742,8 @@ pmap_clear_reference(vm_page_t m) ("pmap_clear_reference: page %p is not managed", m)); vm_page_lock_queues(); sched_pin(); + if ((m->flags & PG_FICTITIOUS) != 0) + goto small_mappings; pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m)); TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) { va = pv->pv_va; @@ -4743,6 +4767,7 @@ pmap_clear_reference(vm_page_t m) } PMAP_UNLOCK(pmap); } +small_mappings: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { pmap = PV_PMAP(pv); PMAP_LOCK(pmap); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 12:00: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 14DC31065689; Mon, 2 Apr 2012 12:00:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E7F8FC0A; Mon, 2 Apr 2012 12:00: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 q32C0ZWQ097242; Mon, 2 Apr 2012 12:00:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32C0ZEU097240; Mon, 2 Apr 2012 12:00:35 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204021200.q32C0ZEU097240@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 2 Apr 2012 12:00:35 +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: r233779 - stable/9/sys/powerpc/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, 02 Apr 2012 12:00:36 -0000 Author: nwhitehorn Date: Mon Apr 2 12:00:35 2012 New Revision: 233779 URL: http://svn.freebsd.org/changeset/base/233779 Log: Turn off WITNESS, etc. for GENERIC64. This was missed in the stable/9 branch in r226405. Modified: stable/9/sys/powerpc/conf/GENERIC64 Modified: stable/9/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/9/sys/powerpc/conf/GENERIC64 Mon Apr 2 11:59:13 2012 (r233778) +++ stable/9/sys/powerpc/conf/GENERIC64 Mon Apr 2 12:00:35 2012 (r233779) @@ -66,16 +66,8 @@ options HWPMC_HOOKS # Necessary kernel options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel - -# Debugging for use in -current -options KDB #Enable the kernel debugger -options DDB #Support DDB -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS #Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed -options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options KDB # Kernel debugger related code +options KDB_TRACE # Print a stack trace for a panic # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 14:52:29 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 237DD106566B; Mon, 2 Apr 2012 14:52:29 +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 0DECE8FC1D; Mon, 2 Apr 2012 14:52:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32EqSiV002589; Mon, 2 Apr 2012 14:52:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32EqSoe002585; Mon, 2 Apr 2012 14:52:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204021452.q32EqSoe002585@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 14:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233780 - in stable/7/sys: amd64/amd64 amd64/conf 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, 02 Apr 2012 14:52:29 -0000 Author: jhb Date: Mon Apr 2 14:52:28 2012 New Revision: 233780 URL: http://svn.freebsd.org/changeset/base/233780 Log: MFC 233256: Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no longer serve any purpose. Modified: stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/conf/NOTES stable/7/sys/conf/options.amd64 Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Mon Apr 2 12:00:35 2012 (r233779) +++ stable/7/sys/amd64/amd64/pmap.c Mon Apr 2 14:52:28 2012 (r233780) @@ -106,7 +106,6 @@ __FBSDID("$FreeBSD$"); */ #include "opt_msgbuf.h" -#include "opt_pmap.h" #include "opt_vm.h" #include @@ -148,10 +147,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#ifndef PMAP_SHPGPERPROC -#define PMAP_SHPGPERPROC 200 -#endif - #if !defined(DIAGNOSTIC) #define PMAP_INLINE __gnu89_inline #else @@ -195,9 +190,8 @@ static u_int64_t DMPDPphys; /* phys addr /* * Data for the pv entry allocation mechanism */ -static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; +static int pv_entry_count; static struct md_page *pv_table; -static int shpgperproc = PMAP_SHPGPERPROC; /* * All those kernel PT submaps that BSD is so fond of @@ -212,7 +206,7 @@ struct msgbuf *msgbufp = 0; static caddr_t crashdumpmap; static void free_pv_entry(pmap_t pmap, pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); +static pv_entry_t get_pv_entry(pmap_t locked_pmap, boolean_t try); static void pmap_pv_demote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static boolean_t pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); static void pmap_pv_promote_pde(pmap_t pmap, vm_offset_t va, vm_paddr_t pa); @@ -651,16 +645,6 @@ pmap_init(void) } /* - * Initialize the address space (zone) for the pv entries. Set a - * high water mark so that the system can recover from excessive - * numbers of pv entries. - */ - TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); - pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); - pv_entry_high_water = 9 * (pv_entry_max / 10); - - /* * If the kernel is running in a virtual machine on an AMD Family 10h * processor, then it must assume that MCA is enabled by the virtual * machine monitor. @@ -695,36 +679,6 @@ pmap_init(void) TAILQ_INIT(&pv_table[i].pv_list); } -static int -pmap_pventry_proc(SYSCTL_HANDLER_ARGS) -{ - int error; - - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0 && req->newptr) { - shpgperproc = (pv_entry_max - cnt.v_page_count) / maxproc; - pv_entry_high_water = 9 * (pv_entry_max / 10); - } - return (error); -} -SYSCTL_PROC(_vm_pmap, OID_AUTO, pv_entry_max, CTLTYPE_INT|CTLFLAG_RW, - &pv_entry_max, 0, pmap_pventry_proc, "IU", "Max number of PV entries"); - -static int -pmap_shpgperproc_proc(SYSCTL_HANDLER_ARGS) -{ - int error; - - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0 && req->newptr) { - pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; - pv_entry_high_water = 9 * (pv_entry_max / 10); - } - return (error); -} -SYSCTL_PROC(_vm_pmap, OID_AUTO, shpgperproc, CTLTYPE_INT|CTLFLAG_RW, - &shpgperproc, 0, pmap_shpgperproc_proc, "IU", "Page share factor per proc"); - SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0, "2MB page mapping counters"); @@ -2071,10 +2025,8 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv * when needed. */ static pv_entry_t -get_pv_entry(pmap_t pmap, int try) +get_pv_entry(pmap_t pmap, boolean_t try) { - static const struct timeval printinterval = { 60, 0 }; - static struct timeval lastprint; static vm_pindex_t colour; struct vpgqueues *pq; int bit, field; @@ -2085,12 +2037,6 @@ get_pv_entry(pmap_t pmap, int try) PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); PV_STAT(pv_entry_allocs++); - pv_entry_count++; - if (pv_entry_count > pv_entry_high_water) - if (ratecheck(&lastprint, &printinterval)) - printf("Approaching the limit on PV entries, consider " - "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entry_max sysctl.\n"); pq = NULL; retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); @@ -2108,8 +2054,10 @@ retry: if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 && pc->pc_map[2] == 0) { TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, + pc_list); } + pv_entry_count++; PV_STAT(pv_entry_spare--); return (pv); } @@ -2120,7 +2068,6 @@ retry: VM_ALLOC_WIRED); if (m == NULL) { if (try) { - pv_entry_count--; PV_STAT(pc_chunk_tryfail++); return (NULL); } @@ -2136,7 +2083,7 @@ retry: PV_STAT(pmap_collect_active++); pq = &vm_page_queues[PQ_ACTIVE]; } else - panic("get_pv_entry: increase vm.pmap.shpgperproc"); + panic("get_pv_entry: allocation failed"); pmap_collect(pmap, pq); goto retry; } @@ -2151,6 +2098,7 @@ retry: pc->pc_map[2] = PC_FREE2; pv = &pc->pc_pventry[0]; TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + pv_entry_count++; PV_STAT(pv_entry_spare += _NPCPV - 1); return (pv); } @@ -2308,8 +2256,7 @@ pmap_try_insert_pv_entry(pmap_t pmap, vm PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (pv_entry_count < pv_entry_high_water && - (pv = get_pv_entry(pmap, TRUE)) != NULL) { + if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); return (TRUE); @@ -2327,8 +2274,7 @@ pmap_pv_insert_pde(pmap_t pmap, vm_offse pv_entry_t pv; mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (pv_entry_count < pv_entry_high_water && - (pv = get_pv_entry(pmap, TRUE)) != NULL) { + if ((pv = get_pv_entry(pmap, TRUE)) != NULL) { pv->pv_va = va; pvh = pa_to_pvh(pa); TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_list); Modified: stable/7/sys/amd64/conf/NOTES ============================================================================== --- stable/7/sys/amd64/conf/NOTES Mon Apr 2 12:00:35 2012 (r233779) +++ stable/7/sys/amd64/conf/NOTES Mon Apr 2 14:52:28 2012 (r233780) @@ -593,19 +593,6 @@ device cpuctl # options ENABLE_ALART # Control alarm on Intel intpm driver -# -# Set the number of PV entries per process. Increasing this can -# stop panics related to heavy use of shared memory. However, that can -# (combined with large amounts of physical memory) cause panics at -# boot time due the kernel running out of VM space. -# -# If you're tweaking this, you might also want to increase the sysctls -# "vm.v_free_min", "vm.v_free_reserved", and "vm.v_free_target". -# -# The value below is the one more than the default. -# -options PMAP_SHPGPERPROC=201 - ##################################################################### # ABI Emulation Modified: stable/7/sys/conf/options.amd64 ============================================================================== --- stable/7/sys/conf/options.amd64 Mon Apr 2 12:00:35 2012 (r233779) +++ stable/7/sys/conf/options.amd64 Mon Apr 2 14:52:28 2012 (r233780) @@ -5,7 +5,6 @@ AUTO_EOI_1 opt_auto_eoi.h AUTO_EOI_2 opt_auto_eoi.h MAXMEM PERFMON -PMAP_SHPGPERPROC opt_pmap.h MP_WATCHDOG # Options for emulators. These should only be used at config time, so From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:30: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 0AB961065672; Mon, 2 Apr 2012 16:30:14 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E90CC8FC15; Mon, 2 Apr 2012 16:30: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 q32GUDVX005834; Mon, 2 Apr 2012 16:30:13 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GUDIY005830; Mon, 2 Apr 2012 16:30:13 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021630.q32GUDIY005830@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:30: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: r233784 - stable/9/sys/dev/isci 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, 02 Apr 2012 16:30:14 -0000 Author: jimharris Date: Mon Apr 2 16:30:13 2012 New Revision: 233784 URL: http://svn.freebsd.org/changeset/base/233784 Log: MFC r233622: Ensure consistent target IDs for direct-attached devices. Sponsored by: Intel Reported by: sbruno, Ravi Pokala Tested by: Ravi Pokala Approved by: sbruno Modified: stable/9/sys/dev/isci/isci.h stable/9/sys/dev/isci/isci_controller.c stable/9/sys/dev/isci/isci_domain.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/isci/isci.h ============================================================================== --- stable/9/sys/dev/isci/isci.h Mon Apr 2 16:26:32 2012 (r233783) +++ stable/9/sys/dev/isci/isci.h Mon Apr 2 16:30:13 2012 (r233784) @@ -89,10 +89,10 @@ struct ISCI_REMOTE_DEVICE { }; struct ISCI_DOMAIN { - struct ISCI_CONTROLLER *controller; - SCI_DOMAIN_HANDLE_T sci_object; - uint8_t index; - + struct ISCI_CONTROLLER *controller; + SCI_DOMAIN_HANDLE_T sci_object; + uint8_t index; + struct ISCI_REMOTE_DEVICE *da_remote_device; }; struct ISCI_MEMORY Modified: stable/9/sys/dev/isci/isci_controller.c ============================================================================== --- stable/9/sys/dev/isci/isci_controller.c Mon Apr 2 16:26:32 2012 (r233783) +++ stable/9/sys/dev/isci/isci_controller.c Mon Apr 2 16:30:13 2012 (r233784) @@ -430,7 +430,18 @@ int isci_controller_allocate_memory(stru remote_device->frozen_lun_mask = 0; sci_fast_list_element_init(remote_device, &remote_device->pending_device_reset_element); - sci_pool_put(controller->remote_device_pool, remote_device); + + /* + * For the first SCI_MAX_DOMAINS device objects, do not put + * them in the pool, rather assign them to each domain. This + * ensures that any device attached directly to port "i" will + * always get CAM target id "i". + */ + if (i < SCI_MAX_DOMAINS) + controller->domain[i].da_remote_device = remote_device; + else + sci_pool_put(controller->remote_device_pool, + remote_device); remote_device_memory_ptr += remote_device_size; } Modified: stable/9/sys/dev/isci/isci_domain.c ============================================================================== --- stable/9/sys/dev/isci/isci_domain.c Mon Apr 2 16:26:32 2012 (r233783) +++ stable/9/sys/dev/isci/isci_domain.c Mon Apr 2 16:30:13 2012 (r233784) @@ -202,10 +202,14 @@ scif_cb_domain_da_device_added(SCI_CONTR struct ISCI_REMOTE_DEVICE *remote_device; struct ISCI_DOMAIN *isci_domain = (struct ISCI_DOMAIN *)sci_object_get_association(domain); - struct ISCI_CONTROLLER *isci_controller = - (struct ISCI_CONTROLLER *)sci_object_get_association(controller); - sci_pool_get(isci_controller->remote_device_pool, remote_device); + /* + * For direct-attached devices, do not pull the device object from + * the pool. Rather, use the one stored in the domain object which + * will ensure that we always get consistent target ids for direct + * attached devices. + */ + remote_device = isci_domain->da_remote_device; scif_remote_device_construct(domain, (uint8_t*)remote_device + sizeof(struct ISCI_REMOTE_DEVICE), @@ -287,6 +291,8 @@ scif_cb_domain_device_removed(SCI_CONTRO { struct ISCI_REMOTE_DEVICE *isci_remote_device = (struct ISCI_REMOTE_DEVICE *)sci_object_get_association(remote_device); + struct ISCI_DOMAIN *isci_domain = + (struct ISCI_DOMAIN *)sci_object_get_association(domain); struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *)sci_object_get_association(controller); uint32_t path = cam_sim_path(isci_controller->sim); @@ -301,7 +307,13 @@ scif_cb_domain_device_removed(SCI_CONTRO scif_remote_device_destruct(remote_device); - sci_pool_put(isci_controller->remote_device_pool, isci_remote_device); + /* + * Only put the remote device back into the pool if it was an + * expander-attached device. + */ + if (isci_remote_device != isci_domain->da_remote_device) + sci_pool_put(isci_controller->remote_device_pool, + isci_remote_device); } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:31: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 85CFA106564A; Mon, 2 Apr 2012 16:31:54 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70C018FC14; Mon, 2 Apr 2012 16:31: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 q32GVsVR005919; Mon, 2 Apr 2012 16:31:54 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GVsFY005915; Mon, 2 Apr 2012 16:31:54 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021631.q32GVsFY005915@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:31: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: r233785 - stable/8/sys/dev/isci 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, 02 Apr 2012 16:31:54 -0000 Author: jimharris Date: Mon Apr 2 16:31:53 2012 New Revision: 233785 URL: http://svn.freebsd.org/changeset/base/233785 Log: MFC r233622: Ensure consistent target IDs for direct-attached devices. Sponsored by: Intel Reported by: sbruno, Ravi Pokala Tested by: Ravi Pokala Approved by: sbruno Modified: stable/8/sys/dev/isci/isci.h stable/8/sys/dev/isci/isci_controller.c stable/8/sys/dev/isci/isci_domain.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/isci/isci.h ============================================================================== --- stable/8/sys/dev/isci/isci.h Mon Apr 2 16:30:13 2012 (r233784) +++ stable/8/sys/dev/isci/isci.h Mon Apr 2 16:31:53 2012 (r233785) @@ -89,10 +89,10 @@ struct ISCI_REMOTE_DEVICE { }; struct ISCI_DOMAIN { - struct ISCI_CONTROLLER *controller; - SCI_DOMAIN_HANDLE_T sci_object; - uint8_t index; - + struct ISCI_CONTROLLER *controller; + SCI_DOMAIN_HANDLE_T sci_object; + uint8_t index; + struct ISCI_REMOTE_DEVICE *da_remote_device; }; struct ISCI_MEMORY Modified: stable/8/sys/dev/isci/isci_controller.c ============================================================================== --- stable/8/sys/dev/isci/isci_controller.c Mon Apr 2 16:30:13 2012 (r233784) +++ stable/8/sys/dev/isci/isci_controller.c Mon Apr 2 16:31:53 2012 (r233785) @@ -430,7 +430,18 @@ int isci_controller_allocate_memory(stru remote_device->frozen_lun_mask = 0; sci_fast_list_element_init(remote_device, &remote_device->pending_device_reset_element); - sci_pool_put(controller->remote_device_pool, remote_device); + + /* + * For the first SCI_MAX_DOMAINS device objects, do not put + * them in the pool, rather assign them to each domain. This + * ensures that any device attached directly to port "i" will + * always get CAM target id "i". + */ + if (i < SCI_MAX_DOMAINS) + controller->domain[i].da_remote_device = remote_device; + else + sci_pool_put(controller->remote_device_pool, + remote_device); remote_device_memory_ptr += remote_device_size; } Modified: stable/8/sys/dev/isci/isci_domain.c ============================================================================== --- stable/8/sys/dev/isci/isci_domain.c Mon Apr 2 16:30:13 2012 (r233784) +++ stable/8/sys/dev/isci/isci_domain.c Mon Apr 2 16:31:53 2012 (r233785) @@ -202,10 +202,14 @@ scif_cb_domain_da_device_added(SCI_CONTR struct ISCI_REMOTE_DEVICE *remote_device; struct ISCI_DOMAIN *isci_domain = (struct ISCI_DOMAIN *)sci_object_get_association(domain); - struct ISCI_CONTROLLER *isci_controller = - (struct ISCI_CONTROLLER *)sci_object_get_association(controller); - sci_pool_get(isci_controller->remote_device_pool, remote_device); + /* + * For direct-attached devices, do not pull the device object from + * the pool. Rather, use the one stored in the domain object which + * will ensure that we always get consistent target ids for direct + * attached devices. + */ + remote_device = isci_domain->da_remote_device; scif_remote_device_construct(domain, (uint8_t*)remote_device + sizeof(struct ISCI_REMOTE_DEVICE), @@ -287,6 +291,8 @@ scif_cb_domain_device_removed(SCI_CONTRO { struct ISCI_REMOTE_DEVICE *isci_remote_device = (struct ISCI_REMOTE_DEVICE *)sci_object_get_association(remote_device); + struct ISCI_DOMAIN *isci_domain = + (struct ISCI_DOMAIN *)sci_object_get_association(domain); struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *)sci_object_get_association(controller); uint32_t path = cam_sim_path(isci_controller->sim); @@ -301,7 +307,13 @@ scif_cb_domain_device_removed(SCI_CONTRO scif_remote_device_destruct(remote_device); - sci_pool_put(isci_controller->remote_device_pool, isci_remote_device); + /* + * Only put the remote device back into the pool if it was an + * expander-attached device. + */ + if (isci_remote_device != isci_domain->da_remote_device) + sci_pool_put(isci_controller->remote_device_pool, + isci_remote_device); } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:33: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 264BC106564A; Mon, 2 Apr 2012 16:33:08 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 108208FC0C; Mon, 2 Apr 2012 16:33: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 q32GX7F6006008; Mon, 2 Apr 2012 16:33:07 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GX7pp006004; Mon, 2 Apr 2012 16:33:07 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021633.q32GX7pp006004@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:33:07 +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: r233786 - stable/7/sys/dev/isci 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, 02 Apr 2012 16:33:08 -0000 Author: jimharris Date: Mon Apr 2 16:33:07 2012 New Revision: 233786 URL: http://svn.freebsd.org/changeset/base/233786 Log: MFC r233622: Ensure consistent target IDs for direct-attached devices. Sponsored by: Intel Reported by: sbruno, Ravi Pokala Tested by: Ravi Pokala Approved by: sbruno Modified: stable/7/sys/dev/isci/isci.h stable/7/sys/dev/isci/isci_controller.c stable/7/sys/dev/isci/isci_domain.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/isci/isci.h ============================================================================== --- stable/7/sys/dev/isci/isci.h Mon Apr 2 16:31:53 2012 (r233785) +++ stable/7/sys/dev/isci/isci.h Mon Apr 2 16:33:07 2012 (r233786) @@ -89,10 +89,10 @@ struct ISCI_REMOTE_DEVICE { }; struct ISCI_DOMAIN { - struct ISCI_CONTROLLER *controller; - SCI_DOMAIN_HANDLE_T sci_object; - uint8_t index; - + struct ISCI_CONTROLLER *controller; + SCI_DOMAIN_HANDLE_T sci_object; + uint8_t index; + struct ISCI_REMOTE_DEVICE *da_remote_device; }; struct ISCI_MEMORY Modified: stable/7/sys/dev/isci/isci_controller.c ============================================================================== --- stable/7/sys/dev/isci/isci_controller.c Mon Apr 2 16:31:53 2012 (r233785) +++ stable/7/sys/dev/isci/isci_controller.c Mon Apr 2 16:33:07 2012 (r233786) @@ -430,7 +430,18 @@ int isci_controller_allocate_memory(stru remote_device->frozen_lun_mask = 0; sci_fast_list_element_init(remote_device, &remote_device->pending_device_reset_element); - sci_pool_put(controller->remote_device_pool, remote_device); + + /* + * For the first SCI_MAX_DOMAINS device objects, do not put + * them in the pool, rather assign them to each domain. This + * ensures that any device attached directly to port "i" will + * always get CAM target id "i". + */ + if (i < SCI_MAX_DOMAINS) + controller->domain[i].da_remote_device = remote_device; + else + sci_pool_put(controller->remote_device_pool, + remote_device); remote_device_memory_ptr += remote_device_size; } Modified: stable/7/sys/dev/isci/isci_domain.c ============================================================================== --- stable/7/sys/dev/isci/isci_domain.c Mon Apr 2 16:31:53 2012 (r233785) +++ stable/7/sys/dev/isci/isci_domain.c Mon Apr 2 16:33:07 2012 (r233786) @@ -202,10 +202,14 @@ scif_cb_domain_da_device_added(SCI_CONTR struct ISCI_REMOTE_DEVICE *remote_device; struct ISCI_DOMAIN *isci_domain = (struct ISCI_DOMAIN *)sci_object_get_association(domain); - struct ISCI_CONTROLLER *isci_controller = - (struct ISCI_CONTROLLER *)sci_object_get_association(controller); - sci_pool_get(isci_controller->remote_device_pool, remote_device); + /* + * For direct-attached devices, do not pull the device object from + * the pool. Rather, use the one stored in the domain object which + * will ensure that we always get consistent target ids for direct + * attached devices. + */ + remote_device = isci_domain->da_remote_device; scif_remote_device_construct(domain, (uint8_t*)remote_device + sizeof(struct ISCI_REMOTE_DEVICE), @@ -287,6 +291,8 @@ scif_cb_domain_device_removed(SCI_CONTRO { struct ISCI_REMOTE_DEVICE *isci_remote_device = (struct ISCI_REMOTE_DEVICE *)sci_object_get_association(remote_device); + struct ISCI_DOMAIN *isci_domain = + (struct ISCI_DOMAIN *)sci_object_get_association(domain); struct ISCI_CONTROLLER *isci_controller = (struct ISCI_CONTROLLER *)sci_object_get_association(controller); uint32_t path = cam_sim_path(isci_controller->sim); @@ -301,7 +307,13 @@ scif_cb_domain_device_removed(SCI_CONTRO scif_remote_device_destruct(remote_device); - sci_pool_put(isci_controller->remote_device_pool, isci_remote_device); + /* + * Only put the remote device back into the pool if it was an + * expander-attached device. + */ + if (isci_remote_device != isci_domain->da_remote_device) + sci_pool_put(isci_controller->remote_device_pool, + isci_remote_device); } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:35: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 6B9B5106566C; Mon, 2 Apr 2012 16:35:43 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5608D8FC16; Mon, 2 Apr 2012 16:35: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 q32GZhpp006202; Mon, 2 Apr 2012 16:35:43 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GZhX1006200; Mon, 2 Apr 2012 16:35:43 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021635.q32GZhX1006200@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:35: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: r233788 - stable/9/sys/dev/isci/scil 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, 02 Apr 2012 16:35:43 -0000 Author: jimharris Date: Mon Apr 2 16:35:42 2012 New Revision: 233788 URL: http://svn.freebsd.org/changeset/base/233788 Log: MFC r233663: Fix bug where isci(4) would report only 15 bytes of returned data on a READ_CAP_16 command to a SATA target. Sponsored by: Intel Approved by: sbruno Modified: stable/9/sys/dev/isci/scil/sati_read_capacity.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/isci/scil/sati_read_capacity.c ============================================================================== --- stable/9/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:33:21 2012 (r233787) +++ stable/9/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:35:42 2012 (r233788) @@ -308,6 +308,10 @@ void sati_read_capacity_16_translate_dat sati_set_data_byte(sequence, scsi_io, 10, (U8)((sector_size >> 8) & 0xFF)); sati_set_data_byte(sequence, scsi_io, 11, (U8)(sector_size & 0xFF)); + //Explicitly set byte 12 to 0. SATI requires that all bytes in the data + //response be explicitly set to some value. + sati_set_data_byte(sequence, scsi_io, 12, 0); + //Check Bit 13 of ATA_IDENTIFY_DEVICE_DATA physical_logical_sector_info //(Word 106) is enabled physical_per_logical_enable_bit = (identify_device_data->physical_logical_sector_info From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:36:45 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 1362A106566C; Mon, 2 Apr 2012 16:36:45 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F19BB8FC1F; Mon, 2 Apr 2012 16:36:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32Gair3006278; Mon, 2 Apr 2012 16:36:44 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32Gai5M006276; Mon, 2 Apr 2012 16:36:44 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021636.q32Gai5M006276@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233789 - stable/8/sys/dev/isci/scil 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, 02 Apr 2012 16:36:45 -0000 Author: jimharris Date: Mon Apr 2 16:36:44 2012 New Revision: 233789 URL: http://svn.freebsd.org/changeset/base/233789 Log: MFC r233663: Fix bug where isci(4) would report only 15 bytes of returned data on a READ_CAP_16 comnmand to a SATA target. Sponsored by: Intel Approved by: sbruno Modified: stable/8/sys/dev/isci/scil/sati_read_capacity.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/isci/scil/sati_read_capacity.c ============================================================================== --- stable/8/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:35:42 2012 (r233788) +++ stable/8/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:36:44 2012 (r233789) @@ -308,6 +308,10 @@ void sati_read_capacity_16_translate_dat sati_set_data_byte(sequence, scsi_io, 10, (U8)((sector_size >> 8) & 0xFF)); sati_set_data_byte(sequence, scsi_io, 11, (U8)(sector_size & 0xFF)); + //Explicitly set byte 12 to 0. SATI requires that all bytes in the data + //response be explicitly set to some value. + sati_set_data_byte(sequence, scsi_io, 12, 0); + //Check Bit 13 of ATA_IDENTIFY_DEVICE_DATA physical_logical_sector_info //(Word 106) is enabled physical_per_logical_enable_bit = (identify_device_data->physical_logical_sector_info From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:37: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 EB5D7106564A; Mon, 2 Apr 2012 16:37:46 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D68508FC19; Mon, 2 Apr 2012 16:37: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 q32Gbk5Z006345; Mon, 2 Apr 2012 16:37:46 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GbkLw006343; Mon, 2 Apr 2012 16:37:46 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201204021637.q32GbkLw006343@svn.freebsd.org> From: Jim Harris Date: Mon, 2 Apr 2012 16:37:46 +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: r233790 - stable/7/sys/dev/isci/scil 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, 02 Apr 2012 16:37:47 -0000 Author: jimharris Date: Mon Apr 2 16:37:46 2012 New Revision: 233790 URL: http://svn.freebsd.org/changeset/base/233790 Log: MFC r233663: Fix bug where isci(4) would report only 15 bytes of returned data on a READ_CAP_16 command to a SATA target. Sponsored by: Intel Approved by: sbruno Modified: stable/7/sys/dev/isci/scil/sati_read_capacity.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/isci/scil/sati_read_capacity.c ============================================================================== --- stable/7/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:36:44 2012 (r233789) +++ stable/7/sys/dev/isci/scil/sati_read_capacity.c Mon Apr 2 16:37:46 2012 (r233790) @@ -308,6 +308,10 @@ void sati_read_capacity_16_translate_dat sati_set_data_byte(sequence, scsi_io, 10, (U8)((sector_size >> 8) & 0xFF)); sati_set_data_byte(sequence, scsi_io, 11, (U8)(sector_size & 0xFF)); + //Explicitly set byte 12 to 0. SATI requires that all bytes in the data + //response be explicitly set to some value. + sati_set_data_byte(sequence, scsi_io, 12, 0); + //Check Bit 13 of ATA_IDENTIFY_DEVICE_DATA physical_logical_sector_info //(Word 106) is enabled physical_per_logical_enable_bit = (identify_device_data->physical_logical_sector_info From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 16:50: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 88568106564A; Mon, 2 Apr 2012 16:50:49 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 596608FC15; Mon, 2 Apr 2012 16:50: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 q32GonMD006784; Mon, 2 Apr 2012 16:50:49 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32GonwN006782; Mon, 2 Apr 2012 16:50:49 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201204021650.q32GonwN006782@svn.freebsd.org> From: "Justin T. Gibbs" Date: Mon, 2 Apr 2012 16:50: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: r233791 - stable/8/sys/dev/xen/blkfront 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, 02 Apr 2012 16:50:49 -0000 Author: gibbs Date: Mon Apr 2 16:50:48 2012 New Revision: 233791 URL: http://svn.freebsd.org/changeset/base/233791 Log: MFC Revision 233465 Correct failure to attach the PV block front device on Citrix XenServer configurations that advertise the multi-page ring extension, but only allow a single page of ring space. sys/dev/xen/blkfront/blkfront.c: If only one page of ring space is being used, do not publish in the XenStore the number of pages in use (1), via either of the supported multi-page ring extension schemes. Single page operation is the same with or without the ring-page extension being negotiated. Relying on the legacy behavior avoids an incompatible difference in how the two ring-page extension schemes that are out in the wild deal with the base case of a single page. The Amazon/Red Hat drivers use the same XenStore variable as if the extension was not negotiated. The Citrix drivers assume the new ring reference XenStore variables will be available. Reported by: Oliver Schonefeld Modified: stable/8/sys/dev/xen/blkfront/blkfront.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/8/sys/dev/xen/blkfront/blkfront.c Mon Apr 2 16:37:46 2012 (r233790) +++ stable/8/sys/dev/xen/blkfront/blkfront.c Mon Apr 2 16:50:48 2012 (r233791) @@ -698,21 +698,25 @@ blkfront_initialize(struct xb_softc *sc) return; /* Support both backend schemes for relaying ring page limits. */ - error = xs_printf(XST_NIL, node_path, - "num-ring-pages","%u", sc->ring_pages); - if (error) { - xenbus_dev_fatal(sc->xb_dev, error, - "writing %s/num-ring-pages", - node_path); - return; - } - error = xs_printf(XST_NIL, node_path, - "ring-page-order","%u", fls(sc->ring_pages) - 1); - if (error) { - xenbus_dev_fatal(sc->xb_dev, error, - "writing %s/ring-page-order", - node_path); - return; + if (sc->ring_pages > 1) { + error = xs_printf(XST_NIL, node_path, + "num-ring-pages","%u", sc->ring_pages); + if (error) { + xenbus_dev_fatal(sc->xb_dev, error, + "writing %s/num-ring-pages", + node_path); + return; + } + + error = xs_printf(XST_NIL, node_path, + "ring-page-order", "%u", + fls(sc->ring_pages) - 1); + if (error) { + xenbus_dev_fatal(sc->xb_dev, error, + "writing %s/ring-page-order", + node_path); + return; + } } error = xs_printf(XST_NIL, node_path, From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 17:33: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 2C9EF1065680; Mon, 2 Apr 2012 17:33:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 171148FC15; Mon, 2 Apr 2012 17:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32HXkAg008357; Mon, 2 Apr 2012 17:33:46 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32HXksI008355; Mon, 2 Apr 2012 17:33:46 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021733.q32HXksI008355@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 17: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: r233794 - stable/9/sys/dev/atkbdc 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, 02 Apr 2012 17:33:47 -0000 Author: jkim Date: Mon Apr 2 17:33:46 2012 New Revision: 233794 URL: http://svn.freebsd.org/changeset/base/233794 Log: MFC: r233619 Add a PNP ID for Japanese 106-key keyboard. Modified: stable/9/sys/dev/atkbdc/atkbdc_isa.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/atkbdc/atkbdc_isa.c ============================================================================== --- stable/9/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:26:21 2012 (r233793) +++ stable/9/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:33:46 2012 (r233794) @@ -87,6 +87,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x2003d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 17:34: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 297871065670; Mon, 2 Apr 2012 17:34:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 146608FC0C; Mon, 2 Apr 2012 17:34: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 q32HYoRB008430; Mon, 2 Apr 2012 17:34:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32HYoVx008428; Mon, 2 Apr 2012 17:34:50 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021734.q32HYoVx008428@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 17:34: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: r233795 - stable/8/sys/dev/atkbdc 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, 02 Apr 2012 17:34:51 -0000 Author: jkim Date: Mon Apr 2 17:34:50 2012 New Revision: 233795 URL: http://svn.freebsd.org/changeset/base/233795 Log: MFC: r233619 Add a PNP ID for Japanese 106-key keyboard. Modified: stable/8/sys/dev/atkbdc/atkbdc_isa.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/atkbdc/atkbdc_isa.c ============================================================================== --- stable/8/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:33:46 2012 (r233794) +++ stable/8/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:34:50 2012 (r233795) @@ -82,6 +82,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x2003d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 17:35:26 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 CB430106566C; Mon, 2 Apr 2012 17:35:26 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B60288FC1B; Mon, 2 Apr 2012 17:35:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32HZQgk008489; Mon, 2 Apr 2012 17:35:26 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32HZQ7p008487; Mon, 2 Apr 2012 17:35:26 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021735.q32HZQ7p008487@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 17:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233796 - stable/7/sys/dev/atkbdc 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, 02 Apr 2012 17:35:26 -0000 Author: jkim Date: Mon Apr 2 17:35:26 2012 New Revision: 233796 URL: http://svn.freebsd.org/changeset/base/233796 Log: MFC: r233619 Add a PNP ID for Japanese 106-key keyboard. Modified: stable/7/sys/dev/atkbdc/atkbdc_isa.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/atkbdc/atkbdc_isa.c ============================================================================== --- stable/7/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:34:50 2012 (r233795) +++ stable/7/sys/dev/atkbdc/atkbdc_isa.c Mon Apr 2 17:35:26 2012 (r233796) @@ -82,6 +82,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x2003d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:13:29 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 DC7FE106564A; Mon, 2 Apr 2012 18:13:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7A848FC18; Mon, 2 Apr 2012 18:13:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32IDTT5009882; Mon, 2 Apr 2012 18:13:29 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32IDTmf009879; Mon, 2 Apr 2012 18:13:29 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021813.q32IDTmf009879@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 18:13:29 +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: r233797 - 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, 02 Apr 2012 18:13:30 -0000 Author: jkim Date: Mon Apr 2 18:13:29 2012 New Revision: 233797 URL: http://svn.freebsd.org/changeset/base/233797 Log: MFC: r232416, r232561 Add VESA option to GENERIC for amd64 and i386. Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/i386/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Mon Apr 2 17:35:26 2012 (r233796) +++ stable/9/sys/amd64/conf/GENERIC Mon Apr 2 18:13:29 2012 (r233797) @@ -154,6 +154,7 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Mon Apr 2 17:35:26 2012 (r233796) +++ stable/9/sys/i386/conf/GENERIC Mon Apr 2 18:13:29 2012 (r233797) @@ -159,6 +159,7 @@ device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:17:52 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 56106106566C; Mon, 2 Apr 2012 18:17:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 418D98FC08; Mon, 2 Apr 2012 18:17:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32IHqrJ010091; Mon, 2 Apr 2012 18:17:52 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32IHqnQ010089; Mon, 2 Apr 2012 18:17:52 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021817.q32IHqnQ010089@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 18:17:52 +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: r233798 - stable/9/sys/amd64/amd64 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, 02 Apr 2012 18:17:52 -0000 Author: jkim Date: Mon Apr 2 18:17:51 2012 New Revision: 233798 URL: http://svn.freebsd.org/changeset/base/233798 Log: MFC: r233702 Work around Erratum 721 for AMD Family 10h and 12h processors. Modified: stable/9/sys/amd64/amd64/initcpu.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/9/sys/amd64/amd64/initcpu.c Mon Apr 2 18:13:29 2012 (r233797) +++ stable/9/sys/amd64/amd64/initcpu.c Mon Apr 2 18:17:51 2012 (r233798) @@ -79,6 +79,27 @@ SYSCTL_UINT(_hw, OID_AUTO, via_feature_r SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); +static void +init_amd(void) +{ + + /* + * Work around Erratum 721 for Family 10h and 12h processors. + * These processors may incorrectly update the stack pointer + * after a long series of push and/or near-call instructions, + * or a long series of pop and/or near-return instructions. + * + * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf + * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + */ + switch (CPUID_TO_FAMILY(cpu_id)) { + case 0x10: + case 0x12: + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + break; + } +} + /* * Initialize special VIA features */ @@ -135,8 +156,14 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR) + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + init_amd(); + break; + case CPU_VENDOR_CENTAUR: init_via(); + break; + } } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:27: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 2456D106564A; Mon, 2 Apr 2012 18:27:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FA848FC0A; Mon, 2 Apr 2012 18:27: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 q32IR6l3010520; Mon, 2 Apr 2012 18:27:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32IR6dX010518; Mon, 2 Apr 2012 18:27:06 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021827.q32IR6dX010518@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 18:27:06 +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: r233799 - stable/8/sys/amd64/amd64 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, 02 Apr 2012 18:27:07 -0000 Author: jkim Date: Mon Apr 2 18:27:06 2012 New Revision: 233799 URL: http://svn.freebsd.org/changeset/base/233799 Log: MFC: r233702 Work around Erratum 721 for AMD Family 10h and 12h processors. Modified: stable/8/sys/amd64/amd64/initcpu.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/8/sys/amd64/amd64/initcpu.c Mon Apr 2 18:17:51 2012 (r233798) +++ stable/8/sys/amd64/amd64/initcpu.c Mon Apr 2 18:27:06 2012 (r233799) @@ -78,6 +78,27 @@ SYSCTL_UINT(_hw, OID_AUTO, via_feature_r SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, &via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU"); +static void +init_amd(void) +{ + + /* + * Work around Erratum 721 for Family 10h and 12h processors. + * These processors may incorrectly update the stack pointer + * after a long series of push and/or near-call instructions, + * or a long series of pop and/or near-return instructions. + * + * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf + * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + */ + switch (CPUID_TO_FAMILY(cpu_id)) { + case 0x10: + case 0x12: + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + break; + } +} + /* * Initialize special VIA C3/C7 features */ @@ -159,10 +180,16 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) >= 0xf) - init_via(); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + init_amd(); + break; + case CPU_VENDOR_CENTAUR: + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) + init_via(); + break; + } } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:31:01 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 E4110106564A; Mon, 2 Apr 2012 18:31:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEBD08FC14; Mon, 2 Apr 2012 18:31: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 q32IV1jc010704; Mon, 2 Apr 2012 18:31:01 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32IV1sA010702; Mon, 2 Apr 2012 18:31:01 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201204021831.q32IV1sA010702@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 2 Apr 2012 18:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233800 - stable/7/sys/amd64/amd64 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, 02 Apr 2012 18:31:02 -0000 Author: jkim Date: Mon Apr 2 18:31:01 2012 New Revision: 233800 URL: http://svn.freebsd.org/changeset/base/233800 Log: MFC: r233702 Work around Erratum 721 for AMD Family 10h and 12h processors. Modified: stable/7/sys/amd64/amd64/initcpu.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/7/sys/amd64/amd64/initcpu.c Mon Apr 2 18:27:06 2012 (r233799) +++ stable/7/sys/amd64/amd64/initcpu.c Mon Apr 2 18:31:01 2012 (r233800) @@ -78,6 +78,27 @@ SYSCTL_UINT(_hw, OID_AUTO, via_feature_r SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, &via_feature_xcrypt, 0, "VIA C3/C7 xcrypt feature available in CPU"); +static void +init_amd(void) +{ + + /* + * Work around Erratum 721 for Family 10h and 12h processors. + * These processors may incorrectly update the stack pointer + * after a long series of push and/or near-call instructions, + * or a long series of pop and/or near-return instructions. + * + * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf + * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + */ + switch (CPUID_TO_FAMILY(cpu_id)) { + case 0x10: + case 0x12: + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + break; + } +} + /* * Initialize special VIA C3/C7 features */ @@ -159,10 +180,16 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) >= 0xf) - init_via(); + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + init_amd(); + break; + case CPU_VENDOR_CENTAUR: + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) + init_via(); + break; + } } void From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:52:52 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 BAF111065674; Mon, 2 Apr 2012 18:52:52 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A53248FC0C; Mon, 2 Apr 2012 18:52:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32Iqq7n011386; Mon, 2 Apr 2012 18:52:52 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32Iqq0V011384; Mon, 2 Apr 2012 18:52:52 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021852.q32Iqq0V011384@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 18:52:52 +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: r233801 - 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, 02 Apr 2012 18:52:52 -0000 Author: trociny Date: Mon Apr 2 18:52:52 2012 New Revision: 233801 URL: http://svn.freebsd.org/changeset/base/233801 Log: MFC r231976: unp_connect() may use a shared lock on the vnode to fetch the socket. Suggested by: jhb Reviewed by: jhb, kib, rwatson Modified: stable/9/sys/kern/uipc_usrreq.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 18:31:01 2012 (r233800) +++ stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 18:52:52 2012 (r233801) @@ -1272,8 +1272,8 @@ unp_connect(struct socket *so, struct so UNP_PCB_UNLOCK(unp); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf, - td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKSHARED | LOCKLEAF, + UIO_SYSSPACE, buf, td); error = namei(&nd); if (error) vp = NULL; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 18:54:11 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 2A3031065674; Mon, 2 Apr 2012 18:54:11 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14F9D8FC14; Mon, 2 Apr 2012 18:54:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32IsAHX011473; Mon, 2 Apr 2012 18:54:10 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32IsASe011471; Mon, 2 Apr 2012 18:54:10 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021854.q32IsASe011471@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 18:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233802 - 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, 02 Apr 2012 18:54:11 -0000 Author: trociny Date: Mon Apr 2 18:54:10 2012 New Revision: 233802 URL: http://svn.freebsd.org/changeset/base/233802 Log: MFC r231976: unp_connect() may use a shared lock on the vnode to fetch the socket. Suggested by: jhb Reviewed by: jhb, kib, rwatson Modified: stable/8/sys/kern/uipc_usrreq.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/uipc_usrreq.c ============================================================================== --- stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:52:52 2012 (r233801) +++ stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:54:10 2012 (r233802) @@ -1188,8 +1188,8 @@ unp_connect(struct socket *so, struct so UNP_PCB_UNLOCK(unp); sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf, - td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKSHARED | LOCKLEAF, + UIO_SYSSPACE, buf, td); error = namei(&nd); if (error) vp = NULL; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 19:01:33 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 7EC021065677; Mon, 2 Apr 2012 19:01:33 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FE918FC12; Mon, 2 Apr 2012 19:01:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32J1X55012254; Mon, 2 Apr 2012 19:01:33 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32J1Xh2012250; Mon, 2 Apr 2012 19:01:33 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021901.q32J1Xh2012250@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 19:01:33 +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: r233803 - in stable/9/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 19:01:33 -0000 Author: trociny Date: Mon Apr 2 19:01:32 2012 New Revision: 233803 URL: http://svn.freebsd.org/changeset/base/233803 Log: MFC r232152: When detaching a unix domain socket, uipc_detach() checks unp->unp_vnode pointer to detect if there is a vnode associated with (binded to) this socket and does necessary cleanup if there is. The issue is that after forced unmount this check may be too late as the unp_vnode is reclaimed and the reference is stale. To fix this provide a helper function that is called on a socket vnode reclamation to do necessary cleanup. Pointed by: kib Reviewed by: kib Modified: stable/9/sys/kern/uipc_usrreq.c stable/9/sys/kern/vfs_subr.c stable/9/sys/sys/vnode.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 18:54:10 2012 (r233802) +++ stable/9/sys/kern/uipc_usrreq.c Mon Apr 2 19:01:32 2012 (r233803) @@ -2299,6 +2299,45 @@ unp_scan(struct mbuf *m0, void (*op)(str } } +/* + * A helper function called by VFS before socket-type vnode reclamation. + * For an active vnode it clears unp_vnode pointer and decrements unp_vnode + * use count. + */ +void +vfs_unp_reclaim(struct vnode *vp) +{ + struct socket *so; + struct unpcb *unp; + int active; + + ASSERT_VOP_ELOCKED(vp, "vfs_unp_reclaim"); + KASSERT(vp->v_type == VSOCK, + ("vfs_unp_reclaim: vp->v_type != VSOCK")); + + active = 0; + UNP_LINK_WLOCK(); + so = vp->v_socket; + if (so == NULL) + goto done; + unp = sotounpcb(so); + if (unp == NULL) + goto done; + UNP_PCB_LOCK(unp); + if (unp->unp_vnode != NULL) { + KASSERT(unp->unp_vnode == vp, + ("vfs_unp_reclaim: vp != unp->unp_vnode")); + vp->v_socket = NULL; + unp->unp_vnode = NULL; + active = 1; + } + UNP_PCB_UNLOCK(unp); +done: + UNP_LINK_WUNLOCK(); + if (active) + vunref(vp); +} + #ifdef DDB static void db_print_indent(int indent) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Mon Apr 2 18:54:10 2012 (r233802) +++ stable/9/sys/kern/vfs_subr.c Mon Apr 2 19:01:32 2012 (r233803) @@ -2657,6 +2657,8 @@ vgonel(struct vnode *vp) vinactive(vp, td); VI_UNLOCK(vp); } + if (vp->v_type == VSOCK) + vfs_unp_reclaim(vp); /* * Reclaim the vnode. */ Modified: stable/9/sys/sys/vnode.h ============================================================================== --- stable/9/sys/sys/vnode.h Mon Apr 2 18:54:10 2012 (r233802) +++ stable/9/sys/sys/vnode.h Mon Apr 2 19:01:32 2012 (r233803) @@ -796,6 +796,8 @@ int vfs_read_dirent(struct vop_readdir_a int vfs_unixify_accmode(accmode_t *accmode); +void vfs_unp_reclaim(struct vnode *vp); + int setfmode(struct thread *td, struct ucred *cred, struct vnode *vp, int mode); int setfown(struct thread *td, struct ucred *cred, struct vnode *vp, uid_t uid, gid_t gid); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 19:06:28 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 DD176106564A; Mon, 2 Apr 2012 19:06:28 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C85988FC0C; Mon, 2 Apr 2012 19:06: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 q32J6S8H012472; Mon, 2 Apr 2012 19:06:28 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32J6SgN012470; Mon, 2 Apr 2012 19:06:28 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021906.q32J6SgN012470@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 19:06:28 +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: r233804 - stable/9/sys/tools 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, 02 Apr 2012 19:06:29 -0000 Author: trociny Date: Mon Apr 2 19:06:28 2012 New Revision: 233804 URL: http://svn.freebsd.org/changeset/base/233804 Log: MFC r231975: Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR. Reviewed by: kib Modified: stable/9/sys/tools/vnode_if.awk Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/tools/vnode_if.awk ============================================================================== --- stable/9/sys/tools/vnode_if.awk Mon Apr 2 19:01:32 2012 (r233803) +++ stable/9/sys/tools/vnode_if.awk Mon Apr 2 19:06:28 2012 (r233804) @@ -195,7 +195,7 @@ while ((getline < srcfile) > 0) { continue; if ($1 ~ /^%%/) { if (NF != 6 || - $2 !~ /^[a-z]+$/ || $3 !~ /^[a-z]+$/ || + $2 !~ /^[a-z_]+$/ || $3 !~ /^[a-z]+$/ || $4 !~ /^.$/ || $5 !~ /^.$/ || $6 !~ /^.$/) { die("Invalid %s construction", "%%"); continue; From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 19:15: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 DCD20106566C; Mon, 2 Apr 2012 19:15:32 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF59F8FC0C; Mon, 2 Apr 2012 19:15: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 q32JFW8P012860; Mon, 2 Apr 2012 19:15:32 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32JFWKL012857; Mon, 2 Apr 2012 19:15:32 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021915.q32JFWKL012857@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 19:15: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: r233806 - in stable/9/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 19:15:33 -0000 Author: trociny Date: Mon Apr 2 19:15:32 2012 New Revision: 233806 URL: http://svn.freebsd.org/changeset/base/233806 Log: MFC r232181, r232455: r232181: Add sysctl to retrieve or set umask of another process. Submitted by: Dmitry Banschikov Discussed with: kib, rwatson Reviewed by: kib r232455: Make kern.proc.umask sysctl readonly. Requested by: src Modified: stable/9/sys/kern/kern_proc.c stable/9/sys/sys/sysctl.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Mon Apr 2 19:13:02 2012 (r233805) +++ stable/9/sys/kern/kern_proc.c Mon Apr 2 19:15:32 2012 (r233806) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2471,6 +2472,33 @@ sysctl_kern_proc_ps_strings(SYSCTL_HANDL return (error); } +/* + * This sysctl allows a process to retrieve umask of another process. + */ +static int +sysctl_kern_proc_umask(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + int error; + u_short fd_cmask; + + if (namelen != 1) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_WANTREAD, &p); + if (error != 0) + return (error); + + FILEDESC_SLOCK(p->p_fd); + fd_cmask = p->p_fd->fd_cmask; + FILEDESC_SUNLOCK(p->p_fd); + PRELE(p); + error = SYSCTL_OUT(req, &fd_cmask, sizeof(fd_cmask)); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2572,3 +2600,6 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_PS_STRINGS, ps_strings, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_ps_strings, "Process ps_strings location"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_UMASK, umask, CTLFLAG_RD | + CTLFLAG_MPSAFE, sysctl_kern_proc_umask, "Process umask"); Modified: stable/9/sys/sys/sysctl.h ============================================================================== --- stable/9/sys/sys/sysctl.h Mon Apr 2 19:13:02 2012 (r233805) +++ stable/9/sys/sys/sysctl.h Mon Apr 2 19:15:32 2012 (r233806) @@ -563,6 +563,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_AUXV 36 /* get ELF auxiliary vector */ #define KERN_PROC_RLIMIT 37 /* process resource limits */ #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ +#define KERN_PROC_UMASK 39 /* process umask */ /* * KERN_IPC identifiers From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 19:17: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 7AC3C1065670; Mon, 2 Apr 2012 19:17:02 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BFB18FC0A; Mon, 2 Apr 2012 19:17: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 q32JH2kL012952; Mon, 2 Apr 2012 19:17:02 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32JH26q012950; Mon, 2 Apr 2012 19:17:02 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204021917.q32JH26q012950@svn.freebsd.org> From: Mikolaj Golub Date: Mon, 2 Apr 2012 19:17: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: r233807 - stable/9/usr.bin/procstat 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, 02 Apr 2012 19:17:02 -0000 Author: trociny Date: Mon Apr 2 19:17:01 2012 New Revision: 233807 URL: http://svn.freebsd.org/changeset/base/233807 Log: MFC r232182: When displaying security credential information show also process umask. Submitted by: Dmitry Banschikov Discussed with: rwatson Modified: stable/9/usr.bin/procstat/procstat_cred.c Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat_cred.c ============================================================================== --- stable/9/usr.bin/procstat/procstat_cred.c Mon Apr 2 19:15:32 2012 (r233806) +++ stable/9/usr.bin/procstat/procstat_cred.c Mon Apr 2 19:17:01 2012 (r233807) @@ -38,6 +38,8 @@ #include "procstat.h" +static const char *get_umask(struct kinfo_proc *kipp); + void procstat_cred(struct kinfo_proc *kipp) { @@ -48,9 +50,9 @@ procstat_cred(struct kinfo_proc *kipp) gid_t *groups = NULL; if (!hflag) - printf("%5s %-16s %5s %5s %5s %5s %5s %5s %5s %-15s\n", "PID", - "COMM", "EUID", "RUID", "SVUID", "EGID", "RGID", "SVGID", - "FLAGS", "GROUPS"); + printf("%5s %-16s %5s %5s %5s %5s %5s %5s %5s %5s %-15s\n", + "PID", "COMM", "EUID", "RUID", "SVUID", "EGID", "RGID", + "SVGID", "UMASK", "FLAGS", "GROUPS"); printf("%5d ", kipp->ki_pid); printf("%-16s ", kipp->ki_comm); @@ -60,6 +62,7 @@ procstat_cred(struct kinfo_proc *kipp) printf("%5d ", kipp->ki_groups[0]); printf("%5d ", kipp->ki_rgid); printf("%5d ", kipp->ki_svgid); + printf("%5s ", get_umask(kipp)); printf("%s", kipp->ki_cr_flags & CRED_FLAG_CAPMODE ? "C" : "-"); printf(" "); @@ -98,3 +101,26 @@ procstat_cred(struct kinfo_proc *kipp) printf("\n"); } + +static const char * +get_umask(struct kinfo_proc *kipp) +{ + int error; + int mib[4]; + size_t len; + u_short fd_cmask; + static char umask[4]; + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_UMASK; + mib[3] = kipp->ki_pid; + len = sizeof(fd_cmask); + error = sysctl(mib, 4, &fd_cmask, &len, NULL, 0); + if (error == 0) { + snprintf(umask, 4, "%03o", fd_cmask); + return (umask); + } else { + return ("-"); + } +} From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:10: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 6DDED1065672; Mon, 2 Apr 2012 20:10:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 588638FC18; Mon, 2 Apr 2012 20:10: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 q32KApIm014800; Mon, 2 Apr 2012 20:10:51 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KAp24014798; Mon, 2 Apr 2012 20:10:51 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201204022010.q32KAp24014798@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 2 Apr 2012 20:10: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: r233810 - in stable/9/sys: dev/hwpmc 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, 02 Apr 2012 20:10:51 -0000 Author: gnn Date: Mon Apr 2 20:10:50 2012 New Revision: 233810 URL: http://svn.freebsd.org/changeset/base/233810 Log: MFC: 232612 Properly mask off bits that are not supported in the IAP counters. This fixes a bug where users would see massively large counts, near to 2**64 -1, due to the bits not being cleared. Modified: stable/9/sys/dev/hwpmc/hwpmc_core.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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Apr 2 19:35:36 2012 (r233809) +++ stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Apr 2 20:10:50 2012 (r233810) @@ -1833,7 +1833,7 @@ iap_read_pmc(int cpu, int ri, pmc_value_ if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = iap_perfctr_value_to_reload_count(tmp); else - *v = tmp; + *v = tmp & ((1ULL << core_iap_width) - 1); PMCDBG(MDP,REA,1, "iap-read cpu=%d ri=%d msr=0x%x -> v=%jx", cpu, ri, ri, *v); From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:14:33 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 74C74106566B; Mon, 2 Apr 2012 20:14:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45E7E8FC16; Mon, 2 Apr 2012 20:14:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32KEXaS014955; Mon, 2 Apr 2012 20:14:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KEXTe014952; Mon, 2 Apr 2012 20:14:33 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204022014.q32KEXTe014952@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Apr 2012 20:14:33 +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: r233811 - in stable/9/sys: i386/conf sparc64/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 20:14:33 -0000 Author: marius Date: Mon Apr 2 20:14:32 2012 New Revision: 233811 URL: http://svn.freebsd.org/changeset/base/233811 Log: MFC: r233701 - Remove erroneous trailing semicolon. [1] - Correctly determine the maximum payload size for setting the TX link frequent NACK latency and replay timer thresholds. Submitted by: stefanf [1] Modified: stable/9/sys/sparc64/pci/fire.c stable/9/sys/sparc64/pci/firereg.h 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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/sparc64/pci/fire.c ============================================================================== --- stable/9/sys/sparc64/pci/fire.c Mon Apr 2 20:10:50 2012 (r233810) +++ stable/9/sys/sparc64/pci/fire.c Mon Apr 2 20:14:32 2012 (r233811) @@ -443,10 +443,11 @@ fire_attach(device_t dev) lw = 0; } mps = (FIRE_PCI_READ_8(sc, FO_PCI_TLU_CTRL) & - FO_PCI_TLU_CTRL_CFG_MASK) >> FO_PCI_TLU_CTRL_CFG_SHFT; + FO_PCI_TLU_CTRL_CFG_MPS_MASK) >> + FO_PCI_TLU_CTRL_CFG_MPS_SHFT; i = sizeof(fire_freq_nak_tmr_thrs) / sizeof(*fire_freq_nak_tmr_thrs); - if (mps >= i); + if (mps >= i) mps = i - 1; FIRE_PCI_SET(sc, FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS, (fire_freq_nak_tmr_thrs[mps][lw] << Modified: stable/9/sys/sparc64/pci/firereg.h ============================================================================== --- stable/9/sys/sparc64/pci/firereg.h Mon Apr 2 20:10:50 2012 (r233810) +++ stable/9/sys/sparc64/pci/firereg.h Mon Apr 2 20:14:32 2012 (r233811) @@ -345,6 +345,13 @@ #define FO_PCI_TLU_CTRL_CFG_MASK 0x000000000000ffffULL #define FO_PCI_TLU_CTRL_CFG_SHFT 0 #define FO_PCI_TLU_CTRL_CFG_REMAIN_DETECT_QUIET 0x0000000000000100ULL +#define FO_PCI_TLU_CTRL_CFG_PAD_LOOPBACK_EN 0x0000000000000080ULL +#define FO_PCI_TLU_CTRL_CFG_EWRAP_LOOPBACK_EN 0x0000000000000040ULL +#define FO_PCI_TLU_CTRL_CFG_DIGITAL_LOOPBACK_EN 0x0000000000000020ULL +#define FO_PCI_TLU_CTRL_CFG_MPS_MASK 0x000000000000001cULL +#define FO_PCI_TLU_CTRL_CFG_MPS_SHFT 2 +#define FO_PCI_TLU_CTRL_CFG_COMMON_CLK_CFG 0x0000000000000002ULL +#define FO_PCI_TLU_CTRL_CFG_PORT 0x0000000000000001ULL /* * PCI TLU other event interrupt enable, interrupt status and status clear From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:14:41 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 5AD6B106566C; Mon, 2 Apr 2012 20:14:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B95D8FC18; Mon, 2 Apr 2012 20:14:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32KEfhC014994; Mon, 2 Apr 2012 20:14:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KEeYk014990; Mon, 2 Apr 2012 20:14:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204022014.q32KEeYk014990@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Apr 2012 20:14:40 +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: r233812 - in stable/8/sys: i386/conf sparc64/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 20:14:41 -0000 Author: marius Date: Mon Apr 2 20:14:40 2012 New Revision: 233812 URL: http://svn.freebsd.org/changeset/base/233812 Log: MFC: r233701 - Remove erroneous trailing semicolon. [1] - Correctly determine the maximum payload size for setting the TX link frequent NACK latency and replay timer thresholds. Submitted by: stefanf [1] Modified: stable/8/sys/sparc64/pci/fire.c stable/8/sys/sparc64/pci/firereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/sparc64/pci/fire.c ============================================================================== --- stable/8/sys/sparc64/pci/fire.c Mon Apr 2 20:14:32 2012 (r233811) +++ stable/8/sys/sparc64/pci/fire.c Mon Apr 2 20:14:40 2012 (r233812) @@ -443,10 +443,11 @@ fire_attach(device_t dev) lw = 0; } mps = (FIRE_PCI_READ_8(sc, FO_PCI_TLU_CTRL) & - FO_PCI_TLU_CTRL_CFG_MASK) >> FO_PCI_TLU_CTRL_CFG_SHFT; + FO_PCI_TLU_CTRL_CFG_MPS_MASK) >> + FO_PCI_TLU_CTRL_CFG_MPS_SHFT; i = sizeof(fire_freq_nak_tmr_thrs) / sizeof(*fire_freq_nak_tmr_thrs); - if (mps >= i); + if (mps >= i) mps = i - 1; FIRE_PCI_SET(sc, FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS, (fire_freq_nak_tmr_thrs[mps][lw] << Modified: stable/8/sys/sparc64/pci/firereg.h ============================================================================== --- stable/8/sys/sparc64/pci/firereg.h Mon Apr 2 20:14:32 2012 (r233811) +++ stable/8/sys/sparc64/pci/firereg.h Mon Apr 2 20:14:40 2012 (r233812) @@ -345,6 +345,13 @@ #define FO_PCI_TLU_CTRL_CFG_MASK 0x000000000000ffffULL #define FO_PCI_TLU_CTRL_CFG_SHFT 0 #define FO_PCI_TLU_CTRL_CFG_REMAIN_DETECT_QUIET 0x0000000000000100ULL +#define FO_PCI_TLU_CTRL_CFG_PAD_LOOPBACK_EN 0x0000000000000080ULL +#define FO_PCI_TLU_CTRL_CFG_EWRAP_LOOPBACK_EN 0x0000000000000040ULL +#define FO_PCI_TLU_CTRL_CFG_DIGITAL_LOOPBACK_EN 0x0000000000000020ULL +#define FO_PCI_TLU_CTRL_CFG_MPS_MASK 0x000000000000001cULL +#define FO_PCI_TLU_CTRL_CFG_MPS_SHFT 2 +#define FO_PCI_TLU_CTRL_CFG_COMMON_CLK_CFG 0x0000000000000002ULL +#define FO_PCI_TLU_CTRL_CFG_PORT 0x0000000000000001ULL /* * PCI TLU other event interrupt enable, interrupt status and status clear From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:14:52 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 761CD10656FA; Mon, 2 Apr 2012 20:14:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 475738FC12; Mon, 2 Apr 2012 20:14:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q32KEqZv015038; Mon, 2 Apr 2012 20:14:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KEquq015035; Mon, 2 Apr 2012 20:14:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204022014.q32KEquq015035@svn.freebsd.org> From: Marius Strobl Date: Mon, 2 Apr 2012 20:14:52 +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: r233813 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 20:14:52 -0000 Author: marius Date: Mon Apr 2 20:14:51 2012 New Revision: 233813 URL: http://svn.freebsd.org/changeset/base/233813 Log: MFC: r233701 - Remove erroneous trailing semicolon. [1] - Correctly determine the maximum payload size for setting the TX link frequent NACK latency and replay timer thresholds. Submitted by: stefanf [1] Modified: stable/7/sys/sparc64/pci/fire.c stable/7/sys/sparc64/pci/firereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/fire.c ============================================================================== --- stable/7/sys/sparc64/pci/fire.c Mon Apr 2 20:14:40 2012 (r233812) +++ stable/7/sys/sparc64/pci/fire.c Mon Apr 2 20:14:51 2012 (r233813) @@ -444,10 +444,11 @@ fire_attach(device_t dev) lw = 0; } mps = (FIRE_PCI_READ_8(sc, FO_PCI_TLU_CTRL) & - FO_PCI_TLU_CTRL_CFG_MASK) >> FO_PCI_TLU_CTRL_CFG_SHFT; + FO_PCI_TLU_CTRL_CFG_MPS_MASK) >> + FO_PCI_TLU_CTRL_CFG_MPS_SHFT; i = sizeof(fire_freq_nak_tmr_thrs) / sizeof(*fire_freq_nak_tmr_thrs); - if (mps >= i); + if (mps >= i) mps = i - 1; FIRE_PCI_SET(sc, FO_PCI_LPU_TXLNK_FREQ_LAT_TMR_THRS, (fire_freq_nak_tmr_thrs[mps][lw] << Modified: stable/7/sys/sparc64/pci/firereg.h ============================================================================== --- stable/7/sys/sparc64/pci/firereg.h Mon Apr 2 20:14:40 2012 (r233812) +++ stable/7/sys/sparc64/pci/firereg.h Mon Apr 2 20:14:51 2012 (r233813) @@ -345,6 +345,13 @@ #define FO_PCI_TLU_CTRL_CFG_MASK 0x000000000000ffffULL #define FO_PCI_TLU_CTRL_CFG_SHFT 0 #define FO_PCI_TLU_CTRL_CFG_REMAIN_DETECT_QUIET 0x0000000000000100ULL +#define FO_PCI_TLU_CTRL_CFG_PAD_LOOPBACK_EN 0x0000000000000080ULL +#define FO_PCI_TLU_CTRL_CFG_EWRAP_LOOPBACK_EN 0x0000000000000040ULL +#define FO_PCI_TLU_CTRL_CFG_DIGITAL_LOOPBACK_EN 0x0000000000000020ULL +#define FO_PCI_TLU_CTRL_CFG_MPS_MASK 0x000000000000001cULL +#define FO_PCI_TLU_CTRL_CFG_MPS_SHFT 2 +#define FO_PCI_TLU_CTRL_CFG_COMMON_CLK_CFG 0x0000000000000002ULL +#define FO_PCI_TLU_CTRL_CFG_PORT 0x0000000000000001ULL /* * PCI TLU other event interrupt enable, interrupt status and status clear From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:34:16 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 7D456106566C; Mon, 2 Apr 2012 20:34:16 +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 5D1278FC0A; Mon, 2 Apr 2012 20:34: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 q32KYG8L015745; Mon, 2 Apr 2012 20:34:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KYGeX015737; Mon, 2 Apr 2012 20:34:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204022034.q32KYGeX015737@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 20:34: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: r233814 - in stable/9/sys: i386/conf kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 20:34:16 -0000 Author: jhb Date: Mon Apr 2 20:34:15 2012 New Revision: 233814 URL: http://svn.freebsd.org/changeset/base/233814 Log: MFC 232700: Add a new sched_clear_name() method to the scheduler interface to clear the cached name used for KTR_SCHED traces when a thread's name changes. This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's name changes, most commonly via execve(). Modified: stable/9/sys/kern/kern_exec.c stable/9/sys/kern/kern_intr.c stable/9/sys/kern/kern_kthread.c stable/9/sys/kern/kern_thr.c stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/sched_ule.c stable/9/sys/sys/sched.h 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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/kern/kern_exec.c ============================================================================== --- stable/9/sys/kern/kern_exec.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/kern_exec.c Mon Apr 2 20:34:15 2012 (r233814) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -636,6 +637,9 @@ interpret: else if (vn_commname(binvp, p->p_comm, sizeof(p->p_comm)) != 0) bcopy(fexecv_proc_title, p->p_comm, sizeof(fexecv_proc_title)); bcopy(p->p_comm, td->td_name, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif /* * mark as execed, wakeup the process that vforked (if any) and tell Modified: stable/9/sys/kern/kern_intr.c ============================================================================== --- stable/9/sys/kern/kern_intr.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/kern_intr.c Mon Apr 2 20:34:15 2012 (r233814) @@ -180,6 +180,9 @@ ithread_update(struct intr_thread *ithd) /* Update name and priority. */ strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif thread_lock(td); sched_prio(td, pri); thread_unlock(td); Modified: stable/9/sys/kern/kern_kthread.c ============================================================================== --- stable/9/sys/kern/kern_kthread.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/kern_kthread.c Mon Apr 2 20:34:15 2012 (r233814) @@ -115,6 +115,9 @@ kproc_create(void (*func)(void *), void va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif /* call the processes' main()... */ cpu_set_fork_handler(td, func, arg); @@ -453,6 +456,9 @@ kproc_kthread_add(void (*func)(void *), va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif return (0); } va_start(ap, fmt); Modified: stable/9/sys/kern/kern_thr.c ============================================================================== --- stable/9/sys/kern/kern_thr.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/kern_thr.c Mon Apr 2 20:34:15 2012 (r233814) @@ -547,6 +547,9 @@ sys_thr_set_name(struct thread *td, stru if (ttd == NULL) return (ESRCH); strcpy(ttd->td_name, name); +#ifdef KTR + sched_clear_tdname(ttd); +#endif PROC_UNLOCK(p); return (error); } Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/sched_4bsd.c Mon Apr 2 20:34:15 2012 (r233814) @@ -1613,6 +1613,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + void sched_affinity(struct thread *td) { Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/kern/sched_ule.c Mon Apr 2 20:34:15 2012 (r233814) @@ -2684,6 +2684,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + #ifdef SMP /* Modified: stable/9/sys/sys/sched.h ============================================================================== --- stable/9/sys/sys/sched.h Mon Apr 2 20:14:51 2012 (r233813) +++ stable/9/sys/sys/sched.h Mon Apr 2 20:34:15 2012 (r233814) @@ -138,6 +138,9 @@ int sched_sizeof_thread(void); * functions. */ char *sched_tdname(struct thread *td); +#ifdef KTR +void sched_clear_tdname(struct thread *td); +#endif static __inline void sched_pin(void) From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:34:42 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 4282E1065673; Mon, 2 Apr 2012 20:34:42 +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 2369C8FC0A; Mon, 2 Apr 2012 20:34: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 q32KYf0b015799; Mon, 2 Apr 2012 20:34:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KYff2015791; Mon, 2 Apr 2012 20:34:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204022034.q32KYff2015791@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 20:34:41 +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: r233815 - in stable/8/sys: i386/conf kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2012 20:34:42 -0000 Author: jhb Date: Mon Apr 2 20:34:41 2012 New Revision: 233815 URL: http://svn.freebsd.org/changeset/base/233815 Log: MFC 232700: Add a new sched_clear_name() method to the scheduler interface to clear the cached name used for KTR_SCHED traces when a thread's name changes. This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's name changes, most commonly via execve(). Modified: stable/8/sys/kern/kern_exec.c stable/8/sys/kern/kern_intr.c stable/8/sys/kern/kern_kthread.c stable/8/sys/kern/kern_thr.c stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c stable/8/sys/sys/sched.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/kern_exec.c Mon Apr 2 20:34:41 2012 (r233815) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -609,6 +610,9 @@ interpret: else if (vn_commname(binvp, p->p_comm, sizeof(p->p_comm)) != 0) bcopy(fexecv_proc_title, p->p_comm, sizeof(fexecv_proc_title)); bcopy(p->p_comm, td->td_name, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif /* * mark as execed, wakeup the process that vforked (if any) and tell Modified: stable/8/sys/kern/kern_intr.c ============================================================================== --- stable/8/sys/kern/kern_intr.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/kern_intr.c Mon Apr 2 20:34:41 2012 (r233815) @@ -179,6 +179,9 @@ ithread_update(struct intr_thread *ithd) /* Update name and priority. */ strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name)); +#ifdef KTR + sched_clear_tdname(td); +#endif thread_lock(td); sched_prio(td, pri); thread_unlock(td); Modified: stable/8/sys/kern/kern_kthread.c ============================================================================== --- stable/8/sys/kern/kern_kthread.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/kern_kthread.c Mon Apr 2 20:34:41 2012 (r233815) @@ -114,6 +114,9 @@ kproc_create(void (*func)(void *), void va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif /* call the processes' main()... */ cpu_set_fork_handler(td, func, arg); @@ -414,6 +417,9 @@ kproc_kthread_add(void (*func)(void *), va_start(ap, fmt); vsnprintf(td->td_name, sizeof(td->td_name), fmt, ap); va_end(ap); +#ifdef KTR + sched_clear_tdname(td); +#endif return (0); } va_start(ap, fmt); Modified: stable/8/sys/kern/kern_thr.c ============================================================================== --- stable/8/sys/kern/kern_thr.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/kern_thr.c Mon Apr 2 20:34:41 2012 (r233815) @@ -528,6 +528,9 @@ thr_set_name(struct thread *td, struct t strcpy(ttd->td_name, name); else error = ESRCH; +#ifdef KTR + sched_clear_tdname(ttd); +#endif PROC_UNLOCK(p); return (error); } Modified: stable/8/sys/kern/sched_4bsd.c ============================================================================== --- stable/8/sys/kern/sched_4bsd.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/sched_4bsd.c Mon Apr 2 20:34:41 2012 (r233815) @@ -1613,6 +1613,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + void sched_affinity(struct thread *td) { Modified: stable/8/sys/kern/sched_ule.c ============================================================================== --- stable/8/sys/kern/sched_ule.c Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/kern/sched_ule.c Mon Apr 2 20:34:41 2012 (r233815) @@ -2645,6 +2645,17 @@ sched_tdname(struct thread *td) #endif } +#ifdef KTR +void +sched_clear_tdname(struct thread *td) +{ + struct td_sched *ts; + + ts = td->td_sched; + ts->ts_name[0] = '\0'; +} +#endif + #ifdef SMP /* Modified: stable/8/sys/sys/sched.h ============================================================================== --- stable/8/sys/sys/sched.h Mon Apr 2 20:34:15 2012 (r233814) +++ stable/8/sys/sys/sched.h Mon Apr 2 20:34:41 2012 (r233815) @@ -139,6 +139,9 @@ int sched_sizeof_thread(void); * functions. */ char *sched_tdname(struct thread *td); +#ifdef KTR +void sched_clear_tdname(struct thread *td); +#endif static __inline void sched_pin(void) From owner-svn-src-stable@FreeBSD.ORG Mon Apr 2 20:36: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 F0E14106566C; Mon, 2 Apr 2012 20:36:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC5CB8FC17; Mon, 2 Apr 2012 20:36: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 q32KaZ7O015904; Mon, 2 Apr 2012 20:36:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q32KaZpb015902; Mon, 2 Apr 2012 20:36:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204022036.q32KaZpb015902@svn.freebsd.org> From: John Baldwin Date: Mon, 2 Apr 2012 20:36:35 +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: r233816 - in stable/9/sys: . 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, 02 Apr 2012 20:36:36 -0000 Author: jhb Date: Mon Apr 2 20:36:35 2012 New Revision: 233816 URL: http://svn.freebsd.org/changeset/base/233816 Log: MFC 233236: Add sys/ofed to the 'make cscope' target. Modified: stable/9/sys/Makefile 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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/Makefile ============================================================================== --- stable/9/sys/Makefile Mon Apr 2 20:34:41 2012 (r233815) +++ stable/9/sys/Makefile Mon Apr 2 20:36:35 2012 (r233816) @@ -11,7 +11,7 @@ SUBDIR= boot CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \ geom gnu isa kern libkern modules net net80211 netatalk \ netgraph netinet netinet6 netipsec netipx netnatm netncp \ - netsmb nfs nfsclient nfsserver nlm opencrypto \ + netsmb nfs nfsclient nfsserver nlm ofed opencrypto \ pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR} .if !defined(CSCOPE_ARCHDIR) .if defined(ALL_ARCH) From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 07:15: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 63462106564A; Tue, 3 Apr 2012 07:15:43 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D8E28FC08; Tue, 3 Apr 2012 07:15: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 q337FhC3036776; Tue, 3 Apr 2012 07:15:43 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q337FhYk036774; Tue, 3 Apr 2012 07:15:43 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201204030715.q337FhYk036774@svn.freebsd.org> From: Fabien Thomas Date: Tue, 3 Apr 2012 07:15: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: r233824 - 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: Tue, 03 Apr 2012 07:15:43 -0000 Author: fabient Date: Tue Apr 3 07:15:42 2012 New Revision: 233824 URL: http://svn.freebsd.org/changeset/base/233824 Log: MFC r233544: Fix random deadlock on pmcstat exit: - Exit the thread when soft shutdown is requested - Wakeup owner thread. Reproduced/tested by looping pmcstat measurement: pmcstat -S instructions -O/tmp/test ls Modified: stable/9/sys/dev/hwpmc/hwpmc_logging.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_logging.c Tue Apr 3 05:42:51 2012 (r233823) +++ stable/9/sys/dev/hwpmc/hwpmc_logging.c Tue Apr 3 07:15:42 2012 (r233824) @@ -285,6 +285,7 @@ pmclog_loop(void *arg) if ((lb = TAILQ_FIRST(&po->po_logbuffers)) == NULL) { mtx_unlock_spin(&po->po_mtx); + /* No more buffers and shutdown required. */ if (po->po_flags & PMC_PO_SHUTDOWN) { mtx_unlock(&pmc_kthread_mtx); /* @@ -293,6 +294,7 @@ pmclog_loop(void *arg) */ fo_close(po->po_file, curthread); mtx_lock(&pmc_kthread_mtx); + break; } (void) msleep(po, &pmc_kthread_mtx, PWAIT, @@ -355,6 +357,7 @@ pmclog_loop(void *arg) lb = NULL; } + wakeup_one(po->po_kthread); po->po_kthread = NULL; mtx_unlock(&pmc_kthread_mtx); @@ -653,8 +656,7 @@ pmclog_deconfigure_log(struct pmc_owner ("[pmclog,%d] po=%p no log file", __LINE__, po)); /* stop the kthread, this will reset the 'OWNS_LOGFILE' flag */ - if (po->po_kthread) - pmclog_stop_kthread(po); + pmclog_stop_kthread(po); KASSERT(po->po_kthread == NULL, ("[pmclog,%d] po=%p kthread not stopped", __LINE__, po)); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 07:48:59 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 2A366106564A; Tue, 3 Apr 2012 07:48:59 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 140EB8FC17; Tue, 3 Apr 2012 07:48:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q337mwEp037983; Tue, 3 Apr 2012 07:48:58 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q337mwEY037981; Tue, 3 Apr 2012 07:48:58 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201204030748.q337mwEY037981@svn.freebsd.org> From: Fabien Thomas Date: Tue, 3 Apr 2012 07:48:58 +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: r233825 - 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: Tue, 03 Apr 2012 07:48:59 -0000 Author: fabient Date: Tue Apr 3 07:48:58 2012 New Revision: 233825 URL: http://svn.freebsd.org/changeset/base/233825 Log: MFC r233544: Fix random deadlock on pmcstat exit: - Exit the thread when soft shutdown is requested - Wakeup owner thread. Reproduced/tested by looping pmcstat measurement: pmcstat -S instructions -O/tmp/test ls Modified: stable/8/sys/dev/hwpmc/hwpmc_logging.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_logging.c Tue Apr 3 07:15:42 2012 (r233824) +++ stable/8/sys/dev/hwpmc/hwpmc_logging.c Tue Apr 3 07:48:58 2012 (r233825) @@ -284,6 +284,7 @@ pmclog_loop(void *arg) if ((lb = TAILQ_FIRST(&po->po_logbuffers)) == NULL) { mtx_unlock_spin(&po->po_mtx); + /* No more buffers and shutdown required. */ if (po->po_flags & PMC_PO_SHUTDOWN) { mtx_unlock(&pmc_kthread_mtx); /* @@ -292,6 +293,7 @@ pmclog_loop(void *arg) */ fo_close(po->po_file, curthread); mtx_lock(&pmc_kthread_mtx); + break; } (void) msleep(po, &pmc_kthread_mtx, PWAIT, @@ -354,6 +356,7 @@ pmclog_loop(void *arg) lb = NULL; } + wakeup_one(po->po_kthread); po->po_kthread = NULL; mtx_unlock(&pmc_kthread_mtx); @@ -652,8 +655,7 @@ pmclog_deconfigure_log(struct pmc_owner ("[pmclog,%d] po=%p no log file", __LINE__, po)); /* stop the kthread, this will reset the 'OWNS_LOGFILE' flag */ - if (po->po_kthread) - pmclog_stop_kthread(po); + pmclog_stop_kthread(po); KASSERT(po->po_kthread == NULL, ("[pmclog,%d] po=%p kthread not stopped", __LINE__, po)); From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 08:29:40 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 14AE1106564A; Tue, 3 Apr 2012 08:29: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 F34E88FC16; Tue, 3 Apr 2012 08:29: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 q338Td1t039649; Tue, 3 Apr 2012 08:29:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q338Tdow039647; Tue, 3 Apr 2012 08:29:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204030829.q338Tdow039647@svn.freebsd.org> From: Alexander Motin Date: Tue, 3 Apr 2012 08:29:39 +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: r233828 - stable/9/sys/cam/scsi 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, 03 Apr 2012 08:29:40 -0000 Author: mav Date: Tue Apr 3 08:29:39 2012 New Revision: 233828 URL: http://svn.freebsd.org/changeset/base/233828 Log: MFC r233746: Be more conservative in using READ CAPACITY(16) command. Previous code checked PROTECT bit in INQUIRY data for all SPC devices, while it is defined only since SPC-3. But there are some SPC-2 USB devices were reported, that have PROTECT bit set, return no error for READ CAPACITY(16) command, but return wrong sector count value in response. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Apr 3 08:28:43 2012 (r233827) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Apr 3 08:29:39 2012 (r233828) @@ -1540,9 +1540,7 @@ daregister(struct cam_periph *periph, vo softc->minimum_cmd_size = 16; /* Predict whether device may support READ CAPACITY(16). */ - if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 || - (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC && - (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) { + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3) { softc->flags |= DA_FLAG_CAN_RC16; softc->state = DA_STATE_PROBE2; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 08:54:35 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 ECF54106564A; Tue, 3 Apr 2012 08:54:35 +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 D42EA8FC0A; Tue, 3 Apr 2012 08:54: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 q338sZ5K040622; Tue, 3 Apr 2012 08:54:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q338sZKe040611; Tue, 3 Apr 2012 08:54:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204030854.q338sZKe040611@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Apr 2012 08:54:35 +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: r233831 - in stable/9/libexec/rtld-elf: . amd64 arm i386 ia64 mips powerpc powerpc64 sparc64 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, 03 Apr 2012 08:54:36 -0000 Author: kib Date: Tue Apr 3 08:54:35 2012 New Revision: 233831 URL: http://svn.freebsd.org/changeset/base/233831 Log: MFC r233231: Fix several problems with our ELF filters implementation. Do not relocate twice an object which happens to be needed by loaded binary (or dso) and some filtee opened due to symbol resolution when relocating need objects. Record the state of the relocation processing in Obj_Entry and short-circuit relocate_objects() if current object already processed. Do not call constructors for filtees loaded during the early relocation processing before image is initialized enough to run user-provided code. Filtees are loaded using dlopen_object(), which normally performs relocation and initialization. If filtee is lazy-loaded during the relocation of dso needed by the main object, dlopen_object() runs too earlier, when most runtime services are not yet ready. Postpone the constructors call to the time when main binary and depended libraries constructors are run, passing the new flag RTLD_LO_EARLY to dlopen_object(). Symbol lookups callers inform symlook_* functions about early stage of initialization with SYMLOOK_EARLY. Pass flags through all functions participating in object relocation. Use the opportunity and fix flags argument to find_symdef() in arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of true, which happen to have the same numeric value. MFC r233777 (by kan): Do not try to adjust stacks if dlopen_object is called too early. MFC r233778 (by kan): Remove extra blank line from revious commit. MFC note: the ARM and MIPS TLS support is not merged back, so the chunks from r233231 which fix misuse of flags in calls to find_symdef() in the corresponding relocation type handlers were not applied. When TLS support is merged, the rest of r233231 should be applied too. Modified: stable/9/libexec/rtld-elf/amd64/reloc.c stable/9/libexec/rtld-elf/arm/reloc.c stable/9/libexec/rtld-elf/i386/reloc.c stable/9/libexec/rtld-elf/ia64/reloc.c stable/9/libexec/rtld-elf/mips/reloc.c stable/9/libexec/rtld-elf/powerpc/reloc.c stable/9/libexec/rtld-elf/powerpc64/reloc.c stable/9/libexec/rtld-elf/rtld.c stable/9/libexec/rtld-elf/rtld.h stable/9/libexec/rtld-elf/sparc64/reloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/amd64/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/amd64/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -82,6 +82,7 @@ do_copy_relocations(Obj_Entry *dstobj) size = dstsym->st_size; symlook_init(&req, name); req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info)); + req.flags = SYMLOOK_EARLY; for (srcobj = dstobj->next; srcobj != NULL; srcobj = srcobj->next) { res = symlook_obj(&req, srcobj); @@ -118,7 +119,8 @@ init_pltgot(Obj_Entry *obj) /* Process the non-PLT relocations. */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -151,7 +153,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -170,7 +172,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -200,7 +202,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -214,7 +216,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -245,7 +247,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -277,7 +279,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -291,7 +293,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -305,7 +307,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -330,7 +332,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry done: if (cache != NULL) free(cache); - return(r); + return (r); } /* Process the PLT relocations. */ @@ -366,7 +368,7 @@ reloc_plt(Obj_Entry *obj) /* Relocate the jump slots in an object. */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -382,8 +384,8 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS switch (ELF_R_TYPE(rela->r_info)) { case R_X86_64_JMP_SLOT: where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, true, NULL, - lockstate); + def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return (-1); if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) { @@ -438,7 +440,7 @@ reloc_iresolve(Obj_Entry *obj, RtldLockS } int -reloc_gnu_ifunc(Obj_Entry *obj, RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -454,8 +456,8 @@ reloc_gnu_ifunc(Obj_Entry *obj, RtldLock switch (ELF_R_TYPE(rela->r_info)) { case R_X86_64_JMP_SLOT: where = (Elf_Addr *)(obj->relocbase + rela->r_offset); - def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, true, NULL, - lockstate); + def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return (-1); if (ELF_ST_TYPE(def->st_info) != STT_GNU_IFUNC) Modified: stable/9/libexec/rtld-elf/arm/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/arm/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/arm/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -51,6 +51,8 @@ do_copy_relocations(Obj_Entry *dstobj) symlook_init(&req, name); req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rel->r_info)); + req.flags = SYMLOOK_EARLY; + for (srcobj = dstobj->next; srcobj != NULL; srcobj = srcobj->next) { res = symlook_obj(&req, srcobj); @@ -132,7 +134,7 @@ store_ptr(void *where, Elf_Addr val) static int reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, - RtldLockState *lockstate) + int flags, RtldLockState *lockstate) { Elf_Addr *where; const Elf_Sym *def; @@ -158,7 +160,7 @@ reloc_nonplt_object(Obj_Entry *obj, cons if (addend & 0x00800000) addend |= 0xff000000; - def = find_symdef(symnum, obj, &defobj, false, cache, + def = find_symdef(symnum, obj, &defobj, flags, cache, lockstate); if (def == NULL) return -1; @@ -185,7 +187,7 @@ reloc_nonplt_object(Obj_Entry *obj, cons case R_ARM_ABS32: /* word32 B + S + A */ case R_ARM_GLOB_DAT: /* word32 B + S */ - def = find_symdef(symnum, obj, &defobj, false, cache, + def = find_symdef(symnum, obj, &defobj, flags, cache, lockstate); if (def == NULL) return -1; @@ -251,7 +253,8 @@ reloc_nonplt_object(Obj_Entry *obj, cons * * Process non-PLT relocations * */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -270,7 +273,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry rellim = (const Elf_Rel *)((caddr_t)obj->rel + obj->relsize); for (rel = obj->rel; rel < rellim; rel++) { - if (reloc_nonplt_object(obj, rel, cache, lockstate) < 0) + if (reloc_nonplt_object(obj, rel, cache, flags, lockstate) < 0) goto done; } r = 0; @@ -307,7 +310,7 @@ reloc_plt(Obj_Entry *obj) * * LD_BIND_NOW was set - force relocation for all jump slots * */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Obj_Entry *defobj; const Elf_Rel *rellim; @@ -321,7 +324,7 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS assert(ELF_R_TYPE(rel->r_info) == R_ARM_JUMP_SLOT); where = (Elf_Addr *)(obj->relocbase + rel->r_offset); def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - true, NULL, lockstate); + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) { dbg("reloc_jmpslots: sym not found"); return (-1); @@ -346,7 +349,8 @@ reloc_iresolve(Obj_Entry *obj, struct St } int -reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) { /* XXX not implemented */ Modified: stable/9/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/i386/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/i386/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -83,6 +83,7 @@ do_copy_relocations(Obj_Entry *dstobj) size = dstsym->st_size; symlook_init(&req, name); req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rel->r_info)); + req.flags = SYMLOOK_EARLY; for (srcobj = dstobj->next; srcobj != NULL; srcobj = srcobj->next) { res = symlook_obj(&req, srcobj); @@ -119,7 +120,8 @@ init_pltgot(Obj_Entry *obj) /* Process the non-PLT relocations. */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -151,7 +153,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -170,7 +172,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -200,7 +202,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -220,7 +222,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry Elf_Addr add; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -253,7 +255,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -267,7 +269,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) goto done; @@ -286,7 +288,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry done: if (cache != NULL) free(cache); - return(r); + return (r); } /* Process the PLT relocations. */ @@ -322,7 +324,7 @@ reloc_plt(Obj_Entry *obj) /* Relocate the jump slots in an object. */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -338,8 +340,8 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS switch (ELF_R_TYPE(rel->r_info)) { case R_386_JMP_SLOT: where = (Elf_Addr *)(obj->relocbase + rel->r_offset); - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL, - lockstate); + def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return (-1); if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) { @@ -390,7 +392,7 @@ reloc_iresolve(Obj_Entry *obj, RtldLockS } int -reloc_gnu_ifunc(Obj_Entry *obj, RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -406,8 +408,8 @@ reloc_gnu_ifunc(Obj_Entry *obj, RtldLock switch (ELF_R_TYPE(rel->r_info)) { case R_386_JMP_SLOT: where = (Elf_Addr *)(obj->relocbase + rel->r_offset); - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL, - lockstate); + def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return (-1); if (ELF_ST_TYPE(def->st_info) != STT_GNU_IFUNC) Modified: stable/9/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/ia64/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/ia64/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -151,7 +151,7 @@ free_fptrs(Obj_Entry *obj, bool mapped) /* Relocate a non-PLT object with addend. */ static int reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, - SymCache *cache, RtldLockState *lockstate) + SymCache *cache, int flags, RtldLockState *lockstate) { struct fptr **fptrs; Elf_Addr *where = (Elf_Addr *) (obj->relocbase + rela->r_offset); @@ -172,7 +172,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O Elf_Addr target; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return -1; @@ -195,7 +195,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O int sym_index; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - true, cache, lockstate); + SYMLOOK_IN_PLT | flags, cache, lockstate); if (def == NULL) { /* * XXX r_debug_state is problematic and find_symdef() @@ -254,7 +254,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O Elf_Addr target, gp; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return -1; @@ -277,7 +277,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return -1; @@ -290,7 +290,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return -1; @@ -303,7 +303,7 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O const Obj_Entry *defobj; def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return -1; @@ -342,7 +342,8 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, O /* Process the non-PLT relocations. */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rel *rellim; const Elf_Rel *rel; @@ -368,7 +369,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry locrela.r_info = rel->r_info; locrela.r_offset = rel->r_offset; locrela.r_addend = 0; - if (reloc_non_plt_obj(obj_rtld, obj, &locrela, cache, + if (reloc_non_plt_obj(obj_rtld, obj, &locrela, cache, flags, lockstate)) goto done; } @@ -376,7 +377,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry /* Perform relocations with addend if there are any: */ relalim = (const Elf_Rela *) ((caddr_t) obj->rela + obj->relasize); for (rela = obj->rela; obj->rela != NULL && rela < relalim; rela++) { - if (reloc_non_plt_obj(obj_rtld, obj, rela, cache, lockstate)) + if (reloc_non_plt_obj(obj_rtld, obj, rela, cache, flags, + lockstate)) goto done; } @@ -444,7 +446,8 @@ reloc_iresolve(Obj_Entry *obj, struct St } int -reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) { /* XXX not implemented */ @@ -453,7 +456,7 @@ reloc_gnu_ifunc(Obj_Entry *obj, struct S /* Relocate the jump slots in an object. */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { if (obj->jmpslots_done) return 0; @@ -472,7 +475,7 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS assert(ELF_R_TYPE(rel->r_info) == R_IA_64_IPLTLSB); where = (Elf_Addr *)(obj->relocbase + rel->r_offset); def = find_symdef(ELF_R_SYM(rel->r_info), obj, - &defobj, true, NULL, lockstate); + &defobj, SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return -1; reloc_jmpslot(where, @@ -493,7 +496,7 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS where = (Elf_Addr *)(obj->relocbase + rela->r_offset); def = find_symdef(ELF_R_SYM(rela->r_info), obj, - &defobj, true, NULL, lockstate); + &defobj, SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) return -1; reloc_jmpslot(where, Modified: stable/9/libexec/rtld-elf/mips/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/mips/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/mips/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -254,7 +254,8 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size } int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rel *rel; const Elf_Rel *rellim; @@ -313,7 +314,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry * to 0 if there are non-PLT references, but older * versions of GNU ld do not do this. */ - def = find_symdef(i, obj, &defobj, false, NULL, + def = find_symdef(i, obj, &defobj, flags, NULL, lockstate); if (def == NULL) return -1; @@ -355,7 +356,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry } } else { /* TODO: add cache here */ - def = find_symdef(i, obj, &defobj, false, NULL, + def = find_symdef(i, obj, &defobj, flags, NULL, lockstate); if (def == NULL) { dbg("Warning4, cant find symbole %d", i); @@ -490,7 +491,7 @@ reloc_plt(Obj_Entry *obj) * LD_BIND_NOW was set - force relocation for all jump slots */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { /* Do nothing */ obj->jmpslots_done = true; @@ -507,7 +508,8 @@ reloc_iresolve(Obj_Entry *obj, struct St } int -reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) { /* XXX not implemented */ Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/powerpc/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -92,6 +92,7 @@ do_copy_relocations(Obj_Entry *dstobj) size = dstsym->st_size; symlook_init(&req, name); req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info)); + req.flags = SYMLOOK_EARLY; for (srcobj = dstobj->next; srcobj != NULL; srcobj = srcobj->next) { @@ -159,7 +160,7 @@ reloc_non_plt_self(Elf_Dyn *dynp, Elf_Ad */ static int reloc_nonplt_object(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, - SymCache *cache, RtldLockState *lockstate) + SymCache *cache, int flags, RtldLockState *lockstate) { Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); const Elf_Sym *def; @@ -174,7 +175,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC_ADDR32: /* word32 S + A */ case R_PPC_GLOB_DAT: /* word32 S + A */ def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) { return (-1); } @@ -221,7 +222,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC_DTPMOD32: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -232,7 +233,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC_TPREL32: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -261,7 +262,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC_DTPREL32: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -285,7 +286,8 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, * Process non-PLT relocations */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -309,8 +311,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry */ relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize); for (rela = obj->rela; rela < relalim; rela++) { - if (reloc_nonplt_object(obj_rtld, obj, rela, cache, lockstate) - < 0) + if (reloc_nonplt_object(obj_rtld, obj, rela, cache, flags, + lockstate) < 0) goto done; } r = 0; @@ -416,7 +418,7 @@ reloc_plt(Obj_Entry *obj) * LD_BIND_NOW was set - force relocation for all jump slots */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Obj_Entry *defobj; const Elf_Rela *relalim; @@ -430,7 +432,7 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS assert(ELF_R_TYPE(rela->r_info) == R_PPC_JMP_SLOT); where = (Elf_Addr *)(obj->relocbase + rela->r_offset); def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - true, NULL, lockstate); + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) { dbg("reloc_jmpslots: sym not found"); return (-1); @@ -525,7 +527,8 @@ reloc_iresolve(Obj_Entry *obj, struct St } int -reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) { /* XXX not implemented */ Modified: stable/9/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc64/reloc.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/powerpc64/reloc.c Tue Apr 3 08:54:35 2012 (r233831) @@ -86,6 +86,7 @@ do_copy_relocations(Obj_Entry *dstobj) size = dstsym->st_size; symlook_init(&req, name); req.ventry = fetch_ventry(dstobj, ELF_R_SYM(rela->r_info)); + req.flags = SYMLOOK_EARLY; for (srcobj = dstobj->next; srcobj != NULL; srcobj = srcobj->next) { @@ -153,7 +154,7 @@ reloc_non_plt_self(Elf_Dyn *dynp, Elf_Ad */ static int reloc_nonplt_object(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela, - SymCache *cache, RtldLockState *lockstate) + SymCache *cache, int flags, RtldLockState *lockstate) { Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); const Elf_Sym *def; @@ -169,7 +170,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC64_ADDR64: case R_PPC_GLOB_DAT: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) { return (-1); } @@ -216,7 +217,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC64_DTPMOD64: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -227,7 +228,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC64_TPREL64: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -256,7 +257,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, case R_PPC64_DTPREL64: def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - false, cache, lockstate); + flags, cache, lockstate); if (def == NULL) return (-1); @@ -280,7 +281,8 @@ reloc_nonplt_object(Obj_Entry *obj_rtld, * Process non-PLT relocations */ int -reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, RtldLockState *lockstate) +reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, + RtldLockState *lockstate) { const Elf_Rela *relalim; const Elf_Rela *rela; @@ -307,8 +309,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry */ relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize); for (rela = obj->rela; rela < relalim; rela++) { - if (reloc_nonplt_object(obj_rtld, obj, rela, cache, lockstate) - < 0) + if (reloc_nonplt_object(obj_rtld, obj, rela, cache, flags, + lockstate) < 0) goto done; } r = 0; @@ -379,7 +381,7 @@ reloc_plt(Obj_Entry *obj) * LD_BIND_NOW was set - force relocation for all jump slots */ int -reloc_jmpslots(Obj_Entry *obj, RtldLockState *lockstate) +reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockState *lockstate) { const Obj_Entry *defobj; const Elf_Rela *relalim; @@ -393,7 +395,7 @@ reloc_jmpslots(Obj_Entry *obj, RtldLockS assert(ELF_R_TYPE(rela->r_info) == R_PPC_JMP_SLOT); where = (Elf_Addr *)(obj->relocbase + rela->r_offset); def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - true, NULL, lockstate); + SYMLOOK_IN_PLT | flags, NULL, lockstate); if (def == NULL) { dbg("reloc_jmpslots: sym not found"); return (-1); @@ -468,7 +470,8 @@ reloc_iresolve(Obj_Entry *obj, struct St } int -reloc_gnu_ifunc(Obj_Entry *obj, struct Struct_RtldLockState *lockstate) +reloc_gnu_ifunc(Obj_Entry *obj, int flags, + struct Struct_RtldLockState *lockstate) { /* XXX not implemented */ Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 08:54:35 2012 (r233831) @@ -116,9 +116,10 @@ static void objlist_push_head(Objlist *, static void objlist_push_tail(Objlist *, Obj_Entry *); static void objlist_remove(Objlist *, Obj_Entry *); static void *path_enumerate(const char *, path_enum_proc, void *); -static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, RtldLockState *); +static int relocate_objects(Obj_Entry *, bool, Obj_Entry *, int, + RtldLockState *); static int resolve_objects_ifunc(Obj_Entry *first, bool bind_now, - RtldLockState *lockstate); + int flags, RtldLockState *lockstate); static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); static void *rtld_dlopen(const char *name, int fd, int mode); @@ -545,7 +546,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ } if (relocate_objects(obj_main, - ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, NULL) == -1) + ld_bind_now != NULL && *ld_bind_now != '\0', + &obj_rtld, SYMLOOK_EARLY, NULL) == -1) die(); dbg("doing copy relocations"); @@ -580,7 +582,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ dbg("resolving ifuncs"); if (resolve_objects_ifunc(obj_main, - ld_bind_now != NULL && *ld_bind_now != '\0', NULL) == -1) + ld_bind_now != NULL && *ld_bind_now != '\0', SYMLOOK_EARLY, + NULL) == -1) die(); if (!obj_main->crt_no_init) { @@ -1552,7 +1555,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo * * that symbols can be found. */ - relocate_objects(&objtmp, true, &objtmp, NULL); + relocate_objects(&objtmp, true, &objtmp, 0, NULL); } /* Initialize the object list. */ @@ -1605,6 +1608,7 @@ initlist_add_neededs(Needed_Entry *neede static void initlist_add_objects(Obj_Entry *obj, Obj_Entry **tail, Objlist *list) { + if (obj->init_scanned || obj->init_done) return; obj->init_scanned = true; @@ -1616,6 +1620,10 @@ initlist_add_objects(Obj_Entry *obj, Obj /* Recursively process the needed objects. */ if (obj->needed != NULL) initlist_add_neededs(obj->needed, list); + if (obj->needed_filtees != NULL) + initlist_add_neededs(obj->needed_filtees, list); + if (obj->needed_aux_filtees != NULL) + initlist_add_neededs(obj->needed_aux_filtees, list); /* Add the object to the init list. */ if (obj->preinit_array != (Elf_Addr)NULL || obj->init != (Elf_Addr)NULL || @@ -2144,13 +2152,17 @@ objlist_remove(Objlist *list, Obj_Entry */ static int relocate_objects(Obj_Entry *first, bool bind_now, Obj_Entry *rtldobj, - RtldLockState *lockstate) + int flags, RtldLockState *lockstate) { Obj_Entry *obj; for (obj = first; obj != NULL; obj = obj->next) { + if (obj->relocated) + continue; + obj->relocated = true; if (obj != rtldobj) dbg("relocating \"%s\"", obj->path); + if (obj->nbuckets == 0 || obj->nchains == 0 || obj->buckets == NULL || obj->symtab == NULL || obj->strtab == NULL) { _rtld_error("%s: Shared object has no run-time symbol table", @@ -2169,7 +2181,7 @@ relocate_objects(Obj_Entry *first, bool } /* Process the non-PLT relocations. */ - if (reloc_non_plt(obj, rtldobj, lockstate)) + if (reloc_non_plt(obj, rtldobj, flags, lockstate)) return -1; if (obj->textrel) { /* Re-protected the text segment. */ @@ -2190,7 +2202,7 @@ relocate_objects(Obj_Entry *first, bool return -1; /* Relocate the jump slots if we are doing immediate binding. */ if (obj->bind_now || bind_now) - if (reloc_jmpslots(obj, lockstate) == -1) + if (reloc_jmpslots(obj, flags, lockstate) == -1) return -1; if (obj->relro_size > 0) { @@ -2225,35 +2237,39 @@ relocate_objects(Obj_Entry *first, bool * consistent with how GNU does it. */ static int -resolve_object_ifunc(Obj_Entry *obj, bool bind_now, RtldLockState *lockstate) +resolve_object_ifunc(Obj_Entry *obj, bool bind_now, int flags, + RtldLockState *lockstate) { if (obj->irelative && reloc_iresolve(obj, lockstate) == -1) return (-1); if ((obj->bind_now || bind_now) && obj->gnu_ifunc && - reloc_gnu_ifunc(obj, lockstate) == -1) + reloc_gnu_ifunc(obj, flags, lockstate) == -1) return (-1); return (0); } static int -resolve_objects_ifunc(Obj_Entry *first, bool bind_now, RtldLockState *lockstate) +resolve_objects_ifunc(Obj_Entry *first, bool bind_now, int flags, + RtldLockState *lockstate) { Obj_Entry *obj; for (obj = first; obj != NULL; obj = obj->next) { - if (resolve_object_ifunc(obj, bind_now, lockstate) == -1) + if (resolve_object_ifunc(obj, bind_now, flags, lockstate) == -1) return (-1); } return (0); } static int -initlist_objects_ifunc(Objlist *list, bool bind_now, RtldLockState *lockstate) +initlist_objects_ifunc(Objlist *list, bool bind_now, int flags, + RtldLockState *lockstate) { Objlist_Entry *elm; STAILQ_FOREACH(elm, list, link) { - if (resolve_object_ifunc(elm->obj, bind_now, lockstate) == -1) + if (resolve_object_ifunc(elm->obj, bind_now, flags, + lockstate) == -1) return (-1); } return (0); @@ -2515,17 +2531,30 @@ dlopen_object(const char *name, int fd, objlist_push_tail(&list_global, obj); if (*old_obj_tail != NULL) { /* We loaded something new. */ assert(*old_obj_tail == obj); - result = load_needed_objects(obj, lo_flags & RTLD_LO_DLOPEN); + result = load_needed_objects(obj, + lo_flags & (RTLD_LO_DLOPEN | RTLD_LO_EARLY)); init_dag(obj); ref_dag(obj); if (result != -1) result = rtld_verify_versions(&obj->dagmembers); if (result != -1 && ld_tracing) goto trace; - if (result == -1 || (relocate_objects(obj, (mode & RTLD_MODEMASK) - == RTLD_NOW, &obj_rtld, &lockstate)) == -1) { + if (result == -1 || (relocate_objects(obj, + (mode & RTLD_MODEMASK) == RTLD_NOW, &obj_rtld, + (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, + &lockstate)) == -1) { dlopen_cleanup(obj); obj = NULL; + } else if (lo_flags & RTLD_LO_EARLY) { + /* + * Do not call the init functions for early loaded + * filtees. The image is still not initialized enough + * for them to work. + * + * Our object is found by the global object list and + * will be ordered among all init calls done right + * before transferring control to main. + */ } else { /* Make list of init functions to call. */ initlist_add_objects(obj, &obj->next, &initlist); @@ -2556,9 +2585,12 @@ dlopen_object(const char *name, int fd, name); GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL); - map_stacks_exec(&lockstate); + if (!(lo_flags & RTLD_LO_EARLY)) { + map_stacks_exec(&lockstate); + } if (initlist_objects_ifunc(&initlist, (mode & RTLD_MODEMASK) == RTLD_NOW, + (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0, &lockstate) == -1) { objlist_clear(&initlist); dlopen_cleanup(obj); @@ -2566,8 +2598,10 @@ dlopen_object(const char *name, int fd, return (NULL); } - /* Call the init functions. */ - objlist_call_init(&initlist, &lockstate); + if (!(lo_flags & RTLD_LO_EARLY)) { + /* Call the init functions. */ + objlist_call_init(&initlist, &lockstate); + } objlist_clear(&initlist); lock_release(rtld_bind_lock, &lockstate); return obj; @@ -3354,12 +3388,13 @@ symlook_obj(SymLook *req, const Obj_Entr { DoneList donelist; SymLook req1; - int res, mres; + int flags, res, mres; mres = symlook_obj1(req, obj); if (mres == 0) { if (obj->needed_filtees != NULL) { - load_filtees(__DECONST(Obj_Entry *, obj), 0, req->lockstate); + flags = (req->flags & SYMLOOK_EARLY) ? RTLD_LO_EARLY : 0; + load_filtees(__DECONST(Obj_Entry *, obj), flags, req->lockstate); donelist_init(&donelist); symlook_init_from_req(&req1, req); res = symlook_needed(&req1, obj->needed_filtees, &donelist); @@ -3370,7 +3405,8 @@ symlook_obj(SymLook *req, const Obj_Entr return (res); } if (obj->needed_aux_filtees != NULL) { - load_filtees(__DECONST(Obj_Entry *, obj), 0, req->lockstate); + flags = (req->flags & SYMLOOK_EARLY) ? RTLD_LO_EARLY : 0; + load_filtees(__DECONST(Obj_Entry *, obj), flags, req->lockstate); donelist_init(&donelist); symlook_init_from_req(&req1, req); res = symlook_needed(&req1, obj->needed_aux_filtees, &donelist); Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Tue Apr 3 08:40:34 2012 (r233830) +++ stable/9/libexec/rtld-elf/rtld.h Tue Apr 3 08:54:35 2012 (r233831) @@ -229,6 +229,7 @@ typedef struct Struct_Obj_Entry { bool mainprog : 1; /* True if this is the main program */ bool rtld : 1; /* True if this is the dynamic linker */ + bool relocated : 1; /* True if processed by relocate_objects() */ bool textrel : 1; /* True if there are relocations to text seg */ bool symbolic : 1; /* True if generated with "-Bsymbolic" */ bool bind_now : 1; /* True if all relocations should be made first */ @@ -267,6 +268,7 @@ typedef struct Struct_Obj_Entry { #define SYMLOOK_IN_PLT 0x01 /* Lookup for PLT symbol */ #define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ +#define SYMLOOK_EARLY 0x04 /* Symlook is done during initialization. */ /* Flags for load_object(). */ #define RTLD_LO_NOLOAD 0x01 /* dlopen() specified RTLD_NOLOAD. */ @@ -274,6 +276,8 @@ typedef struct Struct_Obj_Entry { #define RTLD_LO_TRACE 0x04 /* Only tracing. */ #define RTLD_LO_NODELETE 0x08 /* Loaded object cannot be closed. */ #define RTLD_LO_FILTEES 0x10 /* Loading filtee. */ +#define RTLD_LO_EARLY 0x20 /* Do not call ctors, postpone it to the + initialization during the image start. */ /* * Symbol cache entry used during relocation to avoid multiple lookups @@ -353,11 +357,12 @@ const Ver_Entry *fetch_ventry(const Obj_ * MD function declarations. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 08:56:29 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 DDCD6106566B; Tue, 3 Apr 2012 08:56:29 +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 C83CF8FC12; Tue, 3 Apr 2012 08:56:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q338uT9a040747; Tue, 3 Apr 2012 08:56:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q338uTjm040744; Tue, 3 Apr 2012 08:56:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204030856.q338uTjm040744@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Apr 2012 08:56:29 +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: r233832 - stable/9/libexec/rtld-elf 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, 03 Apr 2012 08:56:30 -0000 Author: kib Date: Tue Apr 3 08:56:29 2012 New Revision: 233832 URL: http://svn.freebsd.org/changeset/base/233832 Log: MFC r233546: Prevent rtld_verify_object_versions() from being called several times for the same object. Modified: stable/9/libexec/rtld-elf/rtld.c stable/9/libexec/rtld-elf/rtld.h Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 08:54:35 2012 (r233831) +++ stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 08:56:29 2012 (r233832) @@ -4163,6 +4163,10 @@ rtld_verify_object_versions(Obj_Entry *o const Obj_Entry *depobj; int maxvernum, vernum; + if (obj->ver_checked) + return (0); + obj->ver_checked = true; + maxvernum = 0; /* * Walk over defined and required version records and figure out Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Tue Apr 3 08:54:35 2012 (r233831) +++ stable/9/libexec/rtld-elf/rtld.h Tue Apr 3 08:56:29 2012 (r233832) @@ -230,6 +230,7 @@ typedef struct Struct_Obj_Entry { bool mainprog : 1; /* True if this is the main program */ bool rtld : 1; /* True if this is the dynamic linker */ bool relocated : 1; /* True if processed by relocate_objects() */ + bool ver_checked : 1; /* True if processed by rtld_verify_object_versions */ bool textrel : 1; /* True if there are relocations to text seg */ bool symbolic : 1; /* True if generated with "-Bsymbolic" */ bool bind_now : 1; /* True if all relocations should be made first */ From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 09:02: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 812181065673; Tue, 3 Apr 2012 09:02:20 +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 6B48A8FC15; Tue, 3 Apr 2012 09:02: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 q3392KrD041007; Tue, 3 Apr 2012 09:02:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3392KXV041005; Tue, 3 Apr 2012 09:02:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204030902.q3392KXV041005@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Apr 2012 09:02: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: r233833 - stable/9/libexec/rtld-elf 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, 03 Apr 2012 09:02:20 -0000 Author: kib Date: Tue Apr 3 09:02:19 2012 New Revision: 233833 URL: http://svn.freebsd.org/changeset/base/233833 Log: MFC r233655: Add a special case in do_dlsym() for TLS stored symbols. MFC r233674: Fix ia64 build after r233655. Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 08:56:29 2012 (r233832) +++ stable/9/libexec/rtld-elf/rtld.c Tue Apr 3 09:02:19 2012 (r233833) @@ -2620,6 +2620,9 @@ do_dlsym(void *handle, const char *name, const Elf_Sym *def; SymLook req; RtldLockState lockstate; +#ifndef __ia64__ + tls_index ti; +#endif int res; def = NULL; @@ -2734,7 +2737,15 @@ do_dlsym(void *handle, const char *name, return (make_function_pointer(def, defobj)); else if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) return (rtld_resolve_ifunc(defobj, def)); - else + else if (ELF_ST_TYPE(def->st_info) == STT_TLS) { +#ifdef __ia64__ + return (__tls_get_addr(defobj->tlsindex, def->st_value)); +#else + ti.ti_module = defobj->tlsindex; + ti.ti_offset = def->st_value; + return (__tls_get_addr(&ti)); +#endif + } else return (defobj->relocbase + def->st_value); } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 15:42: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 9E988106566B; Tue, 3 Apr 2012 15:42:09 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F41C8FC19; Tue, 3 Apr 2012 15:42: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 q33Fg9Wl056503; Tue, 3 Apr 2012 15:42:09 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33Fg9Jj056499; Tue, 3 Apr 2012 15:42:09 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201204031542.q33Fg9Jj056499@svn.freebsd.org> From: Guy Helmer Date: Tue, 3 Apr 2012 15:42: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: r233837 - stable/9/lib/libutil 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, 03 Apr 2012 15:42:09 -0000 Author: ghelmer Date: Tue Apr 3 15:42:08 2012 New Revision: 233837 URL: http://svn.freebsd.org/changeset/base/233837 Log: MFC r229937: Add pidfile_fileno() to obtain the file descriptor for an open pidfile. Modified: stable/9/lib/libutil/libutil.h stable/9/lib/libutil/pidfile.3 stable/9/lib/libutil/pidfile.c Directory Properties: stable/9/lib/libutil/ (props changed) Modified: stable/9/lib/libutil/libutil.h ============================================================================== --- stable/9/lib/libutil/libutil.h Tue Apr 3 14:29:24 2012 (r233836) +++ stable/9/lib/libutil/libutil.h Tue Apr 3 15:42:08 2012 (r233837) @@ -163,6 +163,7 @@ struct pidfh *pidfile_open(const char *p int pidfile_write(struct pidfh *pfh); int pidfile_close(struct pidfh *pfh); int pidfile_remove(struct pidfh *pfh); +int pidfile_fileno(struct pidfh *pfh); #endif #ifdef _UFS_UFS_QUOTA_H_ Modified: stable/9/lib/libutil/pidfile.3 ============================================================================== --- stable/9/lib/libutil/pidfile.3 Tue Apr 3 14:29:24 2012 (r233836) +++ stable/9/lib/libutil/pidfile.3 Tue Apr 3 15:42:08 2012 (r233837) @@ -46,6 +46,8 @@ .Fn pidfile_close "struct pidfh *pfh" .Ft int .Fn pidfile_remove "struct pidfh *pfh" +.Ft int +.Fn pidfile_fileno "struct pidfh *pfh" .Sh DESCRIPTION The .Nm pidfile @@ -89,6 +91,10 @@ to start a child process. The .Fn pidfile_remove function closes and removes a pidfile. +.Pp +The +.Fn pidfile_fileno +function returns the file descriptor for the open pid file. .Sh RETURN VALUES The .Fn pidfile_open @@ -102,15 +108,25 @@ If an error occurs, will be set. .Pp .Rv -std pidfile_write pidfile_close pidfile_remove +.Pp +The +.Fn pidfile_fileno +function returns the low-level file descriptor. +It returns -1 and sets +.Va errno +if a NULL +.Vt pidfh +is specified, or if the pidfile is no longer open. .Sh EXAMPLES The following example shows in which order these functions should be used. Note that it is safe to pass .Dv NULL to .Fn pidfile_write , -.Fn pidfile_remove -and +.Fn pidfile_remove , .Fn pidfile_close +and +.Fn pidfile_fileno functions. .Bd -literal struct pidfh *pfh; @@ -239,6 +255,16 @@ and system calls and the .Xr flopen 3 library function. +.Pp +The +.Fn pidfile_fileno +function will fail if: +.Bl -tag -width Er +.It Bq Er EDOOFUS +Improper function use. +Probably called not from the process which used +.Fn pidfile_open . +.El .Sh SEE ALSO .Xr open 2 , .Xr daemon 3 , Modified: stable/9/lib/libutil/pidfile.c ============================================================================== --- stable/9/lib/libutil/pidfile.c Tue Apr 3 14:29:24 2012 (r233836) +++ stable/9/lib/libutil/pidfile.c Tue Apr 3 15:42:08 2012 (r233837) @@ -252,3 +252,13 @@ pidfile_remove(struct pidfh *pfh) return (_pidfile_remove(pfh, 1)); } + +int +pidfile_fileno(struct pidfh *pfh) +{ + if (pfh == NULL || pfh->pf_fd == -1) { + errno = EDOOFUS; + return (-1); + } + return (pfh->pf_fd); +} From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:01: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 06274106566C; Tue, 3 Apr 2012 17:01:38 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E56008FC15; Tue, 3 Apr 2012 17:01: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 q33H1bwN059529; Tue, 3 Apr 2012 17:01:37 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H1b38059527; Tue, 3 Apr 2012 17:01:37 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031701.q33H1b38059527@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:01:37 +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: r233838 - stable/9/sys/dev/iwn 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, 03 Apr 2012 17:01:38 -0000 Author: bschmidt Date: Tue Apr 3 17:01:37 2012 New Revision: 233838 URL: http://svn.freebsd.org/changeset/base/233838 Log: MFC r233567: Add support for 6150 series devices. Tested by: Shane Riddle Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Tue Apr 3 15:42:08 2012 (r233837) +++ stable/9/sys/dev/iwn/if_iwn.c Tue Apr 3 17:01:37 2012 (r233838) @@ -89,6 +89,8 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x0885, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0886, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:03:34 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 95C341065674; Tue, 3 Apr 2012 17:03:34 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 804498FC08; Tue, 3 Apr 2012 17:03:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33H3YOv059641; Tue, 3 Apr 2012 17:03:34 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H3Y3p059639; Tue, 3 Apr 2012 17:03:34 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031703.q33H3Y3p059639@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:03: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: r233839 - stable/8/sys/dev/iwn 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, 03 Apr 2012 17:03:34 -0000 Author: bschmidt Date: Tue Apr 3 17:03:33 2012 New Revision: 233839 URL: http://svn.freebsd.org/changeset/base/233839 Log: MFC r233567: Add support for 6150 series devices. Tested by: Shane Riddle Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Tue Apr 3 17:01:37 2012 (r233838) +++ stable/8/sys/dev/iwn/if_iwn.c Tue Apr 3 17:03:33 2012 (r233839) @@ -89,6 +89,8 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, + { 0x8086, 0x0885, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0886, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:04: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 0A916106564A; Tue, 3 Apr 2012 17:04:49 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D034D8FC0C; Tue, 3 Apr 2012 17:04: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 q33H4mFx059734; Tue, 3 Apr 2012 17:04:48 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H4m1s059732; Tue, 3 Apr 2012 17:04:48 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031704.q33H4m1s059732@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:04: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: r233840 - stable/9/share/man/man4 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, 03 Apr 2012 17:04:49 -0000 Author: bschmidt Date: Tue Apr 3 17:04:48 2012 New Revision: 233840 URL: http://svn.freebsd.org/changeset/base/233840 Log: MFC r233568: Add a list of available devices which matches the names shown by pciconf. While here add 2 missing firmware modules. Modified: stable/9/share/man/man4/iwn.4 Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/iwn.4 ============================================================================== --- stable/9/share/man/man4/iwn.4 Tue Apr 3 17:03:33 2012 (r233839) +++ stable/9/share/man/man4/iwn.4 Tue Apr 3 17:04:48 2012 (r233840) @@ -25,13 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2010 +.Dd March 27, 2012 .Dt IWN 4 .Os .Sh NAME .Nm iwn -.Nd Intel Wireless WiFi Link 4965/1000/5000/5150/5300/6000/6050 -IEEE 802.11n driver +.Nd Intel IEEE 802.11n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -51,6 +50,8 @@ Choose one from: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6000g2afw" +.Cd "device iwn6000g2bfw" .Cd "device iwn6050fw" .Ed .Pp @@ -71,15 +72,32 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6000g2afw_load="YES" +iwn6000g2bfw_load="YES" iwn6050fw_load="YES" .Ed .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -Wireless WiFi Link 4965, 1000, 5000 and 6000 series of -PCI-Express network adapters. +driver provides support for: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Intel Centrino Advanced-N 6200 +.It Intel Centrino Advanced-N 6205 +.It Intel Centrino Advanced-N 6230 +.It Intel Centrino Advanced-N + WiMAX 6250 +.It Intel Centrino Ultimate-N 6300 +.It Intel Centrino Wireless-N 130 +.It Intel Centrino Wireless-N 1000 +.It Intel Centrino Wireless-N 1030 +.It Intel Centrino Wireless-N + WiMAX 6150 +.It Intel Ultimate N WiFi Link 5300 +.It Intel Wireless WiFi Link 4965 +.It Intel WiFi Link 5100 +.It Intel WiMAX/WiFi Link 5150 +.It Intel WiMAX/WiFi Link 5350 +.El +.Pp .Nm supports .Cm station , From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:05:26 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 CA8311065692; Tue, 3 Apr 2012 17:05:26 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC5E8FC12; Tue, 3 Apr 2012 17:05:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q33H5QKC059795; Tue, 3 Apr 2012 17:05:26 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H5Qhe059793; Tue, 3 Apr 2012 17:05:26 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031705.q33H5Qhe059793@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:05:26 +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: r233841 - stable/8/share/man/man4 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, 03 Apr 2012 17:05:26 -0000 Author: bschmidt Date: Tue Apr 3 17:05:26 2012 New Revision: 233841 URL: http://svn.freebsd.org/changeset/base/233841 Log: MFC r233568: Add a list of available devices which matches the names shown by pciconf. While here add 2 missing firmware modules. Modified: stable/8/share/man/man4/iwn.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Tue Apr 3 17:04:48 2012 (r233840) +++ stable/8/share/man/man4/iwn.4 Tue Apr 3 17:05:26 2012 (r233841) @@ -25,13 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2010 +.Dd March 27, 2012 .Dt IWN 4 .Os .Sh NAME .Nm iwn -.Nd Intel Wireless WiFi Link 4965/1000/5000/5150/5300/6000/6050 -IEEE 802.11n driver +.Nd Intel IEEE 802.11n wireless network driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -51,6 +50,8 @@ Choose one from: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6000g2afw" +.Cd "device iwn6000g2bfw" .Cd "device iwn6050fw" .Ed .Pp @@ -71,15 +72,32 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6000g2afw_load="YES" +iwn6000g2bfw_load="YES" iwn6050fw_load="YES" .Ed .Sh DESCRIPTION The .Nm -driver provides support for -.Tn Intel -Wireless WiFi Link 4965, 1000, 5000 and 6000 series of -PCI-Express network adapters. +driver provides support for: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It Intel Centrino Advanced-N 6200 +.It Intel Centrino Advanced-N 6205 +.It Intel Centrino Advanced-N 6230 +.It Intel Centrino Advanced-N + WiMAX 6250 +.It Intel Centrino Ultimate-N 6300 +.It Intel Centrino Wireless-N 130 +.It Intel Centrino Wireless-N 1000 +.It Intel Centrino Wireless-N 1030 +.It Intel Centrino Wireless-N + WiMAX 6150 +.It Intel Ultimate N WiFi Link 5300 +.It Intel Wireless WiFi Link 4965 +.It Intel WiFi Link 5100 +.It Intel WiMAX/WiFi Link 5150 +.It Intel WiMAX/WiFi Link 5350 +.El +.Pp .Nm supports .Cm station , From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:08:18 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 DE600106566B; Tue, 3 Apr 2012 17:08:17 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7F8A8FC1C; Tue, 3 Apr 2012 17:08: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 q33H8HJB059968; Tue, 3 Apr 2012 17:08:17 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H8HTQ059966; Tue, 3 Apr 2012 17:08:17 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031708.q33H8HTQ059966@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:08: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: r233842 - stable/9/sys/dev/iwn 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, 03 Apr 2012 17:08:18 -0000 Author: bschmidt Date: Tue Apr 3 17:08:17 2012 New Revision: 233842 URL: http://svn.freebsd.org/changeset/base/233842 Log: MFC r233571: strip (R) to match manpage and pci_vendors Modified: stable/9/sys/dev/iwn/if_iwn.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Tue Apr 3 17:05:26 2012 (r233841) +++ stable/9/sys/dev/iwn/if_iwn.c Tue Apr 3 17:08:17 2012 (r233842) @@ -79,35 +79,35 @@ struct iwn_ident { }; static const struct iwn_ident iwn_ident_table[] = { - { 0x8086, 0x0082, "Intel(R) Centrino(R) Advanced-N 6205" }, - { 0x8086, 0x0083, "Intel(R) Centrino(R) Wireless-N 1000" }, - { 0x8086, 0x0084, "Intel(R) Centrino(R) Wireless-N 1000" }, - { 0x8086, 0x0085, "Intel(R) Centrino(R) Advanced-N 6205" }, - { 0x8086, 0x0087, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, - { 0x8086, 0x0089, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, - { 0x8086, 0x008a, "Intel(R) Centrino(R) Wireless-N 1030" }, - { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, - { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, - { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, - { 0x8086, 0x0885, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0886, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, - { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, - { 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200" }, - { 0x8086, 0x422d, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4230, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4232, "Intel(R) WiFi Link 5100" }, - { 0x8086, 0x4233, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4235, "Intel(R) Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4236, "Intel(R) Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4237, "Intel(R) WiFi Link 5100" }, - { 0x8086, 0x4238, "Intel(R) Centrino(R) Ultimate-N 6300" }, - { 0x8086, 0x4239, "Intel(R) Centrino(R) Advanced-N 6200" }, - { 0x8086, 0x423a, "Intel(R) WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423b, "Intel(R) WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423c, "Intel(R) WiMAX/WiFi Link 5150" }, - { 0x8086, 0x423d, "Intel(R) WiMAX/WiFi Link 5150" }, + { 0x8086, 0x0082, "Intel Centrino Advanced-N 6205" }, + { 0x8086, 0x0083, "Intel Centrino Wireless-N 1000" }, + { 0x8086, 0x0084, "Intel Centrino Wireless-N 1000" }, + { 0x8086, 0x0085, "Intel Centrino Advanced-N 6205" }, + { 0x8086, 0x0087, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, 0x0089, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, 0x008a, "Intel Centrino Wireless-N 1030" }, + { 0x8086, 0x008b, "Intel Centrino Wireless-N 1030" }, + { 0x8086, 0x0090, "Intel Centrino Advanced-N 6230" }, + { 0x8086, 0x0091, "Intel Centrino Advanced-N 6230" }, + { 0x8086, 0x0885, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0886, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0896, "Intel Centrino Wireless-N 130" }, + { 0x8086, 0x4229, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x422b, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, 0x422c, "Intel Centrino Advanced-N 6200" }, + { 0x8086, 0x422d, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4230, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4232, "Intel WiFi Link 5100" }, + { 0x8086, 0x4233, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4235, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4236, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4237, "Intel WiFi Link 5100" }, + { 0x8086, 0x4238, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, 0x4239, "Intel Centrino Advanced-N 6200" }, + { 0x8086, 0x423a, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423b, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" }, + { 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" }, { 0, 0, NULL } }; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 17:08:35 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 5318010657EA; Tue, 3 Apr 2012 17:08:35 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD9A8FC21; Tue, 3 Apr 2012 17:08: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 q33H8Z2S060012; Tue, 3 Apr 2012 17:08:35 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33H8ZY8060010; Tue, 3 Apr 2012 17:08:35 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201204031708.q33H8ZY8060010@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 3 Apr 2012 17:08:35 +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: r233843 - stable/8/sys/dev/iwn 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, 03 Apr 2012 17:08:35 -0000 Author: bschmidt Date: Tue Apr 3 17:08:34 2012 New Revision: 233843 URL: http://svn.freebsd.org/changeset/base/233843 Log: MFC r233571: strip (R) to match manpage and pci_vendors Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Tue Apr 3 17:08:17 2012 (r233842) +++ stable/8/sys/dev/iwn/if_iwn.c Tue Apr 3 17:08:34 2012 (r233843) @@ -79,35 +79,35 @@ struct iwn_ident { }; static const struct iwn_ident iwn_ident_table[] = { - { 0x8086, 0x0082, "Intel(R) Centrino(R) Advanced-N 6205" }, - { 0x8086, 0x0083, "Intel(R) Centrino(R) Wireless-N 1000" }, - { 0x8086, 0x0084, "Intel(R) Centrino(R) Wireless-N 1000" }, - { 0x8086, 0x0085, "Intel(R) Centrino(R) Advanced-N 6205" }, - { 0x8086, 0x0087, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, - { 0x8086, 0x0089, "Intel(R) Centrino(R) Advanced-N + WiMAX 6250" }, - { 0x8086, 0x008a, "Intel(R) Centrino(R) Wireless-N 1030" }, - { 0x8086, 0x008b, "Intel(R) Centrino(R) Wireless-N 1030" }, - { 0x8086, 0x0090, "Intel(R) Centrino(R) Advanced-N 6230" }, - { 0x8086, 0x0091, "Intel(R) Centrino(R) Advanced-N 6230" }, - { 0x8086, 0x0885, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0886, "Intel(R) Centrino(R) Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0896, "Intel(R) Centrino(R) Wireless-N 130" }, - { 0x8086, 0x4229, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x422b, "Intel(R) Centrino(R) Ultimate-N 6300" }, - { 0x8086, 0x422c, "Intel(R) Centrino(R) Advanced-N 6200" }, - { 0x8086, 0x422d, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4230, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4232, "Intel(R) WiFi Link 5100" }, - { 0x8086, 0x4233, "Intel(R) Wireless WiFi Link 4965" }, - { 0x8086, 0x4235, "Intel(R) Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4236, "Intel(R) Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4237, "Intel(R) WiFi Link 5100" }, - { 0x8086, 0x4238, "Intel(R) Centrino(R) Ultimate-N 6300" }, - { 0x8086, 0x4239, "Intel(R) Centrino(R) Advanced-N 6200" }, - { 0x8086, 0x423a, "Intel(R) WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423b, "Intel(R) WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423c, "Intel(R) WiMAX/WiFi Link 5150" }, - { 0x8086, 0x423d, "Intel(R) WiMAX/WiFi Link 5150" }, + { 0x8086, 0x0082, "Intel Centrino Advanced-N 6205" }, + { 0x8086, 0x0083, "Intel Centrino Wireless-N 1000" }, + { 0x8086, 0x0084, "Intel Centrino Wireless-N 1000" }, + { 0x8086, 0x0085, "Intel Centrino Advanced-N 6205" }, + { 0x8086, 0x0087, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, 0x0089, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, 0x008a, "Intel Centrino Wireless-N 1030" }, + { 0x8086, 0x008b, "Intel Centrino Wireless-N 1030" }, + { 0x8086, 0x0090, "Intel Centrino Advanced-N 6230" }, + { 0x8086, 0x0091, "Intel Centrino Advanced-N 6230" }, + { 0x8086, 0x0885, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0886, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, 0x0896, "Intel Centrino Wireless-N 130" }, + { 0x8086, 0x4229, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x422b, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, 0x422c, "Intel Centrino Advanced-N 6200" }, + { 0x8086, 0x422d, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4230, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4232, "Intel WiFi Link 5100" }, + { 0x8086, 0x4233, "Intel Wireless WiFi Link 4965" }, + { 0x8086, 0x4235, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4236, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, 0x4237, "Intel WiFi Link 5100" }, + { 0x8086, 0x4238, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, 0x4239, "Intel Centrino Advanced-N 6200" }, + { 0x8086, 0x423a, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423b, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" }, + { 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" }, { 0, 0, NULL } }; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 19:34:01 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 2C334106564A; Tue, 3 Apr 2012 19:34:01 +0000 (UTC) (envelope-from gleb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 160028FC14; Tue, 3 Apr 2012 19:34: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 q33JY0Fj065375; Tue, 3 Apr 2012 19:34:00 GMT (envelope-from gleb@svn.freebsd.org) Received: (from gleb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33JY0fO065372; Tue, 3 Apr 2012 19:34:00 GMT (envelope-from gleb@svn.freebsd.org) Message-Id: <201204031934.q33JY0fO065372@svn.freebsd.org> From: Gleb Kurtsou Date: Tue, 3 Apr 2012 19:34:00 +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: r233851 - stable/9/sys/fs/tmpfs 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, 03 Apr 2012 19:34:01 -0000 Author: gleb Date: Tue Apr 3 19:34:00 2012 New Revision: 233851 URL: http://svn.freebsd.org/changeset/base/233851 Log: MFC r232959 and r232960: Prevent tmpfs_rename() deadlock in a way similar to UFS. Unlock vnodes and try to lock them one by one. Relookup fvp and tvp. Don't enforce LK_RETRY to get existing vnode in tmpfs_alloc_vp(). Doomed vnode is hardly of any use here, besides all callers handle error case. vfs_hash_get() does the same. Don't mess with vnode holdcount, vget() takes care of it already. Approved by: mdf (mentor) Modified: stable/9/sys/fs/tmpfs/tmpfs_subr.c stable/9/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 3 18:38:00 2012 (r233850) +++ stable/9/sys/fs/tmpfs/tmpfs_subr.c Tue Apr 3 19:34:00 2012 (r233851) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -55,6 +56,8 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_NODE(_vfs, OID_AUTO, tmpfs, CTLFLAG_RW, 0, "tmpfs file system"); + /* --------------------------------------------------------------------- */ /* @@ -319,9 +322,11 @@ loop: MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); TMPFS_NODE_UNLOCK(node); - vholdl(vp); - (void) vget(vp, lkflag | LK_INTERLOCK | LK_RETRY, curthread); - vdrop(vp); + error = vget(vp, lkflag | LK_INTERLOCK, curthread); + if (error != 0) { + vp = NULL; + goto out; + } /* * Make sure the vnode is still there after @@ -419,11 +424,13 @@ unlock: out: *vpp = vp; - MPASS(IFF(error == 0, *vpp != NULL && VOP_ISLOCKED(*vpp))); #ifdef INVARIANTS - TMPFS_NODE_LOCK(node); - MPASS(*vpp == node->tn_vnode); - TMPFS_NODE_UNLOCK(node); + if (error == 0) { + MPASS(*vpp != NULL && VOP_ISLOCKED(*vpp)); + TMPFS_NODE_LOCK(node); + MPASS(*vpp == node->tn_vnode); + TMPFS_NODE_UNLOCK(node); + } #endif return error; Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 3 18:38:00 2012 (r233850) +++ stable/9/sys/fs/tmpfs/tmpfs_vnops.c Tue Apr 3 19:34:00 2012 (r233851) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -60,6 +61,13 @@ __FBSDID("$FreeBSD$"); #include #include +SYSCTL_DECL(_vfs_tmpfs); + +static volatile int tmpfs_rename_restarts; +SYSCTL_INT(_vfs_tmpfs, OID_AUTO, rename_restarts, CTLFLAG_RD, + __DEVOLATILE(int *, &tmpfs_rename_restarts), 0, + "Times rename had to restart due to lock contention"); + /* --------------------------------------------------------------------- */ static int @@ -920,6 +928,139 @@ out: /* --------------------------------------------------------------------- */ +/* + * We acquire all but fdvp locks using non-blocking acquisitions. If we + * fail to acquire any lock in the path we will drop all held locks, + * acquire the new lock in a blocking fashion, and then release it and + * restart the rename. This acquire/release step ensures that we do not + * spin on a lock waiting for release. On error release all vnode locks + * and decrement references the way tmpfs_rename() would do. + */ +static int +tmpfs_rename_relock(struct vnode *fdvp, struct vnode **fvpp, + struct vnode *tdvp, struct vnode **tvpp, + struct componentname *fcnp, struct componentname *tcnp) +{ + struct vnode *nvp; + struct mount *mp; + struct tmpfs_dirent *de; + int error, restarts = 0; + + VOP_UNLOCK(tdvp, 0); + if (*tvpp != NULL && *tvpp != tdvp) + VOP_UNLOCK(*tvpp, 0); + mp = fdvp->v_mount; + +relock: + restarts += 1; + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error) + goto releout; + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error) + goto releout; + VOP_UNLOCK(tdvp, 0); + goto relock; + } + /* + * Re-resolve fvp to be certain it still exists and fetch the + * correct vnode. + */ + de = tmpfs_dir_lookup(VP_TO_TMPFS_DIR(fdvp), NULL, fcnp); + if (de == NULL) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if ((fcnp->cn_flags & ISDOTDOT) != 0 || + (fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.')) + error = EINVAL; + else + error = ENOENT; + goto releout; + } + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (error != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + /* + * Concurrent rename race. + */ + if (nvp == tdvp) { + vrele(nvp); + error = EINVAL; + goto releout; + } + vrele(*fvpp); + *fvpp = nvp; + goto relock; + } + vrele(*fvpp); + *fvpp = nvp; + VOP_UNLOCK(*fvpp, 0); + /* + * Re-resolve tvp and acquire the vnode lock if present. + */ + de = tmpfs_dir_lookup(VP_TO_TMPFS_DIR(tdvp), NULL, tcnp); + /* + * If tvp disappeared we just carry on. + */ + if (de == NULL && *tvpp != NULL) { + vrele(*tvpp); + *tvpp = NULL; + } + /* + * Get the tvp ino if the lookup succeeded. We may have to restart + * if the non-blocking acquire fails. + */ + if (de != NULL) { + nvp = NULL; + error = tmpfs_alloc_vp(mp, de->td_node, + LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (*tvpp != NULL) + vrele(*tvpp); + *tvpp = nvp; + if (error != 0) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = tmpfs_alloc_vp(mp, de->td_node, LK_EXCLUSIVE, + &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + /* + * fdvp contains fvp, thus tvp (=fdvp) is not empty. + */ + if (nvp == fdvp) { + error = ENOTEMPTY; + goto releout; + } + goto relock; + } + } + tmpfs_rename_restarts += restarts; + + return (0); + +releout: + vrele(fdvp); + vrele(*fvpp); + vrele(tdvp); + if (*tvpp != NULL) + vrele(*tvpp); + tmpfs_rename_restarts += restarts; + + return (error); +} + static int tmpfs_rename(struct vop_rename_args *v) { @@ -929,6 +1070,7 @@ tmpfs_rename(struct vop_rename_args *v) struct vnode *tdvp = v->a_tdvp; struct vnode *tvp = v->a_tvp; struct componentname *tcnp = v->a_tcnp; + struct mount *mp = NULL; char *newname; int error; @@ -944,8 +1086,6 @@ tmpfs_rename(struct vop_rename_args *v) MPASS(fcnp->cn_flags & HASBUF); MPASS(tcnp->cn_flags & HASBUF); - tnode = (tvp == NULL) ? NULL : VP_TO_TMPFS_NODE(tvp); - /* Disallow cross-device renames. * XXX Why isn't this done by the caller? */ if (fvp->v_mount != tdvp->v_mount || @@ -954,9 +1094,6 @@ tmpfs_rename(struct vop_rename_args *v) goto out; } - tmp = VFS_TO_TMPFS(tdvp->v_mount); - tdnode = VP_TO_TMPFS_DIR(tdvp); - /* If source and target are the same file, there is nothing to do. */ if (fvp == tvp) { error = 0; @@ -965,8 +1102,37 @@ tmpfs_rename(struct vop_rename_args *v) /* If we need to move the directory between entries, lock the * source so that we can safely operate on it. */ - if (fdvp != tdvp && fdvp != tvp) - vn_lock(fdvp, LK_EXCLUSIVE | LK_RETRY); + if (fdvp != tdvp && fdvp != tvp) { + if (vn_lock(fdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + mp = tdvp->v_mount; + error = vfs_busy(mp, 0); + if (error != 0) { + mp = NULL; + goto out; + } + error = tmpfs_rename_relock(fdvp, &fvp, tdvp, &tvp, + fcnp, tcnp); + if (error != 0) { + vfs_unbusy(mp); + return (error); + } + ASSERT_VOP_ELOCKED(fdvp, + "tmpfs_rename: fdvp not locked"); + ASSERT_VOP_ELOCKED(tdvp, + "tmpfs_rename: tdvp not locked"); + if (tvp != NULL) + ASSERT_VOP_ELOCKED(tvp, + "tmpfs_rename: tvp not locked"); + if (fvp == tvp) { + error = 0; + goto out_locked; + } + } + } + + tmp = VFS_TO_TMPFS(tdvp->v_mount); + tdnode = VP_TO_TMPFS_DIR(tdvp); + tnode = (tvp == NULL) ? NULL : VP_TO_TMPFS_NODE(tvp); fdnode = VP_TO_TMPFS_DIR(fdvp); fnode = VP_TO_TMPFS_NODE(fvp); de = tmpfs_dir_lookup(fdnode, fnode, fcnp); @@ -1160,6 +1326,9 @@ out: vrele(fdvp); vrele(fvp); + if (mp != NULL) + vfs_unbusy(mp); + return error; } From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 20:49:27 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 4102310656A5; Tue, 3 Apr 2012 20:49:27 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE398FC08; Tue, 3 Apr 2012 20:49: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 q33KnRKp068485; Tue, 3 Apr 2012 20:49:27 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33KnQf2068482; Tue, 3 Apr 2012 20:49:26 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201204032049.q33KnQf2068482@svn.freebsd.org> From: Guy Helmer Date: Tue, 3 Apr 2012 20:49:26 +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: r233855 - stable/9/lib/libutil 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, 03 Apr 2012 20:49:27 -0000 Author: ghelmer Date: Tue Apr 3 20:49:26 2012 New Revision: 233855 URL: http://svn.freebsd.org/changeset/base/233855 Log: MFC r229951,229985-229986,229988,230011,230037,230233,230599-230601 libutil.h and pidfile.c cleanup: 229951: Constify arguments (pjd) 229985: Fix forward structure declaration and prototype disorder. 229986: Fix namespace issues with prototype parameter names. Add missing prototype parameter names. 229988: Fix prototype formatting (indentation, long lines, and continued lines). 230011: More prototype formatting fixes, struct member formatting fixes, and namespace fix for property_find() prototype. 230037: Move struct pidfh definition into pidfile.c, and leave a forward declaration for pidfh in libutil.h in its place. This allows us to hide the contents of the pidfh structure, and also allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the pidfile_* function prototypes. 230233: Fix more disorder in prototypes and constants. Fix header comments for each section of constants. Fix whitespace in #define lines. Fix unnecessary parenthesis in constants. 230599: Restore the parenthesis that are necessary around the constant values. 230600: Make the comments consistent (capitalization, punctuation, and format). 230601: Consensus between bde and pjd seemed to be that if the function names are lined up, then any * after a long type should appear after the type instead of being in front of the function name on the following line. Modified: stable/9/lib/libutil/libutil.h stable/9/lib/libutil/pidfile.c Directory Properties: stable/9/lib/libutil/ (props changed) Modified: stable/9/lib/libutil/libutil.h ============================================================================== --- stable/9/lib/libutil/libutil.h Tue Apr 3 20:16:26 2012 (r233854) +++ stable/9/lib/libutil/libutil.h Tue Apr 3 20:49:26 2012 (r233855) @@ -48,6 +48,11 @@ typedef __gid_t gid_t; #define _GID_T_DECLARED #endif +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; +#define _MODE_T_DECLARED +#endif + #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED @@ -63,66 +68,36 @@ typedef __uid_t uid_t; #define _UID_T_DECLARED #endif -#define PROPERTY_MAX_NAME 64 -#define PROPERTY_MAX_VALUE 512 +#define PROPERTY_MAX_NAME 64 +#define PROPERTY_MAX_VALUE 512 -/* for properties.c */ +/* For properties.c. */ typedef struct _property { struct _property *next; - char *name; - char *value; + char *name; + char *value; } *properties; -#ifdef _SYS_PARAM_H_ -/* for pidfile.c */ -struct pidfh { - int pf_fd; - char pf_path[MAXPATHLEN + 1]; - __dev_t pf_dev; - ino_t pf_ino; -}; -#endif - -/* Avoid pulling in all the include files for no need */ +/* Avoid pulling in all the include files for no need. */ +struct in_addr; +struct pidfh; +struct sockaddr; struct termios; struct winsize; -struct in_addr; -struct kinfo_file; -struct kinfo_proc; -struct kinfo_vmentry; __BEGIN_DECLS +char *auth_getval(const char *_name); void clean_environment(const char * const *_white, const char * const *_more_white); +int expand_number(const char *_buf, uint64_t *_num); int extattr_namespace_to_string(int _attrnamespace, char **_string); int extattr_string_to_namespace(const char *_string, int *_attrnamespace); int flopen(const char *_path, int _flags, ...); -void hexdump(const void *ptr, int length, const char *hdr, int flags); -int login_tty(int _fd); -void trimdomain(char *_fullhost, int _hostsize); -int openpty(int *_amaster, int *_aslave, char *_name, - struct termios *_termp, struct winsize *_winp); int forkpty(int *_amaster, char *_name, - struct termios *_termp, struct winsize *_winp); + struct termios *_termp, struct winsize *_winp); +void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags); int humanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); -int expand_number(const char *_buf, uint64_t *_num); -const char *uu_lockerr(int _uu_lockresult); -int uu_lock(const char *_ttyname); -int uu_unlock(const char *_ttyname); -int uu_lock_txfr(const char *_ttyname, pid_t _pid); -int _secure_path(const char *_path, uid_t _uid, gid_t _gid); -properties properties_read(int fd); -void properties_free(properties list); -char *property_find(properties list, const char *name); -char *auth_getval(const char *name); -int realhostname(char *host, size_t hsize, const struct in_addr *ip); -struct sockaddr; -int realhostname_sa(char *host, size_t hsize, struct sockaddr *addr, - int addrlen); - -int kld_isloaded(const char *name); -int kld_load(const char *name); struct kinfo_file * kinfo_getfile(pid_t _pid, int *_cntp); struct kinfo_vmentry * @@ -131,14 +106,46 @@ struct kinfo_proc * kinfo_getallproc(int *_cntp); struct kinfo_proc * kinfo_getproc(pid_t _pid); +int kld_isloaded(const char *_name); +int kld_load(const char *_name); +int login_tty(int _fd); +int openpty(int *_amaster, int *_aslave, char *_name, + struct termios *_termp, struct winsize *_winp); +int pidfile_close(struct pidfh *_pfh); +int pidfile_fileno(const struct pidfh *_pfh); +struct pidfh * + pidfile_open(const char *_path, mode_t _mode, pid_t *_pidptr); +int pidfile_remove(struct pidfh *_pfh); +int pidfile_write(struct pidfh *_pfh); +void properties_free(properties _list); +char *property_find(properties _list, const char *_name); +properties + properties_read(int _fd); +int realhostname(char *_host, size_t _hsize, const struct in_addr *_ip); +int realhostname_sa(char *_host, size_t _hsize, struct sockaddr *_addr, + int _addrlen); +int _secure_path(const char *_path, uid_t _uid, gid_t _gid); +void trimdomain(char *_fullhost, int _hostsize); +const char * + uu_lockerr(int _uu_lockresult); +int uu_lock(const char *_ttyname); +int uu_unlock(const char *_ttyname); +int uu_lock_txfr(const char *_ttyname, pid_t _pid); -#ifdef _STDIO_H_ /* avoid adding new includes */ -char *fparseln(FILE *, size_t *, size_t *, const char[3], int); +/* + * Conditionally prototype the following functions if the include + * files upon which they depend have been included. + */ +#ifdef _STDIO_H_ +char *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, + const char _delim[3], int _flags); #endif #ifdef _PWD_H_ -int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, struct passwd *_old_pw); -struct passwd *pw_dup(const struct passwd *_pw); +int pw_copy(int _ffd, int _tfd, const struct passwd *_pw, + struct passwd *_old_pw); +struct passwd + *pw_dup(const struct passwd *_pw); int pw_edit(int _notsetuid); int pw_equal(const struct passwd *_pw1, const struct passwd *_pw2); void pw_fini(void); @@ -146,61 +153,44 @@ int pw_init(const char *_dir, const char char *pw_make(const struct passwd *_pw); int pw_mkdb(const char *_user); int pw_lock(void); -struct passwd *pw_scan(const char *_line, int _flags); -const char *pw_tempname(void); +struct passwd * + pw_scan(const char *_line, int _flags); +const char * + pw_tempname(void); int pw_tmp(int _mfd); #endif #ifdef _GRP_H_ -int gr_equal(const struct group *gr1, const struct group *gr2); -char *gr_make(const struct group *gr); -struct group *gr_dup(const struct group *gr); -struct group *gr_scan(const char *line); -#endif - -#ifdef _SYS_PARAM_H_ -struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr); -int pidfile_write(struct pidfh *pfh); -int pidfile_close(struct pidfh *pfh); -int pidfile_remove(struct pidfh *pfh); -int pidfile_fileno(struct pidfh *pfh); +struct group * + gr_dup(const struct group *_gr); +int gr_equal(const struct group *_gr1, const struct group *_gr2); +char *gr_make(const struct group *_gr); +struct group * + gr_scan(const char *_line); #endif #ifdef _UFS_UFS_QUOTA_H_ -struct quotafile; struct fstab; -struct quotafile *quota_open(struct fstab *, int, int); -void quota_close(struct quotafile *); -int quota_on(struct quotafile *); -int quota_off(struct quotafile *); -const char *quota_fsname(const struct quotafile *); -const char *quota_qfname(const struct quotafile *); -int quota_maxid(struct quotafile *); -int quota_check_path(const struct quotafile *, const char *path); -int quota_read(struct quotafile *, struct dqblk *, int); -int quota_write_limits(struct quotafile *, struct dqblk *, int); -int quota_write_usage(struct quotafile *, struct dqblk *, int); -int quota_convert(struct quotafile *, int); +struct quotafile; +int quota_check_path(const struct quotafile *_qf, const char *_path); +void quota_close(struct quotafile *_qf); +int quota_convert(struct quotafile *_qf, int _wordsize); +const char * + quota_fsname(const struct quotafile *_qf); +int quota_maxid(struct quotafile *_qf); +int quota_off(struct quotafile *_qf); +int quota_on(struct quotafile *_qf); +struct quotafile * + quota_open(struct fstab *_fs, int _quotatype, int _openflags); +const char * + quota_qfname(const struct quotafile *_qf); +int quota_read(struct quotafile *_qf, struct dqblk *_dqb, int _id); +int quota_write_limits(struct quotafile *_qf, struct dqblk *_dqb, int _id); +int quota_write_usage(struct quotafile *_qf, struct dqblk *_dqb, int _id); #endif __END_DECLS -#define UU_LOCK_INUSE (1) -#define UU_LOCK_OK (0) -#define UU_LOCK_OPEN_ERR (-1) -#define UU_LOCK_READ_ERR (-2) -#define UU_LOCK_CREAT_ERR (-3) -#define UU_LOCK_WRITE_ERR (-4) -#define UU_LOCK_LINK_ERR (-5) -#define UU_LOCK_TRY_ERR (-6) -#define UU_LOCK_OWNER_ERR (-7) - -/* return values from realhostname() */ -#define HOSTNAME_FOUND (0) -#define HOSTNAME_INCORRECTNAME (1) -#define HOSTNAME_INVALIDADDR (2) -#define HOSTNAME_INVALIDNAME (3) - /* fparseln(3) */ #define FPARSELN_UNESCESC 0x01 #define FPARSELN_UNESCCONT 0x02 @@ -208,26 +198,43 @@ __END_DECLS #define FPARSELN_UNESCREST 0x08 #define FPARSELN_UNESCALL 0x0f -/* pw_scan() */ -#define PWSCAN_MASTER 0x01 -#define PWSCAN_WARN 0x02 - -/* humanize_number(3) */ -#define HN_DECIMAL 0x01 -#define HN_NOSPACE 0x02 -#define HN_B 0x04 -#define HN_DIVISOR_1000 0x08 -#define HN_IEC_PREFIXES 0x10 - -/* maxscale = 0x07 */ -#define HN_GETSCALE 0x10 -#define HN_AUTOSCALE 0x20 - -/* hexdump(3) */ +/* Flags for hexdump(3). */ #define HD_COLUMN_MASK 0xff #define HD_DELIM_MASK 0xff00 #define HD_OMIT_COUNT (1 << 16) #define HD_OMIT_HEX (1 << 17) #define HD_OMIT_CHARS (1 << 18) +/* Values for humanize_number(3)'s flags parameter. */ +#define HN_DECIMAL 0x01 +#define HN_NOSPACE 0x02 +#define HN_B 0x04 +#define HN_DIVISOR_1000 0x08 +#define HN_IEC_PREFIXES 0x10 + +/* Values for humanize_number(3)'s scale parameter. */ +#define HN_GETSCALE 0x10 +#define HN_AUTOSCALE 0x20 + +/* Return values from realhostname(). */ +#define HOSTNAME_FOUND 0 +#define HOSTNAME_INCORRECTNAME 1 +#define HOSTNAME_INVALIDADDR 2 +#define HOSTNAME_INVALIDNAME 3 + +/* Flags for pw_scan(). */ +#define PWSCAN_MASTER 0x01 +#define PWSCAN_WARN 0x02 + +/* Return values from uu_lock(). */ +#define UU_LOCK_INUSE 1 +#define UU_LOCK_OK 0 +#define UU_LOCK_OPEN_ERR (-1) +#define UU_LOCK_READ_ERR (-2) +#define UU_LOCK_CREAT_ERR (-3) +#define UU_LOCK_WRITE_ERR (-4) +#define UU_LOCK_LINK_ERR (-5) +#define UU_LOCK_TRY_ERR (-6) +#define UU_LOCK_OWNER_ERR (-7) + #endif /* !_LIBUTIL_H_ */ Modified: stable/9/lib/libutil/pidfile.c ============================================================================== --- stable/9/lib/libutil/pidfile.c Tue Apr 3 20:16:26 2012 (r233854) +++ stable/9/lib/libutil/pidfile.c Tue Apr 3 20:49:26 2012 (r233855) @@ -41,10 +41,17 @@ __FBSDID("$FreeBSD$"); #include #include +struct pidfh { + int pf_fd; + char pf_path[MAXPATHLEN + 1]; + dev_t pf_dev; + ino_t pf_ino; +}; + static int _pidfile_remove(struct pidfh *pfh, int freeit); static int -pidfile_verify(struct pidfh *pfh) +pidfile_verify(const struct pidfh *pfh) { struct stat sb; @@ -254,7 +261,7 @@ pidfile_remove(struct pidfh *pfh) } int -pidfile_fileno(struct pidfh *pfh) +pidfile_fileno(const struct pidfh *pfh) { if (pfh == NULL || pfh->pf_fd == -1) { errno = EDOOFUS; From owner-svn-src-stable@FreeBSD.ORG Tue Apr 3 21:10:31 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 A67AA106567B; Tue, 3 Apr 2012 21:10:31 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B348FC15; Tue, 3 Apr 2012 21:10: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 q33LAVSk069344; Tue, 3 Apr 2012 21:10:31 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q33LAV2D069341; Tue, 3 Apr 2012 21:10:31 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201204032110.q33LAV2D069341@svn.freebsd.org> From: Guy Helmer Date: Tue, 3 Apr 2012 21:10:31 +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: r233856 - stable/9/lib/libutil 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, 03 Apr 2012 21:10:31 -0000 Author: ghelmer Date: Tue Apr 3 21:10:30 2012 New Revision: 233856 URL: http://svn.freebsd.org/changeset/base/233856 Log: MFC: 229942, 231938 229942: Style fixes courtesy of pjd. 231938: Set the O_CLOEXEC flag when opening the pidfile to avoid leaking the file descriptor via exec(3). Now that daemon(8) has been fixed to resolve the issue noted by trociny, the consensus is that this change should be OK. Modified: stable/9/lib/libutil/pidfile.3 stable/9/lib/libutil/pidfile.c Directory Properties: stable/9/lib/libutil/ (props changed) Modified: stable/9/lib/libutil/pidfile.3 ============================================================================== --- stable/9/lib/libutil/pidfile.3 Tue Apr 3 20:49:26 2012 (r233855) +++ stable/9/lib/libutil/pidfile.3 Tue Apr 3 21:10:30 2012 (r233856) @@ -94,7 +94,7 @@ function closes and removes a pidfile. .Pp The .Fn pidfile_fileno -function returns the file descriptor for the open pid file. +function returns the file descriptor for the open pidfile. .Sh RETURN VALUES The .Fn pidfile_open @@ -112,7 +112,9 @@ will be set. The .Fn pidfile_fileno function returns the low-level file descriptor. -It returns -1 and sets +It returns +.Li -1 +and sets .Va errno if a NULL .Vt pidfh Modified: stable/9/lib/libutil/pidfile.c ============================================================================== --- stable/9/lib/libutil/pidfile.c Tue Apr 3 20:49:26 2012 (r233855) +++ stable/9/lib/libutil/pidfile.c Tue Apr 3 21:10:30 2012 (r233856) @@ -124,7 +124,7 @@ pidfile_open(const char *path, mode_t mo * pidfile_write() can be called multiple times. */ fd = flopen(pfh->pf_path, - O_WRONLY | O_CREAT | O_TRUNC | O_NONBLOCK, mode); + O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode); if (fd == -1) { count = 0; rqtp.tv_sec = 0; @@ -263,6 +263,7 @@ pidfile_remove(struct pidfh *pfh) int pidfile_fileno(const struct pidfh *pfh) { + if (pfh == NULL || pfh->pf_fd == -1) { errno = EDOOFUS; return (-1); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 05:29: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 2B54F106564A; Wed, 4 Apr 2012 05:29:22 +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 15A6E8FC0C; Wed, 4 Apr 2012 05:29: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 q345TLxo086824; Wed, 4 Apr 2012 05:29:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q345TLsj086822; Wed, 4 Apr 2012 05:29:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204040529.q345TLsj086822@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 4 Apr 2012 05:29: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: r233859 - stable/9/sys/ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 05:29:22 -0000 Author: kib Date: Wed Apr 4 05:29:21 2012 New Revision: 233859 URL: http://svn.freebsd.org/changeset/base/233859 Log: MFC r233608: Microoptimize: in qsync loop over mount vnodes, only unlock mount interlock after we committed to try to vget() the vnode. Modified: stable/9/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/9/sys/ufs/ufs/ufs_quota.c Wed Apr 4 03:55:28 2012 (r233858) +++ stable/9/sys/ufs/ufs/ufs_quota.c Wed Apr 4 05:29:21 2012 (r233859) @@ -1061,12 +1061,11 @@ qsync(struct mount *mp) again: MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); - MNT_IUNLOCK(mp); if (vp->v_type == VNON) { VI_UNLOCK(vp); - MNT_ILOCK(mp); continue; } + MNT_IUNLOCK(mp); error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td); if (error) { MNT_ILOCK(mp); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 05:33:28 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 AE6B31065686; Wed, 4 Apr 2012 05:33:28 +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 9939B8FC0C; Wed, 4 Apr 2012 05:33: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 q345XSSk087022; Wed, 4 Apr 2012 05:33:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q345XS8v087020; Wed, 4 Apr 2012 05:33:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204040533.q345XS8v087020@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 4 Apr 2012 05:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233860 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2012 05:33:28 -0000 Author: kib Date: Wed Apr 4 05:33:28 2012 New Revision: 233860 URL: http://svn.freebsd.org/changeset/base/233860 Log: MFC r233608: Microoptimize: in qsync loop over mount vnodes, only unlock mount interlock after we committed to try to vget() the vnode. Modified: stable/8/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_quota.c Wed Apr 4 05:29:21 2012 (r233859) +++ stable/8/sys/ufs/ufs/ufs_quota.c Wed Apr 4 05:33:28 2012 (r233860) @@ -915,12 +915,11 @@ qsync(struct mount *mp) again: MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); - MNT_IUNLOCK(mp); if (vp->v_type == VNON) { VI_UNLOCK(vp); - MNT_ILOCK(mp); continue; } + MNT_IUNLOCK(mp); error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td); if (error) { MNT_ILOCK(mp); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 08:19:14 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 3435B1065672; Wed, 4 Apr 2012 08:19:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF3E8FC0A; Wed, 4 Apr 2012 08:19: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 q348JEuN092663; Wed, 4 Apr 2012 08:19:14 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q348JD0r092651; Wed, 4 Apr 2012 08:19:13 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201204040819.q348JD0r092651@svn.freebsd.org> From: Martin Matuska Date: Wed, 4 Apr 2012 08:19: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: r233862 - in stable/8: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/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: Wed, 04 Apr 2012 08:19:14 -0000 Author: mm Date: Wed Apr 4 08:19:13 2012 New Revision: 233862 URL: http://svn.freebsd.org/changeset/base/233862 Log: MFC r230397, r230438, r232064: MFC r230397 (pjd): By default turn off prefetch when listing snapshots. In my tests it makes listing snapshots 19% faster with cold cache and 47% faster with warm cache. MFC r230438 (pjd): Dramatically optimize listing snapshots when user requests only snapshot names and wants to sort them by name, ie. when executes: # zfs list -t snapshot -o name -s name Because only name is needed we don't have to read all snapshot properties. Below you can find how long does it take to list 34509 snapshots from a single disk pool before and after this change with cold and warm cache: before: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 525s warm cache: 218s after: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 1.7s warm cache: 1.1s MFC r232064: Import illumos changeset 13608 [1]: add support for "-t " argument to zfs get References: https://www.illumos.org/issues/1936 Update zfs(8) manpage in respect of [1]. Fix typo in zfs(8) manpage. Obtained from: illumos (issue #1936) [1] Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Wed Apr 4 08:19:13 2012 (r233862) @@ -1,5 +1,5 @@ '\" te -.\" Copyright (c) 2011, Martin Matuska . +.\" Copyright (c) 2012, Martin Matuska . .\" All Rights Reserved. .\" .\" The contents of this file are subject to the terms of the @@ -18,8 +18,8 @@ .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved. -.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved. .\" Copyright (c) 2011 by Delphix. All rights reserved. +.\" Copyright (c) 2012 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2011, Pawel Jakub Dawidek .\" .\" $FreeBSD$ @@ -113,6 +113,7 @@ .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1753,7 +1754,7 @@ A comma-separated list of types to displ is one of .Sy filesystem , snapshot , volume , No or Sy all . For example, specifying -.Fl o Cm snapshot +.Fl t Cm snapshot displays only snapshots. .It Fl s Ar property A property for sorting the output by column in ascending order based on the @@ -1811,6 +1812,7 @@ section. .Op Fl r Ns | Ns Fl d Ar depth .Op Fl Hp .Op Fl o Ar all | field Ns Op , Ns Ar ... +.Op Fl t Ar type Ns Op , Ns Ar ... .Op Fl s Ar source Ns Op , Ns Ar ... .Ar all | property Ns Op , Ns Ar ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot @@ -1871,6 +1873,14 @@ Default values are The keyword .Cm all specifies all columns. +.It Fl t Ar type Ns Op , Ns Ar ... +A comma-separated list of types to display, where +.Ar type +is one of +.Sy filesystem , snapshot , volume , No or Sy all . +For example, specifying +.Fl t Cm snapshot +displays only snapshots. .It Fl s Ar source Ns Op , Ns Ar ... A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c Wed Apr 4 08:19:13 2012 (r233862) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -129,8 +131,11 @@ zfs_callback(zfs_handle_t *zhp, void *da cb->cb_depth++; if (zfs_get_type(zhp) == ZFS_TYPE_FILESYSTEM) (void) zfs_iter_filesystems(zhp, zfs_callback, data); - if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) - (void) zfs_iter_snapshots(zhp, zfs_callback, data); + if ((zfs_get_type(zhp) != ZFS_TYPE_SNAPSHOT) && include_snaps) { + (void) zfs_iter_snapshots(zhp, + (cb->cb_flags & ZFS_ITER_SIMPLE) != 0, zfs_callback, + data); + } cb->cb_depth--; } @@ -184,6 +189,14 @@ zfs_free_sort_columns(zfs_sort_column_t } } +boolean_t +zfs_sort_only_by_name(const zfs_sort_column_t *sc) +{ + + return (sc != NULL && sc->sc_next == NULL && + sc->sc_prop == ZFS_PROP_NAME); +} + /* ARGSUSED */ static int zfs_compare(const void *larg, const void *rarg, void *unused) @@ -224,7 +237,13 @@ zfs_compare(const void *larg, const void lcreate = zfs_prop_get_int(l, ZFS_PROP_CREATETXG); rcreate = zfs_prop_get_int(r, ZFS_PROP_CREATETXG); - if (lcreate < rcreate) + /* + * Both lcreate and rcreate being 0 means we don't have + * properties and we should compare full name. + */ + if (lcreate == 0 && rcreate == 0) + ret = strcmp(lat + 1, rat + 1); + else if (lcreate < rcreate) ret = -1; else if (lcreate > rcreate) ret = 1; @@ -290,7 +309,14 @@ zfs_sort(const void *larg, const void *r if (rvalid) verify(nvlist_lookup_string(rval, ZPROP_VALUE, &rstr) == 0); + } else if (psc->sc_prop == ZFS_PROP_NAME) { + lvalid = rvalid = B_TRUE; + + (void) strlcpy(lbuf, zfs_get_name(l), sizeof(lbuf)); + (void) strlcpy(rbuf, zfs_get_name(r), sizeof(rbuf)); + lstr = lbuf; + rstr = rbuf; } else if (zfs_prop_is_string(psc->sc_prop)) { lvalid = (zfs_prop_get(l, psc->sc_prop, lbuf, sizeof (lbuf), NULL, NULL, 0, B_TRUE) == 0); Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.h Wed Apr 4 08:19:13 2012 (r233862) @@ -43,11 +43,13 @@ typedef struct zfs_sort_column { #define ZFS_ITER_PROP_LISTSNAPS (1 << 2) #define ZFS_ITER_DEPTH_LIMIT (1 << 3) #define ZFS_ITER_RECVD_PROPS (1 << 4) +#define ZFS_ITER_SIMPLE (1 << 5) int zfs_for_each(int, char **, int options, zfs_type_t, zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); void zfs_free_sort_columns(zfs_sort_column_t *); +boolean_t zfs_sort_only_by_name(const zfs_sort_column_t *); #ifdef __cplusplus } Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Wed Apr 4 08:19:13 2012 (r233862) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Copyright (c) 2011 Martin Matuska . All rights reserved. */ @@ -227,7 +227,8 @@ get_usage(zfs_help_t idx) "[%][,...]\n")); case HELP_GET: return (gettext("\tget [-rHp] [-d max] " - "[-o \"all\" | field[,...]] [-s source[,...]]\n" + "[-o \"all\" | field[,...]] [-t type[,...]] " + "[-s source[,...]]\n" "\t <\"all\" | property[,...]> " "[filesystem|volume|snapshot] ...\n")); case HELP_INHERIT: @@ -1473,6 +1474,7 @@ zfs_do_get(int argc, char **argv) { zprop_get_cbdata_t cb = { 0 }; int i, c, flags = ZFS_ITER_ARGS_CAN_BE_PATHS; + int types = ZFS_TYPE_DATASET; char *value, *fields; int ret = 0; int limit = 0; @@ -1489,7 +1491,7 @@ zfs_do_get(int argc, char **argv) cb.cb_type = ZFS_TYPE_DATASET; /* check options */ - while ((c = getopt(argc, argv, ":d:o:s:rHp")) != -1) { + while ((c = getopt(argc, argv, ":d:o:s:rt:Hp")) != -1) { switch (c) { case 'p': cb.cb_literal = B_TRUE; @@ -1607,6 +1609,37 @@ zfs_do_get(int argc, char **argv) } break; + case 't': + types = 0; + flags &= ~ZFS_ITER_PROP_LISTSNAPS; + while (*optarg != '\0') { + static char *type_subopts[] = { "filesystem", + "volume", "snapshot", "all", NULL }; + + switch (getsubopt(&optarg, type_subopts, + &value)) { + case 0: + types |= ZFS_TYPE_FILESYSTEM; + break; + case 1: + types |= ZFS_TYPE_VOLUME; + break; + case 2: + types |= ZFS_TYPE_SNAPSHOT; + break; + case 3: + types = ZFS_TYPE_DATASET; + break; + + default: + (void) fprintf(stderr, + gettext("invalid type '%s'\n"), + value); + usage(B_FALSE); + } + } + break; + case '?': (void) fprintf(stderr, gettext("invalid option '%c'\n"), optopt); @@ -1650,7 +1683,7 @@ zfs_do_get(int argc, char **argv) cb.cb_first = B_TRUE; /* run for each object */ - ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_DATASET, NULL, + ret = zfs_for_each(argc, argv, flags, types, NULL, &cb.cb_proplist, limit, get_callback, &cb); if (cb.cb_proplist == &fake_name) @@ -2838,7 +2871,12 @@ print_dataset(zfs_handle_t *zhp, zprop_l first = B_FALSE; } - if (pl->pl_prop != ZPROP_INVAL) { + if (pl->pl_prop == ZFS_PROP_NAME) { + (void) strlcpy(property, zfs_get_name(zhp), + sizeof(property)); + propstr = property; + right_justify = zfs_prop_align_right(pl->pl_prop); + } else if (pl->pl_prop != ZPROP_INVAL) { if (zfs_prop_get(zhp, pl->pl_prop, property, sizeof (property), NULL, NULL, 0, B_FALSE) != 0) propstr = "-"; @@ -3005,6 +3043,13 @@ zfs_do_list(int argc, char **argv) fields = default_fields; /* + * If we are only going to list snapshot names and sort by name, + * then we can use faster version. + */ + if (strcmp(fields, "name") == 0 && zfs_sort_only_by_name(sortcol)) + flags |= ZFS_ITER_SIMPLE; + + /* * If "-o space" and no types were specified, don't display snapshots. */ if (strcmp(fields, "space") == 0 && types_specified == B_FALSE) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Apr 4 08:19:13 2012 (r233862) @@ -507,7 +507,7 @@ extern int zfs_iter_root(libzfs_handle_t extern int zfs_iter_children(zfs_handle_t *, zfs_iter_f, void *); extern int zfs_iter_dependents(zfs_handle_t *, boolean_t, zfs_iter_f, void *); extern int zfs_iter_filesystems(zfs_handle_t *, zfs_iter_f, void *); -extern int zfs_iter_snapshots(zfs_handle_t *, zfs_iter_f, void *); +extern int zfs_iter_snapshots(zfs_handle_t *, boolean_t, zfs_iter_f, void *); extern int zfs_iter_snapshots_sorted(zfs_handle_t *, zfs_iter_f, void *); extern int zfs_iter_snapspec(zfs_handle_t *, const char *, zfs_iter_f, void *); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Apr 4 08:19:13 2012 (r233862) @@ -23,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. */ @@ -514,6 +514,22 @@ make_dataset_handle_zc(libzfs_handle_t * } zfs_handle_t * +make_dataset_simple_handle_zc(zfs_handle_t *pzhp, zfs_cmd_t *zc) +{ + zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1); + + if (zhp == NULL) + return (NULL); + + zhp->zfs_hdl = pzhp->zfs_hdl; + (void) strlcpy(zhp->zfs_name, zc->zc_name, sizeof (zhp->zfs_name)); + zhp->zfs_head_type = pzhp->zfs_type; + zhp->zfs_type = ZFS_TYPE_SNAPSHOT; + zhp->zpool_hdl = zpool_handle(zhp); + return (zhp); +} + +zfs_handle_t * zfs_handle_dup(zfs_handle_t *zhp_orig) { zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Wed Apr 4 08:19:13 2012 (r233862) @@ -150,7 +150,7 @@ int zpool_standard_error_fmt(libzfs_hand int get_dependents(libzfs_handle_t *, boolean_t, const char *, char ***, size_t *); zfs_handle_t *make_dataset_handle_zc(libzfs_handle_t *, zfs_cmd_t *); - +zfs_handle_t *make_dataset_simple_handle_zc(zfs_handle_t *, zfs_cmd_t *); int zprop_parse_value(libzfs_handle_t *, nvpair_t *, int, zfs_type_t, nvlist_t *, char **, uint64_t *, const char *); Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Wed Apr 4 08:19:13 2012 (r233862) @@ -23,6 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -137,7 +139,8 @@ zfs_iter_filesystems(zfs_handle_t *zhp, * Iterate over all snapshots */ int -zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data) +zfs_iter_snapshots(zfs_handle_t *zhp, boolean_t simple, zfs_iter_f func, + void *data) { zfs_cmd_t zc = { 0 }; zfs_handle_t *nzhp; @@ -146,15 +149,19 @@ zfs_iter_snapshots(zfs_handle_t *zhp, zf if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT) return (0); + zc.zc_simple = simple; + if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0) return (-1); while ((ret = zfs_do_list_ioctl(zhp, ZFS_IOC_SNAPSHOT_LIST_NEXT, &zc)) == 0) { - if ((nzhp = make_dataset_handle_zc(zhp->zfs_hdl, - &zc)) == NULL) { + if (simple) + nzhp = make_dataset_simple_handle_zc(zhp, &zc); + else + nzhp = make_dataset_handle_zc(zhp->zfs_hdl, &zc); + if (nzhp == NULL) continue; - } if ((ret = func(nzhp, data)) != 0) { zcmd_free_nvlists(&zc); @@ -234,7 +241,7 @@ zfs_iter_snapshots_sorted(zfs_handle_t * avl_create(&avl, zfs_snapshot_compare, sizeof (zfs_node_t), offsetof(zfs_node_t, zn_avlnode)); - ret = zfs_iter_snapshots(zhp, zfs_sort_snaps, &avl); + ret = zfs_iter_snapshots(zhp, B_FALSE, zfs_sort_snaps, &avl); for (node = avl_first(&avl); node != NULL; node = AVL_NEXT(&avl, node)) ret |= callback(node->zn_handle, data); @@ -378,7 +385,7 @@ zfs_iter_children(zfs_handle_t *zhp, zfs if ((ret = zfs_iter_filesystems(zhp, func, data)) != 0) return (ret); - return (zfs_iter_snapshots(zhp, func, data)); + return (zfs_iter_snapshots(zhp, B_FALSE, func, data)); } @@ -439,8 +446,10 @@ iter_dependents_cb(zfs_handle_t *zhp, vo isf.next = ida->stack; ida->stack = &isf; err = zfs_iter_filesystems(zhp, iter_dependents_cb, ida); - if (err == 0) - err = zfs_iter_snapshots(zhp, iter_dependents_cb, ida); + if (err == 0) { + err = zfs_iter_snapshots(zhp, B_FALSE, + iter_dependents_cb, ida); + } ida->stack = isf.next; } if (!first && err == 0) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Wed Apr 4 08:19:13 2012 (r233862) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -717,7 +719,7 @@ send_iterate_fs(zfs_handle_t *zhp, void sd->parent_fromsnap_guid = 0; VERIFY(0 == nvlist_alloc(&sd->parent_snaps, NV_UNIQUE_NAME, 0)); VERIFY(0 == nvlist_alloc(&sd->snapprops, NV_UNIQUE_NAME, 0)); - (void) zfs_iter_snapshots(zhp, send_iterate_snap, sd); + (void) zfs_iter_snapshots(zhp, B_FALSE, send_iterate_snap, sd); VERIFY(0 == nvlist_add_nvlist(nvfs, "snaps", sd->parent_snaps)); VERIFY(0 == nvlist_add_nvlist(nvfs, "snapprops", sd->snapprops)); nvlist_free(sd->parent_snaps); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Wed Apr 4 08:19:13 2012 (r233862) @@ -284,7 +284,8 @@ typedef struct zfs_cmd { boolean_t zc_temphold; uint64_t zc_action_handle; int zc_cleanup_fd; - uint8_t zc_pad[4]; /* alignment */ + uint8_t zc_simple; + uint8_t zc_pad[3]; /* alignment */ uint64_t zc_sendobj; uint64_t zc_fromobj; uint64_t zc_createtxg; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Apr 4 06:59:04 2012 (r233861) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Apr 4 08:19:13 2012 (r233862) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011 Pawel Jakub Dawidek . + * Copyright (c) 2011-2012 Pawel Jakub Dawidek . * All rights reserved. * Portions Copyright 2011 Martin Matuska * Copyright 2011 Nexenta Systems, Inc. All rights reserved. @@ -81,6 +81,12 @@ CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX); +static int snapshot_list_prefetch; +SYSCTL_DECL(_vfs_zfs); +TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch); +SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW, + &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots"); + static struct cdev *zfsdev; extern void zfs_init(void); @@ -2030,6 +2036,7 @@ top: * zc_name name of filesystem * zc_cookie zap cursor * zc_nvlist_dst_size size of buffer for property nvlist + * zc_simple when set, only name is requested * * outputs: * zc_name name of next snapshot @@ -2044,7 +2051,7 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc int error; top: - if (zc->zc_cookie == 0) + if (snapshot_list_prefetch && zc->zc_cookie == 0 && !zc->zc_simple) (void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch, NULL, DS_FIND_SNAPSHOTS); @@ -2066,7 +2073,7 @@ top: zc->zc_name + strlen(zc->zc_name), &zc->zc_obj, &zc->zc_cookie, NULL); - if (error == 0) { + if (error == 0 && !zc->zc_simple) { dsl_dataset_t *ds; dsl_pool_t *dp = os->os_dsl_dataset->ds_dir->dd_pool; From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 09:14: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 6FA5A106564A; Wed, 4 Apr 2012 09:14:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50E278FC0A; Wed, 4 Apr 2012 09:14: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 q349EH6s094904; Wed, 4 Apr 2012 09:14:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q349EHlu094899; Wed, 4 Apr 2012 09:14:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201204040914.q349EHlu094899@svn.freebsd.org> From: Martin Matuska Date: Wed, 4 Apr 2012 09:14:17 +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: r233867 - in stable/8: share/man/man5 sys/fs/devfs 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, 04 Apr 2012 09:14:17 -0000 Author: mm Date: Wed Apr 4 09:14:16 2012 New Revision: 233867 URL: http://svn.freebsd.org/changeset/base/233867 Log: MFC r232165, r232247 (partial), r232307: MFC r232165: Introduce the "ruleset=number" option for devfs(5) mounts. Add support for updating the devfs mount (currently only changing the ruleset number is supported). Check mnt_optnew with vfs_filteropt(9). This new option sets the specified ruleset number as the active ruleset of the new devfs mount and applies all its rules at mount time. If the specified ruleset doesn't exist, a new empty ruleset is created. MFC r232247 (partial): mdoc(7) type - start new sentences on new line MFC r232307: Add "export" to devfs_opts[] and return EOPNOTSUPP if called with it. Fixes mountd warnings. Modified: stable/8/share/man/man5/devfs.5 stable/8/sys/fs/devfs/devfs.h stable/8/sys/fs/devfs/devfs_rule.c stable/8/sys/fs/devfs/devfs_vfsops.c Directory Properties: stable/8/share/man/man5/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/share/man/man5/devfs.5 ============================================================================== --- stable/8/share/man/man5/devfs.5 Wed Apr 4 08:47:36 2012 (r233866) +++ stable/8/share/man/man5/devfs.5 Wed Apr 4 09:14:16 2012 (r233867) @@ -38,7 +38,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18, 2010 +.Dd February 9, 2012 .Dt DEVFS 5 .Os .Sh NAME @@ -90,6 +90,30 @@ and .Pa 2 . .Xr fdescfs 5 creates files for all open descriptors. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl o Ar options +Use the specified mount +.Ar options , +as described in +.Xr mount 8 . +The following devfs file system-specific options are available: +.Bl -tag -width indent +.It Cm ruleset Ns No = Ns Ar ruleset +Set ruleset number +.Ar ruleset +as the current ruleset for the mount-point and apply all its rules. +If the ruleset number +.Ar ruleset +does not exist, an empty ruleset with the number +.Ar ruleset +is created. +See +.Xr devfs 8 +for more information on working with devfs rulesets. +.El +.El .Sh FILES .Bl -tag -width /dev/XXXX -compact .It Pa /dev Modified: stable/8/sys/fs/devfs/devfs.h ============================================================================== --- stable/8/sys/fs/devfs/devfs.h Wed Apr 4 08:47:36 2012 (r233866) +++ stable/8/sys/fs/devfs/devfs.h Wed Apr 4 09:14:16 2012 (r233867) @@ -172,6 +172,8 @@ extern unsigned devfs_rule_depth; void devfs_rules_apply(struct devfs_mount *dm, struct devfs_dirent *de); void devfs_rules_cleanup (struct devfs_mount *dm); int devfs_rules_ioctl(struct devfs_mount *dm, u_long cmd, caddr_t data, struct thread *td); +void devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm); +void devfs_ruleset_apply(struct devfs_mount *dm); int devfs_allocv(struct devfs_dirent *de, struct mount *mp, int lockmode, struct vnode **vpp); void devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int vp_locked); Modified: stable/8/sys/fs/devfs/devfs_rule.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_rule.c Wed Apr 4 08:47:36 2012 (r233866) +++ stable/8/sys/fs/devfs/devfs_rule.c Wed Apr 4 09:14:16 2012 (r233867) @@ -771,3 +771,38 @@ devfs_rules_cleanup(struct devfs_mount * devfs_ruleset_reap(ds); } } + +/* + * Make rsnum the active ruleset for dm (locked) + */ +void +devfs_ruleset_set(devfs_rsnum rsnum, struct devfs_mount *dm) +{ + + sx_assert(&dm->dm_lock, SX_XLOCKED); + + sx_xlock(&sx_rules); + devfs_ruleset_use(rsnum, dm); + sx_xunlock(&sx_rules); +} + +/* + * Apply the current active ruleset on a mount + */ +void +devfs_ruleset_apply(struct devfs_mount *dm) +{ + struct devfs_ruleset *ds; + + sx_assert(&dm->dm_lock, SX_XLOCKED); + + sx_xlock(&sx_rules); + if (dm->dm_ruleset == 0) { + sx_xunlock(&sx_rules); + return; + } + ds = devfs_ruleset_bynum(dm->dm_ruleset); + if (ds != NULL) + devfs_ruleset_applydm(ds, dm); + sx_xunlock(&sx_rules); +} Modified: stable/8/sys/fs/devfs/devfs_vfsops.c ============================================================================== --- stable/8/sys/fs/devfs/devfs_vfsops.c Wed Apr 4 08:47:36 2012 (r233866) +++ stable/8/sys/fs/devfs/devfs_vfsops.c Wed Apr 4 09:14:16 2012 (r233867) @@ -56,6 +56,10 @@ static vfs_unmount_t devfs_unmount; static vfs_root_t devfs_root; static vfs_statfs_t devfs_statfs; +static const char *devfs_opts[] = { + "from", "export", "ruleset", NULL +}; + /* * Mount the filesystem */ @@ -65,15 +69,49 @@ devfs_mount(struct mount *mp) int error; struct devfs_mount *fmp; struct vnode *rvp; + int rsnum; if (devfs_unr == NULL) devfs_unr = new_unrhdr(0, INT_MAX, NULL); error = 0; - if (mp->mnt_flag & (MNT_UPDATE | MNT_ROOTFS)) + if (mp->mnt_flag & MNT_ROOTFS) return (EOPNOTSUPP); + rsnum = 0; + + if (mp->mnt_optnew != NULL) { + if (vfs_filteropt(mp->mnt_optnew, devfs_opts)) + return (EINVAL); + + if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) + return (EOPNOTSUPP); + + if (vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0 && + (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d", + &rsnum) != 1 || rsnum < 0 || rsnum > 65535)) + error = EINVAL; + } + + if (error) { + vfs_mount_error(mp, "%s", "invalid ruleset specification"); + return (error); + } + + if (mp->mnt_flag & MNT_UPDATE) { + if (rsnum != 0) { + fmp = mp->mnt_data; + if (fmp != NULL) { + sx_xlock(&fmp->dm_lock); + devfs_ruleset_set((devfs_rsnum)rsnum, fmp); + devfs_ruleset_apply(fmp); + sx_xunlock(&fmp->dm_lock); + } + } + return (0); + } + fmp = malloc(sizeof *fmp, M_DEVFS, M_WAITOK | M_ZERO); fmp->dm_idx = alloc_unr(devfs_unr); sx_init(&fmp->dm_lock, "devfsmount"); @@ -101,6 +139,12 @@ devfs_mount(struct mount *mp) return (error); } + if (rsnum != 0) { + sx_xlock(&fmp->dm_lock); + devfs_ruleset_set((devfs_rsnum)rsnum, fmp); + sx_xunlock(&fmp->dm_lock); + } + VOP_UNLOCK(rvp, 0); vfs_mountedfrom(mp, "devfs"); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 13:22:11 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 3DC0B1065672; Wed, 4 Apr 2012 13:22:11 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 282478FC15; Wed, 4 Apr 2012 13:22:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q34DMB9k005799; Wed, 4 Apr 2012 13:22:11 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34DMAMB005797; Wed, 4 Apr 2012 13:22:10 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201204041322.q34DMAMB005797@svn.freebsd.org> From: Sergey Kandaurov Date: Wed, 4 Apr 2012 13:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233871 - stable/8/usr.sbin/pkg_install/delete 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, 04 Apr 2012 13:22:11 -0000 Author: pluknet Date: Wed Apr 4 13:22:10 2012 New Revision: 233871 URL: http://svn.freebsd.org/changeset/base/233871 Log: MFC r225610: Print the package name on deletion errors. PR: bin/160516 Approved by: portmgr (pav) Obtained from: NetBSD Modified: stable/8/usr.sbin/pkg_install/delete/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/delete/perform.c ============================================================================== --- stable/8/usr.sbin/pkg_install/delete/perform.c Wed Apr 4 11:55:20 2012 (r233870) +++ stable/8/usr.sbin/pkg_install/delete/perform.c Wed Apr 4 13:22:10 2012 (r233871) @@ -318,8 +318,8 @@ pkg_do(char *pkg) */ if (delete_package(FALSE, CleanDirs, &Plist) == FAIL) warnx( - "couldn't entirely delete package (perhaps the packing list is\n" - "incorrectly specified?)"); + "couldn't entirely delete package `%s'\n" + "(perhaps the packing list is incorrectly specified?)", pkg); if (chdir(LogDir) == FAIL) { warnx("unable to change directory to %s! deinstall failed", LogDir); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 17:24: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 779D21065672; Wed, 4 Apr 2012 17:24:54 +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 624B68FC1A; Wed, 4 Apr 2012 17:24: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 q34HOsxJ016188; Wed, 4 Apr 2012 17:24:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34HOs9f016186; Wed, 4 Apr 2012 17:24:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204041724.q34HOs9f016186@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Apr 2012 17:24: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: r233878 - stable/9/sys/dev/sound/pci/hda 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, 04 Apr 2012 17:24:54 -0000 Author: mav Date: Wed Apr 4 17:24:53 2012 New Revision: 233878 URL: http://svn.freebsd.org/changeset/base/233878 Log: MFC r233606: Stop HDA controller polling callout on suspend and reset it on resume. PR: kern/166382 Modified: stable/9/sys/dev/sound/pci/hda/hdac.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdac.c Wed Apr 4 16:15:40 2012 (r233877) +++ stable/9/sys/dev/sound/pci/hda/hdac.c Wed Apr 4 17:24:53 2012 (r233878) @@ -1558,8 +1558,10 @@ hdac_suspend(device_t dev) HDA_BOOTHVERBOSE( device_printf(dev, "Reset controller...\n"); ); + callout_stop(&sc->poll_callout); hdac_reset(sc, 0); hdac_unlock(sc); + callout_drain(&sc->poll_callout); taskqueue_drain(taskqueue_thread, &sc->unsolq_task); HDA_BOOTHVERBOSE( device_printf(dev, "Suspend done\n"); @@ -1608,6 +1610,7 @@ hdac_resume(device_t dev) HDAC_GCTL_UNSOL); HDAC_WRITE_4(&sc->mem, HDAC_INTCTL, HDAC_INTCTL_CIE | HDAC_INTCTL_GIE); DELAY(1000); + hdac_poll_reinit(sc); hdac_unlock(sc); error = bus_generic_resume(dev); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 17:27: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 97C0F1065675; Wed, 4 Apr 2012 17:27:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 826938FC18; Wed, 4 Apr 2012 17:27: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 q34HRDFt016314; Wed, 4 Apr 2012 17:27:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34HRD6C016312; Wed, 4 Apr 2012 17:27:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201204041727.q34HRD6C016312@svn.freebsd.org> From: Alexander Motin Date: Wed, 4 Apr 2012 17:27: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: r233879 - stable/9/sys/dev/sound/pci/hda 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, 04 Apr 2012 17:27:13 -0000 Author: mav Date: Wed Apr 4 17:27:13 2012 New Revision: 233879 URL: http://svn.freebsd.org/changeset/base/233879 Log: MFC r233692: Reenable unsolicited responses on CODEC if hdaa_sense_init() called again. This fixes jack connection events handling after suspend/resume. PR: kern/166382 Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa.c Wed Apr 4 17:24:53 2012 (r233878) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Wed Apr 4 17:27:13 2012 (r233879) @@ -612,10 +612,11 @@ hdaa_sense_init(struct hdaa_devinfo *dev if (w == NULL || w->enable == 0 || w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) continue; - if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap) && - w->unsol < 0) { - w->unsol = HDAC_UNSOL_ALLOC( - device_get_parent(devinfo->dev), devinfo->dev, w->nid); + if (HDA_PARAM_AUDIO_WIDGET_CAP_UNSOL_CAP(w->param.widget_cap)) { + if (w->unsol < 0) + w->unsol = HDAC_UNSOL_ALLOC( + device_get_parent(devinfo->dev), + devinfo->dev, w->nid); hda_command(devinfo->dev, HDA_CMD_SET_UNSOLICITED_RESPONSE(0, w->nid, HDA_CMD_SET_UNSOLICITED_RESPONSE_ENABLE | w->unsol)); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 21:19: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 B6FB01065670; Wed, 4 Apr 2012 21:19:19 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 898A68FC15; Wed, 4 Apr 2012 21:19: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 q34LJJLw025496; Wed, 4 Apr 2012 21:19:19 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LJJm0025493; Wed, 4 Apr 2012 21:19:19 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204042119.q34LJJm0025493@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Apr 2012 21:19: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: r233889 - in stable/9/sys: i386/conf sparc64/sparc64 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, 04 Apr 2012 21:19:19 -0000 Author: marius Date: Wed Apr 4 21:19:19 2012 New Revision: 233889 URL: http://svn.freebsd.org/changeset/base/233889 Log: MFC: r233747, r233748 - Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086. Reported by: David E. Cross - Remove checks that are redundant due to tf_type being unsigned. Modified: stable/9/sys/sparc64/sparc64/trap.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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/9/sys/sparc64/sparc64/trap.c Wed Apr 4 21:09:02 2012 (r233888) +++ stable/9/sys/sparc64/sparc64/trap.c Wed Apr 4 21:19:19 2012 (r233889) @@ -215,6 +215,9 @@ static const int trap_sig[] = { -1, /* kernel stack fault */ }; +CTASSERT(sizeof(trap_msg) / sizeof(*trap_msg) == T_MAX); +CTASSERT(sizeof(trap_sig) / sizeof(*trap_sig) == T_MAX); + CTASSERT(sizeof(struct trapframe) == 256); int debugger_on_signal = 0; @@ -298,7 +301,7 @@ trap(struct trapframe *tf) sig = trap_cecc(); break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (user)", tf->tf_type); else if (trap_sig[tf->tf_type] == -1) @@ -402,12 +405,10 @@ trap(struct trapframe *tf) if (error != 0) { tf->tf_type &= ~T_KERNEL; - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (kernel)", tf->tf_type); - else if (trap_sig[tf->tf_type] == -1) - panic("trap: %s (kernel)", - trap_msg[tf->tf_type]); + panic("trap: %s (kernel)", trap_msg[tf->tf_type]); } } CTR1(KTR_TRAP, "trap: td=%p return", td); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 21:19: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 6790D106577C; Wed, 4 Apr 2012 21:19:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 285468FC1E; Wed, 4 Apr 2012 21:19: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 q34LJPBk025537; Wed, 4 Apr 2012 21:19:25 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LJOre025535; Wed, 4 Apr 2012 21:19:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204042119.q34LJOre025535@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Apr 2012 21:19:24 +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: r233890 - in stable/8/sys: i386/conf sparc64/sparc64 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, 04 Apr 2012 21:19:25 -0000 Author: marius Date: Wed Apr 4 21:19:24 2012 New Revision: 233890 URL: http://svn.freebsd.org/changeset/base/233890 Log: MFC: r233747, r233748 - Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086 (MFC'ed to stable/8 in r206198). Reported by: David E. Cross - Remove checks that are redundant due to tf_type being unsigned. Modified: stable/8/sys/sparc64/sparc64/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Wed Apr 4 21:19:19 2012 (r233889) +++ stable/8/sys/sparc64/sparc64/trap.c Wed Apr 4 21:19:24 2012 (r233890) @@ -220,6 +220,9 @@ static const int trap_sig[] = { -1, /* kernel stack fault */ }; +CTASSERT(sizeof(trap_msg) / sizeof(*trap_msg) == T_MAX); +CTASSERT(sizeof(trap_sig) / sizeof(*trap_sig) == T_MAX); + CTASSERT(sizeof(struct trapframe) == 256); int debugger_on_signal = 0; @@ -303,7 +306,7 @@ trap(struct trapframe *tf) sig = trap_cecc(); break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (user)", tf->tf_type); else if (trap_sig[tf->tf_type] == -1) @@ -407,12 +410,10 @@ trap(struct trapframe *tf) if (error != 0) { tf->tf_type &= ~T_KERNEL; - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (kernel)", tf->tf_type); - else if (trap_sig[tf->tf_type] == -1) - panic("trap: %s (kernel)", - trap_msg[tf->tf_type]); + panic("trap: %s (kernel)", trap_msg[tf->tf_type]); } } CTR1(KTR_TRAP, "trap: td=%p return", td); From owner-svn-src-stable@FreeBSD.ORG Wed Apr 4 21:19: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 48C7B1065674; Wed, 4 Apr 2012 21:19:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3375A8FC0A; Wed, 4 Apr 2012 21:19: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 q34LJSLY025572; Wed, 4 Apr 2012 21:19:28 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q34LJSQC025570; Wed, 4 Apr 2012 21:19:28 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204042119.q34LJSQC025570@svn.freebsd.org> From: Marius Strobl Date: Wed, 4 Apr 2012 21:19:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233891 - stable/7/sys/sparc64/sparc64 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, 04 Apr 2012 21:19:28 -0000 Author: marius Date: Wed Apr 4 21:19:27 2012 New Revision: 233891 URL: http://svn.freebsd.org/changeset/base/233891 Log: MFC: r233747, r233748 - Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086 (MFC'ed to stable/7 in r206197). Reported by: David E. Cross - Remove checks that are redundant due to tf_type being unsigned. Modified: stable/7/sys/sparc64/sparc64/trap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/trap.c Wed Apr 4 21:19:24 2012 (r233890) +++ stable/7/sys/sparc64/sparc64/trap.c Wed Apr 4 21:19:27 2012 (r233891) @@ -224,6 +224,9 @@ static const int trap_sig[] = { -1, /* kernel stack fault */ }; +CTASSERT(sizeof(trap_msg) / sizeof(*trap_msg) == T_MAX); +CTASSERT(sizeof(trap_sig) / sizeof(*trap_sig) == T_MAX); + CTASSERT(sizeof(struct trapframe) == 256); int debugger_on_signal = 0; @@ -307,7 +310,7 @@ trap(struct trapframe *tf) sig = trap_cecc(); break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (user)", tf->tf_type); else if (trap_sig[tf->tf_type] == -1) @@ -411,12 +414,10 @@ trap(struct trapframe *tf) if (error != 0) { tf->tf_type &= ~T_KERNEL; - if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + if (tf->tf_type > T_MAX) panic("trap: bad trap type %#lx (kernel)", tf->tf_type); - else if (trap_sig[tf->tf_type] == -1) - panic("trap: %s (kernel)", - trap_msg[tf->tf_type]); + panic("trap: %s (kernel)", trap_msg[tf->tf_type]); } } CTR1(KTR_TRAP, "trap: td=%p return", td); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 00:08: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 E7C471065673; Thu, 5 Apr 2012 00:08:16 +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 D21358FC0C; Thu, 5 Apr 2012 00:08: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 q3508GmU031579; Thu, 5 Apr 2012 00:08:16 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q3508GCC031576; Thu, 5 Apr 2012 00:08:16 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201204050008.q3508GCC031576@svn.freebsd.org> From: Doug Barton Date: Thu, 5 Apr 2012 00:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233910 - stable/7/share/doc/bind9 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, 05 Apr 2012 00:08:17 -0000 Author: dougb Date: Thu Apr 5 00:08:16 2012 New Revision: 233910 URL: http://svn.freebsd.org/changeset/base/233910 Log: Add Bv9ARM.pdf to the list of docs to install. (Direct commit because this file varies widely between BIND versions) Modified: stable/7/share/doc/bind9/Makefile Modified: stable/7/share/doc/bind9/Makefile ============================================================================== --- stable/7/share/doc/bind9/Makefile Wed Apr 4 23:58:41 2012 (r233909) +++ stable/7/share/doc/bind9/Makefile Thu Apr 5 00:08:16 2012 (r233910) @@ -15,7 +15,7 @@ TOPDIR= ${DOCDIR}/bind9 ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \ Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \ Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html \ - Bv9ARM.ch10.html Bv9ARM.html man.dig.html \ + Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf man.dig.html \ man.dnssec-keygen.html man.dnssec-signzone.html man.host.html \ man.named-checkconf.html man.named-checkzone.html \ man.named.html man.rndc-confgen.html man.rndc.conf.html \ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 00:53: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 6A2A7106566B; Thu, 5 Apr 2012 00:53:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5306B8FC0A; Thu, 5 Apr 2012 00:53: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 q350rMD9033019; Thu, 5 Apr 2012 00:53:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q350rMVK033015; Thu, 5 Apr 2012 00:53:22 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201204050053.q350rMVK033015@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 5 Apr 2012 00:53: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: r233911 - stable/9/sys/powerpc/aim 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, 05 Apr 2012 00:53:22 -0000 Author: nwhitehorn Date: Thu Apr 5 00:53:21 2012 New Revision: 233911 URL: http://svn.freebsd.org/changeset/base/233911 Log: MFC 232980,233011,233017,233117,233434,233436,233454,233529,233530,233618: Major pmap performance, concurrency, and correctness improvements, mostly for the 64-bit PMAP module (64-bit-capable CPUs with either a 32-bit or 64-bit kernel). Thanks to alc for his help and prodding. Modified: stable/9/sys/powerpc/aim/mmu_oea.c stable/9/sys/powerpc/aim/mmu_oea64.c stable/9/sys/powerpc/aim/moea64_native.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 5 00:08:16 2012 (r233910) +++ stable/9/sys/powerpc/aim/mmu_oea.c Thu Apr 5 00:53:21 2012 (r233911) @@ -1760,7 +1760,7 @@ moea_release(mmu_t mmu, pmap_t pmap) void moea_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry *pvo, *tpvo; int pteidx; vm_page_lock_queues(); @@ -1772,7 +1772,7 @@ moea_remove(mmu_t mmu, pmap_t pm, vm_off moea_pvo_remove(pvo, pteidx); } } else { - LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) continue; moea_pvo_remove(pvo, -1); Modified: stable/9/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 5 00:08:16 2012 (r233910) +++ stable/9/sys/powerpc/aim/mmu_oea64.c Thu Apr 5 00:53:21 2012 (r233911) @@ -125,6 +125,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -172,9 +173,20 @@ uintptr_t moea64_get_unique_vsid(void); #define VSID_TO_HASH(vsid) (((vsid) >> 4) & 0xfffff) #define VSID_HASH_MASK 0x0000007fffffffffULL -#define LOCK_TABLE() mtx_lock(&moea64_table_mutex) -#define UNLOCK_TABLE() mtx_unlock(&moea64_table_mutex); -#define ASSERT_TABLE_LOCK() mtx_assert(&moea64_table_mutex, MA_OWNED) +/* + * Locking semantics: + * -- Read lock: if no modifications are being made to either the PVO lists + * or page table or if any modifications being made result in internal + * changes (e.g. wiring, protection) such that the existence of the PVOs + * is unchanged and they remain associated with the same pmap (in which + * case the changes should be protected by the pmap lock) + * -- Write lock: required if PTEs/PVOs are being inserted or removed. + */ + +#define LOCK_TABLE_RD() rw_rlock(&moea64_table_lock) +#define UNLOCK_TABLE_RD() rw_runlock(&moea64_table_lock) +#define LOCK_TABLE_WR() rw_wlock(&moea64_table_lock) +#define UNLOCK_TABLE_WR() rw_wunlock(&moea64_table_lock) struct ofw_map { cell_t om_va; @@ -197,7 +209,7 @@ extern void bs_remap_earlyboot(void); /* * Lock for the pteg and pvo tables. */ -struct mtx moea64_table_mutex; +struct rwlock moea64_table_lock; struct mtx moea64_slb_mutex; /* @@ -307,6 +319,7 @@ void moea64_qenter(mmu_t, vm_offset_t, v void moea64_qremove(mmu_t, vm_offset_t, int); void moea64_release(mmu_t, pmap_t); void moea64_remove(mmu_t, pmap_t, vm_offset_t, vm_offset_t); +void moea64_remove_pages(mmu_t, pmap_t); void moea64_remove_all(mmu_t, vm_page_t); void moea64_remove_write(mmu_t, vm_page_t); void moea64_zero_page(mmu_t, vm_page_t); @@ -349,6 +362,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_qremove, moea64_qremove), MMUMETHOD(mmu_release, moea64_release), MMUMETHOD(mmu_remove, moea64_remove), + MMUMETHOD(mmu_remove_pages, moea64_remove_pages), MMUMETHOD(mmu_remove_all, moea64_remove_all), MMUMETHOD(mmu_remove_write, moea64_remove_write), MMUMETHOD(mmu_sync_icache, moea64_sync_icache), @@ -393,35 +407,10 @@ vm_page_to_pvoh(vm_page_t m) } static __inline void -moea64_attr_clear(vm_page_t m, u_int64_t ptebit) -{ - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - m->md.mdpg_attrs &= ~ptebit; -} - -static __inline u_int64_t -moea64_attr_fetch(vm_page_t m) -{ - - return (m->md.mdpg_attrs); -} - -static __inline void -moea64_attr_save(vm_page_t m, u_int64_t ptebit) -{ - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - m->md.mdpg_attrs |= ptebit; -} - -static __inline void moea64_pte_create(struct lpte *pt, uint64_t vsid, vm_offset_t va, uint64_t pte_lo, int flags) { - ASSERT_TABLE_LOCK(); - /* * Construct a PTE. Default to IMB initially. Valid bit only gets * set when the real pte is set in memory. @@ -614,6 +603,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_o DISABLE_TRANS(msr); if (hw_direct_map) { + LOCK_TABLE_WR(); PMAP_LOCK(kernel_pmap); for (i = 0; i < pregions_sz; i++) { for (pa = pregions[i].mr_start; pa < pregions[i].mr_start + @@ -638,6 +628,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_o } } PMAP_UNLOCK(kernel_pmap); + UNLOCK_TABLE_WR(); } else { size = sizeof(struct pvo_head) * moea64_pteg_count; off = (vm_offset_t)(moea64_pvo_table); @@ -796,8 +787,7 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offs * Initialize the lock that synchronizes access to the pteg and pvo * tables. */ - mtx_init(&moea64_table_mutex, "pmap table", NULL, MTX_DEF | - MTX_RECURSE); + rw_init_flags(&moea64_table_lock, "pmap tables", RW_RECURSE); mtx_init(&moea64_slb_mutex, "SLB table", NULL, MTX_DEF); /* @@ -976,7 +966,7 @@ moea64_late_bootstrap(mmu_t mmup, vm_off moea64_scratchpage_pvo[i] = moea64_pvo_find_va( kernel_pmap, (vm_offset_t)moea64_scratchpage_va[i]); - LOCK_TABLE(); + LOCK_TABLE_RD(); moea64_scratchpage_pte[i] = MOEA64_PVO_TO_PTE( mmup, moea64_scratchpage_pvo[i]); moea64_scratchpage_pvo[i]->pvo_pte.lpte.pte_hi @@ -984,7 +974,7 @@ moea64_late_bootstrap(mmu_t mmup, vm_off MOEA64_PTE_CHANGE(mmup, moea64_scratchpage_pte[i], &moea64_scratchpage_pvo[i]->pvo_pte.lpte, moea64_scratchpage_pvo[i]->pvo_vpn); - UNLOCK_TABLE(); + UNLOCK_TABLE_RD(); } } } @@ -1030,11 +1020,11 @@ moea64_change_wiring(mmu_t mmu, pmap_t p uint64_t vsid; int i, ptegidx; + LOCK_TABLE_WR(); PMAP_LOCK(pm); pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF); if (pvo != NULL) { - LOCK_TABLE(); pt = MOEA64_PVO_TO_PTE(mmu, pvo); if (wired) { @@ -1070,8 +1060,8 @@ moea64_change_wiring(mmu_t mmu, pmap_t p } } - UNLOCK_TABLE(); } + UNLOCK_TABLE_WR(); PMAP_UNLOCK(pm); } @@ -1182,10 +1172,10 @@ moea64_enter(mmu_t mmu, pmap_t pmap, vm_ vm_prot_t prot, boolean_t wired) { - vm_page_lock_queues(); + LOCK_TABLE_WR(); PMAP_LOCK(pmap); moea64_enter_locked(mmu, pmap, va, m, prot, wired); - vm_page_unlock_queues(); + UNLOCK_TABLE_WR(); PMAP_UNLOCK(pmap); } @@ -1194,7 +1184,7 @@ moea64_enter(mmu_t mmu, pmap_t pmap, vm_ * target pmap with the protection requested. If specified the page * will be wired down. * - * The page queues and pmap must be locked. + * The table (write) and pmap must be locked. */ static void @@ -1220,8 +1210,6 @@ moea64_enter_locked(mmu_t mmu, pmap_t pm pvo_flags = PVO_MANAGED; } - if (pmap_bootstrapped) - mtx_assert(&vm_page_queue_mtx, MA_OWNED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || VM_OBJECT_LOCKED(m->object), @@ -1319,14 +1307,14 @@ moea64_enter_object(mmu_t mmu, pmap_t pm psize = atop(end - start); m = m_start; - vm_page_lock_queues(); + LOCK_TABLE_WR(); PMAP_LOCK(pm); while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { moea64_enter_locked(mmu, pm, start + ptoa(diff), m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); m = TAILQ_NEXT(m, listq); } - vm_page_unlock_queues(); + UNLOCK_TABLE_WR(); PMAP_UNLOCK(pm); } @@ -1335,11 +1323,11 @@ moea64_enter_quick(mmu_t mmu, pmap_t pm, vm_prot_t prot) { - vm_page_lock_queues(); + LOCK_TABLE_WR(); PMAP_LOCK(pm); moea64_enter_locked(mmu, pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE), FALSE); - vm_page_unlock_queues(); + UNLOCK_TABLE_WR(); PMAP_UNLOCK(pm); } @@ -1349,6 +1337,7 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ struct pvo_entry *pvo; vm_paddr_t pa; + LOCK_TABLE_RD(); PMAP_LOCK(pm); pvo = moea64_pvo_find_va(pm, va); if (pvo == NULL) @@ -1356,6 +1345,7 @@ moea64_extract(mmu_t mmu, pmap_t pm, vm_ else pa = (pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) | (va - PVO_VADDR(pvo)); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pm); return (pa); } @@ -1374,6 +1364,7 @@ moea64_extract_and_hold(mmu_t mmu, pmap_ m = NULL; pa = 0; + LOCK_TABLE_RD(); PMAP_LOCK(pmap); retry: pvo = moea64_pvo_find_va(pmap, va & ~ADDR_POFF); @@ -1387,6 +1378,7 @@ retry: vm_page_hold(m); } PA_UNLOCK_COND(pa); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pmap); return (m); } @@ -1411,9 +1403,6 @@ moea64_uma_page_alloc(uma_zone_t zone, i *flags = UMA_SLAB_PRIV; needed_lock = !PMAP_LOCKED(kernel_pmap); - if (needed_lock) - PMAP_LOCK(kernel_pmap); - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED; else @@ -1433,12 +1422,17 @@ moea64_uma_page_alloc(uma_zone_t zone, i va = VM_PAGE_TO_PHYS(m); + LOCK_TABLE_WR(); + if (needed_lock) + PMAP_LOCK(kernel_pmap); + moea64_pvo_enter(installed_mmu, kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, VM_PAGE_TO_PHYS(m), LPTE_M, PVO_WIRED | PVO_BOOTSTRAP); if (needed_lock) PMAP_UNLOCK(kernel_pmap); + UNLOCK_TABLE_WR(); if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) bzero((void *)va, PAGE_SIZE); @@ -1502,10 +1496,12 @@ moea64_is_prefaultable(mmu_t mmu, pmap_t struct pvo_entry *pvo; boolean_t rv; + LOCK_TABLE_RD(); PMAP_LOCK(pmap); pvo = moea64_pvo_find_va(pmap, va & ~ADDR_POFF); rv = pvo == NULL || (pvo->pvo_pte.lpte.pte_hi & LPTE_VALID) == 0; PMAP_UNLOCK(pmap); + UNLOCK_TABLE_RD(); return (rv); } @@ -1547,7 +1543,7 @@ moea64_remove_write(mmu_t mmu, vm_page_t struct pvo_entry *pvo; uintptr_t pt; pmap_t pmap; - uint64_t lo; + uint64_t lo = 0; KASSERT((m->oflags & VPO_UNMANAGED) == 0, ("moea64_remove_write: page %p is not managed", m)); @@ -1561,13 +1557,11 @@ moea64_remove_write(mmu_t mmu, vm_page_t if ((m->oflags & VPO_BUSY) == 0 && (m->aflags & PGA_WRITEABLE) == 0) return; - vm_page_lock_queues(); - lo = moea64_attr_fetch(m); powerpc_sync(); + LOCK_TABLE_RD(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); - LOCK_TABLE(); if ((pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { pt = MOEA64_PVO_TO_PTE(mmu, pvo); pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; @@ -1582,15 +1576,12 @@ moea64_remove_write(mmu_t mmu, vm_page_t isync(); } } - UNLOCK_TABLE(); + if ((lo & LPTE_CHG) != 0) + vm_page_dirty(m); PMAP_UNLOCK(pmap); } - if ((lo & LPTE_CHG) != 0) { - moea64_attr_clear(m, LPTE_CHG); - vm_page_dirty(m); - } + UNLOCK_TABLE_RD(); vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); } /* @@ -1631,13 +1622,12 @@ moea64_page_set_memattr(mmu_t mmu, vm_pa return; } - vm_page_lock_queues(); pvo_head = vm_page_to_pvoh(m); lo = moea64_calc_wimg(VM_PAGE_TO_PHYS(m), ma); + LOCK_TABLE_RD(); LIST_FOREACH(pvo, pvo_head, pvo_vlink) { pmap = pvo->pvo_pmap; PMAP_LOCK(pmap); - LOCK_TABLE(); pt = MOEA64_PVO_TO_PTE(mmu, pvo); pvo->pvo_pte.lpte.pte_lo &= ~LPTE_WIMG; pvo->pvo_pte.lpte.pte_lo |= lo; @@ -1647,11 +1637,10 @@ moea64_page_set_memattr(mmu_t mmu, vm_pa if (pvo->pvo_pmap == kernel_pmap) isync(); } - UNLOCK_TABLE(); PMAP_UNLOCK(pmap); } + UNLOCK_TABLE_RD(); m->md.mdpg_cache_attrs = ma; - vm_page_unlock_queues(); } /* @@ -1665,9 +1654,12 @@ moea64_kenter_attr(mmu_t mmu, vm_offset_ pte_lo = moea64_calc_wimg(pa, ma); + LOCK_TABLE_WR(); PMAP_LOCK(kernel_pmap); error = moea64_pvo_enter(mmu, kernel_pmap, moea64_upvo_zone, &moea64_pvo_kunmanaged, va, pa, pte_lo, PVO_WIRED); + PMAP_UNLOCK(kernel_pmap); + UNLOCK_TABLE_WR(); if (error != 0 && error != ENOENT) panic("moea64_kenter: failed to enter va %#zx pa %#zx: %d", va, @@ -1678,7 +1670,6 @@ moea64_kenter_attr(mmu_t mmu, vm_offset_ */ if ((pte_lo & (LPTE_I | LPTE_G)) == 0) __syncicache((void *)va, PAGE_SIZE); - PMAP_UNLOCK(kernel_pmap); } void @@ -1705,11 +1696,13 @@ moea64_kextract(mmu_t mmu, vm_offset_t v if (va < VM_MIN_KERNEL_ADDRESS) return (va); + LOCK_TABLE_RD(); PMAP_LOCK(kernel_pmap); pvo = moea64_pvo_find_va(kernel_pmap, va); KASSERT(pvo != NULL, ("moea64_kextract: no addr found for %#" PRIxPTR, va)); pa = (pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN) | (va - PVO_VADDR(pvo)); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(kernel_pmap); return (pa); } @@ -1765,7 +1758,7 @@ moea64_page_exists_quick(mmu_t mmu, pmap ("moea64_page_exists_quick: page %p is not managed", m)); loops = 0; rv = FALSE; - vm_page_lock_queues(); + LOCK_TABLE_RD(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { if (pvo->pvo_pmap == pmap) { rv = TRUE; @@ -1774,7 +1767,7 @@ moea64_page_exists_quick(mmu_t mmu, pmap if (++loops >= 16) break; } - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); return (rv); } @@ -1791,11 +1784,11 @@ moea64_page_wired_mappings(mmu_t mmu, vm count = 0; if ((m->oflags & VPO_UNMANAGED) != 0) return (count); - vm_page_lock_queues(); + LOCK_TABLE_RD(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) if ((pvo->pvo_vaddr & PVO_WIRED) != 0) count++; - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); return (count); } @@ -1903,16 +1896,73 @@ moea64_pinit0(mmu_t mmu, pmap_t pm) /* * Set the physical protection on the specified range of this map as requested. */ +static void +moea64_pvo_protect(mmu_t mmu, pmap_t pm, struct pvo_entry *pvo, vm_prot_t prot) +{ + uintptr_t pt; + uint64_t oldlo; + + PMAP_LOCK_ASSERT(pm, MA_OWNED); + + /* + * Grab the PTE pointer before we diddle with the cached PTE + * copy. + */ + pt = MOEA64_PVO_TO_PTE(mmu, pvo); + + /* + * Change the protection of the page. + */ + oldlo = pvo->pvo_pte.lpte.pte_lo; + pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; + pvo->pvo_pte.lpte.pte_lo &= ~LPTE_NOEXEC; + if ((prot & VM_PROT_EXECUTE) == 0) + pvo->pvo_pte.lpte.pte_lo |= LPTE_NOEXEC; + if (prot & VM_PROT_WRITE) + pvo->pvo_pte.lpte.pte_lo |= LPTE_BW; + else + pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; + + /* + * If the PVO is in the page table, update that pte as well. + */ + if (pt != -1) { + MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, + pvo->pvo_vpn); + if ((pvo->pvo_pte.lpte.pte_lo & + (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { + moea64_syncicache(mmu, pm, PVO_VADDR(pvo), + pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, + PAGE_SIZE); + } + } + + /* + * Update vm about the REF/CHG bits if the page is managed and we have + * removed write access. + */ + if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED && + (oldlo & LPTE_PP) != LPTE_BR && !(prot && VM_PROT_WRITE)) { + struct vm_page *pg; + + pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); + if (pg != NULL) { + if (pvo->pvo_pte.lpte.pte_lo & LPTE_CHG) + vm_page_dirty(pg); + if (pvo->pvo_pte.lpte.pte_lo & LPTE_REF) + vm_page_aflag_set(pg, PGA_REFERENCED); + } + } +} + void moea64_protect(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) { - struct pvo_entry *pvo; - uintptr_t pt; - - CTR4(KTR_PMAP, "moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x", pm, sva, - eva, prot); + struct pvo_entry *pvo, *tpvo; + CTR4(KTR_PMAP, "moea64_protect: pm=%p sva=%#x eva=%#x prot=%#x", pm, + sva, eva, prot); KASSERT(pm == &curproc->p_vmspace->vm_pmap || pm == kernel_pmap, ("moea64_protect: non current pmap")); @@ -1922,45 +1972,30 @@ moea64_protect(mmu_t mmu, pmap_t pm, vm_ return; } - vm_page_lock_queues(); + LOCK_TABLE_RD(); PMAP_LOCK(pm); - for (; sva < eva; sva += PAGE_SIZE) { - pvo = moea64_pvo_find_va(pm, sva); - if (pvo == NULL) - continue; - - /* - * Grab the PTE pointer before we diddle with the cached PTE - * copy. - */ - LOCK_TABLE(); - pt = MOEA64_PVO_TO_PTE(mmu, pvo); - - /* - * Change the protection of the page. - */ - pvo->pvo_pte.lpte.pte_lo &= ~LPTE_PP; - pvo->pvo_pte.lpte.pte_lo |= LPTE_BR; - pvo->pvo_pte.lpte.pte_lo &= ~LPTE_NOEXEC; - if ((prot & VM_PROT_EXECUTE) == 0) - pvo->pvo_pte.lpte.pte_lo |= LPTE_NOEXEC; - - /* - * If the PVO is in the page table, update that pte as well. - */ - if (pt != -1) { - MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, - pvo->pvo_vpn); - if ((pvo->pvo_pte.lpte.pte_lo & - (LPTE_I | LPTE_G | LPTE_NOEXEC)) == 0) { - moea64_syncicache(mmu, pm, sva, - pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN, - PAGE_SIZE); + if ((eva - sva)/PAGE_SIZE < pm->pm_stats.resident_count) { + while (sva < eva) { + #ifdef __powerpc64__ + if (pm != kernel_pmap && + user_va_to_slb_entry(pm, sva) == NULL) { + sva = roundup2(sva + 1, SEGMENT_LENGTH); + continue; } + #endif + pvo = moea64_pvo_find_va(pm, sva); + if (pvo != NULL) + moea64_pvo_protect(mmu, pm, pvo, prot); + sva += PAGE_SIZE; + } + } else { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { + if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) + continue; + moea64_pvo_protect(mmu, pm, pvo, prot); } - UNLOCK_TABLE(); } - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pm); } @@ -2028,29 +2063,61 @@ moea64_release(mmu_t mmu, pmap_t pmap) } /* + * Remove all pages mapped by the specified pmap + */ +void +moea64_remove_pages(mmu_t mmu, pmap_t pm) +{ + struct pvo_entry *pvo, *tpvo; + + LOCK_TABLE_WR(); + PMAP_LOCK(pm); + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { + if (!(pvo->pvo_vaddr & PVO_WIRED)) + moea64_pvo_remove(mmu, pvo); + } + UNLOCK_TABLE_WR(); + PMAP_UNLOCK(pm); +} + +/* * Remove the given range of addresses from the specified map. */ void moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry *pvo, *tpvo; + + /* + * Perform an unsynchronized read. This is, however, safe. + */ + if (pm->pm_stats.resident_count == 0) + return; - vm_page_lock_queues(); + LOCK_TABLE_WR(); PMAP_LOCK(pm); - if ((eva - sva)/PAGE_SIZE < 10) { - for (; sva < eva; sva += PAGE_SIZE) { + if ((eva - sva)/PAGE_SIZE < pm->pm_stats.resident_count) { + while (sva < eva) { + #ifdef __powerpc64__ + if (pm != kernel_pmap && + user_va_to_slb_entry(pm, sva) == NULL) { + sva = roundup2(sva + 1, SEGMENT_LENGTH); + continue; + } + #endif pvo = moea64_pvo_find_va(pm, sva); if (pvo != NULL) moea64_pvo_remove(mmu, pvo); + sva += PAGE_SIZE; } } else { - LIST_FOREACH(pvo, &pm->pmap_pvo, pvo_plink) { + LIST_FOREACH_SAFE(pvo, &pm->pmap_pvo, pvo_plink, tpvo) { if (PVO_VADDR(pvo) < sva || PVO_VADDR(pvo) >= eva) continue; moea64_pvo_remove(mmu, pvo); } } - vm_page_unlock_queues(); + UNLOCK_TABLE_WR(); PMAP_UNLOCK(pm); } @@ -2065,8 +2132,8 @@ moea64_remove_all(mmu_t mmu, vm_page_t m struct pvo_entry *pvo, *next_pvo; pmap_t pmap; - vm_page_lock_queues(); pvo_head = vm_page_to_pvoh(m); + LOCK_TABLE_WR(); for (pvo = LIST_FIRST(pvo_head); pvo != NULL; pvo = next_pvo) { next_pvo = LIST_NEXT(pvo, pvo_vlink); @@ -2075,12 +2142,10 @@ moea64_remove_all(mmu_t mmu, vm_page_t m moea64_pvo_remove(mmu, pvo); PMAP_UNLOCK(pmap); } - if ((m->aflags & PGA_WRITEABLE) && moea64_is_modified(mmu, m)) { - moea64_attr_clear(m, LPTE_CHG); + UNLOCK_TABLE_WR(); + if ((m->aflags & PGA_WRITEABLE) && moea64_is_modified(mmu, m)) vm_page_dirty(m); - } vm_page_aflag_clear(m, PGA_WRITEABLE); - vm_page_unlock_queues(); } /* @@ -2156,6 +2221,9 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u if (!moea64_initialized) bootstrap = 1; + PMAP_LOCK_ASSERT(pm, MA_OWNED); + rw_assert(&moea64_table_lock, RA_WLOCKED); + /* * Compute the PTE Group index. */ @@ -2167,8 +2235,6 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u * Remove any existing mapping for this page. Reuse the pvo entry if * there is a mapping. */ - LOCK_TABLE(); - moea64_pvo_enter_calls++; LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { @@ -2184,7 +2250,6 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u PVO_PTEGIDX_SET(pvo, i); moea64_pte_overflow--; } - UNLOCK_TABLE(); return (0); } moea64_pvo_remove(mmu, pvo); @@ -2211,15 +2276,11 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u * table. The mapping we are working with is already * protected by the PMAP lock. */ - UNLOCK_TABLE(); pvo = uma_zalloc(zone, M_NOWAIT); - LOCK_TABLE(); } - if (pvo == NULL) { - UNLOCK_TABLE(); + if (pvo == NULL) return (ENOMEM); - } moea64_pvo_entries++; pvo->pvo_vaddr = va; @@ -2274,8 +2335,6 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u if (pm == kernel_pmap) isync(); - UNLOCK_TABLE(); - #ifdef __powerpc64__ /* * Make sure all our bootstrap mappings are in the SLB as soon @@ -2293,11 +2352,13 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_ { uintptr_t pt; + PMAP_LOCK_ASSERT(pvo->pvo_pmap, MA_OWNED); + rw_assert(&moea64_table_lock, RA_WLOCKED); + /* * If there is an active pte entry, we need to deactivate it (and * save the ref & cfg bits). */ - LOCK_TABLE(); pt = MOEA64_PVO_TO_PTE(mmu, pvo); if (pt != -1) { MOEA64_PTE_UNSET(mmu, pt, &pvo->pvo_pte.lpte, pvo->pvo_vpn); @@ -2314,19 +2375,6 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_ pvo->pvo_pmap->pm_stats.wired_count--; /* - * Save the REF/CHG bits into their cache if the page is managed. - */ - if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED) { - struct vm_page *pg; - - pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); - if (pg != NULL) { - moea64_attr_save(pg, pvo->pvo_pte.lpte.pte_lo & - (LPTE_REF | LPTE_CHG)); - } - } - - /* * Remove this PVO from the PV and pmap lists. */ LIST_REMOVE(pvo, pvo_vlink); @@ -2338,11 +2386,27 @@ moea64_pvo_remove(mmu_t mmu, struct pvo_ */ LIST_REMOVE(pvo, pvo_olink); + /* + * Update vm about the REF/CHG bits if the page is managed. + */ + if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED && + (pvo->pvo_pte.lpte.pte_lo & LPTE_PP) != LPTE_BR) { + struct vm_page *pg; + + pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.lpte.pte_lo & LPTE_RPGN); + if (pg != NULL) { + if (pvo->pvo_pte.lpte.pte_lo & LPTE_CHG) + vm_page_dirty(pg); + if (pvo->pvo_pte.lpte.pte_lo & LPTE_REF) + vm_page_aflag_set(pg, PGA_REFERENCED); + if (LIST_EMPTY(vm_page_to_pvoh(pg))) + vm_page_aflag_clear(pg, PGA_WRITEABLE); + } + } + moea64_pvo_entries--; moea64_pvo_remove_calls++; - UNLOCK_TABLE(); - if (!(pvo->pvo_vaddr & PVO_BOOTSTRAP)) uma_zfree((pvo->pvo_vaddr & PVO_MANAGED) ? moea64_mpvo_zone : moea64_upvo_zone, pvo); @@ -2380,12 +2444,10 @@ moea64_pvo_find_va(pmap_t pm, vm_offset_ ptegidx = va_to_pteg(vsid, va, 0); #endif - LOCK_TABLE(); LIST_FOREACH(pvo, &moea64_pvo_table[ptegidx], pvo_olink) { if (pvo->pvo_pmap == pm && PVO_VADDR(pvo) == va) break; } - UNLOCK_TABLE(); return (pvo); } @@ -2396,20 +2458,13 @@ moea64_query_bit(mmu_t mmu, vm_page_t m, struct pvo_entry *pvo; uintptr_t pt; - if (moea64_attr_fetch(m) & ptebit) - return (TRUE); - - vm_page_lock_queues(); - + LOCK_TABLE_RD(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { - /* - * See if we saved the bit off. If so, cache it and return - * success. + * See if we saved the bit off. If so, return success. */ if (pvo->pvo_pte.lpte.pte_lo & ptebit) { - moea64_attr_save(m, ptebit); - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); return (TRUE); } } @@ -2425,24 +2480,22 @@ moea64_query_bit(mmu_t mmu, vm_page_t m, /* * See if this pvo has a valid PTE. if so, fetch the * REF/CHG bits from the valid PTE. If the appropriate - * ptebit is set, cache it and return success. + * ptebit is set, return success. */ - LOCK_TABLE(); + PMAP_LOCK(pvo->pvo_pmap); pt = MOEA64_PVO_TO_PTE(mmu, pvo); if (pt != -1) { MOEA64_PTE_SYNCH(mmu, pt, &pvo->pvo_pte.lpte); if (pvo->pvo_pte.lpte.pte_lo & ptebit) { - UNLOCK_TABLE(); - - moea64_attr_save(m, ptebit); - vm_page_unlock_queues(); + PMAP_UNLOCK(pvo->pvo_pmap); + UNLOCK_TABLE_RD(); return (TRUE); } } - UNLOCK_TABLE(); + PMAP_UNLOCK(pvo->pvo_pmap); } - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); return (FALSE); } @@ -2453,13 +2506,6 @@ moea64_clear_bit(mmu_t mmu, vm_page_t m, struct pvo_entry *pvo; uintptr_t pt; - vm_page_lock_queues(); - - /* - * Clear the cached value. - */ - moea64_attr_clear(m, ptebit); - /* * Sync so that any pending REF/CHG bits are flushed to the PTEs (so * we can reset the right ones). note that since the pvo entries and @@ -2474,9 +2520,9 @@ moea64_clear_bit(mmu_t mmu, vm_page_t m, * valid pte clear the ptebit from the valid pte. */ count = 0; + LOCK_TABLE_RD(); LIST_FOREACH(pvo, vm_page_to_pvoh(m), pvo_vlink) { - - LOCK_TABLE(); + PMAP_LOCK(pvo->pvo_pmap); pt = MOEA64_PVO_TO_PTE(mmu, pvo); if (pt != -1) { MOEA64_PTE_SYNCH(mmu, pt, &pvo->pvo_pte.lpte); @@ -2487,10 +2533,10 @@ moea64_clear_bit(mmu_t mmu, vm_page_t m, } } pvo->pvo_pte.lpte.pte_lo &= ~ptebit; - UNLOCK_TABLE(); + PMAP_UNLOCK(pvo->pvo_pmap); } - vm_page_unlock_queues(); + UNLOCK_TABLE_RD(); return (count); } @@ -2501,6 +2547,7 @@ moea64_dev_direct_mapped(mmu_t mmu, vm_o vm_offset_t ppa; int error = 0; + LOCK_TABLE_RD(); PMAP_LOCK(kernel_pmap); for (ppa = pa & ~ADDR_POFF; ppa < pa + size; ppa += PAGE_SIZE) { pvo = moea64_pvo_find_va(kernel_pmap, ppa); @@ -2510,6 +2557,7 @@ moea64_dev_direct_mapped(mmu_t mmu, vm_o break; } } + UNLOCK_TABLE_RD(); PMAP_UNLOCK(kernel_pmap); return (error); @@ -2528,7 +2576,7 @@ moea64_mapdev_attr(mmu_t mmu, vm_offset_ ppa = trunc_page(pa); offset = pa & PAGE_MASK; - size = roundup(offset + size, PAGE_SIZE); + size = roundup2(offset + size, PAGE_SIZE); va = kmem_alloc_nofault(kernel_map, size); @@ -2559,7 +2607,7 @@ moea64_unmapdev(mmu_t mmu, vm_offset_t v base = trunc_page(va); offset = va & PAGE_MASK; - size = roundup(offset + size, PAGE_SIZE); + size = roundup2(offset + size, PAGE_SIZE); kmem_free(kernel_map, base, size); } @@ -2572,6 +2620,7 @@ moea64_sync_icache(mmu_t mmu, pmap_t pm, vm_paddr_t pa; vm_size_t len; + LOCK_TABLE_RD(); PMAP_LOCK(pm); while (sz > 0) { lim = round_page(va); @@ -2585,5 +2634,6 @@ moea64_sync_icache(mmu_t mmu, pmap_t pm, va += len; sz -= len; } + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pm); } Modified: stable/9/sys/powerpc/aim/moea64_native.c ============================================================================== --- stable/9/sys/powerpc/aim/moea64_native.c Thu Apr 5 00:08:16 2012 (r233910) +++ stable/9/sys/powerpc/aim/moea64_native.c Thu Apr 5 00:53:21 2012 (r233911) @@ -103,6 +103,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -138,7 +139,7 @@ __FBSDID("$FreeBSD$"); * Just to add to the fun, exceptions must be off as well * so that we can't trap in 64-bit mode. What a pain. */ -struct mtx tlbie_mutex; +static struct mtx tlbie_mutex; static __inline void TLBIE(uint64_t vpn) { @@ -151,19 +152,20 @@ TLBIE(uint64_t vpn) { vpn <<= ADDR_PIDX_SHFT; vpn &= ~(0xffffULL << 48); - mtx_lock_spin(&tlbie_mutex); #ifdef __powerpc64__ - __asm __volatile("\ - ptesync; \ - tlbie %0; \ - eieio; \ - tlbsync; \ - ptesync;" - :: "r"(vpn) : "memory"); + sched_pin(); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 04:31:18 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 E76F610656A7; Thu, 5 Apr 2012 04:31:18 +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 CDD5B8FC20; Thu, 5 Apr 2012 04:31:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q354VIYd040113; Thu, 5 Apr 2012 04:31:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q354VIOO040087; Thu, 5 Apr 2012 04:31:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201204050431.q354VIOO040087@svn.freebsd.org> From: Doug Barton Date: Thu, 5 Apr 2012 04:31: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: r233915 - in stable/8: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec contrib/bind9/bin/named c... 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, 05 Apr 2012 04:31:19 -0000 Author: dougb Date: Thu Apr 5 04:31:17 2012 New Revision: 233915 URL: http://svn.freebsd.org/changeset/base/233915 Log: Update to version 9.6-ESV-R6, the latest from ISC, which contains numerous bug fixes. Added: stable/8/contrib/bind9/lib/dns/rdata/generic/naptr_35.c - copied unchanged from r233907, vendor/bind9/dist-9.6/lib/dns/rdata/generic/naptr_35.c stable/8/contrib/bind9/lib/dns/rdata/generic/naptr_35.h - copied unchanged from r233907, vendor/bind9/dist-9.6/lib/dns/rdata/generic/naptr_35.h Deleted: stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.html stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.pdf stable/8/contrib/bind9/RELEASE-NOTES-BIND-9.6-ESV.txt stable/8/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/8/contrib/bind9/lib/dns/rdata/in_1/naptr_35.h Modified: stable/8/contrib/bind9/CHANGES stable/8/contrib/bind9/COPYRIGHT stable/8/contrib/bind9/FAQ.xml stable/8/contrib/bind9/Makefile.in stable/8/contrib/bind9/README stable/8/contrib/bind9/README.idnkit stable/8/contrib/bind9/acconfig.h stable/8/contrib/bind9/bin/Makefile.in stable/8/contrib/bind9/bin/check/Makefile.in stable/8/contrib/bind9/bin/check/check-tool.c stable/8/contrib/bind9/bin/check/check-tool.h stable/8/contrib/bind9/bin/check/named-checkconf.8 stable/8/contrib/bind9/bin/check/named-checkconf.c stable/8/contrib/bind9/bin/check/named-checkconf.docbook stable/8/contrib/bind9/bin/check/named-checkconf.html stable/8/contrib/bind9/bin/check/named-checkzone.8 stable/8/contrib/bind9/bin/check/named-checkzone.c stable/8/contrib/bind9/bin/check/named-checkzone.docbook stable/8/contrib/bind9/bin/check/named-checkzone.html stable/8/contrib/bind9/bin/dig/Makefile.in stable/8/contrib/bind9/bin/dig/dig.1 stable/8/contrib/bind9/bin/dig/dig.c stable/8/contrib/bind9/bin/dig/dig.docbook stable/8/contrib/bind9/bin/dig/dig.html stable/8/contrib/bind9/bin/dig/dighost.c stable/8/contrib/bind9/bin/dig/host.1 stable/8/contrib/bind9/bin/dig/host.c stable/8/contrib/bind9/bin/dig/host.docbook stable/8/contrib/bind9/bin/dig/host.html stable/8/contrib/bind9/bin/dig/include/dig/dig.h stable/8/contrib/bind9/bin/dig/nslookup.1 stable/8/contrib/bind9/bin/dig/nslookup.c stable/8/contrib/bind9/bin/dig/nslookup.docbook stable/8/contrib/bind9/bin/dig/nslookup.html stable/8/contrib/bind9/bin/dnssec/Makefile.in stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.8 stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.c stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-dsfromkey.html stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.html stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.c stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/8/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/8/contrib/bind9/bin/dnssec/dnssectool.c stable/8/contrib/bind9/bin/dnssec/dnssectool.h stable/8/contrib/bind9/bin/named/Makefile.in stable/8/contrib/bind9/bin/named/bind9.xsl stable/8/contrib/bind9/bin/named/bind9.xsl.h stable/8/contrib/bind9/bin/named/builtin.c stable/8/contrib/bind9/bin/named/client.c stable/8/contrib/bind9/bin/named/config.c stable/8/contrib/bind9/bin/named/control.c stable/8/contrib/bind9/bin/named/controlconf.c stable/8/contrib/bind9/bin/named/convertxsl.pl stable/8/contrib/bind9/bin/named/include/named/builtin.h stable/8/contrib/bind9/bin/named/include/named/client.h stable/8/contrib/bind9/bin/named/include/named/config.h stable/8/contrib/bind9/bin/named/include/named/control.h stable/8/contrib/bind9/bin/named/include/named/globals.h stable/8/contrib/bind9/bin/named/include/named/interfacemgr.h stable/8/contrib/bind9/bin/named/include/named/listenlist.h stable/8/contrib/bind9/bin/named/include/named/log.h stable/8/contrib/bind9/bin/named/include/named/logconf.h stable/8/contrib/bind9/bin/named/include/named/lwaddr.h stable/8/contrib/bind9/bin/named/include/named/lwdclient.h stable/8/contrib/bind9/bin/named/include/named/lwresd.h stable/8/contrib/bind9/bin/named/include/named/lwsearch.h stable/8/contrib/bind9/bin/named/include/named/main.h stable/8/contrib/bind9/bin/named/include/named/notify.h stable/8/contrib/bind9/bin/named/include/named/ns_smf_globals.h stable/8/contrib/bind9/bin/named/include/named/query.h stable/8/contrib/bind9/bin/named/include/named/server.h stable/8/contrib/bind9/bin/named/include/named/sortlist.h stable/8/contrib/bind9/bin/named/include/named/statschannel.h stable/8/contrib/bind9/bin/named/include/named/tkeyconf.h stable/8/contrib/bind9/bin/named/include/named/tsigconf.h stable/8/contrib/bind9/bin/named/include/named/types.h stable/8/contrib/bind9/bin/named/include/named/update.h stable/8/contrib/bind9/bin/named/include/named/xfrout.h stable/8/contrib/bind9/bin/named/include/named/zoneconf.h stable/8/contrib/bind9/bin/named/interfacemgr.c stable/8/contrib/bind9/bin/named/listenlist.c stable/8/contrib/bind9/bin/named/log.c stable/8/contrib/bind9/bin/named/logconf.c stable/8/contrib/bind9/bin/named/lwaddr.c stable/8/contrib/bind9/bin/named/lwdclient.c stable/8/contrib/bind9/bin/named/lwderror.c stable/8/contrib/bind9/bin/named/lwdgabn.c stable/8/contrib/bind9/bin/named/lwdgnba.c stable/8/contrib/bind9/bin/named/lwdgrbn.c stable/8/contrib/bind9/bin/named/lwdnoop.c stable/8/contrib/bind9/bin/named/lwresd.8 stable/8/contrib/bind9/bin/named/lwresd.c stable/8/contrib/bind9/bin/named/lwresd.docbook stable/8/contrib/bind9/bin/named/lwresd.html stable/8/contrib/bind9/bin/named/lwsearch.c stable/8/contrib/bind9/bin/named/main.c stable/8/contrib/bind9/bin/named/named.8 stable/8/contrib/bind9/bin/named/named.conf.5 stable/8/contrib/bind9/bin/named/named.conf.docbook stable/8/contrib/bind9/bin/named/named.conf.html stable/8/contrib/bind9/bin/named/named.docbook stable/8/contrib/bind9/bin/named/named.html stable/8/contrib/bind9/bin/named/notify.c stable/8/contrib/bind9/bin/named/query.c stable/8/contrib/bind9/bin/named/server.c stable/8/contrib/bind9/bin/named/sortlist.c stable/8/contrib/bind9/bin/named/statschannel.c stable/8/contrib/bind9/bin/named/tkeyconf.c stable/8/contrib/bind9/bin/named/tsigconf.c stable/8/contrib/bind9/bin/named/unix/Makefile.in stable/8/contrib/bind9/bin/named/unix/include/named/os.h stable/8/contrib/bind9/bin/named/unix/os.c stable/8/contrib/bind9/bin/named/update.c stable/8/contrib/bind9/bin/named/xfrout.c stable/8/contrib/bind9/bin/named/zoneconf.c stable/8/contrib/bind9/bin/nsupdate/Makefile.in stable/8/contrib/bind9/bin/nsupdate/nsupdate.1 stable/8/contrib/bind9/bin/nsupdate/nsupdate.c stable/8/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/8/contrib/bind9/bin/nsupdate/nsupdate.html stable/8/contrib/bind9/bin/rndc/Makefile.in stable/8/contrib/bind9/bin/rndc/include/rndc/os.h stable/8/contrib/bind9/bin/rndc/rndc-confgen.8 stable/8/contrib/bind9/bin/rndc/rndc-confgen.c stable/8/contrib/bind9/bin/rndc/rndc-confgen.docbook stable/8/contrib/bind9/bin/rndc/rndc-confgen.html stable/8/contrib/bind9/bin/rndc/rndc.8 stable/8/contrib/bind9/bin/rndc/rndc.c stable/8/contrib/bind9/bin/rndc/rndc.conf stable/8/contrib/bind9/bin/rndc/rndc.conf.5 stable/8/contrib/bind9/bin/rndc/rndc.conf.docbook stable/8/contrib/bind9/bin/rndc/rndc.conf.html stable/8/contrib/bind9/bin/rndc/rndc.docbook stable/8/contrib/bind9/bin/rndc/rndc.html stable/8/contrib/bind9/bin/rndc/unix/Makefile.in stable/8/contrib/bind9/bin/rndc/unix/os.c stable/8/contrib/bind9/bin/rndc/util.c stable/8/contrib/bind9/bin/rndc/util.h stable/8/contrib/bind9/config.h.in stable/8/contrib/bind9/config.threads.in stable/8/contrib/bind9/configure.in stable/8/contrib/bind9/doc/Makefile.in stable/8/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/8/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/8/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/8/contrib/bind9/doc/arm/Bv9ARM.html stable/8/contrib/bind9/doc/arm/Bv9ARM.pdf stable/8/contrib/bind9/doc/arm/Makefile.in stable/8/contrib/bind9/doc/arm/README-SGML stable/8/contrib/bind9/doc/arm/man.dig.html stable/8/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html stable/8/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html stable/8/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/8/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/8/contrib/bind9/doc/arm/man.host.html stable/8/contrib/bind9/doc/arm/man.named-checkconf.html stable/8/contrib/bind9/doc/arm/man.named-checkzone.html stable/8/contrib/bind9/doc/arm/man.named.html stable/8/contrib/bind9/doc/arm/man.nsupdate.html stable/8/contrib/bind9/doc/arm/man.rndc-confgen.html stable/8/contrib/bind9/doc/arm/man.rndc.conf.html stable/8/contrib/bind9/doc/arm/man.rndc.html stable/8/contrib/bind9/doc/misc/Makefile.in stable/8/contrib/bind9/doc/misc/dnssec stable/8/contrib/bind9/doc/misc/format-options.pl stable/8/contrib/bind9/doc/misc/ipv6 stable/8/contrib/bind9/doc/misc/migration stable/8/contrib/bind9/doc/misc/migration-4to9 stable/8/contrib/bind9/doc/misc/rfc-compliance stable/8/contrib/bind9/doc/misc/roadmap stable/8/contrib/bind9/doc/misc/sdb stable/8/contrib/bind9/doc/misc/sort-options.pl stable/8/contrib/bind9/isc-config.sh.in stable/8/contrib/bind9/lib/Makefile.in stable/8/contrib/bind9/lib/bind9/Makefile.in stable/8/contrib/bind9/lib/bind9/api stable/8/contrib/bind9/lib/bind9/check.c stable/8/contrib/bind9/lib/bind9/getaddresses.c stable/8/contrib/bind9/lib/bind9/include/Makefile.in stable/8/contrib/bind9/lib/bind9/include/bind9/Makefile.in stable/8/contrib/bind9/lib/bind9/include/bind9/check.h stable/8/contrib/bind9/lib/bind9/include/bind9/getaddresses.h stable/8/contrib/bind9/lib/bind9/include/bind9/version.h stable/8/contrib/bind9/lib/bind9/version.c stable/8/contrib/bind9/lib/dns/Makefile.in stable/8/contrib/bind9/lib/dns/acache.c stable/8/contrib/bind9/lib/dns/acl.c stable/8/contrib/bind9/lib/dns/adb.c stable/8/contrib/bind9/lib/dns/api stable/8/contrib/bind9/lib/dns/byaddr.c stable/8/contrib/bind9/lib/dns/cache.c stable/8/contrib/bind9/lib/dns/callbacks.c stable/8/contrib/bind9/lib/dns/compress.c stable/8/contrib/bind9/lib/dns/db.c stable/8/contrib/bind9/lib/dns/dbiterator.c stable/8/contrib/bind9/lib/dns/dbtable.c stable/8/contrib/bind9/lib/dns/diff.c stable/8/contrib/bind9/lib/dns/dispatch.c stable/8/contrib/bind9/lib/dns/dlz.c stable/8/contrib/bind9/lib/dns/dnssec.c stable/8/contrib/bind9/lib/dns/ds.c stable/8/contrib/bind9/lib/dns/dst_api.c stable/8/contrib/bind9/lib/dns/dst_internal.h stable/8/contrib/bind9/lib/dns/dst_lib.c stable/8/contrib/bind9/lib/dns/dst_openssl.h stable/8/contrib/bind9/lib/dns/dst_parse.c stable/8/contrib/bind9/lib/dns/dst_parse.h stable/8/contrib/bind9/lib/dns/dst_result.c stable/8/contrib/bind9/lib/dns/forward.c stable/8/contrib/bind9/lib/dns/gen-unix.h stable/8/contrib/bind9/lib/dns/gen.c stable/8/contrib/bind9/lib/dns/gssapi_link.c stable/8/contrib/bind9/lib/dns/gssapictx.c stable/8/contrib/bind9/lib/dns/hmac_link.c stable/8/contrib/bind9/lib/dns/include/Makefile.in stable/8/contrib/bind9/lib/dns/include/dns/Makefile.in stable/8/contrib/bind9/lib/dns/include/dns/acache.h stable/8/contrib/bind9/lib/dns/include/dns/acl.h stable/8/contrib/bind9/lib/dns/include/dns/adb.h stable/8/contrib/bind9/lib/dns/include/dns/bit.h stable/8/contrib/bind9/lib/dns/include/dns/byaddr.h stable/8/contrib/bind9/lib/dns/include/dns/cache.h stable/8/contrib/bind9/lib/dns/include/dns/callbacks.h stable/8/contrib/bind9/lib/dns/include/dns/cert.h stable/8/contrib/bind9/lib/dns/include/dns/compress.h stable/8/contrib/bind9/lib/dns/include/dns/db.h stable/8/contrib/bind9/lib/dns/include/dns/dbiterator.h stable/8/contrib/bind9/lib/dns/include/dns/dbtable.h stable/8/contrib/bind9/lib/dns/include/dns/diff.h stable/8/contrib/bind9/lib/dns/include/dns/dispatch.h stable/8/contrib/bind9/lib/dns/include/dns/dlz.h stable/8/contrib/bind9/lib/dns/include/dns/dnssec.h stable/8/contrib/bind9/lib/dns/include/dns/ds.h stable/8/contrib/bind9/lib/dns/include/dns/events.h stable/8/contrib/bind9/lib/dns/include/dns/fixedname.h stable/8/contrib/bind9/lib/dns/include/dns/forward.h stable/8/contrib/bind9/lib/dns/include/dns/iptable.h stable/8/contrib/bind9/lib/dns/include/dns/journal.h stable/8/contrib/bind9/lib/dns/include/dns/keyflags.h stable/8/contrib/bind9/lib/dns/include/dns/keytable.h stable/8/contrib/bind9/lib/dns/include/dns/keyvalues.h stable/8/contrib/bind9/lib/dns/include/dns/lib.h stable/8/contrib/bind9/lib/dns/include/dns/log.h stable/8/contrib/bind9/lib/dns/include/dns/lookup.h stable/8/contrib/bind9/lib/dns/include/dns/master.h stable/8/contrib/bind9/lib/dns/include/dns/masterdump.h stable/8/contrib/bind9/lib/dns/include/dns/message.h stable/8/contrib/bind9/lib/dns/include/dns/name.h stable/8/contrib/bind9/lib/dns/include/dns/ncache.h stable/8/contrib/bind9/lib/dns/include/dns/nsec.h stable/8/contrib/bind9/lib/dns/include/dns/nsec3.h stable/8/contrib/bind9/lib/dns/include/dns/opcode.h stable/8/contrib/bind9/lib/dns/include/dns/order.h stable/8/contrib/bind9/lib/dns/include/dns/peer.h stable/8/contrib/bind9/lib/dns/include/dns/portlist.h stable/8/contrib/bind9/lib/dns/include/dns/rbt.h stable/8/contrib/bind9/lib/dns/include/dns/rcode.h stable/8/contrib/bind9/lib/dns/include/dns/rdata.h stable/8/contrib/bind9/lib/dns/include/dns/rdataclass.h stable/8/contrib/bind9/lib/dns/include/dns/rdatalist.h stable/8/contrib/bind9/lib/dns/include/dns/rdataset.h stable/8/contrib/bind9/lib/dns/include/dns/rdatasetiter.h stable/8/contrib/bind9/lib/dns/include/dns/rdataslab.h stable/8/contrib/bind9/lib/dns/include/dns/rdatatype.h stable/8/contrib/bind9/lib/dns/include/dns/request.h stable/8/contrib/bind9/lib/dns/include/dns/resolver.h stable/8/contrib/bind9/lib/dns/include/dns/result.h stable/8/contrib/bind9/lib/dns/include/dns/rootns.h stable/8/contrib/bind9/lib/dns/include/dns/sdb.h stable/8/contrib/bind9/lib/dns/include/dns/sdlz.h stable/8/contrib/bind9/lib/dns/include/dns/secalg.h stable/8/contrib/bind9/lib/dns/include/dns/secproto.h stable/8/contrib/bind9/lib/dns/include/dns/soa.h stable/8/contrib/bind9/lib/dns/include/dns/ssu.h stable/8/contrib/bind9/lib/dns/include/dns/stats.h stable/8/contrib/bind9/lib/dns/include/dns/tcpmsg.h stable/8/contrib/bind9/lib/dns/include/dns/time.h stable/8/contrib/bind9/lib/dns/include/dns/timer.h stable/8/contrib/bind9/lib/dns/include/dns/tkey.h stable/8/contrib/bind9/lib/dns/include/dns/tsig.h stable/8/contrib/bind9/lib/dns/include/dns/ttl.h stable/8/contrib/bind9/lib/dns/include/dns/types.h stable/8/contrib/bind9/lib/dns/include/dns/validator.h stable/8/contrib/bind9/lib/dns/include/dns/version.h stable/8/contrib/bind9/lib/dns/include/dns/view.h stable/8/contrib/bind9/lib/dns/include/dns/xfrin.h stable/8/contrib/bind9/lib/dns/include/dns/zone.h stable/8/contrib/bind9/lib/dns/include/dns/zonekey.h stable/8/contrib/bind9/lib/dns/include/dns/zt.h stable/8/contrib/bind9/lib/dns/include/dst/Makefile.in stable/8/contrib/bind9/lib/dns/include/dst/dst.h stable/8/contrib/bind9/lib/dns/include/dst/gssapi.h stable/8/contrib/bind9/lib/dns/include/dst/lib.h stable/8/contrib/bind9/lib/dns/include/dst/result.h stable/8/contrib/bind9/lib/dns/iptable.c stable/8/contrib/bind9/lib/dns/journal.c stable/8/contrib/bind9/lib/dns/key.c stable/8/contrib/bind9/lib/dns/keytable.c stable/8/contrib/bind9/lib/dns/lib.c stable/8/contrib/bind9/lib/dns/log.c stable/8/contrib/bind9/lib/dns/lookup.c stable/8/contrib/bind9/lib/dns/master.c stable/8/contrib/bind9/lib/dns/masterdump.c stable/8/contrib/bind9/lib/dns/message.c stable/8/contrib/bind9/lib/dns/name.c stable/8/contrib/bind9/lib/dns/ncache.c stable/8/contrib/bind9/lib/dns/nsec.c stable/8/contrib/bind9/lib/dns/nsec3.c stable/8/contrib/bind9/lib/dns/openssl_link.c stable/8/contrib/bind9/lib/dns/openssldh_link.c stable/8/contrib/bind9/lib/dns/openssldsa_link.c stable/8/contrib/bind9/lib/dns/opensslrsa_link.c stable/8/contrib/bind9/lib/dns/order.c stable/8/contrib/bind9/lib/dns/peer.c stable/8/contrib/bind9/lib/dns/portlist.c stable/8/contrib/bind9/lib/dns/rbt.c stable/8/contrib/bind9/lib/dns/rbtdb.c stable/8/contrib/bind9/lib/dns/rbtdb.h stable/8/contrib/bind9/lib/dns/rbtdb64.c stable/8/contrib/bind9/lib/dns/rbtdb64.h stable/8/contrib/bind9/lib/dns/rcode.c stable/8/contrib/bind9/lib/dns/rdata.c stable/8/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c stable/8/contrib/bind9/lib/dns/rdata/any_255/tsig_250.h stable/8/contrib/bind9/lib/dns/rdata/ch_3/a_1.c stable/8/contrib/bind9/lib/dns/rdata/ch_3/a_1.h stable/8/contrib/bind9/lib/dns/rdata/generic/afsdb_18.c stable/8/contrib/bind9/lib/dns/rdata/generic/afsdb_18.h stable/8/contrib/bind9/lib/dns/rdata/generic/cert_37.c stable/8/contrib/bind9/lib/dns/rdata/generic/cert_37.h stable/8/contrib/bind9/lib/dns/rdata/generic/cname_5.c stable/8/contrib/bind9/lib/dns/rdata/generic/cname_5.h stable/8/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c stable/8/contrib/bind9/lib/dns/rdata/generic/dlv_32769.h stable/8/contrib/bind9/lib/dns/rdata/generic/dname_39.c stable/8/contrib/bind9/lib/dns/rdata/generic/dname_39.h stable/8/contrib/bind9/lib/dns/rdata/generic/dnskey_48.c stable/8/contrib/bind9/lib/dns/rdata/generic/dnskey_48.h stable/8/contrib/bind9/lib/dns/rdata/generic/ds_43.c stable/8/contrib/bind9/lib/dns/rdata/generic/ds_43.h stable/8/contrib/bind9/lib/dns/rdata/generic/gpos_27.c stable/8/contrib/bind9/lib/dns/rdata/generic/gpos_27.h stable/8/contrib/bind9/lib/dns/rdata/generic/hinfo_13.c stable/8/contrib/bind9/lib/dns/rdata/generic/hinfo_13.h stable/8/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.c stable/8/contrib/bind9/lib/dns/rdata/generic/ipseckey_45.h stable/8/contrib/bind9/lib/dns/rdata/generic/isdn_20.c stable/8/contrib/bind9/lib/dns/rdata/generic/isdn_20.h stable/8/contrib/bind9/lib/dns/rdata/generic/key_25.c stable/8/contrib/bind9/lib/dns/rdata/generic/key_25.h stable/8/contrib/bind9/lib/dns/rdata/generic/loc_29.c stable/8/contrib/bind9/lib/dns/rdata/generic/loc_29.h stable/8/contrib/bind9/lib/dns/rdata/generic/mb_7.c stable/8/contrib/bind9/lib/dns/rdata/generic/mb_7.h stable/8/contrib/bind9/lib/dns/rdata/generic/md_3.c stable/8/contrib/bind9/lib/dns/rdata/generic/md_3.h stable/8/contrib/bind9/lib/dns/rdata/generic/mf_4.c stable/8/contrib/bind9/lib/dns/rdata/generic/mf_4.h stable/8/contrib/bind9/lib/dns/rdata/generic/mg_8.c stable/8/contrib/bind9/lib/dns/rdata/generic/mg_8.h stable/8/contrib/bind9/lib/dns/rdata/generic/minfo_14.c stable/8/contrib/bind9/lib/dns/rdata/generic/minfo_14.h stable/8/contrib/bind9/lib/dns/rdata/generic/mr_9.c stable/8/contrib/bind9/lib/dns/rdata/generic/mr_9.h stable/8/contrib/bind9/lib/dns/rdata/generic/mx_15.c stable/8/contrib/bind9/lib/dns/rdata/generic/mx_15.h stable/8/contrib/bind9/lib/dns/rdata/generic/ns_2.c stable/8/contrib/bind9/lib/dns/rdata/generic/ns_2.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3_50.c stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3_50.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.c stable/8/contrib/bind9/lib/dns/rdata/generic/nsec3param_51.h stable/8/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/8/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/8/contrib/bind9/lib/dns/rdata/generic/null_10.c stable/8/contrib/bind9/lib/dns/rdata/generic/null_10.h stable/8/contrib/bind9/lib/dns/rdata/generic/nxt_30.c stable/8/contrib/bind9/lib/dns/rdata/generic/nxt_30.h stable/8/contrib/bind9/lib/dns/rdata/generic/opt_41.c stable/8/contrib/bind9/lib/dns/rdata/generic/opt_41.h stable/8/contrib/bind9/lib/dns/rdata/generic/proforma.c stable/8/contrib/bind9/lib/dns/rdata/generic/proforma.h stable/8/contrib/bind9/lib/dns/rdata/generic/ptr_12.c stable/8/contrib/bind9/lib/dns/rdata/generic/ptr_12.h stable/8/contrib/bind9/lib/dns/rdata/generic/rp_17.c stable/8/contrib/bind9/lib/dns/rdata/generic/rp_17.h stable/8/contrib/bind9/lib/dns/rdata/generic/rrsig_46.c stable/8/contrib/bind9/lib/dns/rdata/generic/rrsig_46.h stable/8/contrib/bind9/lib/dns/rdata/generic/rt_21.c stable/8/contrib/bind9/lib/dns/rdata/generic/rt_21.h stable/8/contrib/bind9/lib/dns/rdata/generic/sig_24.c stable/8/contrib/bind9/lib/dns/rdata/generic/sig_24.h stable/8/contrib/bind9/lib/dns/rdata/generic/soa_6.c stable/8/contrib/bind9/lib/dns/rdata/generic/soa_6.h stable/8/contrib/bind9/lib/dns/rdata/generic/spf_99.c stable/8/contrib/bind9/lib/dns/rdata/generic/spf_99.h stable/8/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c stable/8/contrib/bind9/lib/dns/rdata/generic/sshfp_44.h stable/8/contrib/bind9/lib/dns/rdata/generic/tkey_249.c stable/8/contrib/bind9/lib/dns/rdata/generic/tkey_249.h stable/8/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/8/contrib/bind9/lib/dns/rdata/generic/txt_16.h stable/8/contrib/bind9/lib/dns/rdata/generic/unspec_103.c stable/8/contrib/bind9/lib/dns/rdata/generic/unspec_103.h stable/8/contrib/bind9/lib/dns/rdata/generic/x25_19.c stable/8/contrib/bind9/lib/dns/rdata/generic/x25_19.h stable/8/contrib/bind9/lib/dns/rdata/hs_4/a_1.c stable/8/contrib/bind9/lib/dns/rdata/hs_4/a_1.h stable/8/contrib/bind9/lib/dns/rdata/in_1/a6_38.c stable/8/contrib/bind9/lib/dns/rdata/in_1/a6_38.h stable/8/contrib/bind9/lib/dns/rdata/in_1/a_1.c stable/8/contrib/bind9/lib/dns/rdata/in_1/a_1.h stable/8/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.c stable/8/contrib/bind9/lib/dns/rdata/in_1/aaaa_28.h stable/8/contrib/bind9/lib/dns/rdata/in_1/apl_42.c stable/8/contrib/bind9/lib/dns/rdata/in_1/apl_42.h stable/8/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.c stable/8/contrib/bind9/lib/dns/rdata/in_1/dhcid_49.h stable/8/contrib/bind9/lib/dns/rdata/in_1/kx_36.c stable/8/contrib/bind9/lib/dns/rdata/in_1/kx_36.h stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.c stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap-ptr_23.h stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c stable/8/contrib/bind9/lib/dns/rdata/in_1/nsap_22.h stable/8/contrib/bind9/lib/dns/rdata/in_1/px_26.c stable/8/contrib/bind9/lib/dns/rdata/in_1/px_26.h stable/8/contrib/bind9/lib/dns/rdata/in_1/srv_33.c stable/8/contrib/bind9/lib/dns/rdata/in_1/srv_33.h stable/8/contrib/bind9/lib/dns/rdata/in_1/wks_11.c stable/8/contrib/bind9/lib/dns/rdata/in_1/wks_11.h stable/8/contrib/bind9/lib/dns/rdata/rdatastructpre.h stable/8/contrib/bind9/lib/dns/rdata/rdatastructsuf.h stable/8/contrib/bind9/lib/dns/rdatalist.c stable/8/contrib/bind9/lib/dns/rdatalist_p.h stable/8/contrib/bind9/lib/dns/rdataset.c stable/8/contrib/bind9/lib/dns/rdatasetiter.c stable/8/contrib/bind9/lib/dns/rdataslab.c stable/8/contrib/bind9/lib/dns/request.c stable/8/contrib/bind9/lib/dns/resolver.c stable/8/contrib/bind9/lib/dns/result.c stable/8/contrib/bind9/lib/dns/rootns.c stable/8/contrib/bind9/lib/dns/sdb.c stable/8/contrib/bind9/lib/dns/sdlz.c stable/8/contrib/bind9/lib/dns/soa.c stable/8/contrib/bind9/lib/dns/spnego.asn1 stable/8/contrib/bind9/lib/dns/spnego.c stable/8/contrib/bind9/lib/dns/spnego.h stable/8/contrib/bind9/lib/dns/spnego_asn1.c stable/8/contrib/bind9/lib/dns/spnego_asn1.pl stable/8/contrib/bind9/lib/dns/ssu.c stable/8/contrib/bind9/lib/dns/stats.c stable/8/contrib/bind9/lib/dns/tcpmsg.c stable/8/contrib/bind9/lib/dns/time.c stable/8/contrib/bind9/lib/dns/timer.c stable/8/contrib/bind9/lib/dns/tkey.c stable/8/contrib/bind9/lib/dns/tsig.c stable/8/contrib/bind9/lib/dns/ttl.c stable/8/contrib/bind9/lib/dns/validator.c stable/8/contrib/bind9/lib/dns/version.c stable/8/contrib/bind9/lib/dns/view.c stable/8/contrib/bind9/lib/dns/xfrin.c stable/8/contrib/bind9/lib/dns/zone.c stable/8/contrib/bind9/lib/dns/zonekey.c stable/8/contrib/bind9/lib/dns/zt.c stable/8/contrib/bind9/lib/isc/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/alpha/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/api stable/8/contrib/bind9/lib/isc/assertions.c stable/8/contrib/bind9/lib/isc/base32.c stable/8/contrib/bind9/lib/isc/base64.c stable/8/contrib/bind9/lib/isc/bitstring.c stable/8/contrib/bind9/lib/isc/buffer.c stable/8/contrib/bind9/lib/isc/bufferlist.c stable/8/contrib/bind9/lib/isc/commandline.c stable/8/contrib/bind9/lib/isc/entropy.c stable/8/contrib/bind9/lib/isc/error.c stable/8/contrib/bind9/lib/isc/event.c stable/8/contrib/bind9/lib/isc/fsaccess.c stable/8/contrib/bind9/lib/isc/hash.c stable/8/contrib/bind9/lib/isc/heap.c stable/8/contrib/bind9/lib/isc/hex.c stable/8/contrib/bind9/lib/isc/hmacmd5.c stable/8/contrib/bind9/lib/isc/hmacsha.c stable/8/contrib/bind9/lib/isc/httpd.c stable/8/contrib/bind9/lib/isc/ia64/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/ia64/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/include/Makefile.in stable/8/contrib/bind9/lib/isc/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/include/isc/app.h stable/8/contrib/bind9/lib/isc/include/isc/assertions.h stable/8/contrib/bind9/lib/isc/include/isc/base32.h stable/8/contrib/bind9/lib/isc/include/isc/base64.h stable/8/contrib/bind9/lib/isc/include/isc/bitstring.h stable/8/contrib/bind9/lib/isc/include/isc/boolean.h stable/8/contrib/bind9/lib/isc/include/isc/buffer.h stable/8/contrib/bind9/lib/isc/include/isc/bufferlist.h stable/8/contrib/bind9/lib/isc/include/isc/commandline.h stable/8/contrib/bind9/lib/isc/include/isc/entropy.h stable/8/contrib/bind9/lib/isc/include/isc/error.h stable/8/contrib/bind9/lib/isc/include/isc/event.h stable/8/contrib/bind9/lib/isc/include/isc/eventclass.h stable/8/contrib/bind9/lib/isc/include/isc/file.h stable/8/contrib/bind9/lib/isc/include/isc/formatcheck.h stable/8/contrib/bind9/lib/isc/include/isc/fsaccess.h stable/8/contrib/bind9/lib/isc/include/isc/hash.h stable/8/contrib/bind9/lib/isc/include/isc/heap.h stable/8/contrib/bind9/lib/isc/include/isc/hex.h stable/8/contrib/bind9/lib/isc/include/isc/hmacmd5.h stable/8/contrib/bind9/lib/isc/include/isc/hmacsha.h stable/8/contrib/bind9/lib/isc/include/isc/httpd.h stable/8/contrib/bind9/lib/isc/include/isc/interfaceiter.h stable/8/contrib/bind9/lib/isc/include/isc/ipv6.h stable/8/contrib/bind9/lib/isc/include/isc/iterated_hash.h stable/8/contrib/bind9/lib/isc/include/isc/lang.h stable/8/contrib/bind9/lib/isc/include/isc/lex.h stable/8/contrib/bind9/lib/isc/include/isc/lfsr.h stable/8/contrib/bind9/lib/isc/include/isc/lib.h stable/8/contrib/bind9/lib/isc/include/isc/list.h stable/8/contrib/bind9/lib/isc/include/isc/log.h stable/8/contrib/bind9/lib/isc/include/isc/magic.h stable/8/contrib/bind9/lib/isc/include/isc/md5.h stable/8/contrib/bind9/lib/isc/include/isc/mem.h stable/8/contrib/bind9/lib/isc/include/isc/msgcat.h stable/8/contrib/bind9/lib/isc/include/isc/msgs.h stable/8/contrib/bind9/lib/isc/include/isc/mutexblock.h stable/8/contrib/bind9/lib/isc/include/isc/netaddr.h stable/8/contrib/bind9/lib/isc/include/isc/netscope.h stable/8/contrib/bind9/lib/isc/include/isc/ondestroy.h stable/8/contrib/bind9/lib/isc/include/isc/os.h stable/8/contrib/bind9/lib/isc/include/isc/parseint.h stable/8/contrib/bind9/lib/isc/include/isc/platform.h.in stable/8/contrib/bind9/lib/isc/include/isc/portset.h stable/8/contrib/bind9/lib/isc/include/isc/print.h stable/8/contrib/bind9/lib/isc/include/isc/quota.h stable/8/contrib/bind9/lib/isc/include/isc/radix.h stable/8/contrib/bind9/lib/isc/include/isc/random.h stable/8/contrib/bind9/lib/isc/include/isc/ratelimiter.h stable/8/contrib/bind9/lib/isc/include/isc/refcount.h stable/8/contrib/bind9/lib/isc/include/isc/region.h stable/8/contrib/bind9/lib/isc/include/isc/resource.h stable/8/contrib/bind9/lib/isc/include/isc/result.h stable/8/contrib/bind9/lib/isc/include/isc/resultclass.h stable/8/contrib/bind9/lib/isc/include/isc/rwlock.h stable/8/contrib/bind9/lib/isc/include/isc/serial.h stable/8/contrib/bind9/lib/isc/include/isc/sha1.h stable/8/contrib/bind9/lib/isc/include/isc/sha2.h stable/8/contrib/bind9/lib/isc/include/isc/sockaddr.h stable/8/contrib/bind9/lib/isc/include/isc/socket.h stable/8/contrib/bind9/lib/isc/include/isc/stats.h stable/8/contrib/bind9/lib/isc/include/isc/stdio.h stable/8/contrib/bind9/lib/isc/include/isc/stdlib.h stable/8/contrib/bind9/lib/isc/include/isc/string.h stable/8/contrib/bind9/lib/isc/include/isc/symtab.h stable/8/contrib/bind9/lib/isc/include/isc/task.h stable/8/contrib/bind9/lib/isc/include/isc/taskpool.h stable/8/contrib/bind9/lib/isc/include/isc/timer.h stable/8/contrib/bind9/lib/isc/include/isc/types.h stable/8/contrib/bind9/lib/isc/include/isc/util.h stable/8/contrib/bind9/lib/isc/include/isc/version.h stable/8/contrib/bind9/lib/isc/include/isc/xml.h stable/8/contrib/bind9/lib/isc/inet_aton.c stable/8/contrib/bind9/lib/isc/inet_ntop.c stable/8/contrib/bind9/lib/isc/inet_pton.c stable/8/contrib/bind9/lib/isc/iterated_hash.c stable/8/contrib/bind9/lib/isc/lex.c stable/8/contrib/bind9/lib/isc/lfsr.c stable/8/contrib/bind9/lib/isc/lib.c stable/8/contrib/bind9/lib/isc/log.c stable/8/contrib/bind9/lib/isc/md5.c stable/8/contrib/bind9/lib/isc/mem.c stable/8/contrib/bind9/lib/isc/mips/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/mips/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/mutexblock.c stable/8/contrib/bind9/lib/isc/netaddr.c stable/8/contrib/bind9/lib/isc/netscope.c stable/8/contrib/bind9/lib/isc/nls/Makefile.in stable/8/contrib/bind9/lib/isc/nls/msgcat.c stable/8/contrib/bind9/lib/isc/noatomic/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/noatomic/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/nothreads/Makefile.in stable/8/contrib/bind9/lib/isc/nothreads/condition.c stable/8/contrib/bind9/lib/isc/nothreads/include/Makefile.in stable/8/contrib/bind9/lib/isc/nothreads/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/nothreads/include/isc/condition.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/mutex.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/once.h stable/8/contrib/bind9/lib/isc/nothreads/include/isc/thread.h stable/8/contrib/bind9/lib/isc/nothreads/mutex.c stable/8/contrib/bind9/lib/isc/nothreads/thread.c stable/8/contrib/bind9/lib/isc/ondestroy.c stable/8/contrib/bind9/lib/isc/parseint.c stable/8/contrib/bind9/lib/isc/portset.c stable/8/contrib/bind9/lib/isc/powerpc/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/powerpc/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/print.c stable/8/contrib/bind9/lib/isc/pthreads/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/condition.c stable/8/contrib/bind9/lib/isc/pthreads/include/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/pthreads/include/isc/condition.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/mutex.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/once.h stable/8/contrib/bind9/lib/isc/pthreads/include/isc/thread.h stable/8/contrib/bind9/lib/isc/pthreads/mutex.c stable/8/contrib/bind9/lib/isc/pthreads/thread.c stable/8/contrib/bind9/lib/isc/quota.c stable/8/contrib/bind9/lib/isc/radix.c stable/8/contrib/bind9/lib/isc/random.c stable/8/contrib/bind9/lib/isc/ratelimiter.c stable/8/contrib/bind9/lib/isc/refcount.c stable/8/contrib/bind9/lib/isc/region.c stable/8/contrib/bind9/lib/isc/result.c stable/8/contrib/bind9/lib/isc/rwlock.c stable/8/contrib/bind9/lib/isc/serial.c stable/8/contrib/bind9/lib/isc/sha1.c stable/8/contrib/bind9/lib/isc/sha2.c stable/8/contrib/bind9/lib/isc/sockaddr.c stable/8/contrib/bind9/lib/isc/sparc64/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/stats.c stable/8/contrib/bind9/lib/isc/string.c stable/8/contrib/bind9/lib/isc/strtoul.c stable/8/contrib/bind9/lib/isc/symtab.c stable/8/contrib/bind9/lib/isc/task.c stable/8/contrib/bind9/lib/isc/task_p.h stable/8/contrib/bind9/lib/isc/taskpool.c stable/8/contrib/bind9/lib/isc/timer.c stable/8/contrib/bind9/lib/isc/timer_p.h stable/8/contrib/bind9/lib/isc/unix/Makefile.in stable/8/contrib/bind9/lib/isc/unix/app.c stable/8/contrib/bind9/lib/isc/unix/dir.c stable/8/contrib/bind9/lib/isc/unix/entropy.c stable/8/contrib/bind9/lib/isc/unix/errno2result.c stable/8/contrib/bind9/lib/isc/unix/errno2result.h stable/8/contrib/bind9/lib/isc/unix/file.c stable/8/contrib/bind9/lib/isc/unix/fsaccess.c stable/8/contrib/bind9/lib/isc/unix/ifiter_getifaddrs.c stable/8/contrib/bind9/lib/isc/unix/ifiter_ioctl.c stable/8/contrib/bind9/lib/isc/unix/ifiter_sysctl.c stable/8/contrib/bind9/lib/isc/unix/include/Makefile.in stable/8/contrib/bind9/lib/isc/unix/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/unix/include/isc/dir.h stable/8/contrib/bind9/lib/isc/unix/include/isc/int.h stable/8/contrib/bind9/lib/isc/unix/include/isc/keyboard.h stable/8/contrib/bind9/lib/isc/unix/include/isc/net.h stable/8/contrib/bind9/lib/isc/unix/include/isc/netdb.h stable/8/contrib/bind9/lib/isc/unix/include/isc/offset.h stable/8/contrib/bind9/lib/isc/unix/include/isc/stat.h stable/8/contrib/bind9/lib/isc/unix/include/isc/stdtime.h stable/8/contrib/bind9/lib/isc/unix/include/isc/strerror.h stable/8/contrib/bind9/lib/isc/unix/include/isc/syslog.h stable/8/contrib/bind9/lib/isc/unix/include/isc/time.h stable/8/contrib/bind9/lib/isc/unix/interfaceiter.c stable/8/contrib/bind9/lib/isc/unix/ipv6.c stable/8/contrib/bind9/lib/isc/unix/keyboard.c stable/8/contrib/bind9/lib/isc/unix/net.c stable/8/contrib/bind9/lib/isc/unix/os.c stable/8/contrib/bind9/lib/isc/unix/resource.c stable/8/contrib/bind9/lib/isc/unix/socket.c stable/8/contrib/bind9/lib/isc/unix/socket_p.h stable/8/contrib/bind9/lib/isc/unix/stdio.c stable/8/contrib/bind9/lib/isc/unix/stdtime.c stable/8/contrib/bind9/lib/isc/unix/strerror.c stable/8/contrib/bind9/lib/isc/unix/syslog.c stable/8/contrib/bind9/lib/isc/unix/time.c stable/8/contrib/bind9/lib/isc/version.c stable/8/contrib/bind9/lib/isc/x86_32/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/x86_32/include/isc/atomic.h stable/8/contrib/bind9/lib/isc/x86_64/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/isc/Makefile.in stable/8/contrib/bind9/lib/isc/x86_64/include/isc/atomic.h stable/8/contrib/bind9/lib/isccc/Makefile.in stable/8/contrib/bind9/lib/isccc/alist.c stable/8/contrib/bind9/lib/isccc/api stable/8/contrib/bind9/lib/isccc/base64.c stable/8/contrib/bind9/lib/isccc/cc.c stable/8/contrib/bind9/lib/isccc/ccmsg.c stable/8/contrib/bind9/lib/isccc/include/Makefile.in stable/8/contrib/bind9/lib/isccc/include/isccc/Makefile.in stable/8/contrib/bind9/lib/isccc/include/isccc/alist.h stable/8/contrib/bind9/lib/isccc/include/isccc/base64.h stable/8/contrib/bind9/lib/isccc/include/isccc/cc.h stable/8/contrib/bind9/lib/isccc/include/isccc/ccmsg.h stable/8/contrib/bind9/lib/isccc/include/isccc/events.h stable/8/contrib/bind9/lib/isccc/include/isccc/lib.h stable/8/contrib/bind9/lib/isccc/include/isccc/result.h stable/8/contrib/bind9/lib/isccc/include/isccc/sexpr.h stable/8/contrib/bind9/lib/isccc/include/isccc/symtab.h stable/8/contrib/bind9/lib/isccc/include/isccc/symtype.h stable/8/contrib/bind9/lib/isccc/include/isccc/types.h stable/8/contrib/bind9/lib/isccc/include/isccc/util.h stable/8/contrib/bind9/lib/isccc/include/isccc/version.h stable/8/contrib/bind9/lib/isccc/lib.c stable/8/contrib/bind9/lib/isccc/result.c stable/8/contrib/bind9/lib/isccc/sexpr.c stable/8/contrib/bind9/lib/isccc/symtab.c stable/8/contrib/bind9/lib/isccc/version.c stable/8/contrib/bind9/lib/isccfg/Makefile.in stable/8/contrib/bind9/lib/isccfg/aclconf.c stable/8/contrib/bind9/lib/isccfg/api stable/8/contrib/bind9/lib/isccfg/include/Makefile.in stable/8/contrib/bind9/lib/isccfg/include/isccfg/Makefile.in stable/8/contrib/bind9/lib/isccfg/include/isccfg/aclconf.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/cfg.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/grammar.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/log.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/namedconf.h stable/8/contrib/bind9/lib/isccfg/include/isccfg/version.h stable/8/contrib/bind9/lib/isccfg/log.c stable/8/contrib/bind9/lib/isccfg/namedconf.c stable/8/contrib/bind9/lib/isccfg/parser.c stable/8/contrib/bind9/lib/isccfg/version.c stable/8/contrib/bind9/lib/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/api stable/8/contrib/bind9/lib/lwres/assert_p.h stable/8/contrib/bind9/lib/lwres/context.c stable/8/contrib/bind9/lib/lwres/context_p.h stable/8/contrib/bind9/lib/lwres/gai_strerror.c stable/8/contrib/bind9/lib/lwres/getaddrinfo.c stable/8/contrib/bind9/lib/lwres/gethost.c stable/8/contrib/bind9/lib/lwres/getipnode.c stable/8/contrib/bind9/lib/lwres/getnameinfo.c stable/8/contrib/bind9/lib/lwres/getrrset.c stable/8/contrib/bind9/lib/lwres/herror.c stable/8/contrib/bind9/lib/lwres/include/Makefile.in stable/8/contrib/bind9/lib/lwres/include/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/include/lwres/context.h stable/8/contrib/bind9/lib/lwres/include/lwres/int.h stable/8/contrib/bind9/lib/lwres/include/lwres/ipv6.h stable/8/contrib/bind9/lib/lwres/include/lwres/lang.h stable/8/contrib/bind9/lib/lwres/include/lwres/list.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwbuffer.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwpacket.h stable/8/contrib/bind9/lib/lwres/include/lwres/lwres.h stable/8/contrib/bind9/lib/lwres/include/lwres/netdb.h.in stable/8/contrib/bind9/lib/lwres/include/lwres/platform.h.in stable/8/contrib/bind9/lib/lwres/include/lwres/result.h stable/8/contrib/bind9/lib/lwres/include/lwres/stdlib.h stable/8/contrib/bind9/lib/lwres/include/lwres/version.h stable/8/contrib/bind9/lib/lwres/lwbuffer.c stable/8/contrib/bind9/lib/lwres/lwconfig.c stable/8/contrib/bind9/lib/lwres/lwinetaton.c stable/8/contrib/bind9/lib/lwres/lwinetntop.c stable/8/contrib/bind9/lib/lwres/lwinetpton.c stable/8/contrib/bind9/lib/lwres/lwpacket.c stable/8/contrib/bind9/lib/lwres/lwres_gabn.c stable/8/contrib/bind9/lib/lwres/lwres_gnba.c stable/8/contrib/bind9/lib/lwres/lwres_grbn.c stable/8/contrib/bind9/lib/lwres/lwres_noop.c stable/8/contrib/bind9/lib/lwres/lwresutil.c stable/8/contrib/bind9/lib/lwres/man/Makefile.in stable/8/contrib/bind9/lib/lwres/man/lwres.3 stable/8/contrib/bind9/lib/lwres/man/lwres.docbook stable/8/contrib/bind9/lib/lwres/man/lwres.html stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.3 stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_buffer.html stable/8/contrib/bind9/lib/lwres/man/lwres_config.3 stable/8/contrib/bind9/lib/lwres/man/lwres_config.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_config.html stable/8/contrib/bind9/lib/lwres/man/lwres_context.3 stable/8/contrib/bind9/lib/lwres/man/lwres_context.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_context.html stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gabn.html stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gai_strerror.html stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getaddrinfo.html stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gethostent.html stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getipnode.html stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getnameinfo.html stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.3 stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_getrrsetbyname.html stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.3 stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_gnba.html stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.3 stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_hstrerror.html stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_inetntop.html stable/8/contrib/bind9/lib/lwres/man/lwres_noop.3 stable/8/contrib/bind9/lib/lwres/man/lwres_noop.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_noop.html stable/8/contrib/bind9/lib/lwres/man/lwres_packet.3 stable/8/contrib/bind9/lib/lwres/man/lwres_packet.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_packet.html stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.3 stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.docbook stable/8/contrib/bind9/lib/lwres/man/lwres_resutil.html stable/8/contrib/bind9/lib/lwres/print.c stable/8/contrib/bind9/lib/lwres/print_p.h stable/8/contrib/bind9/lib/lwres/strtoul.c stable/8/contrib/bind9/lib/lwres/unix/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/lwres/Makefile.in stable/8/contrib/bind9/lib/lwres/unix/include/lwres/net.h stable/8/contrib/bind9/lib/lwres/version.c stable/8/contrib/bind9/make/Makefile.in stable/8/contrib/bind9/make/includes.in stable/8/contrib/bind9/make/mkdep.in stable/8/contrib/bind9/make/rules.in stable/8/contrib/bind9/mkinstalldirs stable/8/contrib/bind9/version stable/8/lib/bind/dns/code.h stable/8/lib/bind/dns/dns/enumclass.h stable/8/lib/bind/dns/dns/enumtype.h stable/8/lib/bind/dns/dns/rdatastruct.h stable/8/lib/bind/isc/isc/platform.h stable/8/lib/bind/lwres/lwres/netdb.h stable/8/lib/bind/lwres/lwres/platform.h Directory Properties: stable/8/contrib/bind9/ (props changed) Modified: stable/8/contrib/bind9/CHANGES ============================================================================== --- stable/8/contrib/bind9/CHANGES Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/CHANGES Thu Apr 5 04:31:17 2012 (r233915) @@ -1,9 +1,247 @@ - --- 9.6-ESV-R5-P1 released --- + --- 9.6-ESV-R6 released --- + +3298. [bug] Named could dereference a NULL pointer in + zmgr_start_xfrin_ifquota if the zone was being removed. + [RT #28419] + +3297. [bug] Named could die on a malformed master file. [RT #28467] + +3295. [bug] Adjust isc_time_secondsastimet range check to be more + portable. [RT # 26542] + +3294. [bug] isccc/cc.c:table_fromwire failed to free alist on + error. [RT #28265] + +3291. [port] Fixed a build error on systems without ENOTSUP. + [RT #28200] + +3290. [bug] was not being installed. [RT #28169] + +3287. [port] Update ans.pl to work with Net::DNS 0.68. [RT #28028] + + --- 9.6-ESV-R6rc2 released --- + +3285. [bug] val-frdataset was incorrectly disassociated in + proveunsecure after calling startfinddlvsep. + [RT #27928] + +3284. [bug] Address race conditions with the handling of + rbtnode.deadlink. [RT #27738] + +3283. [bug] Raw zones with with more than 512 records in a RRset + failed to load. [RT #27863] + +3282. [bug] Restrict the TTL of NS RRset to no more than that + of the old NS RRset when replacing it. + [RT #27792] [RT #27884] + +3281. [bug] SOA refresh queries could be treated as cancelled + despite succeeding over the loopback interface. + [RT #27782] + +3374. [bug] Log when a zone is not reusable. Only set loadtime + on successful loads. [RT #27650] + +3268. [bug] Convert RRSIG expiry times to 64 timestamps to work + out the earliest expiry time. [RT #23311] + +3267. [bug] Memory allocation failures could be mis-reported as + unexpected error. New ISC_R_UNSET result code. + [RT #27336] + +3266. [bug] The maximum number of NSEC3 iterations for a + DNSKEY RRset was not being properly computed. + [RT #26543] + + --- 9.6-ESV-R6rc1 released --- + +3260. [bug] "rrset-order cyclic" could appear not to rotate + for some query patterns. [RT #27170/27185] + +3259. [bug] named-compilezone: Suppress "dump zone to " + message when writing to stdout. [RT #27109] + +3257. [bug] Do not generate a error message when calling fsync() + in a pipe or socket. [RT #27109] + +3256. [bug] Disable empty zones for lwresd -C. [RT #27139] + +3254. [bug] Set isc_socket_ipv6only() on the IPv6 control channels. + [RT #22249] + +3253. [bug] Return DNS_R_SYNTAX when the input to a text field is + too long. [RT #26956] + +3251. [bug] Enforce a upper bound (65535 bytes) on the amount of + memory dns_sdlz_putrr() can allocate per record to + prevent run away memory consumption on ISC_R_NOSPACE. + [RT #26956] + +3250. [func] 'configure --enable-developer'; turn on various + configure options, normally off by default, that + we want developers to build and test with. [RT #27103] + +3249. [bug] Update log message when saving slave zones files for + analysis after load failures. [RT #27087] + +3247. [bug] 'raw' format zones failed to preserve load order + breaking 'fixed' sort order. [RT #27087] + +3243. [port] netbsd,bsdi: the thread defaults were not being + properly set. + +3241. [bug] Address race conditions in the resolver code. + [RT #26889] + +3238. [bug] keyrdata was not being reinitialized in + lib/dns/rbtdb.c:iszonesecure. [RT#26913] + +3237. [bug] dig -6 didn't work with +trace. [RT #26906] + +3234. [bug] 'make depend' produced invalid makefiles. [RT #26830] + +3231. [bug] named could fail to send a uncompressable zone. + [RT #26796] + +3230. [bug] 'dig axfr' failed to properly handle a multi-message + axfr with a serial of 0. [RT #26796] + +3228. [tuning] Dynamically grow symbol table to improve zone + loading performance. [RT #26523] + +3227. [bug] Interim fix to make WKS's use of getprotobyname() + and getservbyname() self thread safe. [RT #26232] + +3226. [bug] Address minor resource leakages. [RT #26624] + + --- 9.6-ESV-R6b1 released --- + +3221. [bug] Fixed a potential coredump on shutdown due to + referencing fetch context after it's been freed. + [RT #26720] 3218. [security] Cache lookup could return RRSIG data associated with nonexistent records, leading to an assertion failure. [RT #26590] +3216. [bug] resolver.c:validated() was not thread-safe. [RT #26478] + +3213. [doc] Clarify ixfr-from-differences behavior. [RT #25188] + +3212. [bug] rbtdb.c: failed to remove a node from the deadnodes + list prior to adding a reference to it leading a + possible assertion failure. [RT #23219] + +3208. [bug] 'dig -y' handle unknown tsig alorithm better. + [RT #25522] + +3207. [contrib] Fixed build error in Berkeley DB DLZ module. [RT #26444] + +3206. [cleanup] Add ISC information to log at start time. [RT #25484] + +3204. [bug] When a master server that has been marked as + unreachable sends a NOTIFY, mark it reachable + again. [RT #25960] + +3203. [bug] Increase log level to 'info' for validation failures + from expired or not-yet-valid RRSIGs. [RT #21796] + +3200. [doc] Some rndc functions were undocumented or were + missing from 'rndc -h' output. [RT #25555] + +3196. [bug] nsupdate: return nonzero exit code when target zone + doesn't exist. [RT #25783] + +3194. [doc] Updated RFC references in the 'empty-zones-enable' + documentation. [RT #25203] + +3193. [cleanup] Changed MAXZONEKEYS to DNS_MAXZONEKEYS, moved to + dnssec.h. [RT #26415] + +3192. [bug] A query structure could be used after being freed. + [RT #22208] + +3191. [bug] Print NULL records using "unknown" format. [RT #26392] + +3190. [bug] Underflow in error handling in isc_mutexblock_init. + [RT #26397] + +3189. [test] Added a summary report after system tests. [RT #25517] + +3187. [port] win32: support for Visual Studio 2008. [RT #26356] + +3179. [port] kfreebsd: build issues. [RT #26273] + +3175. [bug] Fix how DNSSEC positive wildcard responses from a + NSEC3 signed zone are validated. Stop sending a + unnecessary NSEC3 record when generating such + responses. [RT #26200] + +3173. [port] Correctly validate root DS responses. [RT #25726] + +3169. [func] Catch db/version mis-matches when calling dns_db_*(). + [RT #26017] + +3167. [bug] Negative answers from forwarders were not being + correctly tagged making them appear to not be cached. + [RT #25380] + +3162. [test] start.pl: modified to allow for "named.args" in + ns*/ subdirectory to override stock arguments to + named. Largely from RT#26044, but no separate ticket. + +3157. [tuning] Reduce the time spent in "rndc reconfig" by parsing + the config file before pausing the server. [RT #21373] + +3156. [bug] Reconfiguring the server with an incorrectly + formatted TSIG key could cause a crash during + subsequent zone transfers. [RT #20391] + +3154. [bug] Attempting to print an empty rdataset could trigger + an assert. [RT #25452] + +3151. [bug] Queries for type RRSIG or SIG could be handled + incorrectly. [RT #21050] + +3149. [tuning] Improve scalability by allocating one zone + task per 100 zones at startup time. (The + BIND9_ZONE_TASKS_HINT environment variable + which was established as a temporary measure + in change #3132 is no longer needed or + used.) [rt25541] + +3148. [bug] Processing of normal queries could be stalled when + forwarding a UPDATE message. [RT #24711] + +3146. [test] Fixed gcc4.6.0 errors in ATF. [RT #25598] + +3145. [test] Capture output of ATF unit tests in "./atf.out" if + there were any errors while running them. [RT #25527] + +3144. [bug] dns_dbiterator_seek() could trigger an assert when + used with a nonexistent database node. [RT #25358] + +3143. [bug] Silence clang compiler warnings. [RT #25174] + +3142. [bug] NAPTR is class agnostic. [RT #25429] + +3141. [bug] Silence spurious "zone serial unchanged" messages + associated with empty zones. [RT #25079] + +3139. [test] Added tests from RFC 6234, RFC 2202, and RFC 1321 + for the hashing algorithms (md5, sha1 - sha512, and + their hmac counterparts). [RT #25067] + +3138. [bug] Address memory leaks and out-of-order operations when + shutting named down. [RT #25210] + +3136. [func] Add RFC 1918 reverse zones to the list of built-in + empty zones switched on by the 'empty-zones-enable' + option. [RT #24990] + +3134. [bug] Improve the accuracy of dnssec-signzone's signing + statistics. [RT #16030] + --- 9.6-ESV-R5 released --- 3135. [port] FreeBSD: workaround broken IPV6_USE_MIN_MTU processing. @@ -27,8 +265,6 @@ --- 9.6-ESV-R5rc1 released --- 3124. [bug] Use an rdataset attribute flag to indicate - -3124. [bug] Use an rdataset attribute flag to indicate negative-cache records rather than using rrtype 0; this will prevent problems when that rrtype is used in actual DNS packets. [RT #24777] @@ -42,7 +278,7 @@ trigger an off-by-one error in the ncache code and crash named. [RT #24650] -3120. [bug] Named could fail to validate zones list in a DLV +3120. [bug] Named could fail to validate zones listed in a DLV that validated insecure without using DLV and had DS records in the parent zone. [RT #24631] @@ -1689,8 +1925,8 @@ 2316. [port] Missing #include in lib/dns/gssapictx.c. [RT #17513] -2315. [bug] Used incorrect address family for mapped IPv4 - addresses in acl.c. [RT #17519] +2315. [bug] Used incorrect address family for mapped IPv4 + addresses in acl.c. [RT #17519] 2314. [bug] Uninitialized memory use on error path in bin/named/lwdnoop.c. [RT #17476] @@ -1701,8 +1937,8 @@ 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [bug] IPv6 addresses could match IPv4 ACL entries and - vice versa. [RT #17462] +2311. [bug] IPv6 addresses could match IPv4 ACL entries and + vice versa. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] Modified: stable/8/contrib/bind9/COPYRIGHT ============================================================================== --- stable/8/contrib/bind9/COPYRIGHT Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/COPYRIGHT Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -$Id: COPYRIGHT,v 1.14.176.4 2011-02-22 06:40:42 marka Exp $ +$Id$ Portions of this code release fall under one or more of the following Copyright notices. Please see individual source Modified: stable/8/contrib/bind9/FAQ.xml ============================================================================== --- stable/8/contrib/bind9/FAQ.xml Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/FAQ.xml Thu Apr 5 04:31:17 2012 (r233915) @@ -1,7 +1,7 @@ - +
Frequently Asked Questions about BIND 9 @@ -30,6 +30,7 @@ 2008 2009 2010 + 2012 Internet Systems Consortium, Inc. ("ISC") Modified: stable/8/contrib/bind9/Makefile.in ============================================================================== --- stable/8/contrib/bind9/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/Makefile.in Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2009, 2011 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.52.48.4 2011-02-28 01:18:39 tbox Exp $ +# $Id$ srcdir = @srcdir@ VPATH = @srcdir@ @@ -63,8 +63,10 @@ tags: check: test test: - (cd bin/tests && ${MAKE} ${MAKEDEFS} test) - (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) + status=0; \ + (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ + (test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \ + exit $$status FAQ: FAQ.xml ${XSLTPROC} doc/xsl/isc-docbook-text.xsl FAQ.xml | \ Modified: stable/8/contrib/bind9/README ============================================================================== --- stable/8/contrib/bind9/README Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/README Thu Apr 5 04:31:17 2012 (r233915) @@ -42,6 +42,17 @@ BIND 9 Stichting NLnet - NLnet Foundation Nominum, Inc. + For a detailed list of user-visible changes from + previous releases, see the CHANGES file. + + For up-to-date release notes and errata, see + http://www.isc.org/software/bind9/releasenotes + +BIND 9.6-ESV-R6 (Extended Support Version) + + BIND 9.6-ESV-R6 includes a number of bug fixes and prevents a + security problem described in CVE-2011-4313 + BIND 9.6-ESV-R5 (Extended Support Version) BIND 9.4-ESV-R5 is a maintenance release, fixing bugs in BIND @@ -407,9 +418,6 @@ BIND 9.2.0 transfers from a BIND 9 server to a W2K server to fail. For details, see the "Zone Transfers" section in doc/misc/migration. - For a detailed list of user-visible changes from - previous releases, see the CHANGES file. - Building Modified: stable/8/contrib/bind9/README.idnkit ============================================================================== --- stable/8/contrib/bind9/README.idnkit Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/README.idnkit Thu Apr 5 04:31:17 2012 (r233915) @@ -109,4 +109,4 @@ about idnkit and this patch. Bug reports and comments on this kit should be sent to mdnkit-bugs@nic.ad.jp and idn-cmt@nic.ad.jp, respectively. -; $Id: README.idnkit,v 1.2.762.1 2009-01-18 23:25:14 marka Exp $ +; $Id$ Modified: stable/8/contrib/bind9/acconfig.h ============================================================================== --- stable/8/contrib/bind9/acconfig.h Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/acconfig.h Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: acconfig.h,v 1.51.334.2 2009-02-16 23:47:15 tbox Exp $ */ +/* $Id$ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/Makefile.in Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.25 2007-06-19 23:46:59 tbox Exp $ +# $Id$ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/check/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/check/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/Makefile.in Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2007, 2012 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000-2003 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.32 2007-06-19 23:46:59 tbox Exp $ +# $Id$ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/check/check-tool.c ============================================================================== --- stable/8/contrib/bind9/bin/check/check-tool.c Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/check-tool.c Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2010, 2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.c,v 1.35.36.5 2010-09-07 23:46:05 tbox Exp $ */ +/* $Id$ */ /*! \file */ Modified: stable/8/contrib/bind9/bin/check/check-tool.h ============================================================================== --- stable/8/contrib/bind9/bin/check/check-tool.h Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/check-tool.h Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007, 2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2010, 2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: check-tool.h,v 1.14.334.2 2010-09-07 23:46:05 tbox Exp $ */ +/* $Id$ */ #ifndef CHECK_TOOL_H #define CHECK_TOOL_H Modified: stable/8/contrib/bind9/bin/check/named-checkconf.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.8 Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkconf.8 Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkconf.8,v 1.30.334.1 2009-07-11 01:55:20 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l @@ -88,7 +88,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br Modified: stable/8/contrib/bind9/bin/check/named-checkconf.c ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.c Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkconf.c Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007, 2009-2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2007, 2009-2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkconf.c,v 1.46.222.6 2011-03-12 04:57:22 tbox Exp $ */ +/* $Id$ */ /*! \file */ @@ -59,6 +59,9 @@ isc_log_t *logc = NULL; } while (0) /*% usage */ +ISC_PLATFORM_NORETURN_PRE static void +usage(void) ISC_PLATFORM_NORETURN_POST; + static void usage(void) { fprintf(stderr, "usage: %s [-h] [-j] [-v] [-z] [-t directory] " Modified: stable/8/contrib/bind9/bin/check/named-checkconf.docbook ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.docbook Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkconf.docbook Thu Apr 5 04:31:17 2012 (r233915) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + June 14, 2000 @@ -35,6 +35,7 @@ 2004 2005 2007 + 2012 Internet Systems Consortium, Inc. ("ISC") Modified: stable/8/contrib/bind9/bin/check/named-checkconf.html ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkconf.html Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkconf.html Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ - + @@ -32,14 +32,14 @@

named-checkconf [-h] [-v] [-j] [-t directory] {filename} [-z]

-

DESCRIPTION

+

DESCRIPTION

named-checkconf checks the syntax, but not the semantics, of a named configuration file.

-

OPTIONS

+

OPTIONS

-h

@@ -74,21 +74,21 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkconf returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkzone(8), BIND 9 Administrator Reference Manual.

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: stable/8/contrib/bind9/bin/check/named-checkzone.8 ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.8 Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkzone.8 Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004-2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2002 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: named-checkzone.8,v 1.42.334.3 2009-11-11 01:56:22 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l @@ -272,7 +272,7 @@ BIND 9 Administrator Reference Manual. .PP Internet Systems Consortium .SH "COPYRIGHT" -Copyright \(co 2004\-2007, 2009 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004\-2007, 2009, 2012 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2002 Internet Software Consortium. .br Modified: stable/8/contrib/bind9/bin/check/named-checkzone.c ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.c Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkzone.c Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.51.34.6 2010-09-07 23:46:06 tbox Exp $ */ +/* $Id$ */ /*! \file */ @@ -70,6 +70,9 @@ static enum { progmode_check, progmode_c } \ } while (0) +ISC_PLATFORM_NORETURN_PRE static void +usage(void) ISC_PLATFORM_NORETURN_POST; + static void usage(void) { fprintf(stderr, @@ -108,6 +111,7 @@ main(int argc, char **argv) { const char *outputformatstr = NULL; dns_masterformat_t inputformat = dns_masterformat_text; dns_masterformat_t outputformat = dns_masterformat_text; + isc_boolean_t logdump = ISC_FALSE; FILE *errout = stdout; outputstyle = &dns_master_style_full; @@ -395,6 +399,7 @@ main(int argc, char **argv) { if (progmode == progmode_compile) { dumpzone = 1; /* always dump */ + logdump = !quiet; if (output_filename == NULL) { fprintf(stderr, "output file required, but not specified\n"); @@ -413,8 +418,10 @@ main(int argc, char **argv) { (output_filename == NULL || strcmp(output_filename, "-") == 0 || strcmp(output_filename, "/dev/fd/1") == 0 || - strcmp(output_filename, "/dev/stdout") == 0)) + strcmp(output_filename, "/dev/stdout") == 0)) { errout = stderr; + logdump = ISC_FALSE; + } if (isc_commandline_index + 2 != argc) usage(); @@ -439,13 +446,13 @@ main(int argc, char **argv) { &zone); if (result == ISC_R_SUCCESS && dumpzone) { - if (!quiet && progmode == progmode_compile) { + if (logdump) { fprintf(errout, "dump zone to %s...", output_filename); fflush(errout); } result = dump_zone(origin, zone, output_filename, outputformat, outputstyle); - if (!quiet && progmode == progmode_compile) + if (logdump) fprintf(errout, "done\n"); } Modified: stable/8/contrib/bind9/bin/check/named-checkzone.docbook ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.docbook Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkzone.docbook Thu Apr 5 04:31:17 2012 (r233915) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + June 13, 2000 @@ -37,6 +37,7 @@ 2006 2007 2009 + 2012 Internet Systems Consortium, Inc. ("ISC")
Modified: stable/8/contrib/bind9/bin/check/named-checkzone.html ============================================================================== --- stable/8/contrib/bind9/bin/check/named-checkzone.html Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/check/named-checkzone.html Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@

named-compilezone [-d] [-j] [-q] [-v] [-c class] [-C mode] [-f format] [-F format] [-i mode] [-k mode] [-m mode] [-n mode] [-o filename] [-s style ] [-t directory] [-w directory] [-D] [-W mode] {-o filename} {zonename} {filename}

-

DESCRIPTION

+

DESCRIPTION

named-checkzone checks the syntax and integrity of a zone file. It performs the same checks as named does when loading a @@ -53,7 +53,7 @@

-

OPTIONS

+

OPTIONS

-d

@@ -239,14 +239,14 @@

-

RETURN VALUES

+

RETURN VALUES

named-checkzone returns an exit status of 1 if errors were detected and 0 otherwise.

-

SEE ALSO

+

SEE ALSO

named(8), named-checkconf(8), RFC 1035, @@ -254,7 +254,7 @@

-

AUTHOR

+

AUTHOR

Internet Systems Consortium

Modified: stable/8/contrib/bind9/bin/dig/Makefile.in ============================================================================== --- stable/8/contrib/bind9/bin/dig/Makefile.in Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/dig/Makefile.in Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000-2002 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: Makefile.in,v 1.41 2007-06-19 23:46:59 tbox Exp $ +# $Id$ srcdir = @srcdir@ VPATH = @srcdir@ Modified: stable/8/contrib/bind9/bin/dig/dig.1 ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.1 Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/dig/dig.1 Thu Apr 5 04:31:17 2012 (r233915) @@ -1,4 +1,4 @@ -.\" Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") +.\" Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC") .\" Copyright (C) 2000-2003 Internet Software Consortium. .\" .\" Permission to use, copy, modify, and/or distribute this software for any @@ -13,7 +13,7 @@ .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.\" $Id: dig.1,v 1.50.44.3 2009-07-11 01:55:20 tbox Exp $ +.\" $Id$ .\" .hy 0 .ad l @@ -562,7 +562,7 @@ RFC1035. .PP There are probably too many query options. .SH "COPYRIGHT" -Copyright \(co 2004\-2009 Internet Systems Consortium, Inc. ("ISC") +Copyright \(co 2004\-2009, 2012 Internet Systems Consortium, Inc. ("ISC") .br Copyright \(co 2000\-2003 Internet Software Consortium. .br Modified: stable/8/contrib/bind9/bin/dig/dig.c ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.c Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/dig/dig.c Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2011 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.225.26.10 2011-03-11 10:49:49 marka Exp $ */ +/* $Id$ */ /*! \file */ @@ -136,6 +136,9 @@ print_usage(FILE *fp) { " [ host [@local-server] {local-d-opt} [...]]\n", fp); } +ISC_PLATFORM_NORETURN_PRE static void +usage(void) ISC_PLATFORM_NORETURN_POST; + static void usage(void) { print_usage(stderr); @@ -1548,7 +1551,7 @@ parse_args(isc_boolean_t is_batchfile, i if (strncmp(rv[0], "%", 1) == 0) break; if (strncmp(rv[0], "@", 1) == 0) { - addresscount = getaddresses(lookup, &rv[0][1]); + addresscount = getaddresses(lookup, &rv[0][1], NULL); } else if (rv[0][0] == '+') { plus_option(&rv[0][1], is_batchfile, lookup); Modified: stable/8/contrib/bind9/bin/dig/dig.docbook ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.docbook Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/dig/dig.docbook Thu Apr 5 04:31:17 2012 (r233915) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + @@ -44,6 +44,7 @@ 2007 2008 2009 + 2012 Internet Systems Consortium, Inc. ("ISC")
Modified: stable/8/contrib/bind9/bin/dig/dig.html ============================================================================== --- stable/8/contrib/bind9/bin/dig/dig.html Thu Apr 5 04:29:35 2012 (r233914) +++ stable/8/contrib/bind9/bin/dig/dig.html Thu Apr 5 04:31:17 2012 (r233915) @@ -1,5 +1,5 @@ - + @@ -34,7 +34,7 @@

dig [global-queryopt...] [query...]

-

DESCRIPTION

+

DESCRIPTION

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and @@ -80,7 +80,7 @@

-

SIMPLE USAGE

+

SIMPLE USAGE

A typical invocation of dig looks like:

@@ -126,7 +126,7 @@

-

OPTIONS

+

OPTIONS

The -b option sets the source IP address of the query to address. This must be a valid @@ -230,7 +230,7 @@

-

QUERY OPTIONS

+

QUERY OPTIONS

dig provides a number of query options which affect the way in which lookups are made and the results displayed. Some of @@ -555,7 +555,7 @@

-

MULTIPLE QUERIES

+

MULTIPLE QUERIES

The BIND 9 implementation of dig supports @@ -601,7 +601,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc

-

IDN SUPPORT

+

IDN SUPPORT

*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 04:32: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 D9597106564A; Thu, 5 Apr 2012 04:32: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 C48FE8FC08; Thu, 5 Apr 2012 04:32: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 q354Wvgl040192; Thu, 5 Apr 2012 04:32:57 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q354WvSi040189; Thu, 5 Apr 2012 04:32:57 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201204050432.q354WvSi040189@svn.freebsd.org> From: Doug Barton Date: Thu, 5 Apr 2012 04:32: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: r233916 - stable/8/share/doc/bind9 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, 05 Apr 2012 04:32:58 -0000 Author: dougb Date: Thu Apr 5 04:32:57 2012 New Revision: 233916 URL: http://svn.freebsd.org/changeset/base/233916 Log: Update relevant to the 9.6-ESV-R6 release. Add Bv9ARM.pdf to the list of docs to install. (Direct commit because this file varies widely between BIND versions) Modified: stable/8/share/doc/bind9/Makefile Modified: stable/8/share/doc/bind9/Makefile ============================================================================== --- stable/8/share/doc/bind9/Makefile Thu Apr 5 04:31:17 2012 (r233915) +++ stable/8/share/doc/bind9/Makefile Thu Apr 5 04:32:57 2012 (r233916) @@ -9,14 +9,12 @@ NO_OBJ= FILESGROUPS= TOP ARM MISC TOP= CHANGES COPYRIGHT FAQ KNOWN-DEFECTS NSEC3-NOTES README \ - RELEASE-NOTES-BIND-9.6-ESV.pdf RELEASE-NOTES-BIND-9.6-ESV.txt \ - RELEASE-NOTES-BIND-9.6-ESV.html release-notes.css \ README.idnkit README.pkcs11 TOPDIR= ${DOCDIR}/bind9 ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \ Bv9ARM.ch04.html Bv9ARM.ch05.html Bv9ARM.ch06.html \ Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html \ - Bv9ARM.ch10.html Bv9ARM.html man.dig.html \ + Bv9ARM.ch10.html Bv9ARM.html Bv9ARM.pdf man.dig.html \ man.dnssec-dsfromkey.html man.dnssec-keyfromlabel.html \ man.dnssec-keygen.html man.dnssec-signzone.html man.host.html \ man.named-checkconf.html man.named-checkzone.html \ From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 10:30: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 097D11065670; Thu, 5 Apr 2012 10:30:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E821E8FC14; Thu, 5 Apr 2012 10:30: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 q35AUscY054693; Thu, 5 Apr 2012 10:30:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35AUsYO054691; Thu, 5 Apr 2012 10:30:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204051030.q35AUsYO054691@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Apr 2012 10:30: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: r233919 - 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: Thu, 05 Apr 2012 10:30:55 -0000 Author: kib Date: Thu Apr 5 10:30:54 2012 New Revision: 233919 URL: http://svn.freebsd.org/changeset/base/233919 Log: MFC r233808: Add helper function to remove the process from the orphans list and use it instead of inlined code. Modified: stable/9/sys/kern/kern_exit.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Thu Apr 5 07:59:59 2012 (r233918) +++ stable/9/sys/kern/kern_exit.c Thu Apr 5 10:30:54 2012 (r233919) @@ -100,6 +100,18 @@ SDT_PROBE_ARGTYPE(proc, kernel, , exit, /* Hook for NFS teardown procedure. */ void (*nlminfo_release_p)(struct proc *p); +static void +clear_orphan(struct proc *p) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (p->p_flag & P_ORPHAN) { + LIST_REMOVE(p, p_orphan); + p->p_flag &= ~P_ORPHAN; + } +} + /* * exit -- death of process. */ @@ -739,10 +751,7 @@ proc_reap(struct thread *td, struct proc sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); PROC_LOCK(p); - if (p->p_flag & P_ORPHAN) { - LIST_REMOVE(p, p_orphan); - p->p_flag &= ~P_ORPHAN; - } + clear_orphan(p); PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC @@ -987,10 +996,7 @@ proc_reparent(struct proc *child, struct LIST_REMOVE(child, p_sibling); LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); - if (child->p_flag & P_ORPHAN) { - LIST_REMOVE(child, p_orphan); - child->p_flag &= ~P_ORPHAN; - } + clear_orphan(child); if (child->p_flag & P_TRACED) { LIST_INSERT_HEAD(&child->p_pptr->p_orphans, child, p_orphan); child->p_flag |= P_ORPHAN; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 10:33:39 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 D5B65106566B; Thu, 5 Apr 2012 10:33: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 C05348FC16; Thu, 5 Apr 2012 10:33: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 q35AXdkh054835; Thu, 5 Apr 2012 10:33:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35AXdxb054833; Thu, 5 Apr 2012 10:33:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204051033.q35AXdxb054833@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Apr 2012 10:33:39 +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: r233920 - 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: Thu, 05 Apr 2012 10:33:39 -0000 Author: kib Date: Thu Apr 5 10:33:39 2012 New Revision: 233920 URL: http://svn.freebsd.org/changeset/base/233920 Log: MFC r233809: When process exists, not only the children shall be reparented to init, but also the orphans shall be removed from the orphan list, because the list header is destroyed. Modified: stable/9/sys/kern/kern_exit.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Thu Apr 5 10:30:54 2012 (r233919) +++ stable/9/sys/kern/kern_exit.c Thu Apr 5 10:33:39 2012 (r233920) @@ -430,6 +430,13 @@ exit1(struct thread *td, int rv) if (q->p_flag & P_TRACED) { struct thread *temp; + /* + * Since q was found on our children list, the + * proc_reparent() call moved q to the orphan + * list due to present P_TRACED flag. Clear + * orphan link for q now while q is locked. + */ + clear_orphan(q); q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); FOREACH_THREAD_IN_PROC(q, temp) temp->td_dbgflags &= ~TDB_SUSPEND; @@ -438,6 +445,15 @@ exit1(struct thread *td, int rv) PROC_UNLOCK(q); } + /* + * Also get rid of our orphans. + */ + while ((q = LIST_FIRST(&p->p_orphans)) != NULL) { + PROC_LOCK(q); + clear_orphan(q); + PROC_UNLOCK(q); + } + /* Save exit status. */ PROC_LOCK(p); p->p_xthread = td; From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 10:36: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 D338F1065670; Thu, 5 Apr 2012 10:36:35 +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 BE5248FC08; Thu, 5 Apr 2012 10:36: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 q35AaZOq054975; Thu, 5 Apr 2012 10:36:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35AaZXX054973; Thu, 5 Apr 2012 10:36:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204051036.q35AaZXX054973@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Apr 2012 10:36:35 +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: r233921 - stable/9/libexec/rtld-elf 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, 05 Apr 2012 10:36:35 -0000 Author: kib Date: Thu Apr 5 10:36:35 2012 New Revision: 233921 URL: http://svn.freebsd.org/changeset/base/233921 Log: MFC r233306: Remove the fragments which are not needed on FreeBSD. Modified: stable/9/libexec/rtld-elf/malloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/malloc.c ============================================================================== --- stable/9/libexec/rtld-elf/malloc.c Thu Apr 5 10:33:39 2012 (r233920) +++ stable/9/libexec/rtld-elf/malloc.c Thu Apr 5 10:36:35 2012 (r233921) @@ -59,15 +59,6 @@ static char *rcsid = "$FreeBSD$"; #include #include #include "rtld_printf.h" -#ifndef BSD -#define MAP_COPY MAP_PRIVATE -#define MAP_FILE 0 -#define MAP_ANON 0 -#endif - -#ifndef BSD /* Need do better than this */ -#define NEED_DEV_ZERO 1 -#endif static void morecore(); static int findbucket(); @@ -492,12 +483,6 @@ int n; int fd = -1; int offset; -#ifdef NEED_DEV_ZERO - fd = open(_PATH_DEVZERO, O_RDWR, 0); - if (fd == -1) - perror(_PATH_DEVZERO); -#endif - if (pagepool_end - pagepool_start > pagesz) { caddr_t addr = (caddr_t) (((long)pagepool_start + pagesz - 1) & ~(pagesz - 1)); @@ -517,8 +502,5 @@ int n; pagepool_end = pagepool_start + n * pagesz; pagepool_start += offset; -#ifdef NEED_DEV_ZERO - close(fd); -#endif return n; } From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 10:38: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 E77EE106566C; Thu, 5 Apr 2012 10:38:07 +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 C848A8FC0A; Thu, 5 Apr 2012 10:38: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 q35Ac7sW055075; Thu, 5 Apr 2012 10:38:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35Ac7Wb055069; Thu, 5 Apr 2012 10:38:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204051038.q35Ac7Wb055069@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 5 Apr 2012 10:38:07 +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: r233922 - in stable/9/libexec/rtld-elf: . ia64 powerpc64 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, 05 Apr 2012 10:38:08 -0000 Author: kib Date: Thu Apr 5 10:38:07 2012 New Revision: 233922 URL: http://svn.freebsd.org/changeset/base/233922 Log: MFC r233307: Use xmalloc() instead of malloc() in the places where malloc() calls are assumed to not fail. Make the xcalloc() calling conventions follow the calloc(3) calling conventions and replace unchecked calls to calloc() with calls to xcalloc(). Remove redundand declarations from xmalloc.c, which are already present in rtld.h. Modified: stable/9/libexec/rtld-elf/ia64/reloc.c stable/9/libexec/rtld-elf/powerpc64/reloc.c stable/9/libexec/rtld-elf/rtld.c stable/9/libexec/rtld-elf/rtld.h stable/9/libexec/rtld-elf/xmalloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/ia64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/ia64/reloc.c Thu Apr 5 10:36:35 2012 (r233921) +++ stable/9/libexec/rtld-elf/ia64/reloc.c Thu Apr 5 10:38:07 2012 (r233922) @@ -87,7 +87,7 @@ alloc_fptr(Elf_Addr target, Elf_Addr gp) struct fptr* fptr; if (next_fptr == last_fptr) { - current_chunk = malloc(sizeof(struct fptr_chunk)); + current_chunk = xmalloc(sizeof(struct fptr_chunk)); next_fptr = ¤t_chunk->fptrs[0]; last_fptr = ¤t_chunk->fptrs[FPTR_CHUNK_SIZE]; } @@ -116,9 +116,7 @@ alloc_fptrs(Obj_Entry *obj, bool mapped) if (fptrs == MAP_FAILED) fptrs = NULL; } else { - fptrs = malloc(fbytes); - if (fptrs != NULL) - memset(fptrs, 0, fbytes); + fptrs = xcalloc(1, fbytes); } /* Modified: stable/9/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc64/reloc.c Thu Apr 5 10:36:35 2012 (r233921) +++ stable/9/libexec/rtld-elf/powerpc64/reloc.c Thu Apr 5 10:38:07 2012 (r233922) @@ -338,7 +338,7 @@ reloc_plt_object(Obj_Entry *obj, const E reloff = rela - obj->pltrela; if (obj->priv == NULL) - obj->priv = malloc(obj->pltrelasize); + obj->priv = xmalloc(obj->pltrelasize); glink = obj->priv + reloff*sizeof(Elf_Addr)*2; dbg(" reloc_plt_object: where=%p,reloff=%lx,glink=%p", (void *)where, reloff, glink); Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Thu Apr 5 10:36:35 2012 (r233921) +++ stable/9/libexec/rtld-elf/rtld.c Thu Apr 5 10:38:07 2012 (r233922) @@ -3746,7 +3746,7 @@ tls_get_addr_slow(Elf_Addr **dtvp, int i /* Check dtv generation in case new modules have arrived */ if (dtv[0] != tls_dtv_generation) { wlock_acquire(rtld_bind_lock, &lockstate); - newdtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); + newdtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); to_copy = dtv[1]; if (to_copy > tls_max_index) to_copy = tls_max_index; @@ -3803,7 +3803,7 @@ allocate_tls(Obj_Entry *objs, void *oldt return (oldtcb); assert(tcbsize >= TLS_TCB_SIZE); - tcb = calloc(1, tls_static_space - TLS_TCB_SIZE + tcbsize); + tcb = xcalloc(1, tls_static_space - TLS_TCB_SIZE + tcbsize); tls = (Elf_Addr **)(tcb + tcbsize - TLS_TCB_SIZE); if (oldtcb != NULL) { @@ -3819,7 +3819,7 @@ allocate_tls(Obj_Entry *objs, void *oldt } } } else { - dtv = calloc(tls_max_index + 2, sizeof(Elf_Addr)); + dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); tls[0] = dtv; dtv[0] = tls_dtv_generation; dtv[1] = tls_max_index; @@ -3884,8 +3884,8 @@ allocate_tls(Obj_Entry *objs, void *oldt size = round(tls_static_space, tcbalign); assert(tcbsize >= 2*sizeof(Elf_Addr)); - tls = calloc(1, size + tcbsize); - dtv = calloc(1, (tls_max_index + 2) * sizeof(Elf_Addr)); + tls = xcalloc(1, size + tcbsize); + dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr)); segbase = (Elf_Addr)(tls + size); ((Elf_Addr*)segbase)[0] = segbase; @@ -4229,7 +4229,7 @@ rtld_verify_object_versions(Obj_Entry *o * way. */ obj->vernum = maxvernum + 1; - obj->vertab = calloc(obj->vernum, sizeof(Ver_Entry)); + obj->vertab = xcalloc(obj->vernum, sizeof(Ver_Entry)); vd = obj->verdef; while (vd != NULL) { Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Thu Apr 5 10:36:35 2012 (r233921) +++ stable/9/libexec/rtld-elf/rtld.h Thu Apr 5 10:38:07 2012 (r233922) @@ -58,7 +58,7 @@ #endif #define NEW(type) ((type *) xmalloc(sizeof(type))) -#define CNEW(type) ((type *) xcalloc(sizeof(type))) +#define CNEW(type) ((type *) xcalloc(1, sizeof(type))) /* We might as well do booleans like C++. */ typedef unsigned char bool; @@ -320,7 +320,7 @@ typedef struct Struct_SymLook { extern void _rtld_error(const char *, ...) __printflike(1, 2); extern const char *rtld_strerror(int); extern Obj_Entry *map_object(int, const char *, const struct stat *); -extern void *xcalloc(size_t); +extern void *xcalloc(size_t, size_t); extern void *xmalloc(size_t); extern char *xstrdup(const char *); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; Modified: stable/9/libexec/rtld-elf/xmalloc.c ============================================================================== --- stable/9/libexec/rtld-elf/xmalloc.c Thu Apr 5 10:36:35 2012 (r233921) +++ stable/9/libexec/rtld-elf/xmalloc.c Thu Apr 5 10:38:07 2012 (r233922) @@ -32,14 +32,17 @@ #include "rtld.h" #include "rtld_printf.h" -void *xcalloc(size_t); -void *xmalloc(size_t); -char *xstrdup(const char *); - void * -xcalloc(size_t size) +xcalloc(size_t number, size_t size) { - return memset(xmalloc(size), 0, size); + void *p; + + p = calloc(number, size); + if (p == NULL) { + rtld_fdputstr(STDERR_FILENO, "Out of memory\n"); + _exit(1); + } + return (p); } void * From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 16:05:35 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 B590B106564A; Thu, 5 Apr 2012 16:05:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8700D8FC14; Thu, 5 Apr 2012 16:05: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 q35G5ZVW065566; Thu, 5 Apr 2012 16:05:35 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35G5ZBT065564; Thu, 5 Apr 2012 16:05:35 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201204051605.q35G5ZBT065564@svn.freebsd.org> From: John Baldwin Date: Thu, 5 Apr 2012 16:05:35 +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: r233924 - in stable/9/sys: i386/conf x86/isa 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, 05 Apr 2012 16:05:35 -0000 Author: jhb Date: Thu Apr 5 16:05:35 2012 New Revision: 233924 URL: http://svn.freebsd.org/changeset/base/233924 Log: MFC 233675: Restore proper use of bounce buffers for ISA DMA. When locking was added, the call to pmap_kextract() was moved up, and as a result the code never updated the physical address to use for DMA if a bounce buffer was used. Restore the earlier location of pmap_kextract() so it takes bounce buffers into account. Modified: stable/9/sys/x86/isa/isa_dma.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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/x86/isa/isa_dma.c ============================================================================== --- stable/9/sys/x86/isa/isa_dma.c Thu Apr 5 15:16:51 2012 (r233923) +++ stable/9/sys/x86/isa/isa_dma.c Thu Apr 5 16:05:35 2012 (r233924) @@ -237,8 +237,6 @@ isa_dmastart(int flags, caddr_t addr, u_ caddr_t newaddr; int dma_range_checked; - /* translate to physical */ - phys = pmap_extract(kernel_pmap, (vm_offset_t)addr); dma_range_checked = isa_dmarangecheck(addr, nbytes, chan); #ifdef DIAGNOSTIC @@ -281,6 +279,9 @@ isa_dmastart(int flags, caddr_t addr, u_ addr = newaddr; } + /* translate to physical */ + phys = pmap_extract(kernel_pmap, (vm_offset_t)addr); + if (flags & ISADMA_RAW) { dma_auto_mode |= (1 << chan); } else { From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 18:43: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 1FF091065672; Thu, 5 Apr 2012 18:43:28 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09B238FC17; Thu, 5 Apr 2012 18:43: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 q35IhR1H072050; Thu, 5 Apr 2012 18:43:27 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35IhR7I072047; Thu, 5 Apr 2012 18:43:27 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204051843.q35IhR7I072047@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 5 Apr 2012 18:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233926 - in stable/8/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2012 18:43:28 -0000 Author: trociny Date: Thu Apr 5 18:43:27 2012 New Revision: 233926 URL: http://svn.freebsd.org/changeset/base/233926 Log: MFC r228648: On start most of sysctl_kern_proc functions use the same pattern: locate a process calling pfind() and do some additional checks like p_candebug(). To reduce this code duplication a new function pget() is introduced and used. As the function may be useful not only in kern_proc.c it is in the kernel name space. Suggested by: kib Reviewed by: kib Modified: stable/8/sys/kern/kern_proc.c stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Thu Apr 5 17:13:14 2012 (r233925) +++ stable/8/sys/kern/kern_proc.c Thu Apr 5 18:43:27 2012 (r233926) @@ -323,6 +323,55 @@ pgfind(pgid) } /* + * Locate process and do additional manipulations, depending on flags. + */ +int +pget(pid_t pid, int flags, struct proc **pp) +{ + struct proc *p; + int error; + + p = pfind(pid); + if (p == NULL) + return (ESRCH); + if ((flags & PGET_CANSEE) != 0) { + error = p_cansee(curthread, p); + if (error != 0) + goto errout; + } + if ((flags & PGET_CANDEBUG) != 0) { + error = p_candebug(curthread, p); + if (error != 0) + goto errout; + } + if ((flags & PGET_ISCURRENT) != 0 && curproc != p) { + error = EPERM; + goto errout; + } + if ((flags & PGET_NOTWEXIT) != 0 && (p->p_flag & P_WEXIT) != 0) { + error = ESRCH; + goto errout; + } + if ((flags & PGET_NOTINEXEC) != 0 && (p->p_flag & P_INEXEC) != 0) { + /* + * XXXRW: Not clear ESRCH is the right error during proc + * execve(). + */ + error = ESRCH; + goto errout; + } + if ((flags & PGET_HOLD) != 0) { + _PHOLD(p); + PROC_UNLOCK(p); + } + *pp = p; + return (0); +errout: + PROC_UNLOCK(p); + return (error); +} + +/* * Create a new process group. * pgid must be equal to the pid of p. * Begin a new session if required. @@ -1163,13 +1212,9 @@ sysctl_kern_proc(SYSCTL_HANDLER_ARGS) error = sysctl_wire_old_buffer(req, 0); if (error) return (error); - p = pfind((pid_t)name[0]); - if (!p) - return (ESRCH); - if ((error = p_cansee(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_CANSEE, &p); + if (error != 0) return (error); - } error = sysctl_out_proc(p, req, flags); return (error); } @@ -1361,24 +1406,17 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARG u_int namelen = arg2; struct pargs *newpa, *pa; struct proc *p; - int error = 0; + int flags, error = 0; if (namelen != 1) return (EINVAL); - p = pfind((pid_t)name[0]); - if (!p) - return (ESRCH); - - if ((error = p_cansee(curthread, p)) != 0) { - PROC_UNLOCK(p); + flags = PGET_CANSEE; + if (req->newptr != NULL) + flags |= PGET_ISCURRENT; + error = pget((pid_t)name[0], flags, &p); + if (error) return (error); - } - - if (req->newptr && curproc != p) { - PROC_UNLOCK(p); - return (EPERM); - } pa = p->p_args; pargs_hold(pa); @@ -1424,13 +1462,9 @@ sysctl_kern_proc_pathname(SYSCTL_HANDLER if (*pidp == -1) { /* -1 means this process */ p = req->td->td_proc; } else { - p = pfind(*pidp); - if (p == NULL) - return (ESRCH); - if ((error = p_cansee(curthread, p)) != 0) { - PROC_UNLOCK(p); + error = pget(*pidp, PGET_CANSEE, &p); + if (error != 0) return (error); - } } vp = p->p_textvp; @@ -1467,12 +1501,9 @@ sysctl_kern_proc_sv_name(SYSCTL_HANDLER_ return (EINVAL); name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - if ((error = p_cansee(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_CANSEE, &p); + if (error != 0) return (error); - } sv_name = p->p_sysent->sv_name; PROC_UNLOCK(p); return (sysctl_handle_string(oidp, sv_name, 0, req)); @@ -1499,18 +1530,9 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A struct vmspace *vm; name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - if (p->p_flag & P_WEXIT) { - PROC_UNLOCK(p); - return (ESRCH); - } - if ((error = p_candebug(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_WANTREAD, &p); + if (error != 0) return (error); - } - _PHOLD(p); - PROC_UNLOCK(p); vm = vmspace_acquire_ref(p); if (vm == NULL) { PRELE(p); @@ -1677,18 +1699,9 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR vm_map_t map; name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - if (p->p_flag & P_WEXIT) { - PROC_UNLOCK(p); - return (ESRCH); - } - if ((error = p_candebug(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_WANTREAD, &p); + if (error != 0) return (error); - } - _PHOLD(p); - PROC_UNLOCK(p); vm = vmspace_acquire_ref(p); if (vm == NULL) { PRELE(p); @@ -1851,19 +1864,9 @@ sysctl_kern_proc_kstack(SYSCTL_HANDLER_A struct proc *p; name = (int *)arg1; - if ((p = pfind((pid_t)name[0])) == NULL) - return (ESRCH); - /* XXXRW: Not clear ESRCH is the right error during proc execve(). */ - if (p->p_flag & P_WEXIT || p->p_flag & P_INEXEC) { - PROC_UNLOCK(p); - return (ESRCH); - } - if ((error = p_candebug(curthread, p))) { - PROC_UNLOCK(p); + error = pget((pid_t)name[0], PGET_NOTINEXEC | PGET_WANTREAD, &p); + if (error != 0) return (error); - } - _PHOLD(p); - PROC_UNLOCK(p); kkstp = malloc(sizeof(*kkstp), M_TEMP, M_WAITOK); st = stack_create(); @@ -1958,13 +1961,9 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_A if (*pidp == -1) { /* -1 means this process */ p = req->td->td_proc; } else { - p = pfind(*pidp); - if (p == NULL) - return (ESRCH); - if ((error = p_cansee(curthread, p)) != 0) { - PROC_UNLOCK(p); + error = pget(*pidp, PGET_CANSEE, &p); + if (error != 0) return (error); - } } cred = crhold(p->p_ucred); Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Thu Apr 5 17:13:14 2012 (r233925) +++ stable/8/sys/sys/proc.h Thu Apr 5 18:43:27 2012 (r233926) @@ -806,6 +806,20 @@ struct proc *pfind(pid_t); /* Find proc struct pgrp *pgfind(pid_t); /* Find process group by id. */ struct proc *zpfind(pid_t); /* Find zombie process by id. */ +/* + * pget() flags. + */ +#define PGET_HOLD 0x00001 /* Hold the process. */ +#define PGET_CANSEE 0x00002 /* Check against p_cansee(). */ +#define PGET_CANDEBUG 0x00004 /* Check against p_candebug(). */ +#define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */ +#define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */ +#define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */ + +#define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT) + +int pget(pid_t pid, int flags, struct proc **pp); + void ast(struct trapframe *framep); struct thread *choosethread(void); int cr_cansignal(struct ucred *cred, struct proc *proc, int signum); From owner-svn-src-stable@FreeBSD.ORG Thu Apr 5 19:32:40 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 643B5106566B; Thu, 5 Apr 2012 19:32:40 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2B08FC14; Thu, 5 Apr 2012 19:32: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 q35JWeRE074051; Thu, 5 Apr 2012 19:32:40 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q35JWe6Y074049; Thu, 5 Apr 2012 19:32:40 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204051932.q35JWe6Y074049@svn.freebsd.org> From: Mikolaj Golub Date: Thu, 5 Apr 2012 19:32: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: r233928 - stable/9/usr.bin/procstat 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, 05 Apr 2012 19:32:40 -0000 Author: trociny Date: Thu Apr 5 19:32:39 2012 New Revision: 233928 URL: http://svn.freebsd.org/changeset/base/233928 Log: MFC r232300 (pluknet): Update the description for -s flag after r232182. When displaying security credential information show also process umask. Modified: stable/9/usr.bin/procstat/procstat.1 Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Thu Apr 5 18:47:54 2012 (r233927) +++ stable/9/usr.bin/procstat/procstat.1 Thu Apr 5 19:32:39 2012 (r233928) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 28, 2011 +.Dd February 29, 2012 .Dt PROCSTAT 1 .Os .Sh NAME @@ -329,6 +329,8 @@ effective group ID real group ID .It SVGID saved group ID +.It UMASK +file creation mode mask .It FLAGS credential flags .It GROUPS From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 04:29:18 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 8B4EF106564A; Fri, 6 Apr 2012 04:29:18 +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 760148FC14; Fri, 6 Apr 2012 04:29:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q364TH9W091536; Fri, 6 Apr 2012 04:29:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q364TH2b091534; Fri, 6 Apr 2012 04:29:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204060429.q364TH2b091534@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Apr 2012 04:29: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: r233933 - stable/9/libexec/rtld-elf 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, 06 Apr 2012 04:29:18 -0000 Author: kib Date: Fri Apr 6 04:29:17 2012 New Revision: 233933 URL: http://svn.freebsd.org/changeset/base/233933 Log: MFC r233357: Implement xstrdup() using strlen()/xmalloc()/memcpy() already presented in rtld, instead of pulling in libc strdup(). Modified: stable/9/libexec/rtld-elf/xmalloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/xmalloc.c ============================================================================== --- stable/9/libexec/rtld-elf/xmalloc.c Fri Apr 6 00:03:45 2012 (r233932) +++ stable/9/libexec/rtld-elf/xmalloc.c Fri Apr 6 04:29:17 2012 (r233933) @@ -57,12 +57,13 @@ xmalloc(size_t size) } char * -xstrdup(const char *s) +xstrdup(const char *str) { - char *p = strdup(s); - if (p == NULL) { - rtld_fdputstr(STDERR_FILENO, "Out of memory\n"); - _exit(1); - } - return p; + char *copy; + size_t len; + + len = strlen(str) + 1; + copy = xmalloc(len); + memcpy(copy, str, len); + return (copy); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 04:30: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 737421065679; Fri, 6 Apr 2012 04:30:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 323BA8FC24; Fri, 6 Apr 2012 04:30: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 q364UNB3091634; Fri, 6 Apr 2012 04:30:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q364UM6v091632; Fri, 6 Apr 2012 04:30:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204060430.q364UM6v091632@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Apr 2012 04:30: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: r233934 - stable/9/libexec/rtld-elf 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, 06 Apr 2012 04:30:23 -0000 Author: kib Date: Fri Apr 6 04:30:22 2012 New Revision: 233934 URL: http://svn.freebsd.org/changeset/base/233934 Log: MFC r233360: Centralize the calculation of the top source directory. Modified: stable/9/libexec/rtld-elf/Makefile Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/Makefile ============================================================================== --- stable/9/libexec/rtld-elf/Makefile Fri Apr 6 04:29:17 2012 (r233933) +++ stable/9/libexec/rtld-elf/Makefile Fri Apr 6 04:30:22 2012 (r233934) @@ -9,8 +9,9 @@ SRCS= rtld_start.S \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 +TOPSRCDIR= ${.CURDIR}/../.. CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -CFLAGS+= -I${.CURDIR}/../../lib/csu/common +CFLAGS+= -I${TOPSRCDIR}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} .else @@ -42,7 +43,7 @@ DPADD= ${LIBC_PIC} LDADD= -lc_pic -lssp_nonshared .if ${MK_SYMVER} == "yes" -LIBCDIR= ${.CURDIR}/../../lib/libc +LIBCDIR= ${TOPSRCDIR}/lib/libc VERSION_DEF= ${LIBCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_MAP= Version.map From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 04:32:05 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 3FE20106564A; Fri, 6 Apr 2012 04:32:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC668FC18; Fri, 6 Apr 2012 04:32: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 q364W56b091740; Fri, 6 Apr 2012 04:32:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q364W4om091738; Fri, 6 Apr 2012 04:32:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204060432.q364W4om091738@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 6 Apr 2012 04:32: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: r233935 - stable/9/libexec/rtld-elf 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, 06 Apr 2012 04:32:05 -0000 Author: kib Date: Fri Apr 6 04:32:04 2012 New Revision: 233935 URL: http://svn.freebsd.org/changeset/base/233935 Log: MFC r233361: Remove superfluous extern keywords. Modified: stable/9/libexec/rtld-elf/rtld.h Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Fri Apr 6 04:30:22 2012 (r233934) +++ stable/9/libexec/rtld-elf/rtld.h Fri Apr 6 04:32:04 2012 (r233935) @@ -317,19 +317,19 @@ typedef struct Struct_SymLook { struct Struct_RtldLockState *lockstate; } SymLook; -extern void _rtld_error(const char *, ...) __printflike(1, 2); -extern const char *rtld_strerror(int); -extern Obj_Entry *map_object(int, const char *, const struct stat *); -extern void *xcalloc(size_t, size_t); -extern void *xmalloc(size_t); -extern char *xstrdup(const char *); +void _rtld_error(const char *, ...) __printflike(1, 2); +const char *rtld_strerror(int); +Obj_Entry *map_object(int, const char *, const struct stat *); +void *xcalloc(size_t, size_t); +void *xmalloc(size_t); +char *xstrdup(const char *); extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; extern Elf_Sym sym_zero; /* For resolving undefined weak refs. */ -extern void dump_relocations (Obj_Entry *); -extern void dump_obj_relocations (Obj_Entry *); -extern void dump_Elf_Rel (Obj_Entry *, const Elf_Rel *, u_long); -extern void dump_Elf_Rela (Obj_Entry *, const Elf_Rela *, u_long); +void dump_relocations(Obj_Entry *); +void dump_obj_relocations(Obj_Entry *); +void dump_Elf_Rel(Obj_Entry *, const Elf_Rel *, u_long); +void dump_Elf_Rela(Obj_Entry *, const Elf_Rela *, u_long); /* * Function declarations. From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 11:06:48 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 07671106566C; Fri, 6 Apr 2012 11:06:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB8198FC08; Fri, 6 Apr 2012 11:06: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 q36B6lhg005897; Fri, 6 Apr 2012 11:06:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36B6l2f005894; Fri, 6 Apr 2012 11:06:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201204061106.q36B6l2f005894@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Apr 2012 11:06: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: r233942 - in stable/9/lib/libc: compat-43 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, 06 Apr 2012 11:06:48 -0000 Author: ed Date: Fri Apr 6 11:06:47 2012 New Revision: 233942 URL: http://svn.freebsd.org/changeset/base/233942 Log: MFC r233002, r233003 and r233012: Remove impossible error condition from the man page. On FreeBSD, all processes have a process group, so it is impossible for kill(2) to fail this way. POSIX also doesn't mention this error condition. Modified: stable/9/lib/libc/compat-43/killpg.2 stable/9/lib/libc/sys/kill.2 Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/lib/libc/compat-43/killpg.2 ============================================================================== --- stable/9/lib/libc/compat-43/killpg.2 Fri Apr 6 09:36:22 2012 (r233941) +++ stable/9/lib/libc/compat-43/killpg.2 Fri Apr 6 11:06:47 2012 (r233942) @@ -28,7 +28,7 @@ .\" @(#)killpg.2 8.1 (Berkeley) 6/2/93 .\" $FreeBSD$ .\" -.Dd October 10, 2006 +.Dd March 15, 2012 .Dt KILLPG 2 .Os .Sh NAME @@ -79,9 +79,6 @@ is not a valid signal number. .It Bq Er ESRCH No process can be found in the process group specified by .Fa pgrp . -.It Bq Er ESRCH -The process group was given as 0 -but the sending process does not have a process group. .It Bq Er EPERM The sending process is not the super-user and one or more of the target processes has an effective user ID different from that Modified: stable/9/lib/libc/sys/kill.2 ============================================================================== --- stable/9/lib/libc/sys/kill.2 Fri Apr 6 09:36:22 2012 (r233941) +++ stable/9/lib/libc/sys/kill.2 Fri Apr 6 11:06:47 2012 (r233942) @@ -28,7 +28,7 @@ .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd April 19, 1994 +.Dd March 15, 2012 .Dt KILL 2 .Os .Sh NAME @@ -121,11 +121,8 @@ The argument is not a valid signal number. .It Bq Er ESRCH -No process can be found corresponding to that specified by +No process or process group can be found corresponding to that specified by .Fa pid . -.It Bq Er ESRCH -The process id was given as 0 -but the sending process does not have a process group. .It Bq Er EPERM The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving process. From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 11:07:45 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 60515106566B; Fri, 6 Apr 2012 11:07:45 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3148FC15; Fri, 6 Apr 2012 11:07: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 q36B7jKC005973; Fri, 6 Apr 2012 11:07:45 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36B7j1G005970; Fri, 6 Apr 2012 11:07:45 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201204061107.q36B7j1G005970@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Apr 2012 11:07: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: r233943 - stable/9/etc 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, 06 Apr 2012 11:07:45 -0000 Author: ed Date: Fri Apr 6 11:07:44 2012 New Revision: 233943 URL: http://svn.freebsd.org/changeset/base/233943 Log: MFC r232976: Hide stty(1) errors. If rc(8) is executed without using a TTY, this error appears at the beginning: stty: stdin isn't a terminal Because this is to be expected and of course not harmful, it is better to simply hide the error message. Modified: stable/9/etc/rc stable/9/etc/rc.shutdown Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc ============================================================================== --- stable/9/etc/rc Fri Apr 6 11:06:47 2012 (r233942) +++ stable/9/etc/rc Fri Apr 6 11:07:44 2012 (r233943) @@ -38,7 +38,7 @@ # first before contemplating any changes here. If you do need to change # this file for some reason, we would like to know about it. -stty status '^T' +stty status '^T' 2> /dev/null # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user. Modified: stable/9/etc/rc.shutdown ============================================================================== --- stable/9/etc/rc.shutdown Fri Apr 6 11:06:47 2012 (r233942) +++ stable/9/etc/rc.shutdown Fri Apr 6 11:07:44 2012 (r233943) @@ -32,7 +32,7 @@ # Output and errors are directed to console by init, and the # console is the controlling terminal. -stty status '^T' +stty status '^T' 2> /dev/null # Set shell to ignore SIGINT (2), but not children; # shell catches SIGQUIT (3) and returns to single user after fsck. From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 11:09: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 1B274106564A; Fri, 6 Apr 2012 11:09:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E00708FC14; Fri, 6 Apr 2012 11:09: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 q36B9ncF006085; Fri, 6 Apr 2012 11:09:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36B9n3I006083; Fri, 6 Apr 2012 11:09:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201204061109.q36B9n3I006083@svn.freebsd.org> From: Ed Schouten Date: Fri, 6 Apr 2012 11:09: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: r233944 - stable/9/sbin/init 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, 06 Apr 2012 11:09:50 -0000 Author: ed Date: Fri Apr 6 11:09:49 2012 New Revision: 233944 URL: http://svn.freebsd.org/changeset/base/233944 Log: MFC r232841: Fix whitespace. Modified: stable/9/sbin/init/init.c Directory Properties: stable/9/sbin/init/ (props changed) Modified: stable/9/sbin/init/init.c ============================================================================== --- stable/9/sbin/init/init.c Fri Apr 6 11:07:44 2012 (r233943) +++ stable/9/sbin/init/init.c Fri Apr 6 11:09:49 2012 (r233944) @@ -87,13 +87,13 @@ static const char rcsid[] = */ #define GETTY_SPACING 5 /* N secs minimum getty spacing */ #define GETTY_SLEEP 30 /* sleep N secs after spacing problem */ -#define GETTY_NSPACE 3 /* max. spacing count to bring reaction */ +#define GETTY_NSPACE 3 /* max. spacing count to bring reaction */ #define WINDOW_WAIT 3 /* wait N secs after starting window */ #define STALL_TIMEOUT 30 /* wait N secs after warning */ #define DEATH_WATCH 10 /* wait N secs for procs to die */ #define DEATH_SCRIPT 120 /* wait for 2min for /etc/rc.shutdown */ #define RESOURCE_RC "daemon" -#define RESOURCE_WINDOW "default" +#define RESOURCE_WINDOW "default" #define RESOURCE_GETTY "default" static void handle(sig_t, ...); @@ -150,15 +150,15 @@ typedef struct init_session { int se_flags; /* status of session */ #define SE_SHUTDOWN 0x1 /* session won't be restarted */ #define SE_PRESENT 0x2 /* session is in /etc/ttys */ - int se_nspace; /* spacing count */ + int se_nspace; /* spacing count */ char *se_device; /* filename of port */ char *se_getty; /* what to run on that port */ - char *se_getty_argv_space; /* pre-parsed argument array space */ + char *se_getty_argv_space; /* pre-parsed argument array space */ char **se_getty_argv; /* pre-parsed argument array */ char *se_window; /* window system (started only once) */ - char *se_window_argv_space; /* pre-parsed argument array space */ + char *se_window_argv_space; /* pre-parsed argument array space */ char **se_window_argv; /* pre-parsed argument array */ - char *se_type; /* default terminal type */ + char *se_type; /* default terminal type */ struct init_session *se_prev; struct init_session *se_next; } session_t; @@ -821,7 +821,7 @@ run_script(const char *script) setctty(_PATH_CONSOLE); - char _sh[] = "sh"; + char _sh[] = "sh"; char _autoboot[] = "autoboot"; argv[0] = _sh; From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 16:28:43 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 E6246106566C; Fri, 6 Apr 2012 16:28:43 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B69B68FC12; Fri, 6 Apr 2012 16:28: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 q36GShWW016965; Fri, 6 Apr 2012 16:28:43 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36GShUo016962; Fri, 6 Apr 2012 16:28:43 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204061628.q36GShUo016962@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 6 Apr 2012 16:28: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: r233950 - in stable/9/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2012 16:28:44 -0000 Author: trociny Date: Fri Apr 6 16:28:43 2012 New Revision: 233950 URL: http://svn.freebsd.org/changeset/base/233950 Log: MFC r233389: Add a sysctl to set and retrieve binary osreldate of another process. Suggested by: kib Reviewed by: kib Modified: stable/9/sys/kern/kern_proc.c stable/9/sys/sys/sysctl.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_proc.c ============================================================================== --- stable/9/sys/kern/kern_proc.c Fri Apr 6 16:03:38 2012 (r233949) +++ stable/9/sys/kern/kern_proc.c Fri Apr 6 16:28:43 2012 (r233950) @@ -2499,6 +2499,52 @@ sysctl_kern_proc_umask(SYSCTL_HANDLER_AR return (error); } +/* + * This sysctl allows a process to set and retrieve binary osreldate of + * another process. + */ +static int +sysctl_kern_proc_osrel(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + int flags, error, osrel; + + if (namelen != 1) + return (EINVAL); + + if (req->newptr != NULL && req->newlen != sizeof(osrel)) + return (EINVAL); + + flags = PGET_HOLD | PGET_NOTWEXIT; + if (req->newptr != NULL) + flags |= PGET_CANDEBUG; + else + flags |= PGET_CANSEE; + error = pget((pid_t)name[0], flags, &p); + if (error != 0) + return (error); + + error = SYSCTL_OUT(req, &p->p_osrel, sizeof(p->p_osrel)); + if (error != 0) + goto errout; + + if (req->newptr != NULL) { + error = SYSCTL_IN(req, &osrel, sizeof(osrel)); + if (error != 0) + goto errout; + if (osrel < 0) { + error = EINVAL; + goto errout; + } + p->p_osrel = osrel; + } +errout: + PRELE(p); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2603,3 +2649,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_UMASK, umask, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_umask, "Process umask"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | + CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, + "Process binary osreldate"); Modified: stable/9/sys/sys/sysctl.h ============================================================================== --- stable/9/sys/sys/sysctl.h Fri Apr 6 16:03:38 2012 (r233949) +++ stable/9/sys/sys/sysctl.h Fri Apr 6 16:28:43 2012 (r233950) @@ -564,6 +564,7 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a #define KERN_PROC_RLIMIT 37 /* process resource limits */ #define KERN_PROC_PS_STRINGS 38 /* get ps_strings location */ #define KERN_PROC_UMASK 39 /* process umask */ +#define KERN_PROC_OSREL 40 /* osreldate for process binary */ /* * KERN_IPC identifiers From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 16:30:17 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 DF6461065670; Fri, 6 Apr 2012 16:30:17 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B084F8FC15; Fri, 6 Apr 2012 16:30: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 q36GUHZU017065; Fri, 6 Apr 2012 16:30:17 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36GUHc8017062; Fri, 6 Apr 2012 16:30:17 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204061630.q36GUHc8017062@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 6 Apr 2012 16:30:17 +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: r233951 - in stable/8/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2012 16:30:18 -0000 Author: trociny Date: Fri Apr 6 16:30:17 2012 New Revision: 233951 URL: http://svn.freebsd.org/changeset/base/233951 Log: MFC r233389: Add a sysctl to set and retrieve binary osreldate of another process. Suggested by: kib Reviewed by: kib Modified: stable/8/sys/kern/kern_proc.c stable/8/sys/sys/sysctl.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Fri Apr 6 16:28:43 2012 (r233950) +++ stable/8/sys/kern/kern_proc.c Fri Apr 6 16:30:17 2012 (r233951) @@ -1976,6 +1976,52 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_A return (error); } +/* + * This sysctl allows a process to set and retrieve binary osreldate of + * another process. + */ +static int +sysctl_kern_proc_osrel(SYSCTL_HANDLER_ARGS) +{ + int *name = (int *)arg1; + u_int namelen = arg2; + struct proc *p; + int flags, error, osrel; + + if (namelen != 1) + return (EINVAL); + + if (req->newptr != NULL && req->newlen != sizeof(osrel)) + return (EINVAL); + + flags = PGET_HOLD | PGET_NOTWEXIT; + if (req->newptr != NULL) + flags |= PGET_CANDEBUG; + else + flags |= PGET_CANSEE; + error = pget((pid_t)name[0], flags, &p); + if (error != 0) + return (error); + + error = SYSCTL_OUT(req, &p->p_osrel, sizeof(p->p_osrel)); + if (error != 0) + goto errout; + + if (req->newptr != NULL) { + error = SYSCTL_IN(req, &osrel, sizeof(osrel)); + if (error != 0) + goto errout; + if (osrel < 0) { + error = EINVAL; + goto errout; + } + p->p_osrel = osrel; + } +errout: + PRELE(p); + return (error); +} + SYSCTL_NODE(_kern, KERN_PROC, proc, CTLFLAG_RD, 0, "Process table"); SYSCTL_PROC(_kern_proc, KERN_PROC_ALL, all, CTLFLAG_RD|CTLTYPE_STRUCT| @@ -2063,3 +2109,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC static SYSCTL_NODE(_kern_proc, KERN_PROC_GROUPS, groups, CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_kern_proc_groups, "Process groups"); + +static SYSCTL_NODE(_kern_proc, KERN_PROC_OSREL, osrel, CTLFLAG_RW | + CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_osrel, + "Process binary osreldate"); Modified: stable/8/sys/sys/sysctl.h ============================================================================== --- stable/8/sys/sys/sysctl.h Fri Apr 6 16:28:43 2012 (r233950) +++ stable/8/sys/sys/sysctl.h Fri Apr 6 16:30:17 2012 (r233951) @@ -493,6 +493,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e #define KERN_PROC_VMMAP 32 /* VM map entries for process */ #define KERN_PROC_FILEDESC 33 /* File descriptors for process */ #define KERN_PROC_GROUPS 34 /* process groups */ +#define KERN_PROC_OSREL 40 /* osreldate for process binary */ /* * KERN_IPC identifiers From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 16:31:29 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 DEC181065670; Fri, 6 Apr 2012 16:31:29 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFBDA8FC08; Fri, 6 Apr 2012 16:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q36GVTuZ017139; Fri, 6 Apr 2012 16:31:29 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36GVTu0017136; Fri, 6 Apr 2012 16:31:29 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204061631.q36GVTu0017136@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 6 Apr 2012 16:31:29 +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: r233952 - stable/9/usr.bin/procstat 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, 06 Apr 2012 16:31:30 -0000 Author: trociny Date: Fri Apr 6 16:31:29 2012 New Revision: 233952 URL: http://svn.freebsd.org/changeset/base/233952 Log: MFC r233390: When displaying binary information show also osreldate. Suggested by: kib Modified: stable/9/usr.bin/procstat/procstat.1 stable/9/usr.bin/procstat/procstat_bin.c Directory Properties: stable/9/usr.bin/procstat/ (props changed) Modified: stable/9/usr.bin/procstat/procstat.1 ============================================================================== --- stable/9/usr.bin/procstat/procstat.1 Fri Apr 6 16:30:17 2012 (r233951) +++ stable/9/usr.bin/procstat/procstat.1 Fri Apr 6 16:31:29 2012 (r233952) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 29, 2012 +.Dd March 23, 2012 .Dt PROCSTAT 1 .Os .Sh NAME @@ -110,6 +110,8 @@ Display the process ID, command, and pat process ID .It COMM command +.It OSREL +osreldate for process binary .It PATH path to process binary (if available) .El Modified: stable/9/usr.bin/procstat/procstat_bin.c ============================================================================== --- stable/9/usr.bin/procstat/procstat_bin.c Fri Apr 6 16:30:17 2012 (r233951) +++ stable/9/usr.bin/procstat/procstat_bin.c Fri Apr 6 16:31:29 2012 (r233952) @@ -43,11 +43,11 @@ void procstat_bin(struct kinfo_proc *kipp) { char pathname[PATH_MAX]; - int error, name[4]; + int error, osrel, name[4]; size_t len; if (!hflag) - printf("%5s %-16s %-53s\n", "PID", "COMM", "PATH"); + printf("%5s %-16s %8s %s\n", "PID", "COMM", "OSREL", "PATH"); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -65,7 +65,19 @@ procstat_bin(struct kinfo_proc *kipp) if (len == 0 || strlen(pathname) == 0) strcpy(pathname, "-"); + name[2] = KERN_PROC_OSREL; + + len = sizeof(osrel); + error = sysctl(name, 4, &osrel, &len, NULL, 0); + if (error < 0 && errno != ESRCH) { + warn("sysctl: kern.proc.osrel: %d", kipp->ki_pid); + return; + } + if (error < 0) + return; + printf("%5d ", kipp->ki_pid); printf("%-16s ", kipp->ki_comm); + printf("%8d ", osrel); printf("%s\n", pathname); } From owner-svn-src-stable@FreeBSD.ORG Fri Apr 6 16:32:30 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 5ABD31065673; Fri, 6 Apr 2012 16:32:30 +0000 (UTC) (envelope-from trociny@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1198FC14; Fri, 6 Apr 2012 16:32: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 q36GWUgT017215; Fri, 6 Apr 2012 16:32:30 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q36GWTT2017212; Fri, 6 Apr 2012 16:32:29 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201204061632.q36GWTT2017212@svn.freebsd.org> From: Mikolaj Golub Date: Fri, 6 Apr 2012 16:32:29 +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: r233953 - stable/8/usr.bin/procstat 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, 06 Apr 2012 16:32:30 -0000 Author: trociny Date: Fri Apr 6 16:32:29 2012 New Revision: 233953 URL: http://svn.freebsd.org/changeset/base/233953 Log: MFC r233390: When displaying binary information show also osreldate. Suggested by: kib Modified: stable/8/usr.bin/procstat/procstat.1 stable/8/usr.bin/procstat/procstat_bin.c Directory Properties: stable/8/usr.bin/procstat/ (props changed) Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Fri Apr 6 16:31:29 2012 (r233952) +++ stable/8/usr.bin/procstat/procstat.1 Fri Apr 6 16:32:29 2012 (r233953) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 7, 2010 +.Dd March 23, 2012 .Dt PROCSTAT 1 .Os .Sh NAME @@ -98,6 +98,8 @@ Display the process ID, command, and pat process ID .It COMM command +.It OSREL +osreldate for process binary .It PATH path to process binary (if available) .El Modified: stable/8/usr.bin/procstat/procstat_bin.c ============================================================================== --- stable/8/usr.bin/procstat/procstat_bin.c Fri Apr 6 16:31:29 2012 (r233952) +++ stable/8/usr.bin/procstat/procstat_bin.c Fri Apr 6 16:32:29 2012 (r233953) @@ -42,11 +42,11 @@ void procstat_bin(pid_t pid, struct kinfo_proc *kipp) { char pathname[PATH_MAX]; - int error, name[4]; + int error, osrel, name[4]; size_t len; if (!hflag) - printf("%5s %-16s %-53s\n", "PID", "COMM", "PATH"); + printf("%5s %-16s %8s %s\n", "PID", "COMM", "OSREL", "PATH"); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -64,7 +64,19 @@ procstat_bin(pid_t pid, struct kinfo_pro if (len == 0 || strlen(pathname) == 0) strcpy(pathname, "-"); + name[2] = KERN_PROC_OSREL; + + len = sizeof(osrel); + error = sysctl(name, 4, &osrel, &len, NULL, 0); + if (error < 0 && errno != ESRCH) { + warn("sysctl: kern.proc.osrel: %d", pid); + return; + } + if (error < 0) + return; + printf("%5d ", pid); printf("%-16s ", kipp->ki_comm); + printf("%8d ", osrel); printf("%s\n", pathname); } From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 05:42:38 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 5193D106566B; Sat, 7 Apr 2012 05:42:38 +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 3A7AF8FC15; Sat, 7 Apr 2012 05:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q375gckD045249; Sat, 7 Apr 2012 05:42:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q375gcn2045247; Sat, 7 Apr 2012 05:42:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204070542.q375gcn2045247@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Apr 2012 05:42:38 +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: r233986 - stable/9/libexec/rtld-elf 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, 07 Apr 2012 05:42:38 -0000 Author: kib Date: Sat Apr 7 05:42:37 2012 New Revision: 233986 URL: http://svn.freebsd.org/changeset/base/233986 Log: MFC r233430: Provide short-circuit exit(3) implementation for rtld. Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Sat Apr 7 05:41:02 2012 (r233985) +++ stable/9/libexec/rtld-elf/rtld.c Sat Apr 7 05:42:37 2012 (r233986) @@ -4384,6 +4384,17 @@ __getosreldate(void) return (osreldate); } +void +exit(int status) +{ + + _exit(status); +} + +void (*__cleanup)(void); +int __isthreaded = 0; +int _thread_autoinit_dummy_decl = 1; + /* * No unresolved symbols for rtld. */ From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 05:43: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 1FA18106567A; Sat, 7 Apr 2012 05:43:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AF388FC14; Sat, 7 Apr 2012 05:43: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 q375hodC045340; Sat, 7 Apr 2012 05:43:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q375hoeU045337; Sat, 7 Apr 2012 05:43:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201204070543.q375hoeU045337@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 7 Apr 2012 05:43: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: r233987 - stable/9/libexec/rtld-elf 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, 07 Apr 2012 05:43:51 -0000 Author: kib Date: Sat Apr 7 05:43:50 2012 New Revision: 233987 URL: http://svn.freebsd.org/changeset/base/233987 Log: MFC r233431: Remove libssp_nonshared from the rtld linking set. The only use for the library was definition for the weak alias of __stack_chk_fail. Modified: stable/9/libexec/rtld-elf/Makefile stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/Makefile ============================================================================== --- stable/9/libexec/rtld-elf/Makefile Sat Apr 7 05:42:37 2012 (r233986) +++ stable/9/libexec/rtld-elf/Makefile Sat Apr 7 05:43:50 2012 (r233987) @@ -40,7 +40,7 @@ CFLAGS+= -fpic CFLAGS+= -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} -LDADD= -lc_pic -lssp_nonshared +LDADD= -lc_pic .if ${MK_SYMVER} == "yes" LIBCDIR= ${TOPSRCDIR}/lib/libc Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Sat Apr 7 05:42:37 2012 (r233986) +++ stable/9/libexec/rtld-elf/rtld.c Sat Apr 7 05:43:50 2012 (r233987) @@ -4410,6 +4410,7 @@ __stack_chk_fail(void) _rtld_error("stack overflow detected; terminated"); die(); } +__weak_reference(__stack_chk_fail, __stack_chk_fail_local); void __chk_fail(void) From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 12:46:28 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 427D5106564A; Sat, 7 Apr 2012 12:46:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23AC98FC0A; Sat, 7 Apr 2012 12:46: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 q37CkRT0062068; Sat, 7 Apr 2012 12:46:27 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37CkRVf062066; Sat, 7 Apr 2012 12:46:27 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204071246.q37CkRVf062066@svn.freebsd.org> From: Marius Strobl Date: Sat, 7 Apr 2012 12:46: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: r233995 - in stable/9/sys: dev/mpt 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: Sat, 07 Apr 2012 12:46:28 -0000 Author: marius Date: Sat Apr 7 12:46:27 2012 New Revision: 233995 URL: http://svn.freebsd.org/changeset/base/233995 Log: MFC: r233827 Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed to stable/9 in r232562). Reported by: infofarmer MFC: r233886 Refine r233827; as it turns out, controllers with a device ID of 0x0059 can be upgraded to MegaRAID mode, in which case mfi(4) should attach to these based on the sub-vendor and -device ID instead (not currently done). Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY. While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in the default case. Modified: stable/9/sys/dev/mpt/mpt_pci.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/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/i386/conf/XENHVM (props changed) Modified: stable/9/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/9/sys/dev/mpt/mpt_pci.c Sat Apr 7 09:26:21 2012 (r233994) +++ stable/9/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:46:27 2012 (r233995) @@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB 0x0055 #endif +#ifndef MPI_MANUFACTPAGE_DEVID_SAS1068E_FB +#define MPI_MANUFACTPAGE_DEVID_SAS1068E_FB 0x0059 +#endif + #ifndef MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif @@ -183,10 +187,12 @@ static int mpt_pci_probe(device_t dev) { const char *desc; + int rval; if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC) return (ENXIO); + rval = BUS_PROBE_DEFAULT; switch (pci_get_device(dev)) { case MPI_MANUFACTPAGE_DEVICEID_FC909_FB: desc = "LSILogic FC909 FC Adapter"; @@ -228,6 +234,13 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_53C1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: + /* + * Allow mfi(4) to claim this device in case it's in MegaRAID + * mode. + */ + rval = BUS_PROBE_LOW_PRIORITY; + /* FALLTHROUGH */ case MPI_MANUFACTPAGE_DEVID_SAS1064: case MPI_MANUFACTPAGE_DEVID_SAS1064A: case MPI_MANUFACTPAGE_DEVID_SAS1064E: @@ -245,7 +258,7 @@ mpt_pci_probe(device_t dev) } device_set_desc(dev, desc); - return (0); + return (rval); } #if __FreeBSD_version < 500000 @@ -419,6 +432,7 @@ mpt_pci_attach(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: mpt->is_sas = 1; break; default: From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 12:46: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 9E3C6106566B; Sat, 7 Apr 2012 12:46:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EDAF8FC0A; Sat, 7 Apr 2012 12:46: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 q37Cksg7062124; Sat, 7 Apr 2012 12:46:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37CksgM062122; Sat, 7 Apr 2012 12:46:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204071246.q37CksgM062122@svn.freebsd.org> From: Marius Strobl Date: Sat, 7 Apr 2012 12:46: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: r233996 - in stable/8/sys: dev/mpt 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: Sat, 07 Apr 2012 12:46:54 -0000 Author: marius Date: Sat Apr 7 12:46:53 2012 New Revision: 233996 URL: http://svn.freebsd.org/changeset/base/233996 Log: MFC: r233827 Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed to stable/8 in r232563). Reported by: infofarmer MFC: r233886 Refine r233827; as it turns out, controllers with a device ID of 0x0059 can be upgraded to MegaRAID mode, in which case mfi(4) should attach to these based on the sub-vendor and -device ID instead (not currently done). Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY. While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in the default case. Modified: stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:46:27 2012 (r233995) +++ stable/8/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:46:53 2012 (r233996) @@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB 0x0055 #endif +#ifndef MPI_MANUFACTPAGE_DEVID_SAS1068E_FB +#define MPI_MANUFACTPAGE_DEVID_SAS1068E_FB 0x0059 +#endif + #ifndef MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif @@ -183,10 +187,12 @@ static int mpt_pci_probe(device_t dev) { const char *desc; + int rval; if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC) return (ENXIO); + rval = BUS_PROBE_DEFAULT; switch (pci_get_device(dev)) { case MPI_MANUFACTPAGE_DEVICEID_FC909_FB: desc = "LSILogic FC909 FC Adapter"; @@ -228,6 +234,13 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_53C1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: + /* + * Allow mfi(4) to claim this device in case it's in MegaRAID + * mode. + */ + rval = BUS_PROBE_LOW_PRIORITY; + /* FALLTHROUGH */ case MPI_MANUFACTPAGE_DEVID_SAS1064: case MPI_MANUFACTPAGE_DEVID_SAS1064A: case MPI_MANUFACTPAGE_DEVID_SAS1064E: @@ -245,7 +258,7 @@ mpt_pci_probe(device_t dev) } device_set_desc(dev, desc); - return (0); + return (rval); } #if __FreeBSD_version < 500000 @@ -419,6 +432,7 @@ mpt_pci_attach(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: mpt->is_sas = 1; break; default: From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 12:47: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 9BBE210657EB; Sat, 7 Apr 2012 12:47:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7038FC0A; Sat, 7 Apr 2012 12: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 q37ClDnt062171; Sat, 7 Apr 2012 12:47:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37ClDMd062169; Sat, 7 Apr 2012 12:47:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201204071247.q37ClDMd062169@svn.freebsd.org> From: Marius Strobl Date: Sat, 7 Apr 2012 12:47:13 +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: r233997 - stable/7/sys/dev/mpt 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, 07 Apr 2012 12:47:13 -0000 Author: marius Date: Sat Apr 7 12:47:12 2012 New Revision: 233997 URL: http://svn.freebsd.org/changeset/base/233997 Log: MFC: r233827 Fix probing of SAS1068E with a device ID of 0x0059 after r232411 (MFC'ed to stable/7 in r232610). Reported by: infofarmer MFC: r233886 Refine r233827; as it turns out, controllers with a device ID of 0x0059 can be upgraded to MegaRAID mode, in which case mfi(4) should attach to these based on the sub-vendor and -device ID instead (not currently done). Therefore, let mpt_pci_probe() return BUS_PROBE_LOW_PRIORITY. While it, let mpt_pci_probe() return BUS_PROBE_DEFAULT instead of 0 in the default case. Modified: stable/7/sys/dev/mpt/mpt_pci.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/7/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:46:53 2012 (r233996) +++ stable/7/sys/dev/mpt/mpt_pci.c Sat Apr 7 12:47:12 2012 (r233997) @@ -141,6 +141,10 @@ __FBSDID("$FreeBSD$"); #define MPI_MANUFACTPAGE_DEVID_SAS1068A_FB 0x0055 #endif +#ifndef MPI_MANUFACTPAGE_DEVID_SAS1068E_FB +#define MPI_MANUFACTPAGE_DEVID_SAS1068E_FB 0x0059 +#endif + #ifndef MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB #define MPI_MANUFACTPAGE_DEVID_SAS1078DE_FB 0x007C #endif @@ -183,10 +187,12 @@ static int mpt_pci_probe(device_t dev) { const char *desc; + int rval; if (pci_get_vendor(dev) != MPI_MANUFACTPAGE_VENDORID_LSILOGIC) return (ENXIO); + rval = BUS_PROBE_DEFAULT; switch (pci_get_device(dev)) { case MPI_MANUFACTPAGE_DEVICEID_FC909_FB: desc = "LSILogic FC909 FC Adapter"; @@ -228,6 +234,13 @@ mpt_pci_probe(device_t dev) case MPI_MANUFACTPAGE_DEVID_53C1030ZC: desc = "LSILogic 1030 Ultra4 Adapter"; break; + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: + /* + * Allow mfi(4) to claim this device in case it's in MegaRAID + * mode. + */ + rval = BUS_PROBE_LOW_PRIORITY; + /* FALLTHROUGH */ case MPI_MANUFACTPAGE_DEVID_SAS1064: case MPI_MANUFACTPAGE_DEVID_SAS1064A: case MPI_MANUFACTPAGE_DEVID_SAS1064E: @@ -245,7 +258,7 @@ mpt_pci_probe(device_t dev) } device_set_desc(dev, desc); - return (0); + return (rval); } #if __FreeBSD_version < 500000 @@ -419,6 +432,7 @@ mpt_pci_attach(device_t dev) case MPI_MANUFACTPAGE_DEVID_SAS1068: case MPI_MANUFACTPAGE_DEVID_SAS1068A_FB: case MPI_MANUFACTPAGE_DEVID_SAS1068E: + case MPI_MANUFACTPAGE_DEVID_SAS1068E_FB: mpt->is_sas = 1; break; default: From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 20:52: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 3F903106566B; Sat, 7 Apr 2012 20:52:22 +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 2A54C8FC0C; Sat, 7 Apr 2012 20:52: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 q37KqMgd078043; Sat, 7 Apr 2012 20:52:22 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37KqLCe078041; Sat, 7 Apr 2012 20:52:21 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201204072052.q37KqLCe078041@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 7 Apr 2012 20:52:21 +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: r234001 - stable/8/bin/sh 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, 07 Apr 2012 20:52:22 -0000 Author: jilles Date: Sat Apr 7 20:52:21 2012 New Revision: 234001 URL: http://svn.freebsd.org/changeset/base/234001 Log: sh: Allow variables starting with underscores in arithmetic. This is a direct commit because I do not want to merge the totally rewritten arithmetic expression code from 9.x where this already works. Example: _x=1; _x=$((_x+1)) Modified: stable/8/bin/sh/arith_lex.l Modified: stable/8/bin/sh/arith_lex.l ============================================================================== --- stable/8/bin/sh/arith_lex.l Sat Apr 7 15:30:46 2012 (r234000) +++ stable/8/bin/sh/arith_lex.l Sat Apr 7 20:52:21 2012 (r234001) @@ -90,7 +90,7 @@ static struct varname *varnames; return ARITH_NUM; } -[A-Za-z][A-Za-z0-9_]* { +[A-Za-z_][A-Za-z0-9_]* { /* * If variable doesn't exist, we should initialize * it to zero. From owner-svn-src-stable@FreeBSD.ORG Sat Apr 7 20:56:29 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 A12D9106566C; Sat, 7 Apr 2012 20:56:29 +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 8C2338FC08; Sat, 7 Apr 2012 20:56:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q37KuTYg078208; Sat, 7 Apr 2012 20:56:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q37KuTDh078207; Sat, 7 Apr 2012 20:56:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201204072056.q37KuTDh078207@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 7 Apr 2012 20:56:29 +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: r234002 - stable/8/tools/regression/bin/sh/expansion 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, 07 Apr 2012 20:56:29 -0000 Author: jilles Date: Sat Apr 7 20:56:29 2012 New Revision: 234002 URL: http://svn.freebsd.org/changeset/base/234002 Log: MFC r232839: sh: Add a test for variables with underscores in arithmetic. Added: stable/8/tools/regression/bin/sh/expansion/arith12.0 - copied unchanged from r232839, head/tools/regression/bin/sh/expansion/arith12.0 Modified: Directory Properties: stable/8/tools/regression/bin/sh/ (props changed) Copied: stable/8/tools/regression/bin/sh/expansion/arith12.0 (from r232839, head/tools/regression/bin/sh/expansion/arith12.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/arith12.0 Sat Apr 7 20:56:29 2012 (r234002, copy of r232839, head/tools/regression/bin/sh/expansion/arith12.0) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +_x=4 y_=5 z_z=6 +[ "$((_x*100+y_*10+z_z))" = 456 ]