From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 01:10:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82FD91065678; Sun, 9 Nov 2008 01:10:21 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 730A58FC0C; Sun, 9 Nov 2008 01:10:21 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA91ALuD026622; Sun, 9 Nov 2008 01:10:21 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA91ALkc026621; Sun, 9 Nov 2008 01:10:21 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200811090110.mA91ALkc026621@svn.freebsd.org> From: Hiroki Sato Date: Sun, 9 Nov 2008 01:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184777 - head/usr.bin/sed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 01:10:21 -0000 Author: hrs Date: Sun Nov 9 01:10:21 2008 New Revision: 184777 URL: http://svn.freebsd.org/changeset/base/184777 Log: Add workaround for a back reference when no corresponding parenthesized subexpression is defined. For example, the following command line caused unexpected behavior like segmentation fault: % echo test | sed -e 's/test/\1/' PR: bin/126682 MFC after: 1 week Modified: head/usr.bin/sed/compile.c Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Sun Nov 9 00:49:36 2008 (r184776) +++ head/usr.bin/sed/compile.c Sun Nov 9 01:10:21 2008 (r184777) @@ -324,9 +324,17 @@ nonsel: /* Now parse the command */ if (p == NULL) errx(1, "%lu: %s: unterminated substitute pattern", linenum, fname); + + /* Compile RE with no case sensitivity temporarily */ + if (*re == '\0') + cmd->u.s->re = NULL; + else + cmd->u.s->re = compile_re(re, 0); --p; p = compile_subst(p, cmd->u.s); p = compile_flags(p, cmd->u.s); + + /* Recompile RE with case sensitivity from "I" flag if any */ if (*re == '\0') cmd->u.s->re = NULL; else From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 01:53:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A23D1065670; Sun, 9 Nov 2008 01:53:06 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A2CC8FC12; Sun, 9 Nov 2008 01:53:06 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA91r6eL027363; Sun, 9 Nov 2008 01:53:06 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA91r6b9027362; Sun, 9 Nov 2008 01:53:06 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811090153.mA91r6b9027362@svn.freebsd.org> From: Kip Macy Date: Sun, 9 Nov 2008 01:53:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184778 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 01:53:06 -0000 Author: kmacy Date: Sun Nov 9 01:53:06 2008 New Revision: 184778 URL: http://svn.freebsd.org/changeset/base/184778 Log: make kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al. initialize pkthdr in field order Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Sun Nov 9 01:10:21 2008 (r184777) +++ head/sys/kern/kern_mbuf.c Sun Nov 9 01:53:06 2008 (r184778) @@ -104,13 +104,14 @@ struct mbstat mbstat; static void tunable_mbinit(void *dummy) { + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); /* This has to be done before VM init. */ - nmbclusters = 1024 + maxusers * 64; + if (nmbclusters == 0) + nmbclusters = 1024 + maxusers * 64; nmbjumbop = nmbclusters / 2; nmbjumbo9 = nmbjumbop / 2; nmbjumbo16 = nmbjumbo9 / 2; - TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL); @@ -409,8 +410,8 @@ mb_ctor_mbuf(void *mem, int size, void * if (flags & M_PKTHDR) { m->m_data = m->m_pktdat; m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.len = 0; m->m_pkthdr.header = NULL; + m->m_pkthdr.len = 0; m->m_pkthdr.csum_flags = 0; m->m_pkthdr.csum_data = 0; m->m_pkthdr.tso_segsz = 0; From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 06:44:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 581E2106568D; Sun, 9 Nov 2008 06:44:54 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47D9A8FC17; Sun, 9 Nov 2008 06:44:54 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA96iroM032671; Sun, 9 Nov 2008 06:44:53 GMT (envelope-from matteo@svn.freebsd.org) Received: (from matteo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA96ira1032670; Sun, 9 Nov 2008 06:44:53 GMT (envelope-from matteo@svn.freebsd.org) Message-Id: <200811090644.mA96ira1032670@svn.freebsd.org> From: Matteo Riondato Date: Sun, 9 Nov 2008 06:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184779 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 06:44:54 -0000 Author: matteo Date: Sun Nov 9 06:44:53 2008 New Revision: 184779 URL: http://svn.freebsd.org/changeset/base/184779 Log: Be paranoid and use snprintf PR: bin/122137 Submitted by: Steven Kreuzer MFC after: 3 days Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 01:53:06 2008 (r184778) +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 06:44:53 2008 (r184779) @@ -263,7 +263,7 @@ list_cmd() { FILE *f; log_it(RealUser, Pid, "LIST", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (!(f = fopen(n, "r"))) { if (errno == ENOENT) errx(ERROR_EXIT, "no crontab for %s", User); @@ -293,7 +293,7 @@ delete_cmd() { } log_it(RealUser, Pid, "DELETE", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (unlink(n)) { if (errno == ENOENT) errx(ERROR_EXIT, "no crontab for %s", User); @@ -327,7 +327,7 @@ edit_cmd() { char new_md5[MD5_SIZE]; log_it(RealUser, Pid, "BEGIN EDIT", User); - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (!(f = fopen(n, "r"))) { if (errno != ENOENT) err(ERROR_EXIT, "%s", n); @@ -337,7 +337,7 @@ edit_cmd() { } um = umask(077); - (void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX"); + (void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX"); if ((t = mkstemp(Filename)) == -1) { warn("%s", Filename); (void) umask(um); @@ -504,8 +504,8 @@ replace_cmd() { return (-2); } - (void) sprintf(n, "tmp.%d", Pid); - (void) sprintf(tn, CRON_TAB(n)); + (void) snprintf(n, sizeof(n), "tmp.%d", Pid); + (void) snprintf(tn, sizeof(n), CRON_TAB(n)); if (!(tmp = fopen(tn, "w+"))) { warn("%s", tn); return (-2); @@ -592,7 +592,7 @@ replace_cmd() { return (-2); } - (void) sprintf(n, CRON_TAB(User)); + (void) snprintf(n, sizeof(n), CRON_TAB(User)); if (rename(tn, n)) { warn("error renaming %s to %s", tn, n); unlink(tn); From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 07:34:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 009381065670; Sun, 9 Nov 2008 07:34:12 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E49238FC16; Sun, 9 Nov 2008 07:34:11 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA97YBs7033554; Sun, 9 Nov 2008 07:34:11 GMT (envelope-from matteo@svn.freebsd.org) Received: (from matteo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA97YBld033553; Sun, 9 Nov 2008 07:34:11 GMT (envelope-from matteo@svn.freebsd.org) Message-Id: <200811090734.mA97YBld033553@svn.freebsd.org> From: Matteo Riondato Date: Sun, 9 Nov 2008 07:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184780 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 07:34:12 -0000 Author: matteo Date: Sun Nov 9 07:34:11 2008 New Revision: 184780 URL: http://svn.freebsd.org/changeset/base/184780 Log: Don't leave files in /var/cront/tabs when interrupted PR: 17363 MFC after: 3 days Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 06:44:53 2008 (r184779) +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 07:34:11 2008 (r184780) @@ -63,6 +63,7 @@ static FILE *NewCrontab; static int CheckErrorCount; static enum opt_t Option; static struct passwd *pw; +static char *tmp_path; static void list_cmd(void), delete_cmd(void), edit_cmd(void), @@ -486,6 +487,16 @@ edit_cmd() { } +void +static remove_tmp(int sig) +{ + if (tmp_path) { + unlink(tmp_path); + } + exit(ERROR_EXIT); +} + + /* returns 0 on success * -1 on syntax error * -2 on install error @@ -498,6 +509,7 @@ replace_cmd() { entry *e; time_t now = time(NULL); char **envp = env_init(); + void (*f[3])(); if (envp == NULL) { warnx("cannot allocate memory"); @@ -506,6 +518,13 @@ replace_cmd() { (void) snprintf(n, sizeof(n), "tmp.%d", Pid); (void) snprintf(tn, sizeof(n), CRON_TAB(n)); + + /* Set up to remove the temp file if interrupted by a signal. */ + f[0] = signal(SIGHUP, remove_tmp); + f[1] = signal(SIGINT, remove_tmp); + f[2] = signal(SIGTERM, remove_tmp); + tmp_path = tn; + if (!(tmp = fopen(tn, "w+"))) { warn("%s", tn); return (-2); @@ -598,6 +617,13 @@ replace_cmd() { unlink(tn); return (-2); } + + /* Restore the default signal handlers. */ + tmp_path = NULL; + signal(SIGHUP, f[0]); + signal(SIGINT, f[1]); + signal(SIGTERM, f[2]); + log_it(RealUser, Pid, "REPLACE", User); poke_daemon(); From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 07:58:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4D9F1065688; Sun, 9 Nov 2008 07:58:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 942F18FC12; Sun, 9 Nov 2008 07:58:23 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA97wNnA033973; Sun, 9 Nov 2008 07:58:23 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA97wNKt033972; Sun, 9 Nov 2008 07:58:23 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200811090758.mA97wNKt033972@svn.freebsd.org> From: Maxim Sobolev Date: Sun, 9 Nov 2008 07:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184781 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 07:58:23 -0000 Author: sobomax Date: Sun Nov 9 07:58:23 2008 New Revision: 184781 URL: http://svn.freebsd.org/changeset/base/184781 Log: Ignore files that only differ in CVS Id tag. MFC after: 2 weeks Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Nov 9 07:34:11 2008 (r184780) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Nov 9 07:58:23 2008 (r184781) @@ -947,6 +947,20 @@ for COMPFILE in `find . -type f -size +0 echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; + + *) + tempfoo=`basename $0` + TMPFILE1=`mktemp -t ${tempfoo}` || break + TMPFILE2=`mktemp -t ${tempfoo}` || break + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" + if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ + /dev/null 2>&1; then + echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, deleting" + rm "${COMPFILE}" + fi + rm -f "${TMPFILE1}" "${TMPFILE2}" + ;; esac ;; esac From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 08:36:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0D171065673; Sun, 9 Nov 2008 08:36:35 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF13A8FC13; Sun, 9 Nov 2008 08:36:35 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA98aZW1034732; Sun, 9 Nov 2008 08:36:35 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA98aZAD034731; Sun, 9 Nov 2008 08:36:35 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811090836.mA98aZAD034731@svn.freebsd.org> From: Joseph Koshy Date: Sun, 9 Nov 2008 08:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184782 - head/usr.sbin/pmccontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 08:36:35 -0000 Author: jkoshy Date: Sun Nov 9 08:36:35 2008 New Revision: 184782 URL: http://svn.freebsd.org/changeset/base/184782 Log: Change the meaning of a "*" argument to option -c to mean 'all unhalted CPUs', instead of 'all CPUs'. This change brings pmccontrol(8) in line with pmcstat(8). Modified: head/usr.sbin/pmccontrol/pmccontrol.c Modified: head/usr.sbin/pmccontrol/pmccontrol.c ============================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.c Sun Nov 9 07:58:23 2008 (r184781) +++ head/usr.sbin/pmccontrol/pmccontrol.c Sun Nov 9 08:36:35 2008 (r184782) @@ -133,21 +133,33 @@ pmcc_init_debug(void) static int pmcc_do_enable_disable(struct pmcc_op_list *op_list) { - unsigned char op; int c, error, i, j, ncpu, npmc, t; - int cpu, pmc; + cpumask_t haltedcpus, cpumask; struct pmcc_op *np; unsigned char *map; + unsigned char op; + int cpu, pmc; + size_t dummy; if ((ncpu = pmc_ncpu()) < 0) err(EX_OSERR, "Unable to determine the number of cpus"); - /* determine the maximum number of PMCs in any CPU */ + /* Determine the set of active CPUs. */ + cpumask = (1 << ncpu) - 1; + dummy = sizeof(int); + haltedcpus = (cpumask_t) 0; + if (ncpu > 1 && sysctlbyname("machdep.hlt_cpus", &haltedcpus, + &dummy, NULL, 0) < 0) + err(EX_OSERR, "ERROR: Cannot determine which CPUs are " + "halted"); + cpumask &= ~haltedcpus; + + /* Determine the maximum number of PMCs in any CPU. */ npmc = 0; for (c = 0; c < ncpu; c++) { if ((t = pmc_npmc(c)) < 0) - err(EX_OSERR, "Unable to determine the number of PMCs in " - "CPU %d", c); + err(EX_OSERR, "Unable to determine the number of " + "PMCs in CPU %d", c); npmc = t > npmc ? t : npmc; } @@ -187,8 +199,10 @@ pmcc_do_enable_disable(struct pmcc_op_li #define MAP(M,C,P) (*((M) + (C)*npmc + (P))) if (cpu == PMCC_CPU_ALL) - for (i = 0; i < ncpu; i++) - SET_PMCS(i, pmc, op); + for (i = 0; i < ncpu; i++) { + if ((1 << i) & cpumask) + SET_PMCS(i, pmc, op); + } else SET_PMCS(cpu, pmc, op); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 08:39:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7379C1065678; Sun, 9 Nov 2008 08:39:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 617988FC08; Sun, 9 Nov 2008 08:39:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA98dr0T034826; Sun, 9 Nov 2008 08:39:53 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA98dr79034825; Sun, 9 Nov 2008 08:39:53 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811090839.mA98dr79034825@svn.freebsd.org> From: Joseph Koshy Date: Sun, 9 Nov 2008 08:39:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184783 - head/usr.sbin/pmccontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 08:39:53 -0000 Author: jkoshy Date: Sun Nov 9 08:39:52 2008 New Revision: 184783 URL: http://svn.freebsd.org/changeset/base/184783 Log: - Document the changed meaning of a '*' argument to option "-c". - Tweak grammar. Modified: head/usr.sbin/pmccontrol/pmccontrol.8 Modified: head/usr.sbin/pmccontrol/pmccontrol.8 ============================================================================== --- head/usr.sbin/pmccontrol/pmccontrol.8 Sun Nov 9 08:36:35 2008 (r184782) +++ head/usr.sbin/pmccontrol/pmccontrol.8 Sun Nov 9 08:39:52 2008 (r184783) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2003 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2003,2008 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2003 +.Dd November 9, 2008 .Os .Dt PMCCONTROL 8 .Sh NAME @@ -52,13 +52,13 @@ The following options are available: .Bl -tag -width indent .It Fl c Ar cpu Subsequent enable and disable options affect the CPU -denoted by +denoted by argument .Ar cpu . The argument .Ar cpu -is either a number denoting a CPU number in the system, or the string +is a number denoting a CPU in the system, or .Dq Li * , -denoting all CPUs in the system. +denoting all unhalted CPUs in the system. .It Fl d Ar pmc Disable PMC number .Ar pmc @@ -67,7 +67,7 @@ on the CPU specified by preventing it from being used till subsequently re-enabled. The argument .Ar pmc -is either a number denoting a specified PMC, or the string +is a number denoting a specific PMC, or .Dq Li * denoting all the PMCs on the specified CPU. .Pp @@ -81,7 +81,7 @@ on the CPU specified by allowing it to be used in the future. The argument .Ar pmc -is either a number denoting a specified PMC, or the string +is a number denoting a specific PMC, or .Dq Li * denoting all the PMCs on the specified CPU. If PMC From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 08:48:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 8C32A1065688; Sun, 9 Nov 2008 08:48:17 +0000 (UTC) Date: Sun, 9 Nov 2008 08:48:17 +0000 From: Alexey Dokuchaev To: Matteo Riondato Message-ID: <20081109084817.GA23323@FreeBSD.org> References: <200811090734.mA97YBld033553@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200811090734.mA97YBld033553@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184780 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 08:48:17 -0000 On Sun, Nov 09, 2008 at 07:34:11AM +0000, Matteo Riondato wrote: > > +void > +static remove_tmp(int sig) > +{ > + if (tmp_path) { > + unlink(tmp_path); > + } > + exit(ERROR_EXIT); > +} This looks weird: `static' should be on same line as `void' as `static void' (so ^remove_tmp would match). It will also always exit with ERROR_EXIT, which does not look right, does it? ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:01:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 273F6106567C; Sun, 9 Nov 2008 09:01:10 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14DF88FC24; Sun, 9 Nov 2008 09:01:10 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9919pT035252; Sun, 9 Nov 2008 09:01:09 GMT (envelope-from matteo@svn.freebsd.org) Received: (from matteo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9919m3035251; Sun, 9 Nov 2008 09:01:09 GMT (envelope-from matteo@svn.freebsd.org) Message-Id: <200811090901.mA9919m3035251@svn.freebsd.org> From: Matteo Riondato Date: Sun, 9 Nov 2008 09:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184784 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:01:10 -0000 Author: matteo Date: Sun Nov 9 09:01:09 2008 New Revision: 184784 URL: http://svn.freebsd.org/changeset/base/184784 Log: Revert to previous revision. I should not commit anything at 3.50 AM. In addition to danfe's comments, I got others. I'll work on a better version of the patch. Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 08:39:52 2008 (r184783) +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 09:01:09 2008 (r184784) @@ -63,7 +63,6 @@ static FILE *NewCrontab; static int CheckErrorCount; static enum opt_t Option; static struct passwd *pw; -static char *tmp_path; static void list_cmd(void), delete_cmd(void), edit_cmd(void), @@ -487,16 +486,6 @@ edit_cmd() { } -void -static remove_tmp(int sig) -{ - if (tmp_path) { - unlink(tmp_path); - } - exit(ERROR_EXIT); -} - - /* returns 0 on success * -1 on syntax error * -2 on install error @@ -519,12 +508,6 @@ replace_cmd() { (void) snprintf(n, sizeof(n), "tmp.%d", Pid); (void) snprintf(tn, sizeof(n), CRON_TAB(n)); - /* Set up to remove the temp file if interrupted by a signal. */ - f[0] = signal(SIGHUP, remove_tmp); - f[1] = signal(SIGINT, remove_tmp); - f[2] = signal(SIGTERM, remove_tmp); - tmp_path = tn; - if (!(tmp = fopen(tn, "w+"))) { warn("%s", tn); return (-2); @@ -618,12 +601,6 @@ replace_cmd() { return (-2); } - /* Restore the default signal handlers. */ - tmp_path = NULL; - signal(SIGHUP, f[0]); - signal(SIGINT, f[1]); - signal(SIGTERM, f[2]); - log_it(RealUser, Pid, "REPLACE", User); poke_daemon(); From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:05:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1AA01065673; Sun, 9 Nov 2008 09:05:39 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 962DE8FC18; Sun, 9 Nov 2008 09:05:39 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA995dP3035382; Sun, 9 Nov 2008 09:05:39 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA995dho035381; Sun, 9 Nov 2008 09:05:39 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811090905.mA995dho035381@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 09:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184785 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:05:39 -0000 Author: rafan Date: Sun Nov 9 09:05:38 2008 New Revision: 184785 URL: http://svn.freebsd.org/changeset/base/184785 Log: - Open vendor/ncurses for the upcoming ncurses 5.7 update Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Sun Nov 9 09:01:09 2008 (r184784) +++ svnadmin/conf/paths Sun Nov 9 09:05:38 2008 (r184785) @@ -47,6 +47,7 @@ ^vendor/cpio ^vendor/bind9 ^vendor/gdtoa +^vendor/ncurses ^vendor/netcat ^vendor/ntp ^vendor/sendmail From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:06:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DCCC1065693; Sun, 9 Nov 2008 09:06:05 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286FA8FC22; Sun, 9 Nov 2008 09:06:05 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9965TP035430; Sun, 9 Nov 2008 09:06:05 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9964w4035426; Sun, 9 Nov 2008 09:06:04 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811090906.mA9964w4035426@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 09:06:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184786 - in vendor/ncurses/dist: . contrib doc form include man menu misc ncurses panel progs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:06:05 -0000 Author: rafan Date: Sun Nov 9 09:06:04 2008 New Revision: 184786 URL: http://svn.freebsd.org/changeset/base/184786 Log: - Flatten the vendor area Added: vendor/ncurses/dist/ANNOUNCE - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/ANNOUNCE vendor/ncurses/dist/AUTHORS - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/AUTHORS vendor/ncurses/dist/INSTALL - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/INSTALL vendor/ncurses/dist/MANIFEST - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/MANIFEST vendor/ncurses/dist/Makefile.in - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/Makefile.in vendor/ncurses/dist/Makefile.os2 - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/Makefile.os2 vendor/ncurses/dist/NEWS - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/NEWS vendor/ncurses/dist/README - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/README vendor/ncurses/dist/README.emx - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/README.emx vendor/ncurses/dist/TO-DO - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/TO-DO vendor/ncurses/dist/aclocal.m4 - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/aclocal.m4 vendor/ncurses/dist/announce.html.in - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/announce.html.in vendor/ncurses/dist/config.guess - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/config.guess vendor/ncurses/dist/config.sub - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/config.sub vendor/ncurses/dist/configure - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/configure vendor/ncurses/dist/configure.in - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/configure.in vendor/ncurses/dist/convert_configure.pl - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/convert_configure.pl vendor/ncurses/dist/dist.mk - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/dist.mk vendor/ncurses/dist/doc/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/doc/ vendor/ncurses/dist/form/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/form/ vendor/ncurses/dist/include/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/include/ vendor/ncurses/dist/install-sh - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/install-sh vendor/ncurses/dist/man/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/man/ vendor/ncurses/dist/menu/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/menu/ vendor/ncurses/dist/misc/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/misc/ vendor/ncurses/dist/mk-0th.awk - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/mk-0th.awk vendor/ncurses/dist/mk-1st.awk - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/mk-1st.awk vendor/ncurses/dist/mk-2nd.awk - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/mk-2nd.awk vendor/ncurses/dist/mk-hdr.awk - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/mk-hdr.awk vendor/ncurses/dist/mkdirs.sh - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/mkdirs.sh vendor/ncurses/dist/ncurses/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/ncurses/ vendor/ncurses/dist/panel/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/panel/ vendor/ncurses/dist/progs/ - copied from r184783, vendor/ncurses/dist/contrib/ncurses/progs/ vendor/ncurses/dist/tar-copy.sh - copied unchanged from r184783, vendor/ncurses/dist/contrib/ncurses/tar-copy.sh Deleted: vendor/ncurses/dist/contrib/ Copied: vendor/ncurses/dist/ANNOUNCE (from r184783, vendor/ncurses/dist/contrib/ncurses/ANNOUNCE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ncurses/dist/ANNOUNCE Sun Nov 9 09:06:04 2008 (r184786, copy of r184783, vendor/ncurses/dist/contrib/ncurses/ANNOUNCE) @@ -0,0 +1,463 @@ + Announcing ncurses 5.6 + + The ncurses (new curses) library is a free software emulation of + curses in System V Release 4.0, and more. It uses terminfo format, + supports pads and color and multiple highlights and forms characters + and function-key mapping, and has all the other SYSV-curses + enhancements over BSD curses. + + In mid-June 1995, the maintainer of 4.4BSD curses declared that he + considered 4.4BSD curses obsolete, and encouraged the keepers of Unix + releases such as BSD/OS, FreeBSD and NetBSD to switch over to ncurses. + + The ncurses code was developed under GNU/Linux. It has been in use for + some time with OpenBSD as the system curses library, and on FreeBSD + and NetBSD as an external package. It should port easily to any + ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp! + + The distribution includes the library and support utilities, including + a terminfo compiler tic(1), a decompiler infocmp(1), clear(1), + tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full + manual pages are provided for the library and tools. + + The ncurses distribution is available via anonymous FTP at the GNU + distribution site [1]ftp://ftp.gnu.org/gnu/ncurses/ . + It is also available at [2]ftp://invisible-island.net/ncurses/ . + + Release Notes + + This release is designed to be upward compatible from ncurses 5.0 + through 5.5; very few applications will require recompilation, + depending on the platform. These are the highlights from the + change-log since ncurses 5.5 release. + + Interface changes: + * generate linkable stubs for some macros: + getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx, + getpary, getpary, + and (for libncursesw) + wgetbkgrnd + + New features and improvements: + * library + + support hashed databases for the terminal descriptions. This + uses the Berkeley database, has been tested for several + versions on different platforms. + + add use_legacy_coding() function to support lynx's + font-switching feature. + + add extension nofilter(), to cancel a prior filter() call. + + add/install a package config script, e.g., ncurses5-config or + ncursesw5-config, according to configuration options. + + provide ifdef for NCURSES_NOMACROS which suppresses most + macro definitions from curses.h, i.e., where a macro is + defined to override a function to improve performance. + + make ifdef's consistent in curses.h for the extended colors + so the header file can be used for the normal curses library. + The header file installed for extended colors is a variation + of the wide-character configuration. + + improve tgetstr() by making the return value point into the + user's buffer, if provided. + + add ifdef's allowing ncurses to be built with tparm() using + either varargs (the existing status), or using a + fixed-parameter list (to match X/Open). + + widen the test for xterm kmous a little to allow for other + strings than "\E[M", e.g., for xterm-sco functionality in + xterm. + + modify wgetnstr() to return KEY_RESIZE if a sigwinch occurs. + + move prototypes for wide-character trace functions from + curses.tail to curses.wide to avoid accidental reference to + those if _XOPEN_SOURCE_EXTENDED is defined without ensuring + that is included. + + change the way shared libraries (other than libtool) are + installed. Rather than copying the build-tree's libraries, + link the shared objects into the install directory. This + makes the --with-rpath option work except with $(DESTDIR). + + several improvements for rendering in hpterm. These are only + available if the library is configured using + --enable-xmc-glitch. + + Add NCURSES_NO_HARD_TABS and NCURSES_NO_MAGIC_COOKIE + environment variables to allow runtime suppression of the + related hard-tabs and xmc-glitch features. + * programs: + + add new test programs: chgat.c, demo_altkeys.c, echochar.c, + foldkeys.c, movewindow.c, redraw.c, (noting that existing + test programs also were modified to test additional + features). + + modify tack to test extended capability function-key strings. + + modify toe to access termcap data, e.g., via cgetent() + functions, or as a text file if those are not available. + + improve infocmp/tic -f option formatting. + + add toe -a option, to show all databases. This uses new + private interfaces in the ncurses library for iterating + through the list of databases. + + modify MKfallback.sh to use tic -x when constructing fallback + tables to allow extended capabilities to be retrieved from a + fallback entry. + * terminal database + + add terminfo entries for xfce terminal (xfce) and multi gnome + terminal (mgt) + + add nsterm-16color entry + + updated mlterm terminfo entry + + add kon, kon2 and jfbterm terminfo entry + + remove invis capability from klone+sgr, mainly used by linux + entry, since it does not really do this + + add ka2, kb1, kb3, kc2 to vt220-keypad as an extension + + add shifted up/down arrow codes to xterm-new as kind/kri + strings + + add hpterm-color terminfo entry + + add 256color variants of terminfo entries for programs which + are reported to implement this feature + + correct order of use-clauses in rxvt-basic entry which made + codes for f1-f4 vt100-style rather than vt220-style. + + Major bug fixes: + * correct a typo in configure --with-bool option for the case where + --without-cxx is used. + * move assignment from environment variable ESCDELAY from initscr() + down to newterm() so the environment variable affects timeouts for + terminals opened with newterm() as well. + * modify werase to clear multicolumn characters that extend into a + derived window. + * modify wchgat() to mark updated cells as changed so a refresh will + repaint those cells. + * correct logic in wadd_wch() and wecho_wch(), which did not guard + against passing the multi-column attribute into a call on + waddch(), e.g., using data returned by win_wch() + * fix redrawing of windows other than stdscr using wredrawln() by + touching the corresponding rows in curscr. + * reduce memory leaks in repeated calls to tgetent() by remembering + the last TERMINAL* value allocated to hold the corresponding data + and freeing that if the tgetent() result buffer is the same as the + previous call. + * modify read_termtype() so the term_names data is always allocated + as part of the str_table, a better fix for a memory leak. + * fix wins_nwstr(), which did not handle single-column non-8bit + codes. + * modify wbkgrnd() to avoid clearing the A_CHARTEXT attribute bits + since those record the state of multicolumn characters. + * improve SIGWINCH handling by postponing its effect during + newterm(), etc., when allocating screens. + * remove 970913 feature for copying subwindows as they are moved in + mvwin(). + * add checks in waddchnstr() and wadd_wchnstr() to stop copying when + a null character is found. + * add some checks to ensure current position is within scrolling + region before scrolling on a new line. + * add a workaround to ACS mapping to allow applications such as + test/blue.c to use the "PC ROM" characters by masking them with + A_ALTCHARSET. This worked up til 5.5, but was lost in the revision + of legacy coding. + + Portability: + * configure script: + + new options: + + --with-hashed-db + Use Berkeley hashed database for storing terminfo + data rather than storing each compiled entry in a + separate binary file within a directory tree. + + --without-dlsym + Do not use dlsym() to load GPM dynamically. + + --with-valgrind + Simplify building for testing with valgrind. + + --enable-wgetch-events + Compile with experimental wgetch-events code. + + --enable-signed-char + Store booleans in "signed char" rather than "char". + + + improved options: + + --disable-largefile + make the option work both ways. + + --with-gpm + The option now accepts a parameter, i.e., the name + of the dynamic GPM library to load via dlopen() + + --disable-symlinks + The option now allows one to disable symlink() in + tic even when link() does not work. + + * other configure/build issues: + + remove special case for Darwin in CF_XOPEN_SOURCE configure + macro. + + add configure check to ensure that SIGWINCH is defined on + platforms such as OS X which exclude that when _XOPEN_SOURCE, + etc., are defined + + use ld's -search_paths_first option on Darwin to work around + odd search rules on that platform. + + improve ifdef's for _POSIX_VDISABLE in tset to work with Mac + OS X. + + modify configure script to ensure that if the C compiler is + used rather than the loader in making shared libraries, the + $(CFLAGS) variable is also used. + + use ${CC} rather than ${LD} in shared library rules for + IRIX64, Solaris to help ensure that initialization sections + are provided for extra linkage requirements, e.g., of C++ + applications. + + improve some shared-library configure scripting for Linux, + FreeBSD and NetBSD to make --with-shlib-version work. + + split up dependency of names.c and codes.c in + ncurses/Makefile to work with parallel make. + + modify MKlib_gen.sh to change preprocessor-expanded _Bool + back to bool. + + modify progs/Makefile.in to make tput init work properly with + cygwin, i.e., do not pass a .exe in the reference string used + in check_aliases. + * library: + + ignore wide-acs line-drawing characters that wcwidth() claims + are not one-column. This is a workaround for Solaris' broken + locale support. + + reduce name-pollution in term.h by removing #define's for + HAVE_xxx symbols. + + fix #ifdef in c++/internal.h for QNX 6.1 + * test programs: + + modify test/configure script to allow building test programs + with PDCurses/X11. + + modified test programs to allow some to work with NetBSD + curses. Several do not because NetBSD curses implements a + subset of X/Open curses, and also lacks much of SVr4 + additions. But it is enough for comparison. + + improved test/configure to build test/ncurses on HPUX 11 + using the vendor curses. + + change configure script to produce test/Makefile from data + file. + + Features of Ncurses + + The ncurses package is fully compatible with SVr4 (System V Release 4) + curses: + * All 257 of the SVr4 calls have been implemented (and are + documented). + * Full support for SVr4 curses features including keyboard mapping, + color, forms-drawing with ACS characters, and automatic + recognition of keypad and function keys. + * An emulation of the SVr4 panels library, supporting a stack of + windows with backing store, is included. + * An emulation of the SVr4 menus library, supporting a uniform but + flexible interface for menu programming, is included. + * An emulation of the SVr4 form library, supporting data collection + through on-screen forms, is included. + * Binary terminfo entries generated by the ncurses tic(1) + implementation are bit-for-bit-compatible with the entry format + SVr4 curses uses. + * The utilities have options to allow you to filter terminfo entries + for use with less capable curses/terminfo versions such as the + HP/UX and AIX ports. + + The ncurses package also has many useful extensions over SVr4: + * The API is 8-bit clean and base-level conformant with the X/OPEN + curses specification, XSI curses (that is, it implements all BASE + level features, and most EXTENDED features). It includes many + function calls not supported under SVr4 curses (but portability of + all calls is documented so you can use the SVr4 subset only). + * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost + corner of the screen if your terminal has an insert-character + capability. + * Ada95 and C++ bindings. + * Support for mouse event reporting with X Window xterm and FreeBSD + and OS/2 console windows. + * Extended mouse support via Alessandro Rubini's gpm package. + * The function wresize() allows you to resize windows, preserving + their data. + * The function use_default_colors() allows you to use the terminal's + default colors for the default color pair, achieving the effect of + transparent colors. + * The functions keyok() and define_key() allow you to better control + the use of function keys, e.g., disabling the ncurses KEY_MOUSE, + or by defining more than one control sequence to map to a given + key code. + * Support for 16-color terminals, such as aixterm and modern xterm. + * Better cursor-movement optimization. The package now features a + cursor-local-movement computation more efficient than either BSD's + or System V's. + * Super hardware scrolling support. The screen-update code + incorporates a novel, simple, and cheap algorithm that enables it + to make optimal use of hardware scrolling, line-insertion, and + line-deletion for screen-line movements. This algorithm is more + powerful than the 4.4BSD curses quickch() routine. + * Real support for terminals with the magic-cookie glitch. The + screen-update code will refrain from drawing a highlight if the + magic- cookie unattributed spaces required just before the + beginning and after the end would step on a non-space character. + It will automatically shift highlight boundaries when doing so + would make it possible to draw the highlight without changing the + visual appearance of the screen. + * It is possible to generate the library with a list of pre-loaded + fallback entries linked to it so that it can serve those terminal + types even when no terminfo tree or termcap file is accessible + (this may be useful for support of screen-oriented programs that + must run in single-user mode). + * The tic(1)/captoinfo utility provided with ncurses has the ability + to translate many termcaps from the XENIX, IBM and AT&T extension + sets. + * A BSD-like tset(1) utility is provided. + * The ncurses library and utilities will automatically read terminfo + entries from $HOME/.terminfo if it exists, and compile to that + directory if it exists and the user has no write access to the + system directory. This feature makes it easier for users to have + personal terminfo entries without giving up access to the system + terminfo directory. + * You may specify a path of directories to search for compiled + descriptions with the environment variable TERMINFO_DIRS (this + generalizes the feature provided by TERMINFO under stock System + V.) + * In terminfo source files, use capabilities may refer not just to + other entries in the same source file (as in System V) but also to + compiled entries in either the system terminfo directory or the + user's $HOME/.terminfo directory. + * A script (capconvert) is provided to help BSD users transition + from termcap to terminfo. It gathers the information in a TERMCAP + environment variable and/or a ~/.termcap local entries file and + converts it to an equivalent local terminfo tree under + $HOME/.terminfo. + * Automatic fallback to the /etc/termcap file can be compiled in + when it is not possible to build a terminfo tree. This feature is + neither fast nor cheap, you don't want to use it unless you have + to, but it's there. + * The table-of-entries utility toe makes it easy for users to see + exactly what terminal types are available on the system. + * The library meets the XSI requirement that every macro entry point + have a corresponding function which may be linked (and will be + prototype-checked) if the macro definition is disabled with + #undef. + * An HTML "Introduction to Programming with NCURSES" document + provides a narrative introduction to the curses programming + interface. + + State of the Package + + Numerous bugs present in earlier versions have been fixed; the library + is far more reliable than it used to be. Bounds checking in many + `dangerous' entry points has been improved. The code is now type-safe + according to gcc -Wall. The library has been checked for malloc leaks + and arena corruption by the Purify memory-allocation tester. + + The ncurses code has been tested with a wide variety of applications + including (versions starting with those noted): + + cdk + Curses Development Kit + [3]http://invisible-island.net/cdk/ + [4]http://www.vexus.ca/products/CDK/ + + ded + directory-editor + [5]http://invisible-island.net/ded/ + + dialog + the underlying application used in Slackware's setup, and the + basis for similar applications on GNU/Linux. + [6]http://invisible-island.net/dialog/ + + lynx + the character-screen WWW browser + [7]http://lynx.isc.org/release/ + + Midnight Commander + file manager + [8]http://www.ibiblio.org/mc/ + + mutt + mail utility + [9]http://www.mutt.org/ + + ncftp + file-transfer utility + [10]http://www.ncftp.com/ + + nvi + New vi versions 1.50 are able to use ncurses versions 1.9.7 and + later. + [11]http://www.bostic.com/vi/ + + pinfo + Lynx-like info browser. + [12]http://dione.ids.pl/~pborys/software/pinfo/ + + tin + newsreader, supporting color, MIME [13]http://www.tin.org/ + + vh-1.6 + Volks-Hypertext browser for the Jargon File + [14]http://www.debian.org/Packages/unstable/text/vh.html + + as well as some that use ncurses for the terminfo support alone: + + minicom + terminal emulator + [15]http://alioth.debian.org/projects/minicom/ + + vile + vi-like-emacs + [16]http://invisible-island.net/vile/ + + The ncurses distribution includes a selection of test programs + (including a few games). + +Who's Who and What's What + + Zeyd Ben-Halim started it from a previous package pcurses, written by + Pavel Curtis. Eric S. Raymond continued development. Juergen Pfeifer + wrote most of the form and menu libraries. Ongoing work is being done + by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the + Free Software Foundation, which holds the copyright on ncurses. + Contact the current maintainers at [18]bug-ncurses@gnu.org. + + To join the ncurses mailing list, please write email to + bug-ncurses-request@gnu.org containing the line: + subscribe @ + + This list is open to anyone interested in helping with the development + and testing of this package. + + Beta versions of ncurses and patches to the current release are made + available at [19]ftp://invisible-island.net/ncurses/ . + +Future Plans + + * Extended-level XPG4 conformance, with internationalization + support. + * Ports to more systems, including DOS and Windows. + + We need people to help with these projects. If you are interested in + working on them, please join the ncurses list. + +Other Related Resources + + The distribution provides a newer version of the terminfo-format + terminal description file once maintained by [20]Eric Raymond . Unlike + the older version, the termcap and terminfo data are provided in the + same file, and provides several user-definable extensions beyond the + X/Open specification. + + You can find lots of information on terminal-related topics not + covered in the terminfo file at [21]Richard Shuford's archive . + +References + + 1. ftp://ftp.gnu.org/gnu/ncurses/ + 2. ftp://invisible-island.net/ncurses/ + 3. http://invisible-island.net/cdk/ + 4. http://www.vexus.ca/products/CDK/ + 5. http://invisible-island.net/ded/ + 6. http://invisible-island.net/dialog/ + 7. http://lynx.isc.org/release/ + 8. http://www.ibiblio.org/mc/ + 9. http://www.mutt.org/ + 10. http://www.ncftp.com/ + 11. http://www.bostic.com/vi/ + 12. http://dione.ids.pl/~pborys/software/pinfo/ + 13. http://www.tin.org/ + 14. http://www.debian.org/Packages/unstable/text/vh.html + 15. http://alioth.debian.org/projects/minicom/ + 16. http://invisible-island.net/vile/ + 17. mailto:dickey@invisible-island.net + 18. mailto:bug-ncurses@gnu.org + 19. ftp://invisible-island.net/ncurses/ + 20. http://www.catb.org/~esr/terminfo/ + 21. http://www.cs.utk.edu/~shuford/terminal_index.html Copied: vendor/ncurses/dist/AUTHORS (from r184783, vendor/ncurses/dist/contrib/ncurses/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ncurses/dist/AUTHORS Sun Nov 9 09:06:04 2008 (r184786, copy of r184783, vendor/ncurses/dist/contrib/ncurses/AUTHORS) @@ -0,0 +1,38 @@ +------------------------------------------------------------------------------- +-- Copyright (c) 2006 Free Software Foundation, Inc. -- +-- -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell copies -- +-- of the Software, and to permit persons to whom the Software is furnished -- +-- to do so, subject to the following conditions: -- +-- -- +-- The above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. -- +-- -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -- +-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- +-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -- +------------------------------------------------------------------------------- +-- $Id: AUTHORS,v 1.2 2006/10/28 21:44:52 tom Exp $ +------------------------------------------------------------------------------- +These are the principal authors/contributors of ncurses since 1.9.9e, +in decreasing order of their contribution: + +TD Thomas E. Dickey +JPF Juergen Pfeifer +ESR Eric S Raymond +AVL Alexander V Lukyanov +PB Philippe Blain +SV Sven Verdoolaege Copied: vendor/ncurses/dist/INSTALL (from r184783, vendor/ncurses/dist/contrib/ncurses/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/ncurses/dist/INSTALL Sun Nov 9 09:06:04 2008 (r184786, copy of r184783, vendor/ncurses/dist/contrib/ncurses/INSTALL) @@ -0,0 +1,1619 @@ +------------------------------------------------------------------------------- +-- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell copies -- +-- of the Software, and to permit persons to whom the Software is furnished -- +-- to do so, subject to the following conditions: -- +-- -- +-- The above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. -- +-- -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -- +-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- +-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -- +------------------------------------------------------------------------------- +-- $Id: INSTALL,v 1.124 2008/03/29 18:07:32 tom Exp $ +--------------------------------------------------------------------- + How to install Ncurses/Terminfo on your system +--------------------------------------------------------------------- + + ************************************************************ + * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. * + ************************************************************ + +You should be reading the file INSTALL in a directory called ncurses-d.d, where +d.d is the current version number. There should be several subdirectories, +including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs', +and `test'. See the README file for a roadmap to the package. + +If you are a Linux or FreeBSD or NetBSD distribution integrator or packager, +please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR +below. + +If you are converting from BSD curses and do not have root access, be sure +to read the BSD CONVERSION NOTES section below. + +If you are trying to build applications using gpm with ncurses, +read the USING NCURSES WITH GPM section below. + +If you are running over the Andrew File System see the note below on +USING NCURSES WITH AFS. + +If you are cross-compiling, see the note below on BUILDING NCURSES WITH A +CROSS-COMPILER. + +If you want to build the Ada95 binding, go to the Ada95 directory and +follow the instructions there. The Ada95 binding is not covered below. + +If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based +i386 Unixes, go read the Portability section in the TO-DO file before you +do anything else. + + +REQUIREMENTS: +------------ + +You will need the following to build and install ncurses under UNIX: + + * ANSI C compiler (gcc, for instance) + * sh (bash will do) + * awk (mawk or gawk will do) + * sed + * BSD or System V style install (a script is enclosed) + +Ncurses has been also built in the OS/2 EMX environment. + + +INSTALLATION PROCEDURE: +---------------------- + +1. First, decide whether you want ncurses to replace your existing library (in + which case you'll need super-user privileges) or be installed in parallel + with it. + + The --prefix option to configure changes the root directory for installing + ncurses. The default is normally in subdirectories of /usr/local, except + for systems where ncurses is normally installed as a system library, e.g., + Linux, the various BSD systems and Cygwin. Use --prefix=/usr to replace + your default curses distribution. + + The package gets installed beneath the --prefix directory as follows: + + In $(prefix)/bin: tic, infocmp, captoinfo, tset, + reset, clear, tput, toe + In $(prefix)/lib: libncurses*.* libcurses.a + In $(prefix)/share/terminfo: compiled terminal descriptions + In $(prefix)/include: C header files + Under $(prefix)/man: the manual pages + + Note that the configure script attempts to locate previous installation of + ncurses, and will set the default prefix according to where it finds the + ncurses headers. + + Do not use commands such as + + make install prefix=XXX + + to change the prefix after configuration, since the prefix value is used + for some absolute pathnames such as TERMINFO. Instead do this + + make install DESTDIR=XXX + + See also the discussion of --with-install-prefix. + +2. Type `./configure' in the top-level directory of the distribution to + configure ncurses for your operating system and create the Makefiles. + Besides --prefix, various configuration options are available to customize + the installation; use `./configure --help' to list the available options. + + If your operating system is not supported, read the PORTABILITY section in + the file ncurses/README for information on how to create a configuration + file for your system. + + The `configure' script generates makefile rules for one or more object + models and their associated libraries: + + libncurses.a (normal) + + libcurses.a (normal, a link to libncurses.a) + This gets left out if you configure with --disable-overwrite. + + libncurses.so (shared) + + libncurses_g.a (debug) + + libncurses_p.a (profile) + + libncurses.la (libtool) + + If you configure using the --enable-widec option, a "w" is appended to the + library names (e.g., libncursesw.a), and the resulting libraries support + wide-characters, e.g., via a UTF-8 locale. The corresponding header files + are compatible with the non-wide-character configuration; wide-character + features are provided by ifdef's in the header files. The wide-character + library interfaces are not binary-compatible with the non-wide-character + version. Building and running the wide-character code relies on a fairly + recent implementation of libiconv. We have built this configuration on + Linux using libiconv, sometimes requiring libutf8. + + If you configure using the --with-pthread option, a "t" is appended to + the library names (e.g., libncursest.a, libncursestw.a). + + If you do not specify any models, the normal and debug libraries will be + configured. Typing `configure' with no arguments is equivalent to: + + ./configure --with-normal --with-debug --enable-overwrite + + Typing + + ./configure --with-shared + + makes the shared libraries the default, resulting in + + ./configure --with-shared --with-normal --with-debug --enable-overwrite + + If you want only shared libraries, type + + ./configure --with-shared --without-normal --without-debug + + Rules for generating shared libraries are highly dependent upon the choice + of host system and compiler. We've been testing shared libraries on Linux + and SunOS with gcc, but more work needs to be done to make shared libraries + work on other systems. + + If you have libtool installed, you can type + + ./configure --with-libtool + + to generate the appropriate static and/or shared libraries for your + platform using libtool. + + You can make curses and terminfo fall back to an existing file of termcap + definitions by configuring with --enable-termcap. If you do this, the + library will search /etc/termcap before the terminfo database, and will + also interpret the contents of the TERM environment variable. See the + section BSD CONVERSION NOTES below. + +3. Type `make'. Ignore any warnings, no error messages should be produced. + This should compile the ncurses library, the terminfo compiler tic(1), + captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) + programs (see the manual pages for explanation of what they do), some test + programs, and the panels, menus, and forms libraries. + +4. Run ncurses and several other test programs in the test directory to + verify that ncurses functions correctly before doing an install that + may overwrite system files. Read the file test/README for details on + the test programs. + + NOTE: You must have installed the terminfo database, or set the + environment variable $TERMINFO to point to a SVr4-compatible terminfo + database before running the test programs. Not all vendors' terminfo + databases are SVr4-compatible, but most seem to be. Exceptions include + DEC's Digital Unix (formerly known as OSF/1). + + If you run the test programs WITHOUT installing terminfo, ncurses may + read the termcap file and cache that in $HOME/.terminfo, which will + thereafter be used instead of the terminfo database. See the comments + on "--enable-getcap-cache", to see why this is a Bad Thing. + + It is possible to configure ncurses to use other terminfo database formats. + A few are provided as examples in the include-directory (see --with-caps). + + The ncurses program is designed specifically to test the ncurses library. + You can use it to verify that the screen highlights work correctly, that + cursor addressing and window scrolling works OK, etc. + +5. Once you've tested, you can type `make install' to install libraries, + the programs, the terminfo database and the manual pages. Alternately, you + can type `make install' in each directory you want to install. In the + top-level directory, you can do a partial install using these commands: + + 'make install.progs' installs tic, infocmp, etc... + 'make install.includes' installs the headers. + 'make install.libs' installs the libraries (and the headers). + 'make install.data' installs the terminfo data. (Note: `tic' must + be installed before the terminfo data can be + compiled). + 'make install.man' installs the manual pages. + + ############################################################################ + # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing # + # terminfo database. If you have any custom or unusual entries SAVE them # + # before you install ncurses. I have a file called terminfo.custom for # + # this purpose. Don't forget to run tic on the file once you're done. # + ############################################################################ + + The terminfo(5) manual page must be preprocessed with tbl(1) before + being formatted by nroff(1). Modern man(1) implementations tend to do + this by default, but you may want to look at your version's manual page + to be sure. You may also install the manual pages after preprocessing + with tbl(1) by specifying the configure option --with-manpage-tbl. + + If the system already has a curses library that you need to keep using + you'll need to distinguish between it and ncurses. See the discussion of + --disable-overwrite. If ncurses is installed outside the standard + directories (/usr/include and /usr/lib) then all your users will need to + use the -I option to compile programs and -L to link them. + + If you have another curses installed in your system and you accidentally + compile using its curses.h you'll end up with a large number of + undefined symbols at link time. + + IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory + and run the `capconvert' script. This script will deduce various things + about your environment and use them to build you a private terminfo tree, + so you can use ncurses applications. + + If more than one user at your site does this, the space for the duplicate + trees is wasted. Try to get your site administrators to install a system- + wide terminfo tree instead. + + See the BSD CONVERSION NOTES section below for a few more details. + +6. The c++ directory has C++ classes that are built on top of ncurses and + panels. You must have c++ (and its libraries) installed before you can + compile and run the demo. + + Use --without-cxx-binding to tell configure to not build the C++ bindings + and demo. + + If you do not have C++, you must use the --without-cxx option to tell + the configure script to not attempt to determine the type of 'bool' + which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT + YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++. + + +SUMMARY OF CONFIGURE OPTIONS: +---------------------------- + + The configure script provides a short list of its options when you type + + ./configure --help + + The --help and several options are common to all configure scripts that are + generated with autoconf. Those are all listed before the line + + --enable and --with options recognized: + + The other options are specific to this package. We list them in alphabetic + order. + + --disable-assumed-color + With ncurses 5.1, we introduced a new function, assume_default_colors() + which allows applications to specify what the default foreground and + background color are assumed to be. Most color applications use + full-screen color; but a few do not color the background. While the + assumed values can be overridden by invoking assume_default_colors(), + you may find it useful to set the assumed values to the pre-5.1 + convention, using this configure option. + + --disable-big-core + Assume machine has little memory. The configure script attempts to + determine if your machine has enough memory (about 6Mb) to compile the + terminfo database without writing portions to disk. Some allocators + return deceptive results, so you may have to override the configure + script. Or you may be building tic for a smaller machine. + + --disable-big-strings + Disable compile-time optimization of predefined tables which puts + all of their strings into a very long string, to reduce relocation + overhead. + + --disable-database + Use only built-in data. The ncurses libraries normally read terminfo + and termcap data from disk. You can configure ncurses to have a + built-in database, aka "fallback" entries. Embedded applications may + have no need for an external database. Some, but not all of the + programs are useful in this configuration, e.g., reset and tput versus + infocmp and tic. + + --disable-ext-funcs + Disable function-extensions. Configure ncurses without the functions + that are not specified by XSI. See ncurses/modules for the exact + list of library modules that would be suppressed. + + --disable-hashmap + Compile without hashmap scrolling-optimization code. This algorithm is + the default. + + --disable-home-terminfo + The $HOME/.terminfo directory is normally added to ncurses' search + list for reading/writing terminfo entries, since that directory is + more likely writable than the system terminfo database. Use this + option to disable the feature altogether. + + --disable-largefile + Disable compiler flags needed to use large-file interfaces. + + --disable-leaks + For testing, compile-in code that frees memory that normally would not + be freed, to simplify analysis of memory-leaks. + + Any implementation of curses must not free the memory associated with + a screen, since (even after calling endwin()), it must be available + for use in the next call to refresh(). There are also chunks of + memory held for performance reasons. That makes it hard to analyze + curses applications for memory leaks. To work around this, build + a debugging version of the ncurses library which frees those chunks + which it can, and provides the _nc_free_and_exit() function to free + the remainder on exit. The ncurses utility and test programs use this + feature, e.g., via the ExitProgram() macro. + + --disable-lp64 + The header files will ignore use of the _LP64 symbol to make chtype + and mmask_t types 32 bits (they may be long on 64-bit hosts, for + compatibility with older releases). + + NOTE: this is potentially an ABI change, depending on existing + packages. The default for this option is "disabled" for ncurses + ABI 5, and "enabled" for ABI 6. + + --disable-macros + For testing, use functions rather than macros. The program will run + more slowly, but it is simpler to debug. This defines NCURSES_NOMACROS + at build time. See also the --enable-expanded option. + + --disable-overwrite + If you are installing ncurses on a system which contains another + development version of curses, or which could be confused by the loader + for another version, we recommend that you leave out the link to + -lcurses. The ncurses library is always available as -lncurses. + Disabling overwrite also causes the ncurses header files to be + installed into a subdirectory, e.g., /usr/local/include/ncurses, + rather than the include directory. This makes it simpler to avoid + compile-time conflicts with other versions of curses.h + + --disable-relink + If --enable-rpath is given, the generated makefiles normally will + rebuild the libraries during install. Use this option to simply + copy whatever the linked produced. + + This option is ignored if --enable-rpath is not given. + + --disable-root-environ + Compile with environment restriction, so certain environment variables + are not available when running as root, or via a setuid/setgid + application. These are (for example $TERMINFO) those that allow the + search path for the terminfo or termcap entry to be customized. + + --disable-scroll-hints + Compile without scroll-hints code. This option is ignored when + hashmap scrolling is configured, which is the default. + + --disable-tparm-varargs + Portable programs should call tparm() using the fixed-length parameter + list documented in X/Open. ncurses provides varargs support for this + function. Use --disable-tparm-varargs to disable this support. + + --enable-assertions + For testing, compile-in assertion code. This is used only for a few + places where ncurses cannot easily recover by returning an error code. + + --enable-broken_linker + A few platforms have what we consider a broken linker: it cannot link + objects from an archive solely by referring to data objects in those + files, but requires a function reference. This configure option + changes several data references to functions to work around this + problem. + + NOTE: With ncurses 5.1, this may not be necessary, since we are + told that some linkers interpret uninitialized global data as a + different type of reference which behaves as described above. We have + explicitly initialized all of the global data to work around the + problem. + + --enable-bsdpad + Recognize BSD-style prefix padding. Some ancient BSD programs (such as + nethack) call tputs("50") to implement delays. + + --enable-colorfgbg + Compile with experimental $COLORFGBG code. That environment variable + is set by some terminal emulators as a hint to applications, by + advertising the default foreground and background colors. During + initialization, ncurses sets color pair 0 to match this. + + --enable-const + The curses interface as documented in XSI is rather old, in fact + including features that precede ANSI C. The prototypes generally do + not make effective use of "const". When using stricter compilers (or + gcc with appropriate warnings), you may see warnings about the mismatch + between const and non-const data. We provide a configure option which + changes the interfaces to use const - quieting these warnings and + reflecting the actual use of the parameters more closely. The ncurses + library uses the symbol NCURSES_CONST for these instances of const, + and if you have asked for compiler warnings, will add gcc's const-qual + warning. There will still be warnings due to subtle inconsistencies + in the interface, but at a lower level. + + NOTE: configuring ncurses with this option may detract from the + portability of your applications by encouraging you to use const in + places where the XSI curses interface would not allow them. Similar + issues arise when porting to SVr4 curses, which uses const in even + fewer places. + + --enable-echo + Use the option --disable-echo to make the build-log less verbose by + suppressing the display of the compile and link commands. This makes + it easier to see the compiler warnings. (You can always use "make -n" + to see the options that are used). + + --enable-expanded + For testing, generate functions for certain macros to make them visible + as such to the debugger. See also the --disable-macros option. + + --enable-ext-colors + Extend the cchar_t structure to allow more than 16 colors to be + encoded. This applies only to the wide-character (--enable-widec) + configuration. + + NOTE: using this option will make libraries which are not binary- + compatible with libncursesw 5.4. None of the interfaces change, but + applications which have an array of cchar_t's must be recompiled. + + --enable-ext-mouse + Modify the encoding of mouse state to make room for a 5th mouse button. + That allows one to use ncurses with a wheel mouse with xterm or + similar X terminal emulators. + + NOTE: using this option will make libraries which are not binary- + compatible with libncursesw 5.4. None of the interfaces change, but + applications which have mouse mask mmask_t's must be recompiled. + + --enable-getcap + Use the 4.4BSD getcap code if available, or a bundled version of it to + fetch termcap entries. Entries read in this way cannot use (make + cross-references to) the terminfo tree, but it is faster than reading + /etc/termcap. + + If configured for one of the *BSD systems, this automatically uses + the hashed database system produced using cap_mkdb or similar tools. + In that case, there is no advantage in using the --enable-getcap-cache + option. + + See also the --with-hashed-db option. + + --enable-getcap-cache + Cache translated termcaps under the directory $HOME/.terminfo + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:07:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 935E2106567A; Sun, 9 Nov 2008 09:07:47 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3778FC13; Sun, 9 Nov 2008 09:07:47 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA997lZB035488; Sun, 9 Nov 2008 09:07:47 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA997lIm035487; Sun, 9 Nov 2008 09:07:47 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811090907.mA997lIm035487@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 09:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184787 - in vendor/ncurses/dist: . doc doc/html form include man menu misc misc/tabset ncurses ncurses/base ncurses/tinfo ncurses/trace ncurses/tty ncurses/widechar panel progs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:07:47 -0000 Author: rafan Date: Sun Nov 9 09:07:46 2008 New Revision: 184787 URL: http://svn.freebsd.org/changeset/base/184787 Log: - Remove svn:keywords on unmodified vendor code Modified: vendor/ncurses/dist/ANNOUNCE (props changed) vendor/ncurses/dist/AUTHORS (props changed) vendor/ncurses/dist/INSTALL (props changed) vendor/ncurses/dist/MANIFEST (props changed) vendor/ncurses/dist/Makefile.in (props changed) vendor/ncurses/dist/Makefile.os2 (props changed) vendor/ncurses/dist/NEWS (props changed) vendor/ncurses/dist/README (props changed) vendor/ncurses/dist/README.emx (props changed) vendor/ncurses/dist/TO-DO (props changed) vendor/ncurses/dist/aclocal.m4 (props changed) vendor/ncurses/dist/announce.html.in (props changed) vendor/ncurses/dist/config.guess (props changed) vendor/ncurses/dist/config.sub (props changed) vendor/ncurses/dist/configure (props changed) vendor/ncurses/dist/configure.in (props changed) vendor/ncurses/dist/convert_configure.pl (props changed) vendor/ncurses/dist/dist.mk (props changed) vendor/ncurses/dist/doc/hackguide.doc (props changed) vendor/ncurses/dist/doc/html/NCURSES-Programming-HOWTO.html (props changed) vendor/ncurses/dist/doc/html/announce.html (props changed) vendor/ncurses/dist/doc/html/hackguide.html (props changed) vendor/ncurses/dist/doc/html/ncurses-intro.html (props changed) vendor/ncurses/dist/doc/ncurses-intro.doc (props changed) vendor/ncurses/dist/form/Makefile.in (props changed) vendor/ncurses/dist/form/READ.ME (props changed) vendor/ncurses/dist/form/f_trace.c (props changed) vendor/ncurses/dist/form/fld_arg.c (props changed) vendor/ncurses/dist/form/fld_attr.c (props changed) vendor/ncurses/dist/form/fld_current.c (props changed) vendor/ncurses/dist/form/fld_def.c (props changed) vendor/ncurses/dist/form/fld_dup.c (props changed) vendor/ncurses/dist/form/fld_ftchoice.c (props changed) vendor/ncurses/dist/form/fld_ftlink.c (props changed) vendor/ncurses/dist/form/fld_info.c (props changed) vendor/ncurses/dist/form/fld_just.c (props changed) vendor/ncurses/dist/form/fld_link.c (props changed) vendor/ncurses/dist/form/fld_max.c (props changed) vendor/ncurses/dist/form/fld_move.c (props changed) vendor/ncurses/dist/form/fld_newftyp.c (props changed) vendor/ncurses/dist/form/fld_opts.c (props changed) vendor/ncurses/dist/form/fld_pad.c (props changed) vendor/ncurses/dist/form/fld_page.c (props changed) vendor/ncurses/dist/form/fld_stat.c (props changed) vendor/ncurses/dist/form/fld_type.c (props changed) vendor/ncurses/dist/form/fld_user.c (props changed) vendor/ncurses/dist/form/form.h (props changed) vendor/ncurses/dist/form/form.priv.h (props changed) vendor/ncurses/dist/form/frm_cursor.c (props changed) vendor/ncurses/dist/form/frm_data.c (props changed) vendor/ncurses/dist/form/frm_def.c (props changed) vendor/ncurses/dist/form/frm_driver.c (props changed) vendor/ncurses/dist/form/frm_hook.c (props changed) vendor/ncurses/dist/form/frm_opts.c (props changed) vendor/ncurses/dist/form/frm_page.c (props changed) vendor/ncurses/dist/form/frm_post.c (props changed) vendor/ncurses/dist/form/frm_req_name.c (props changed) vendor/ncurses/dist/form/frm_scale.c (props changed) vendor/ncurses/dist/form/frm_sub.c (props changed) vendor/ncurses/dist/form/frm_user.c (props changed) vendor/ncurses/dist/form/frm_win.c (props changed) vendor/ncurses/dist/form/fty_alnum.c (props changed) vendor/ncurses/dist/form/fty_alpha.c (props changed) vendor/ncurses/dist/form/fty_enum.c (props changed) vendor/ncurses/dist/form/fty_int.c (props changed) vendor/ncurses/dist/form/fty_ipv4.c (props changed) vendor/ncurses/dist/form/fty_num.c (props changed) vendor/ncurses/dist/form/fty_regex.c (props changed) vendor/ncurses/dist/form/headers (props changed) vendor/ncurses/dist/form/llib-lform (props changed) vendor/ncurses/dist/form/llib-lformw (props changed) vendor/ncurses/dist/form/modules (props changed) vendor/ncurses/dist/include/Caps (props changed) vendor/ncurses/dist/include/Caps.aix4 (props changed) vendor/ncurses/dist/include/Caps.hpux11 (props changed) vendor/ncurses/dist/include/Caps.keys (props changed) vendor/ncurses/dist/include/Caps.osf1r5 (props changed) vendor/ncurses/dist/include/Caps.uwin (props changed) vendor/ncurses/dist/include/MKhashsize.sh (props changed) vendor/ncurses/dist/include/MKkey_defs.sh (props changed) vendor/ncurses/dist/include/MKncurses_def.sh (props changed) vendor/ncurses/dist/include/MKparametrized.sh (props changed) vendor/ncurses/dist/include/MKterm.h.awk.in (props changed) vendor/ncurses/dist/include/Makefile.in (props changed) vendor/ncurses/dist/include/capdefaults.c (props changed) vendor/ncurses/dist/include/curses.h.in (props changed) vendor/ncurses/dist/include/curses.tail (props changed) vendor/ncurses/dist/include/curses.wide (props changed) vendor/ncurses/dist/include/edit_cfg.sh (props changed) vendor/ncurses/dist/include/hashed_db.h (props changed) vendor/ncurses/dist/include/headers (props changed) vendor/ncurses/dist/include/nc_alloc.h (props changed) vendor/ncurses/dist/include/nc_panel.h (props changed) vendor/ncurses/dist/include/nc_tparm.h (props changed) vendor/ncurses/dist/include/ncurses_cfg.hin (props changed) vendor/ncurses/dist/include/ncurses_defs (props changed) vendor/ncurses/dist/include/ncurses_dll.h (props changed) vendor/ncurses/dist/include/term_entry.h (props changed) vendor/ncurses/dist/include/termcap.h.in (props changed) vendor/ncurses/dist/include/tic.h (props changed) vendor/ncurses/dist/include/unctrl.h.in (props changed) vendor/ncurses/dist/install-sh (props changed) vendor/ncurses/dist/man/MKterminfo.sh (props changed) vendor/ncurses/dist/man/Makefile.in (props changed) vendor/ncurses/dist/man/captoinfo.1m (props changed) vendor/ncurses/dist/man/clear.1 (props changed) vendor/ncurses/dist/man/curs_add_wch.3x (props changed) vendor/ncurses/dist/man/curs_add_wchstr.3x (props changed) vendor/ncurses/dist/man/curs_addch.3x (props changed) vendor/ncurses/dist/man/curs_addchstr.3x (props changed) vendor/ncurses/dist/man/curs_addstr.3x (props changed) vendor/ncurses/dist/man/curs_addwstr.3x (props changed) vendor/ncurses/dist/man/curs_attr.3x (props changed) vendor/ncurses/dist/man/curs_beep.3x (props changed) vendor/ncurses/dist/man/curs_bkgd.3x (props changed) vendor/ncurses/dist/man/curs_bkgrnd.3x (props changed) vendor/ncurses/dist/man/curs_border.3x (props changed) vendor/ncurses/dist/man/curs_border_set.3x (props changed) vendor/ncurses/dist/man/curs_clear.3x (props changed) vendor/ncurses/dist/man/curs_color.3x (props changed) vendor/ncurses/dist/man/curs_delch.3x (props changed) vendor/ncurses/dist/man/curs_deleteln.3x (props changed) vendor/ncurses/dist/man/curs_extend.3x (props changed) vendor/ncurses/dist/man/curs_get_wch.3x (props changed) vendor/ncurses/dist/man/curs_get_wstr.3x (props changed) vendor/ncurses/dist/man/curs_getcchar.3x (props changed) vendor/ncurses/dist/man/curs_getch.3x (props changed) vendor/ncurses/dist/man/curs_getstr.3x (props changed) vendor/ncurses/dist/man/curs_getyx.3x (props changed) vendor/ncurses/dist/man/curs_in_wch.3x (props changed) vendor/ncurses/dist/man/curs_in_wchstr.3x (props changed) vendor/ncurses/dist/man/curs_inch.3x (props changed) vendor/ncurses/dist/man/curs_inchstr.3x (props changed) vendor/ncurses/dist/man/curs_initscr.3x (props changed) vendor/ncurses/dist/man/curs_inopts.3x (props changed) vendor/ncurses/dist/man/curs_ins_wch.3x (props changed) vendor/ncurses/dist/man/curs_ins_wstr.3x (props changed) vendor/ncurses/dist/man/curs_insch.3x (props changed) vendor/ncurses/dist/man/curs_insstr.3x (props changed) vendor/ncurses/dist/man/curs_instr.3x (props changed) vendor/ncurses/dist/man/curs_inwstr.3x (props changed) vendor/ncurses/dist/man/curs_kernel.3x (props changed) vendor/ncurses/dist/man/curs_legacy.3x (props changed) vendor/ncurses/dist/man/curs_mouse.3x (props changed) vendor/ncurses/dist/man/curs_move.3x (props changed) vendor/ncurses/dist/man/curs_opaque.3x (props changed) vendor/ncurses/dist/man/curs_outopts.3x (props changed) vendor/ncurses/dist/man/curs_overlay.3x (props changed) vendor/ncurses/dist/man/curs_pad.3x (props changed) vendor/ncurses/dist/man/curs_print.3x (props changed) vendor/ncurses/dist/man/curs_printw.3x (props changed) vendor/ncurses/dist/man/curs_refresh.3x (props changed) vendor/ncurses/dist/man/curs_scanw.3x (props changed) vendor/ncurses/dist/man/curs_scr_dump.3x (props changed) vendor/ncurses/dist/man/curs_scroll.3x (props changed) vendor/ncurses/dist/man/curs_slk.3x (props changed) vendor/ncurses/dist/man/curs_termattrs.3x (props changed) vendor/ncurses/dist/man/curs_termcap.3x (props changed) vendor/ncurses/dist/man/curs_terminfo.3x (props changed) vendor/ncurses/dist/man/curs_threads.3x (props changed) vendor/ncurses/dist/man/curs_touch.3x (props changed) vendor/ncurses/dist/man/curs_trace.3x (props changed) vendor/ncurses/dist/man/curs_util.3x (props changed) vendor/ncurses/dist/man/curs_window.3x (props changed) vendor/ncurses/dist/man/default_colors.3x (props changed) vendor/ncurses/dist/man/define_key.3x (props changed) vendor/ncurses/dist/man/form.3x (props changed) vendor/ncurses/dist/man/form_cursor.3x (props changed) vendor/ncurses/dist/man/form_data.3x (props changed) vendor/ncurses/dist/man/form_driver.3x (props changed) vendor/ncurses/dist/man/form_field.3x (props changed) vendor/ncurses/dist/man/form_field_attributes.3x (props changed) vendor/ncurses/dist/man/form_field_buffer.3x (props changed) vendor/ncurses/dist/man/form_field_info.3x (props changed) vendor/ncurses/dist/man/form_field_just.3x (props changed) vendor/ncurses/dist/man/form_field_new.3x (props changed) vendor/ncurses/dist/man/form_field_opts.3x (props changed) vendor/ncurses/dist/man/form_field_userptr.3x (props changed) vendor/ncurses/dist/man/form_field_validation.3x (props changed) vendor/ncurses/dist/man/form_fieldtype.3x (props changed) vendor/ncurses/dist/man/form_hook.3x (props changed) vendor/ncurses/dist/man/form_new.3x (props changed) vendor/ncurses/dist/man/form_new_page.3x (props changed) vendor/ncurses/dist/man/form_opts.3x (props changed) vendor/ncurses/dist/man/form_page.3x (props changed) vendor/ncurses/dist/man/form_post.3x (props changed) vendor/ncurses/dist/man/form_requestname.3x (props changed) vendor/ncurses/dist/man/form_userptr.3x (props changed) vendor/ncurses/dist/man/form_win.3x (props changed) vendor/ncurses/dist/man/infocmp.1m (props changed) vendor/ncurses/dist/man/infotocap.1m (props changed) vendor/ncurses/dist/man/key_defined.3x (props changed) vendor/ncurses/dist/man/keybound.3x (props changed) vendor/ncurses/dist/man/keyok.3x (props changed) vendor/ncurses/dist/man/legacy_coding.3x (props changed) vendor/ncurses/dist/man/make_sed.sh (props changed) vendor/ncurses/dist/man/man_db.renames (props changed) vendor/ncurses/dist/man/manlinks.sed (props changed) vendor/ncurses/dist/man/menu.3x (props changed) vendor/ncurses/dist/man/menu_attributes.3x (props changed) vendor/ncurses/dist/man/menu_cursor.3x (props changed) vendor/ncurses/dist/man/menu_driver.3x (props changed) vendor/ncurses/dist/man/menu_format.3x (props changed) vendor/ncurses/dist/man/menu_hook.3x (props changed) vendor/ncurses/dist/man/menu_items.3x (props changed) vendor/ncurses/dist/man/menu_mark.3x (props changed) vendor/ncurses/dist/man/menu_new.3x (props changed) vendor/ncurses/dist/man/menu_opts.3x (props changed) vendor/ncurses/dist/man/menu_pattern.3x (props changed) vendor/ncurses/dist/man/menu_post.3x (props changed) vendor/ncurses/dist/man/menu_requestname.3x (props changed) vendor/ncurses/dist/man/menu_spacing.3x (props changed) vendor/ncurses/dist/man/menu_userptr.3x (props changed) vendor/ncurses/dist/man/menu_win.3x (props changed) vendor/ncurses/dist/man/mitem_current.3x (props changed) vendor/ncurses/dist/man/mitem_name.3x (props changed) vendor/ncurses/dist/man/mitem_new.3x (props changed) vendor/ncurses/dist/man/mitem_opts.3x (props changed) vendor/ncurses/dist/man/mitem_userptr.3x (props changed) vendor/ncurses/dist/man/mitem_value.3x (props changed) vendor/ncurses/dist/man/mitem_visible.3x (props changed) vendor/ncurses/dist/man/ncurses.3x (props changed) vendor/ncurses/dist/man/panel.3x (props changed) vendor/ncurses/dist/man/resizeterm.3x (props changed) vendor/ncurses/dist/man/term.5 (props changed) vendor/ncurses/dist/man/term.7 (props changed) vendor/ncurses/dist/man/terminfo.head (props changed) vendor/ncurses/dist/man/terminfo.tail (props changed) vendor/ncurses/dist/man/tic.1m (props changed) vendor/ncurses/dist/man/toe.1m (props changed) vendor/ncurses/dist/man/tput.1 (props changed) vendor/ncurses/dist/man/tset.1 (props changed) vendor/ncurses/dist/man/wresize.3x (props changed) vendor/ncurses/dist/menu/Makefile.in (props changed) vendor/ncurses/dist/menu/READ.ME (props changed) vendor/ncurses/dist/menu/eti.h (props changed) vendor/ncurses/dist/menu/headers (props changed) vendor/ncurses/dist/menu/llib-lmenu (props changed) vendor/ncurses/dist/menu/llib-lmenuw (props changed) vendor/ncurses/dist/menu/m_attribs.c (props changed) vendor/ncurses/dist/menu/m_cursor.c (props changed) vendor/ncurses/dist/menu/m_driver.c (props changed) vendor/ncurses/dist/menu/m_format.c (props changed) vendor/ncurses/dist/menu/m_global.c (props changed) vendor/ncurses/dist/menu/m_hook.c (props changed) vendor/ncurses/dist/menu/m_item_cur.c (props changed) vendor/ncurses/dist/menu/m_item_nam.c (props changed) vendor/ncurses/dist/menu/m_item_new.c (props changed) vendor/ncurses/dist/menu/m_item_opt.c (props changed) vendor/ncurses/dist/menu/m_item_top.c (props changed) vendor/ncurses/dist/menu/m_item_use.c (props changed) vendor/ncurses/dist/menu/m_item_val.c (props changed) vendor/ncurses/dist/menu/m_item_vis.c (props changed) vendor/ncurses/dist/menu/m_items.c (props changed) vendor/ncurses/dist/menu/m_new.c (props changed) vendor/ncurses/dist/menu/m_opts.c (props changed) vendor/ncurses/dist/menu/m_pad.c (props changed) vendor/ncurses/dist/menu/m_pattern.c (props changed) vendor/ncurses/dist/menu/m_post.c (props changed) vendor/ncurses/dist/menu/m_req_name.c (props changed) vendor/ncurses/dist/menu/m_scale.c (props changed) vendor/ncurses/dist/menu/m_spacing.c (props changed) vendor/ncurses/dist/menu/m_sub.c (props changed) vendor/ncurses/dist/menu/m_trace.c (props changed) vendor/ncurses/dist/menu/m_userptr.c (props changed) vendor/ncurses/dist/menu/m_win.c (props changed) vendor/ncurses/dist/menu/menu.h (props changed) vendor/ncurses/dist/menu/menu.priv.h (props changed) vendor/ncurses/dist/menu/mf_common.h (props changed) vendor/ncurses/dist/menu/modules (props changed) vendor/ncurses/dist/misc/Makefile.in (props changed) vendor/ncurses/dist/misc/chkdef.cmd (props changed) vendor/ncurses/dist/misc/cleantic.cmd (props changed) vendor/ncurses/dist/misc/cmpdef.cmd (props changed) vendor/ncurses/dist/misc/csort (props changed) vendor/ncurses/dist/misc/emx.src (props changed) vendor/ncurses/dist/misc/form.def (props changed) vendor/ncurses/dist/misc/form.ref (props changed) vendor/ncurses/dist/misc/gen_edit.sh (props changed) vendor/ncurses/dist/misc/jpf-indent (props changed) vendor/ncurses/dist/misc/makedef.cmd (props changed) vendor/ncurses/dist/misc/makellib (props changed) vendor/ncurses/dist/misc/menu.def (props changed) vendor/ncurses/dist/misc/menu.ref (props changed) vendor/ncurses/dist/misc/ncu-indent (props changed) vendor/ncurses/dist/misc/ncurses-config.in (props changed) vendor/ncurses/dist/misc/ncurses.def (props changed) vendor/ncurses/dist/misc/ncurses.ref (props changed) vendor/ncurses/dist/misc/panel.def (props changed) vendor/ncurses/dist/misc/panel.ref (props changed) vendor/ncurses/dist/misc/run_tic.in (props changed) vendor/ncurses/dist/misc/shlib (props changed) vendor/ncurses/dist/misc/tabset/std (props changed) vendor/ncurses/dist/misc/tabset/stdcrt (props changed) vendor/ncurses/dist/misc/tabset/vt100 (props changed) vendor/ncurses/dist/misc/tabset/vt300 (props changed) vendor/ncurses/dist/misc/tdlint (props changed) vendor/ncurses/dist/misc/terminfo.src (props changed) vendor/ncurses/dist/mk-0th.awk (props changed) vendor/ncurses/dist/mk-1st.awk (props changed) vendor/ncurses/dist/mk-2nd.awk (props changed) vendor/ncurses/dist/mk-hdr.awk (props changed) vendor/ncurses/dist/mkdirs.sh (props changed) vendor/ncurses/dist/ncurses/Makefile.in (props changed) vendor/ncurses/dist/ncurses/README (props changed) vendor/ncurses/dist/ncurses/README.IZ (props changed) vendor/ncurses/dist/ncurses/SigAction.h (props changed) vendor/ncurses/dist/ncurses/base/MKkeyname.awk (props changed) vendor/ncurses/dist/ncurses/base/MKlib_gen.sh (props changed) vendor/ncurses/dist/ncurses/base/MKunctrl.awk (props changed) vendor/ncurses/dist/ncurses/base/README (props changed) vendor/ncurses/dist/ncurses/base/define_key.c (props changed) vendor/ncurses/dist/ncurses/base/key_defined.c (props changed) vendor/ncurses/dist/ncurses/base/keybound.c (props changed) vendor/ncurses/dist/ncurses/base/keyok.c (props changed) vendor/ncurses/dist/ncurses/base/legacy_coding.c (props changed) vendor/ncurses/dist/ncurses/base/lib_addch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_addstr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_beep.c (props changed) vendor/ncurses/dist/ncurses/base/lib_bkgd.c (props changed) vendor/ncurses/dist/ncurses/base/lib_box.c (props changed) vendor/ncurses/dist/ncurses/base/lib_chgat.c (props changed) vendor/ncurses/dist/ncurses/base/lib_clear.c (props changed) vendor/ncurses/dist/ncurses/base/lib_clearok.c (props changed) vendor/ncurses/dist/ncurses/base/lib_clrbot.c (props changed) vendor/ncurses/dist/ncurses/base/lib_clreol.c (props changed) vendor/ncurses/dist/ncurses/base/lib_color.c (props changed) vendor/ncurses/dist/ncurses/base/lib_colorset.c (props changed) vendor/ncurses/dist/ncurses/base/lib_delch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_delwin.c (props changed) vendor/ncurses/dist/ncurses/base/lib_dft_fgbg.c (props changed) vendor/ncurses/dist/ncurses/base/lib_echo.c (props changed) vendor/ncurses/dist/ncurses/base/lib_endwin.c (props changed) vendor/ncurses/dist/ncurses/base/lib_erase.c (props changed) vendor/ncurses/dist/ncurses/base/lib_flash.c (props changed) vendor/ncurses/dist/ncurses/base/lib_freeall.c (props changed) vendor/ncurses/dist/ncurses/base/lib_getch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_getstr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_hline.c (props changed) vendor/ncurses/dist/ncurses/base/lib_immedok.c (props changed) vendor/ncurses/dist/ncurses/base/lib_inchstr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_initscr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_insch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_insdel.c (props changed) vendor/ncurses/dist/ncurses/base/lib_insnstr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_instr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_isendwin.c (props changed) vendor/ncurses/dist/ncurses/base/lib_leaveok.c (props changed) vendor/ncurses/dist/ncurses/base/lib_mouse.c (props changed) vendor/ncurses/dist/ncurses/base/lib_move.c (props changed) vendor/ncurses/dist/ncurses/base/lib_mvwin.c (props changed) vendor/ncurses/dist/ncurses/base/lib_newterm.c (props changed) vendor/ncurses/dist/ncurses/base/lib_newwin.c (props changed) vendor/ncurses/dist/ncurses/base/lib_nl.c (props changed) vendor/ncurses/dist/ncurses/base/lib_overlay.c (props changed) vendor/ncurses/dist/ncurses/base/lib_pad.c (props changed) vendor/ncurses/dist/ncurses/base/lib_printw.c (props changed) vendor/ncurses/dist/ncurses/base/lib_redrawln.c (props changed) vendor/ncurses/dist/ncurses/base/lib_refresh.c (props changed) vendor/ncurses/dist/ncurses/base/lib_restart.c (props changed) vendor/ncurses/dist/ncurses/base/lib_scanw.c (props changed) vendor/ncurses/dist/ncurses/base/lib_screen.c (props changed) vendor/ncurses/dist/ncurses/base/lib_scroll.c (props changed) vendor/ncurses/dist/ncurses/base/lib_scrollok.c (props changed) vendor/ncurses/dist/ncurses/base/lib_scrreg.c (props changed) vendor/ncurses/dist/ncurses/base/lib_set_term.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slk.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkatr_set.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkatrof.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkatron.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkatrset.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkattr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkclear.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkcolor.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkinit.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slklab.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkrefr.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slkset.c (props changed) vendor/ncurses/dist/ncurses/base/lib_slktouch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_touch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_ungetch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_vline.c (props changed) vendor/ncurses/dist/ncurses/base/lib_wattroff.c (props changed) vendor/ncurses/dist/ncurses/base/lib_wattron.c (props changed) vendor/ncurses/dist/ncurses/base/lib_winch.c (props changed) vendor/ncurses/dist/ncurses/base/lib_window.c (props changed) vendor/ncurses/dist/ncurses/base/memmove.c (props changed) vendor/ncurses/dist/ncurses/base/nc_panel.c (props changed) vendor/ncurses/dist/ncurses/base/resizeterm.c (props changed) vendor/ncurses/dist/ncurses/base/safe_sprintf.c (props changed) vendor/ncurses/dist/ncurses/base/sigaction.c (props changed) vendor/ncurses/dist/ncurses/base/tries.c (props changed) vendor/ncurses/dist/ncurses/base/use_window.c (props changed) vendor/ncurses/dist/ncurses/base/version.c (props changed) vendor/ncurses/dist/ncurses/base/vsscanf.c (props changed) vendor/ncurses/dist/ncurses/base/wresize.c (props changed) vendor/ncurses/dist/ncurses/curses.priv.h (props changed) vendor/ncurses/dist/ncurses/fifo_defs.h (props changed) vendor/ncurses/dist/ncurses/llib-lncurses (props changed) vendor/ncurses/dist/ncurses/llib-lncursest (props changed) vendor/ncurses/dist/ncurses/llib-lncursesw (props changed) vendor/ncurses/dist/ncurses/modules (props changed) vendor/ncurses/dist/ncurses/tinfo/MKcaptab.awk (props changed) vendor/ncurses/dist/ncurses/tinfo/MKcaptab.sh (props changed) vendor/ncurses/dist/ncurses/tinfo/MKcodes.awk (props changed) vendor/ncurses/dist/ncurses/tinfo/MKfallback.sh (props changed) vendor/ncurses/dist/ncurses/tinfo/MKkeys_list.sh (props changed) vendor/ncurses/dist/ncurses/tinfo/MKnames.awk (props changed) vendor/ncurses/dist/ncurses/tinfo/README (props changed) vendor/ncurses/dist/ncurses/tinfo/access.c (props changed) vendor/ncurses/dist/ncurses/tinfo/add_tries.c (props changed) vendor/ncurses/dist/ncurses/tinfo/alloc_entry.c (props changed) vendor/ncurses/dist/ncurses/tinfo/alloc_ttype.c (props changed) vendor/ncurses/dist/ncurses/tinfo/captoinfo.c (props changed) vendor/ncurses/dist/ncurses/tinfo/comp_error.c (props changed) vendor/ncurses/dist/ncurses/tinfo/comp_expand.c (props changed) vendor/ncurses/dist/ncurses/tinfo/comp_hash.c (props changed) vendor/ncurses/dist/ncurses/tinfo/comp_parse.c (props changed) vendor/ncurses/dist/ncurses/tinfo/comp_scan.c (props changed) vendor/ncurses/dist/ncurses/tinfo/db_iterator.c (props changed) vendor/ncurses/dist/ncurses/tinfo/doalloc.c (props changed) vendor/ncurses/dist/ncurses/tinfo/entries.c (props changed) vendor/ncurses/dist/ncurses/tinfo/free_ttype.c (props changed) vendor/ncurses/dist/ncurses/tinfo/getenv_num.c (props changed) vendor/ncurses/dist/ncurses/tinfo/hashed_db.c (props changed) vendor/ncurses/dist/ncurses/tinfo/home_terminfo.c (props changed) vendor/ncurses/dist/ncurses/tinfo/init_keytry.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_acs.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_baudrate.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_cur_term.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_data.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_has_cap.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_kernel.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_longname.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_napms.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_options.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_print.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_raw.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_setup.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_termcap.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_termname.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_tgoto.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_ti.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_tparm.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_tputs.c (props changed) vendor/ncurses/dist/ncurses/tinfo/lib_ttyflags.c (props changed) vendor/ncurses/dist/ncurses/tinfo/make_keys.c (props changed) vendor/ncurses/dist/ncurses/tinfo/name_match.c (props changed) vendor/ncurses/dist/ncurses/tinfo/parse_entry.c (props changed) vendor/ncurses/dist/ncurses/tinfo/read_entry.c (props changed) vendor/ncurses/dist/ncurses/tinfo/read_termcap.c (props changed) vendor/ncurses/dist/ncurses/tinfo/setbuf.c (props changed) vendor/ncurses/dist/ncurses/tinfo/strings.c (props changed) vendor/ncurses/dist/ncurses/tinfo/trim_sgr0.c (props changed) vendor/ncurses/dist/ncurses/tinfo/use_screen.c (props changed) vendor/ncurses/dist/ncurses/tinfo/write_entry.c (props changed) vendor/ncurses/dist/ncurses/trace/README (props changed) vendor/ncurses/dist/ncurses/trace/lib_trace.c (props changed) vendor/ncurses/dist/ncurses/trace/lib_traceatr.c (props changed) vendor/ncurses/dist/ncurses/trace/lib_tracebits.c (props changed) vendor/ncurses/dist/ncurses/trace/lib_tracechr.c (props changed) vendor/ncurses/dist/ncurses/trace/lib_tracedmp.c (props changed) vendor/ncurses/dist/ncurses/trace/lib_tracemse.c (props changed) vendor/ncurses/dist/ncurses/trace/trace_buf.c (props changed) vendor/ncurses/dist/ncurses/trace/trace_tries.c (props changed) vendor/ncurses/dist/ncurses/trace/trace_xnames.c (props changed) vendor/ncurses/dist/ncurses/trace/varargs.c (props changed) vendor/ncurses/dist/ncurses/trace/visbuf.c (props changed) vendor/ncurses/dist/ncurses/tty/MKexpanded.sh (props changed) vendor/ncurses/dist/ncurses/tty/hardscroll.c (props changed) vendor/ncurses/dist/ncurses/tty/hashmap.c (props changed) vendor/ncurses/dist/ncurses/tty/lib_mvcur.c (props changed) vendor/ncurses/dist/ncurses/tty/lib_tstp.c (props changed) vendor/ncurses/dist/ncurses/tty/lib_twait.c (props changed) vendor/ncurses/dist/ncurses/tty/lib_vidattr.c (props changed) vendor/ncurses/dist/ncurses/tty/tty_display.h (props changed) vendor/ncurses/dist/ncurses/tty/tty_input.h (props changed) vendor/ncurses/dist/ncurses/tty/tty_update.c (props changed) vendor/ncurses/dist/ncurses/widechar/charable.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_add_wch.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_box_set.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_cchar.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_erasewchar.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_get_wch.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_get_wstr.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_hline_set.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_in_wch.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_in_wchnstr.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_ins_wch.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_inwstr.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_key_name.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_pecho_wchar.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_slk_wset.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_unget_wch.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_vid_attr.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_vline_set.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_wacs.c (props changed) vendor/ncurses/dist/ncurses/widechar/lib_wunctrl.c (props changed) vendor/ncurses/dist/panel/Makefile.in (props changed) vendor/ncurses/dist/panel/headers (props changed) vendor/ncurses/dist/panel/llib-lpanel (props changed) vendor/ncurses/dist/panel/llib-lpanelw (props changed) vendor/ncurses/dist/panel/modules (props changed) vendor/ncurses/dist/panel/p_above.c (props changed) vendor/ncurses/dist/panel/p_below.c (props changed) vendor/ncurses/dist/panel/p_bottom.c (props changed) vendor/ncurses/dist/panel/p_delete.c (props changed) vendor/ncurses/dist/panel/p_hidden.c (props changed) vendor/ncurses/dist/panel/p_hide.c (props changed) vendor/ncurses/dist/panel/p_move.c (props changed) vendor/ncurses/dist/panel/p_new.c (props changed) vendor/ncurses/dist/panel/p_replace.c (props changed) vendor/ncurses/dist/panel/p_show.c (props changed) vendor/ncurses/dist/panel/p_top.c (props changed) vendor/ncurses/dist/panel/p_update.c (props changed) vendor/ncurses/dist/panel/p_user.c (props changed) vendor/ncurses/dist/panel/p_win.c (props changed) vendor/ncurses/dist/panel/panel.c (props changed) vendor/ncurses/dist/panel/panel.h (props changed) vendor/ncurses/dist/panel/panel.priv.h (props changed) vendor/ncurses/dist/progs/MKtermsort.sh (props changed) vendor/ncurses/dist/progs/Makefile.in (props changed) vendor/ncurses/dist/progs/capconvert (props changed) vendor/ncurses/dist/progs/clear.c (props changed) vendor/ncurses/dist/progs/clear.sh (props changed) vendor/ncurses/dist/progs/dump_entry.c (props changed) vendor/ncurses/dist/progs/dump_entry.h (props changed) vendor/ncurses/dist/progs/infocmp.c (props changed) vendor/ncurses/dist/progs/modules (props changed) vendor/ncurses/dist/progs/progs.priv.h (props changed) vendor/ncurses/dist/progs/tic.c (props changed) vendor/ncurses/dist/progs/toe.c (props changed) vendor/ncurses/dist/progs/tput.c (props changed) vendor/ncurses/dist/progs/tset.c (props changed) vendor/ncurses/dist/tar-copy.sh (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:24:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0B91065677; Sun, 9 Nov 2008 09:24:01 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71ACE8FC0A; Sun, 9 Nov 2008 09:24:01 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA99O1Wn035850; Sun, 9 Nov 2008 09:24:01 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA99O1mh035849; Sun, 9 Nov 2008 09:24:01 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811090924.mA99O1mh035849@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 09:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184788 - head/contrib/ncurses X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:24:01 -0000 Author: rafan Date: Sun Nov 9 09:24:01 2008 New Revision: 184788 URL: http://svn.freebsd.org/changeset/base/184788 Log: - Bootstrap mergeinfo Modified: head/contrib/ncurses/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 10:11:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25AD11065676; Sun, 9 Nov 2008 10:11:54 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id A241E8FC13; Sun, 9 Nov 2008 10:11:53 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2F98A.dip.t-dialin.net [217.226.249.138]) by redbull.bpaserver.net (Postfix) with ESMTP id 1DF0C2E25E; Sun, 9 Nov 2008 11:11:44 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 66CAB355EF; Sun, 9 Nov 2008 11:11:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1226225494; bh=B9FlBm49AkC7J5z4/qg5LJCe33uh/bKZn iN/c2DzLg8=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bZCIs8s97Cy8vykHCGTwjq29gAKeuvxM2LEQj/xxMgcXyw5Xssa0gL4K0VNCs1Hd9 VvOad8uXqKiWRPNpIUcVqkP5vLBUgGyDM3QeUlzXn6q2gocrfVG1N7Y09KfiHdqEEVS DoZhL3b+lNJVJJeWy+hX0IG673r+ZPXSaFL2XLbYjrKd6xcZ1WlRzWX8mL2mfMY7KY3 x6bRc9y2L4sgMixp1NUcw+OAk4HBczZFfpOp77Z0v+ejmyJJy2TP44hGiLgiTQHRaU0 TjIi/vZOnWY6Su7Y5+08vUdJTeBXBsRPAtWIkci83eDPgmr0B8QjyxIJIyEp78FNMKo vaxvSxNXQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id mA9ABYLf089965; Sun, 9 Nov 2008 11:11:34 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from 192.168.2.100 ([192.168.2.100]) by webmail.leidinger.net (Horde Framework) with HTTP; Sun, 09 Nov 2008 11:11:33 +0100 Message-ID: <20081109111133.88165rocbmwehckc@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Sun, 09 Nov 2008 11:11:33 +0100 From: Alexander Leidinger To: Maxim Sobolev References: <200811090758.mA97wNKt033972@svn.freebsd.org> In-Reply-To: <200811090758.mA97wNKt033972@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 1DF0C2E25E.6CF24 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.813, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, NO_RDNS2 0.01, RDNS_DYNAMIC 0.10, TW_SV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184781 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 10:11:54 -0000 Quoting Maxim Sobolev (from Sun, 9 Nov 2008 =20 07:58:23 +0000 (UTC)): > Author: sobomax > Date: Sun Nov 9 07:58:23 2008 > New Revision: 184781 > URL: http://svn.freebsd.org/changeset/base/184781 > > Log: > Ignore files that only differ in CVS Id tag. I would like to have (ideally automatic) replacement of files in this =20 case. Is it still possible to get the new file there with mergemaster =20 after this patch? Bye, Alexander. > MFC after:=092 weeks > > Modified: > head/usr.sbin/mergemaster/mergemaster.sh > > Modified: head/usr.sbin/mergemaster/mergemaster.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/mergemaster/mergemaster.sh=09Sun Nov 9 07:34:11 =20 > 2008=09(r184780) > +++ head/usr.sbin/mergemaster/mergemaster.sh=09Sun Nov 9 07:58:23 =20 > 2008=09(r184781) > @@ -947,6 +947,20 @@ for COMPFILE in `find . -type f -size +0 > echo " *** Temp ${COMPFILE} and installed have the same CVS =20 > Id, deleting" > rm "${COMPFILE}" > ;; > + > + *) > + tempfoo=3D`basename $0` > + TMPFILE1=3D`mktemp -t ${tempfoo}` || break > + TMPFILE2=3D`mktemp -t ${tempfoo}` || break > + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > =20 > "${TMPFILE1}" > + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" > + if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ > + /dev/null 2>&1; then > + echo " *** Temp ${COMPFILE} and installed are the same =20 > except CVS Id, deleting" > + rm "${COMPFILE}" > + fi > + rm -f "${TMPFILE1}" "${TMPFILE2}" > + ;; > esac > ;; > esac > > --=20 BOFH excuse #171: NOTICE: alloc: /dev/null: filesystem full http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 10:25:51 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B859B1065676; Sun, 9 Nov 2008 10:25:51 +0000 (UTC) Date: Sun, 9 Nov 2008 10:25:51 +0000 From: Alexey Dokuchaev To: Alexander Leidinger Message-ID: <20081109102551.GA61113@FreeBSD.org> References: <200811090758.mA97wNKt033972@svn.freebsd.org> <20081109111133.88165rocbmwehckc@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20081109111133.88165rocbmwehckc@webmail.leidinger.net> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@FreeBSD.org, Maxim Sobolev , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184781 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 10:25:51 -0000 On Sun, Nov 09, 2008 at 11:11:33AM +0100, Alexander Leidinger wrote: > Quoting Maxim Sobolev (from Sun, 9 Nov 2008 > 07:58:23 +0000 (UTC)): > > >Author: sobomax > >Date: Sun Nov 9 07:58:23 2008 > >New Revision: 184781 > >URL: http://svn.freebsd.org/changeset/base/184781 > > > >Log: > > Ignore files that only differ in CVS Id tag. > > I would like to have (ideally automatic) replacement of files in this > case. Seconded. Methinks it would be nice to have CVS Id's updated, either automagically or via interactive process, but certainly not silently ignored. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 10:45:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89ED91065672; Sun, 9 Nov 2008 10:45:14 +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 730878FC0A; Sun, 9 Nov 2008 10:45:14 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9AjE7q037337; Sun, 9 Nov 2008 10:45:14 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9AjDDq037323; Sun, 9 Nov 2008 10:45:13 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811091045.mA9AjDDq037323@svn.freebsd.org> From: Ed Schouten Date: Sun, 9 Nov 2008 10:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184789 - in head: lib/libc/amd64/sys lib/libc/arm/sys lib/libc/i386/sys lib/libc/ia64/sys lib/libc/mips/sys lib/libc/powerpc/sys lib/libc/sparc64/sys sys/amd64/linux32 sys/compat/freeb... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 10:45:14 -0000 Author: ed Date: Sun Nov 9 10:45:13 2008 New Revision: 184789 URL: http://svn.freebsd.org/changeset/base/184789 Log: Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4. Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib Modified: head/lib/libc/amd64/sys/Makefile.inc head/lib/libc/arm/sys/Makefile.inc head/lib/libc/i386/sys/Makefile.inc head/lib/libc/ia64/sys/Makefile.inc head/lib/libc/mips/sys/Makefile.inc head/lib/libc/powerpc/sys/Makefile.inc head/lib/libc/sparc64/sys/Makefile.inc head/sys/amd64/linux32/syscalls.master head/sys/compat/freebsd32/syscalls.master head/sys/compat/linux/linux_misc.c head/sys/i386/linux/syscalls.master head/sys/kern/kern_xxx.c head/sys/kern/syscalls.master head/sys/sys/priv.h Modified: head/lib/libc/amd64/sys/Makefile.inc ============================================================================== --- head/lib/libc/amd64/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/amd64/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -7,8 +7,7 @@ MDASM= vfork.S brk.S cerror.S exect.S ge reboot.S sbrk.S setlogin.S sigreturn.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/arm/sys/Makefile.inc ============================================================================== --- head/lib/libc/arm/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/arm/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -3,8 +3,7 @@ MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _exit.o _getlogin.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/i386/sys/Makefile.inc ============================================================================== --- head/lib/libc/i386/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/i386/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -12,8 +12,7 @@ MDASM= Ovfork.S brk.S cerror.S exect.S g reboot.S sbrk.S setlogin.S sigreturn.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/ia64/sys/Makefile.inc ============================================================================== --- head/lib/libc/ia64/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/ia64/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -4,8 +4,7 @@ MDASM+= Ovfork.S brk.S cerror.S exect.S sbrk.S setlogin.S sigreturn.S swapcontext.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o vfork.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/mips/sys/Makefile.inc ============================================================================== --- head/lib/libc/mips/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/mips/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -4,9 +4,8 @@ MDASM= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S ptrace.S sbrk.S shmat.S syscall.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o ftruncate.o getdomainname.o getlogin.o \ - lseek.o mmap.o openbsd_poll.o pread.o \ - pwrite.o setdomainname.o sstk.o truncate.o uname.o vfork.o yield.o +NOASM= break.o exit.o ftruncate.o getlogin.o lseek.o mmap.o \ + openbsd_poll.o pread.o pwrite.o sstk.o truncate.o vfork.o yield.o PSEUDO= _exit.o _getlogin.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/powerpc/sys/Makefile.inc ============================================================================== --- head/lib/libc/powerpc/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/powerpc/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -3,8 +3,7 @@ MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/lib/libc/sparc64/sys/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/sys/Makefile.inc Sun Nov 9 09:24:01 2008 (r184788) +++ head/lib/libc/sparc64/sys/Makefile.inc Sun Nov 9 10:45:13 2008 (r184789) @@ -18,8 +18,7 @@ CFLAGS+= -DSUN4V MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction.S # Don't generate default code for these syscalls: -NOASM= break.o exit.o getdomainname.o getlogin.o openbsd_poll.o \ - setdomainname.o sstk.o uname.o yield.o +NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o PSEUDO= _getlogin.o _exit.o .if !defined(WITHOUT_SYSCALL_COMPAT) Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/amd64/linux32/syscalls.master Sun Nov 9 10:45:13 2008 (r184789) @@ -216,7 +216,7 @@ ; linux uses some strange calling convention here so we have to use the dummy arg 120 AUE_RFORK STD { int linux_clone(l_int flags, void *stack, \ void *parent_tidptr, int dummy, void * child_tidptr); } -121 AUE_SYSCTL NOPROTO { int setdomainname(char *name, \ +121 AUE_SYSCTL STD { int linux_setdomainname(char *name, \ int len); } 122 AUE_NULL STD { int linux_newuname( \ struct l_new_utsname *buf); } Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/compat/freebsd32/syscalls.master Sun Nov 9 10:45:13 2008 (r184789) @@ -295,11 +295,9 @@ 160 AUE_LGETFH UNIMPL lgetfh 161 AUE_NFS_GETFH NOPROTO { int getfh(char *fname, \ struct fhandle *fhp); } -162 AUE_SYSCTL NOPROTO { int getdomainname(char *domainname, \ - int len); } -163 AUE_SYSCTL NOPROTO { int setdomainname(char *domainname, \ - int len); } -164 AUE_NULL NOPROTO { int uname(struct utsname *name); } +162 AUE_NULL OBSOL getdomainname +163 AUE_NULL OBSOL setdomainname +164 AUE_NULL OBSOL uname 165 AUE_SYSARCH NOPROTO { int sysarch(int op, char *parms); } 166 AUE_RTPRIO NOPROTO { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/compat/linux/linux_misc.c Sun Nov 9 10:45:13 2008 (r184789) @@ -1682,6 +1682,7 @@ int linux_sethostname(struct thread *td, struct linux_sethostname_args *args) { int name[2]; + int error; #ifdef DEBUG if (ldebug(sethostname)) @@ -1690,8 +1691,31 @@ linux_sethostname(struct thread *td, str name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, - args->len, 0, 0)); + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, + args->len, 0, 0); + mtx_unlock(&Giant); + return (error); +} + +int +linux_setdomainname(struct thread *td, struct linux_setdomainname_args *args) +{ + int name[2]; + int error; + +#ifdef DEBUG + if (ldebug(setdomainname)) + printf(ARGS(setdomainname, "*, %i"), args->len); +#endif + + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, args->name, + args->len, 0, 0); + mtx_unlock(&Giant); + return (error); } int Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/i386/linux/syscalls.master Sun Nov 9 10:45:13 2008 (r184789) @@ -217,7 +217,7 @@ ; linux uses some strange calling convention here so we have to use the dummy arg 120 AUE_RFORK STD { int linux_clone(l_int flags, void *stack, \ void *parent_tidptr, int dummy, void * child_tidptr); } -121 AUE_SYSCTL NOPROTO { int setdomainname(char *name, \ +121 AUE_SYSCTL STD { int linux_setdomainname(char *name, \ int len); } 122 AUE_NULL STD { int linux_newuname( \ struct l_new_utsname *buf); } Modified: head/sys/kern/kern_xxx.c ============================================================================== --- head/sys/kern/kern_xxx.c Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/kern/kern_xxx.c Sun Nov 9 10:45:13 2008 (r184789) @@ -148,8 +148,9 @@ oquota(td, uap) } #endif /* COMPAT_43 */ +#ifdef COMPAT_FREEBSD4 /* - * This is the FreeBSD-1.1 compatable uname(2) interface. These days it is + * This is the FreeBSD-1.1 compatible uname(2) interface. These days it is * done in libc as a wrapper around a bunch of sysctl's. This must maintain * the old 1.1 binary ABI. */ @@ -163,9 +164,7 @@ struct uname_args { #endif /* ARGSUSED */ int -uname(td, uap) - struct thread *td; - struct uname_args *uap; +freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap) { int name[2], error; size_t len; @@ -242,22 +241,20 @@ struct getdomainname_args { #endif /* ARGSUSED */ int -getdomainname(td, uap) - struct thread *td; - struct getdomainname_args *uap; +freebsd4_getdomainname(struct thread *td, + struct freebsd4_getdomainname_args *uap) { - INIT_VPROCG(TD_TO_VPROCG(td)); - char tmpdomainname[MAXHOSTNAMELEN]; - int domainnamelen; - - mtx_lock(&hostname_mtx); - bcopy(V_domainname, tmpdomainname, sizeof(tmpdomainname)); - mtx_unlock(&hostname_mtx); - - domainnamelen = strlen(tmpdomainname) + 1; - if ((u_int)uap->len > domainnamelen) - uap->len = domainnamelen; - return (copyout(tmpdomainname, uap->domainname, uap->len)); + int name[2]; + int error; + size_t len = uap->len; + + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, uap->domainname, &len, + 1, 0, 0, 0, 0); + mtx_unlock(&Giant); + return(error); } #ifndef _SYS_SYSPROTO_H_ @@ -268,26 +265,18 @@ struct setdomainname_args { #endif /* ARGSUSED */ int -setdomainname(td, uap) - struct thread *td; - struct setdomainname_args *uap; +freebsd4_setdomainname(struct thread *td, + struct freebsd4_setdomainname_args *uap) { - INIT_VPROCG(TD_TO_VPROCG(td)); - char tmpdomainname[MAXHOSTNAMELEN]; - int error, domainnamelen; - - error = priv_check(td, PRIV_SETDOMAINNAME); - if (error) - return (error); - if ((u_int)uap->len > sizeof(tmpdomainname) - 1) - return (EINVAL); - domainnamelen = uap->len; - error = copyin(uap->domainname, tmpdomainname, uap->len); - if (error == 0) { - tmpdomainname[domainnamelen] = 0; - mtx_lock(&hostname_mtx); - bcopy(tmpdomainname, V_domainname, sizeof(V_domainname)); - mtx_unlock(&hostname_mtx); - } + int name[2]; + int error; + + name[0] = CTL_KERN; + name[1] = KERN_NISDOMAINNAME; + mtx_lock(&Giant); + error = userland_sysctl(td, name, 2, 0, 0, 0, uap->domainname, + uap->len, 0, 0); + mtx_unlock(&Giant); return (error); } +#endif /* COMPAT_FREEBSD4 */ Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/kern/syscalls.master Sun Nov 9 10:45:13 2008 (r184789) @@ -320,11 +320,11 @@ struct fhandle *fhp); } 161 AUE_NFS_GETFH STD { int getfh(char *fname, \ struct fhandle *fhp); } -162 AUE_SYSCTL STD { int getdomainname(char *domainname, \ +162 AUE_SYSCTL COMPAT4 { int getdomainname(char *domainname, \ int len); } -163 AUE_SYSCTL STD { int setdomainname(char *domainname, \ +163 AUE_SYSCTL COMPAT4 { int setdomainname(char *domainname, \ int len); } -164 AUE_NULL STD { int uname(struct utsname *name); } +164 AUE_NULL COMPAT4 { int uname(struct utsname *name); } 165 AUE_SYSARCH STD { int sysarch(int op, char *parms); } 166 AUE_RTPRIO STD { int rtprio(int function, pid_t pid, \ struct rtprio *rtp); } Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Sun Nov 9 09:24:01 2008 (r184788) +++ head/sys/sys/priv.h Sun Nov 9 10:45:13 2008 (r184789) @@ -84,7 +84,6 @@ #define PRIV_CLOCK_SETTIME 17 /* Can call clock_settime. */ #define PRIV_SETTIMEOFDAY 18 /* Can call settimeofday. */ #define PRIV_SETHOSTID 19 /* Can call sethostid. */ -#define PRIV_SETDOMAINNAME 20 /* Can call setdomainname. */ /* * Audit subsystem privileges. From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 10:48:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52DA0106564A; Sun, 9 Nov 2008 10:48:07 +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 3E2ED8FC17; Sun, 9 Nov 2008 10:48:07 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9Am7a9039472; Sun, 9 Nov 2008 10:48:07 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9Am6ss039456; Sun, 9 Nov 2008 10:48:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811091048.mA9Am6ss039456@svn.freebsd.org> From: Ed Schouten Date: Sun, 9 Nov 2008 10:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184790 - in head/sys: amd64/linux32 compat/freebsd32 i386/linux kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 10:48:07 -0000 Author: ed Date: Sun Nov 9 10:48:06 2008 New Revision: 184790 URL: http://svn.freebsd.org/changeset/base/184790 Log: Regenerate system call tables for r184789. Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_sysent.c head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/amd64/linux32/linux32_proto.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #ifndef _LINUX_SYSPROTO_H_ @@ -378,6 +378,10 @@ struct linux_clone_args { char dummy_l_[PADL_(int)]; int dummy; char dummy_r_[PADR_(int)]; char child_tidptr_l_[PADL_(void *)]; void * child_tidptr; char child_tidptr_r_[PADR_(void *)]; }; +struct linux_setdomainname_args { + char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; struct linux_newuname_args { char buf_l_[PADL_(struct l_new_utsname *)]; struct l_new_utsname * buf; char buf_r_[PADR_(struct l_new_utsname *)]; }; @@ -1077,6 +1081,7 @@ int linux_sysinfo(struct thread *, struc int linux_ipc(struct thread *, struct linux_ipc_args *); int linux_sigreturn(struct thread *, struct linux_sigreturn_args *); int linux_clone(struct thread *, struct linux_clone_args *); +int linux_setdomainname(struct thread *, struct linux_setdomainname_args *); int linux_newuname(struct thread *, struct linux_newuname_args *); int linux_adjtimex(struct thread *, struct linux_adjtimex_args *); int linux_mprotect(struct thread *, struct linux_mprotect_args *); @@ -1339,6 +1344,7 @@ int linux_vmsplice(struct thread *, stru #define LINUX_SYS_AUE_linux_ipc AUE_NULL #define LINUX_SYS_AUE_linux_sigreturn AUE_SIGRETURN #define LINUX_SYS_AUE_linux_clone AUE_RFORK +#define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL #define LINUX_SYS_AUE_linux_newuname AUE_NULL #define LINUX_SYS_AUE_linux_adjtimex AUE_ADJTIME #define LINUX_SYS_AUE_linux_mprotect AUE_MPROTECT Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/amd64/linux32/linux32_syscall.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #define LINUX_SYS_exit 1 @@ -112,7 +112,7 @@ #define LINUX_SYS_fsync 118 #define LINUX_SYS_linux_sigreturn 119 #define LINUX_SYS_linux_clone 120 -#define LINUX_SYS_setdomainname 121 +#define LINUX_SYS_linux_setdomainname 121 #define LINUX_SYS_linux_newuname 122 #define LINUX_SYS_linux_adjtimex 124 #define LINUX_SYS_linux_mprotect 125 Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/amd64/linux32/linux32_sysent.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.34 2008/05/13 20:01:26 rdivacky Exp + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #include "opt_compat.h" @@ -140,7 +140,7 @@ struct sysent linux_sysent[] = { { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0 }, /* 118 = fsync */ { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 119 = linux_sigreturn */ { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0 }, /* 120 = linux_clone */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = setdomainname */ + { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = linux_setdomainname */ { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0 }, /* 122 = linux_newuname */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 123 = modify_ldt */ { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0 }, /* 124 = linux_adjtimex */ Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #define FREEBSD32_SYS_syscall 0 @@ -156,9 +156,9 @@ #define FREEBSD32_SYS_freebsd4_freebsd32_statfs 157 #define FREEBSD32_SYS_freebsd4_freebsd32_fstatfs 158 #define FREEBSD32_SYS_getfh 161 -#define FREEBSD32_SYS_getdomainname 162 -#define FREEBSD32_SYS_setdomainname 163 -#define FREEBSD32_SYS_uname 164 + /* 162 is obsolete getdomainname */ + /* 163 is obsolete setdomainname */ + /* 164 is obsolete uname */ #define FREEBSD32_SYS_sysarch 165 #define FREEBSD32_SYS_rtprio 166 #define FREEBSD32_SYS_freebsd32_semsys 169 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ const char *freebsd32_syscallnames[] = { @@ -169,9 +169,9 @@ const char *freebsd32_syscallnames[] = { "#159", /* 159 = nosys */ "#160", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ - "getdomainname", /* 162 = getdomainname */ - "setdomainname", /* 163 = setdomainname */ - "uname", /* 164 = uname */ + "obs_getdomainname", /* 162 = obsolete getdomainname */ + "obs_setdomainname", /* 163 = obsolete setdomainname */ + "obs_uname", /* 164 = obsolete uname */ "sysarch", /* 165 = sysarch */ "rtprio", /* 166 = rtprio */ "#167", /* 167 = nosys */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #include "opt_compat.h" @@ -200,9 +200,9 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ - { AS(getdomainname_args), (sy_call_t *)getdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 162 = getdomainname */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 163 = setdomainname */ - { AS(uname_args), (sy_call_t *)uname, AUE_NULL, NULL, 0, 0 }, /* 164 = uname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 162 = obsolete getdomainname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 163 = obsolete setdomainname */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 164 = obsolete uname */ { AS(sysarch_args), (sy_call_t *)sysarch, AUE_SYSARCH, NULL, 0, 0 }, /* 165 = sysarch */ { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 167 = nosys */ Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/i386/linux/linux_proto.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #ifndef _LINUX_SYSPROTO_H_ @@ -381,6 +381,10 @@ struct linux_clone_args { char dummy_l_[PADL_(int)]; int dummy; char dummy_r_[PADR_(int)]; char child_tidptr_l_[PADL_(void *)]; void * child_tidptr; char child_tidptr_r_[PADR_(void *)]; }; +struct linux_setdomainname_args { + char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; struct linux_newuname_args { char buf_l_[PADL_(struct l_new_utsname *)]; struct l_new_utsname * buf; char buf_r_[PADR_(struct l_new_utsname *)]; }; @@ -1097,6 +1101,7 @@ int linux_sysinfo(struct thread *, struc int linux_ipc(struct thread *, struct linux_ipc_args *); int linux_sigreturn(struct thread *, struct linux_sigreturn_args *); int linux_clone(struct thread *, struct linux_clone_args *); +int linux_setdomainname(struct thread *, struct linux_setdomainname_args *); int linux_newuname(struct thread *, struct linux_newuname_args *); int linux_modify_ldt(struct thread *, struct linux_modify_ldt_args *); int linux_adjtimex(struct thread *, struct linux_adjtimex_args *); @@ -1360,6 +1365,7 @@ int linux_vmsplice(struct thread *, stru #define LINUX_SYS_AUE_linux_ipc AUE_NULL #define LINUX_SYS_AUE_linux_sigreturn AUE_SIGRETURN #define LINUX_SYS_AUE_linux_clone AUE_RFORK +#define LINUX_SYS_AUE_linux_setdomainname AUE_SYSCTL #define LINUX_SYS_AUE_linux_newuname AUE_NULL #define LINUX_SYS_AUE_linux_modify_ldt AUE_NULL #define LINUX_SYS_AUE_linux_adjtimex AUE_ADJTIME Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/i386/linux/linux_syscall.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #define LINUX_SYS_exit 1 @@ -116,7 +116,7 @@ #define LINUX_SYS_fsync 118 #define LINUX_SYS_linux_sigreturn 119 #define LINUX_SYS_linux_clone 120 -#define LINUX_SYS_setdomainname 121 +#define LINUX_SYS_linux_setdomainname 121 #define LINUX_SYS_linux_newuname 122 #define LINUX_SYS_linux_modify_ldt 123 #define LINUX_SYS_linux_adjtimex 124 Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/i386/linux/linux_sysent.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.93 2008/05/13 20:01:27 rdivacky Exp + * created from FreeBSD: head/sys/i386/linux/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #include @@ -139,7 +139,7 @@ struct sysent linux_sysent[] = { { AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC, NULL, 0, 0 }, /* 118 = fsync */ { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 119 = linux_sigreturn */ { AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK, NULL, 0, 0 }, /* 120 = linux_clone */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = setdomainname */ + { AS(linux_setdomainname_args), (sy_call_t *)linux_setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 121 = linux_setdomainname */ { AS(linux_newuname_args), (sy_call_t *)linux_newuname, AUE_NULL, NULL, 0, 0 }, /* 122 = linux_newuname */ { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt, AUE_NULL, NULL, 0, 0 }, /* 123 = linux_modify_ldt */ { 0, (sy_call_t *)linux_adjtimex, AUE_ADJTIME, NULL, 0, 0 }, /* 124 = linux_adjtimex */ Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/kern/init_sysent.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/kern/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #include "opt_compat.h" @@ -190,9 +190,9 @@ struct sysent sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 159 = nosys */ { AS(lgetfh_args), (sy_call_t *)lgetfh, AUE_LGETFH, NULL, 0, 0 }, /* 160 = lgetfh */ { AS(getfh_args), (sy_call_t *)getfh, AUE_NFS_GETFH, NULL, 0, 0 }, /* 161 = getfh */ - { AS(getdomainname_args), (sy_call_t *)getdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 162 = getdomainname */ - { AS(setdomainname_args), (sy_call_t *)setdomainname, AUE_SYSCTL, NULL, 0, 0 }, /* 163 = setdomainname */ - { AS(uname_args), (sy_call_t *)uname, AUE_NULL, NULL, 0, 0 }, /* 164 = uname */ + { compat4(AS(freebsd4_getdomainname_args),getdomainname), AUE_SYSCTL, NULL, 0, 0 }, /* 162 = old getdomainname */ + { compat4(AS(freebsd4_setdomainname_args),setdomainname), AUE_SYSCTL, NULL, 0, 0 }, /* 163 = old setdomainname */ + { compat4(AS(freebsd4_uname_args),uname), AUE_NULL, NULL, 0, 0 }, /* 164 = old uname */ { AS(sysarch_args), (sy_call_t *)sysarch, AUE_SYSARCH, NULL, 0, 0 }, /* 165 = sysarch */ { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 167 = nosys */ Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/kern/syscalls.c Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/kern/syscalls.master 184789 2008-11-09 10:45:13Z ed */ const char *syscallnames[] = { @@ -169,9 +169,9 @@ const char *syscallnames[] = { "#159", /* 159 = nosys */ "lgetfh", /* 160 = lgetfh */ "getfh", /* 161 = getfh */ - "getdomainname", /* 162 = getdomainname */ - "setdomainname", /* 163 = setdomainname */ - "uname", /* 164 = uname */ + "compat4.getdomainname", /* 162 = old getdomainname */ + "compat4.setdomainname", /* 163 = old setdomainname */ + "compat4.uname", /* 164 = old uname */ "sysarch", /* 165 = sysarch */ "rtprio", /* 166 = rtprio */ "#167", /* 167 = nosys */ Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/kern/systrace_args.c Sun Nov 9 10:48:06 2008 (r184790) @@ -864,29 +864,6 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* getdomainname */ - case 162: { - struct getdomainname_args *p = params; - uarg[0] = (intptr_t) p->domainname; /* char * */ - iarg[1] = p->len; /* int */ - *n_args = 2; - break; - } - /* setdomainname */ - case 163: { - struct setdomainname_args *p = params; - uarg[0] = (intptr_t) p->domainname; /* char * */ - iarg[1] = p->len; /* int */ - *n_args = 2; - break; - } - /* uname */ - case 164: { - struct uname_args *p = params; - uarg[0] = (intptr_t) p->name; /* struct utsname * */ - *n_args = 1; - break; - } /* sysarch */ case 165: { struct sysarch_args *p = params; @@ -4441,42 +4418,6 @@ systrace_setargdesc(int sysnum, int ndx, break; }; break; - /* getdomainname */ - case 162: - switch(ndx) { - case 0: - p = "char *"; - break; - case 1: - p = "int"; - break; - default: - break; - }; - break; - /* setdomainname */ - case 163: - switch(ndx) { - case 0: - p = "char *"; - break; - case 1: - p = "int"; - break; - default: - break; - }; - break; - /* uname */ - case 164: - switch(ndx) { - case 0: - p = "struct utsname *"; - break; - default: - break; - }; - break; /* sysarch */ case 165: switch(ndx) { Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/sys/syscall.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/kern/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #define SYS_syscall 0 @@ -161,9 +161,9 @@ #define SYS_freebsd4_fstatfs 158 #define SYS_lgetfh 160 #define SYS_getfh 161 -#define SYS_getdomainname 162 -#define SYS_setdomainname 163 -#define SYS_uname 164 +#define SYS_freebsd4_getdomainname 162 +#define SYS_freebsd4_setdomainname 163 +#define SYS_freebsd4_uname 164 #define SYS_sysarch 165 #define SYS_rtprio 166 #define SYS_semsys 169 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/sys/syscall.mk Sun Nov 9 10:48:06 2008 (r184790) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 184588 2008-11-03 10:38:00Z dfr +# created from FreeBSD: head/sys/kern/syscalls.master 184789 2008-11-09 10:45:13Z ed MIASM = \ syscall.o \ exit.o \ @@ -113,9 +113,9 @@ MIASM = \ freebsd4_fstatfs.o \ lgetfh.o \ getfh.o \ - getdomainname.o \ - setdomainname.o \ - uname.o \ + freebsd4_getdomainname.o \ + freebsd4_setdomainname.o \ + freebsd4_uname.o \ sysarch.o \ rtprio.o \ semsys.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Sun Nov 9 10:45:13 2008 (r184789) +++ head/sys/sys/sysproto.h Sun Nov 9 10:48:06 2008 (r184790) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 184588 2008-11-03 10:38:00Z dfr + * created from FreeBSD: head/sys/kern/syscalls.master 184789 2008-11-09 10:45:13Z ed */ #ifndef _SYS_SYSPROTO_H_ @@ -500,17 +500,6 @@ struct getfh_args { char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; }; -struct getdomainname_args { - char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; - char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; -}; -struct setdomainname_args { - char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; - char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; -}; -struct uname_args { - char name_l_[PADL_(struct utsname *)]; struct utsname * name; char name_r_[PADR_(struct utsname *)]; -}; struct sysarch_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char parms_l_[PADL_(char *)]; char * parms; char parms_r_[PADR_(char *)]; @@ -1743,9 +1732,6 @@ int nlm_syscall(struct thread *, struct int nfssvc(struct thread *, struct nfssvc_args *); int lgetfh(struct thread *, struct lgetfh_args *); int getfh(struct thread *, struct getfh_args *); -int getdomainname(struct thread *, struct getdomainname_args *); -int setdomainname(struct thread *, struct setdomainname_args *); -int uname(struct thread *, struct uname_args *); int sysarch(struct thread *, struct sysarch_args *); int rtprio(struct thread *, struct rtprio_args *); int semsys(struct thread *, struct semsys_args *); @@ -2181,6 +2167,17 @@ struct freebsd4_fstatfs_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; }; +struct freebsd4_getdomainname_args { + char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; +struct freebsd4_setdomainname_args { + char domainname_l_[PADL_(char *)]; char * domainname; char domainname_r_[PADR_(char *)]; + char len_l_[PADL_(int)]; int len; char len_r_[PADR_(int)]; +}; +struct freebsd4_uname_args { + char name_l_[PADL_(struct utsname *)]; struct utsname * name; char name_r_[PADR_(struct utsname *)]; +}; struct freebsd4_fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; @@ -2205,6 +2202,9 @@ struct freebsd4_sigreturn_args { int freebsd4_getfsstat(struct thread *, struct freebsd4_getfsstat_args *); int freebsd4_statfs(struct thread *, struct freebsd4_statfs_args *); int freebsd4_fstatfs(struct thread *, struct freebsd4_fstatfs_args *); +int freebsd4_getdomainname(struct thread *, struct freebsd4_getdomainname_args *); +int freebsd4_setdomainname(struct thread *, struct freebsd4_setdomainname_args *); +int freebsd4_uname(struct thread *, struct freebsd4_uname_args *); int freebsd4_fhstatfs(struct thread *, struct freebsd4_fhstatfs_args *); int freebsd4_sendfile(struct thread *, struct freebsd4_sendfile_args *); int freebsd4_sigaction(struct thread *, struct freebsd4_sigaction_args *); @@ -2325,9 +2325,6 @@ int freebsd4_sigreturn(struct thread *, #define SYS_AUE_nfssvc AUE_NFS_SVC #define SYS_AUE_lgetfh AUE_LGETFH #define SYS_AUE_getfh AUE_NFS_GETFH -#define SYS_AUE_getdomainname AUE_SYSCTL -#define SYS_AUE_setdomainname AUE_SYSCTL -#define SYS_AUE_uname AUE_NULL #define SYS_AUE_sysarch AUE_SYSARCH #define SYS_AUE_rtprio AUE_RTPRIO #define SYS_AUE_semsys AUE_SEMSYS From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 09:34:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1814106567C for ; Sun, 9 Nov 2008 09:34:35 +0000 (UTC) (envelope-from rionda@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by mx1.freebsd.org (Postfix) with ESMTP id B11EF8FC1A for ; Sun, 9 Nov 2008 09:34:35 +0000 (UTC) (envelope-from rionda@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1851936rvf.43 for ; Sun, 09 Nov 2008 01:34:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=m6bDywjpCIaZ144QcIX+FJAMt/EgoB4F5Yl4hfCcP4g=; b=UOoLrHca5qago8S2Hfn0iuNRELr52y7Lo0F0kOYGTDJott3L8cYP659wX78q3IzIx+ q31J+o5P8rzJHWat3RP38/8cNceFuvBMV260rj7CmiqRWZNHQlHdlgU2kMuwLXnS2B2O tqe+o1WhjpuevLKPf2SViD+BoI0NVMAX6qXoU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=w3h1KY1MDJr/K2QmVVc0wN1aYzGPusdqtofC/DE/H07w/ZCCaClOaJ7kItuqinuZ1a x6phPHDOdComDsJ59Prdsfj+saVyi1ArR8Ry2zbQiFBJ0ZZVI7SKcZxsCtt6qr5EubSB hIpTyt3Xu7tJPI65nq6X/YnF/w0SiUSopuCCM= Received: by 10.141.153.17 with SMTP id f17mr2861060rvo.99.1226221635680; Sun, 09 Nov 2008 01:07:15 -0800 (PST) Received: by 10.141.195.9 with HTTP; Sun, 9 Nov 2008 01:07:15 -0800 (PST) Message-ID: Date: Sun, 9 Nov 2008 04:07:15 -0500 From: "Matteo Riondato" Sender: rionda@gmail.com To: "Alexey Dokuchaev" In-Reply-To: <20081109084817.GA23323@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200811090734.mA97YBld033553@svn.freebsd.org> <20081109084817.GA23323@FreeBSD.org> X-Google-Sender-Auth: 2215ecc7819451a8 X-Mailman-Approved-At: Sun, 09 Nov 2008 12:19:46 +0000 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184780 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 09:34:36 -0000 On Sun, Nov 9, 2008 at 3:48 AM, Alexey Dokuchaev wrote: > On Sun, Nov 09, 2008 at 07:34:11AM +0000, Matteo Riondato wrote: >> >> +void >> +static remove_tmp(int sig) >> +{ >> + if (tmp_path) { >> + unlink(tmp_path); >> + } >> + exit(ERROR_EXIT); >> +} > > This looks weird: `static' should be on same line as `void' as `static > void' (so ^remove_tmp would match). It will also always exit with > ERROR_EXIT, which does not look right, does it? Sure. I reverted the file back to the previous revision. I got other comments which suggest I should work on a better version of the patch. I'll do it later today... Sorry for the noise. Best regards -- Matteo Riondato FreeBSD Committer (http://www.freebsd.org) G.U.F.I. Staff Member (http://www.gufi.org) FreeSBIE Developer (http://www.freesbie.org) From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 13:20:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9A7D106564A; Sun, 9 Nov 2008 13:20:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 649E28FC08; Sun, 9 Nov 2008 13:20:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KzADO-000N4G-FL; Sun, 09 Nov 2008 15:20:30 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mA9DKRXC049500 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Nov 2008 15:20:28 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mA9DKR1E072063; Sun, 9 Nov 2008 15:20:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mA9DKRim072061; Sun, 9 Nov 2008 15:20:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 9 Nov 2008 15:20:26 +0200 From: Kostik Belousov To: Matteo Riondato Message-ID: <20081109132026.GL18100@deviant.kiev.zoral.com.ua> References: <200811090644.mA96ira1032670@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EyugWz6C5819Q3pC" Content-Disposition: inline In-Reply-To: <200811090644.mA96ira1032670@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KzADO-000N4G-FL 5b74bafc673dcc8b9e2e65ee58c8fae9 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184779 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 13:20:32 -0000 --EyugWz6C5819Q3pC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 09, 2008 at 06:44:53AM +0000, Matteo Riondato wrote: > Author: matteo > Date: Sun Nov 9 06:44:53 2008 > New Revision: 184779 > URL: http://svn.freebsd.org/changeset/base/184779 >=20 > Log: > Be paranoid and use snprintf > =20 > PR: bin/122137 > Submitted by: Steven Kreuzer > MFC after: 3 days >=20 > Modified: > head/usr.sbin/cron/crontab/crontab.c >=20 > Modified: head/usr.sbin/cron/crontab/crontab.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 01:53:06 2008 (r18477= 8) > +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 06:44:53 2008 (r18477= 9) > @@ -263,7 +263,7 @@ list_cmd() { > FILE *f; > =20 > log_it(RealUser, Pid, "LIST", User); > - (void) sprintf(n, CRON_TAB(User)); > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); This note is probably also about paranoia instead of exploitable bug. I think that it is better to use %s format explicitely instead of expecting no '%' in the CRON_TAB(User). > if (!(f =3D fopen(n, "r"))) { > if (errno =3D=3D ENOENT) > errx(ERROR_EXIT, "no crontab for %s", User); > @@ -293,7 +293,7 @@ delete_cmd() { > } > =20 > log_it(RealUser, Pid, "DELETE", User); > - (void) sprintf(n, CRON_TAB(User)); > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); > if (unlink(n)) { > if (errno =3D=3D ENOENT) > errx(ERROR_EXIT, "no crontab for %s", User); > @@ -327,7 +327,7 @@ edit_cmd() { > char new_md5[MD5_SIZE]; > =20 > log_it(RealUser, Pid, "BEGIN EDIT", User); > - (void) sprintf(n, CRON_TAB(User)); > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); > if (!(f =3D fopen(n, "r"))) { > if (errno !=3D ENOENT) > err(ERROR_EXIT, "%s", n); > @@ -337,7 +337,7 @@ edit_cmd() { > } > =20 > um =3D umask(077); > - (void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX"); > + (void) snprintf(Filename, sizeof(Filename), "/tmp/crontab.XXXXXXXXXX"); > if ((t =3D mkstemp(Filename)) =3D=3D -1) { > warn("%s", Filename); > (void) umask(um); > @@ -504,8 +504,8 @@ replace_cmd() { > return (-2); > } > =20 > - (void) sprintf(n, "tmp.%d", Pid); > - (void) sprintf(tn, CRON_TAB(n)); > + (void) snprintf(n, sizeof(n), "tmp.%d", Pid); > + (void) snprintf(tn, sizeof(n), CRON_TAB(n)); > if (!(tmp =3D fopen(tn, "w+"))) { > warn("%s", tn); > return (-2); > @@ -592,7 +592,7 @@ replace_cmd() { > return (-2); > } > =20 > - (void) sprintf(n, CRON_TAB(User)); > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); > if (rename(tn, n)) { > warn("error renaming %s to %s", tn, n); > unlink(tn); --EyugWz6C5819Q3pC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkW45oACgkQC3+MBN1Mb4gfYQCg5TMAnQ+cJEhlagqffYeSSLn9 qyMAn1eJYaBBWg8z9rIKQqOkyk0sxfBk =XRk+ -----END PGP SIGNATURE----- --EyugWz6C5819Q3pC-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 13:58:15 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8B6106568B; Sun, 9 Nov 2008 13:58:15 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 539108FC0A; Sun, 9 Nov 2008 13:58:15 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (c-68-83-213-214.hsd1.va.comcast.net [68.83.213.214]) (authenticated bits=0) by pittgoth.com (8.14.2/8.14.2) with ESMTP id mA9DK06m062929 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 9 Nov 2008 08:20:01 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Sun, 9 Nov 2008 08:19:58 -0500 From: Tom Rhodes To: Alexey Dokuchaev Message-Id: <20081109081958.140b26f7.trhodes@FreeBSD.org> In-Reply-To: <20081109102551.GA61113@FreeBSD.org> References: <200811090758.mA97wNKt033972@svn.freebsd.org> <20081109111133.88165rocbmwehckc@webmail.leidinger.net> <20081109102551.GA61113@FreeBSD.org> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Alexander@Leidinger.net, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, sobomax@FreeBSD.org Subject: Re: svn commit: r184781 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 13:58:15 -0000 On Sun, 9 Nov 2008 10:25:51 +0000 Alexey Dokuchaev wrote: > On Sun, Nov 09, 2008 at 11:11:33AM +0100, Alexander Leidinger wrote: > > Quoting Maxim Sobolev (from Sun, 9 Nov 2008 > > 07:58:23 +0000 (UTC)): > > > > >Author: sobomax > > >Date: Sun Nov 9 07:58:23 2008 > > >New Revision: 184781 > > >URL: http://svn.freebsd.org/changeset/base/184781 > > > > > >Log: > > > Ignore files that only differ in CVS Id tag. > > > > I would like to have (ideally automatic) replacement of files in this > > case. > > Seconded. Methinks it would be nice to have CVS Id's updated, either > automagically or via interactive process, but certainly not silently > ignored. > > ./danfe > Doesn't "mergemaster -Ui" just do that? And yes, I agree, ignoring files this way is probably a bad idea. -- Tom Rhodes From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 14:06:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1B6A1065700; Sun, 9 Nov 2008 14:06:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4EF8FC14; Sun, 9 Nov 2008 14:06:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E6jFO043118; Sun, 9 Nov 2008 14:06:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E6jBe043116; Sun, 9 Nov 2008 14:06:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811091406.mA9E6jBe043116@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 9 Nov 2008 14:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184797 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:06:45 -0000 Author: bz Date: Sun Nov 9 14:06:44 2008 New Revision: 184797 URL: http://svn.freebsd.org/changeset/base/184797 Log: For consistency work on the local object passed into the function for the lock operation instead using the global name. Submitted by: ganbold MFC after: 2 months Modified: head/sys/netinet/ip_fw2.c Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Sun Nov 9 14:06:17 2008 (r184796) +++ head/sys/netinet/ip_fw2.c Sun Nov 9 14:06:44 2008 (r184797) @@ -1803,14 +1803,14 @@ add_table_entry(struct ip_fw_chain *ch, ent->addr.sin_len = ent->mask.sin_len = 8; ent->mask.sin_addr.s_addr = htonl(mlen ? ~((1 << (32 - mlen)) - 1) : 0); ent->addr.sin_addr.s_addr = addr & ent->mask.sin_addr.s_addr; - IPFW_WLOCK(&V_layer3_chain); + IPFW_WLOCK(ch); if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent) == NULL) { - IPFW_WUNLOCK(&V_layer3_chain); + IPFW_WUNLOCK(ch); free(ent, M_IPFW_TBL); return (EEXIST); } - IPFW_WUNLOCK(&V_layer3_chain); + IPFW_WUNLOCK(ch); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 14:08:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D80D5106564A; Sun, 9 Nov 2008 14:08:54 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF3608FC14; Sun, 9 Nov 2008 14:08:54 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9E8s3Y043197; Sun, 9 Nov 2008 14:08:54 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9E8sLW043192; Sun, 9 Nov 2008 14:08:54 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091408.mA9E8sLW043192@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:08:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184798 - in vendor/ncurses/dist: . doc/html form include man menu misc ncurses ncurses/base ncurses/tinfo ncurses/trace ncurses/tty ncurses/widechar panel progs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:08:55 -0000 Author: rafan Date: Sun Nov 9 14:08:54 2008 New Revision: 184798 URL: http://svn.freebsd.org/changeset/base/184798 Log: - Import ncurses 5.7-20081102 (5.7 release) onto vendor branch Added: vendor/ncurses/dist/man/curs_memleaks.3x vendor/ncurses/dist/misc/ncurses.supp Modified: vendor/ncurses/dist/ANNOUNCE vendor/ncurses/dist/INSTALL vendor/ncurses/dist/MANIFEST vendor/ncurses/dist/NEWS vendor/ncurses/dist/TO-DO vendor/ncurses/dist/aclocal.m4 vendor/ncurses/dist/announce.html.in vendor/ncurses/dist/config.guess vendor/ncurses/dist/config.sub vendor/ncurses/dist/configure vendor/ncurses/dist/configure.in vendor/ncurses/dist/dist.mk vendor/ncurses/dist/doc/html/announce.html vendor/ncurses/dist/form/form.priv.h vendor/ncurses/dist/form/frm_def.c vendor/ncurses/dist/form/frm_driver.c vendor/ncurses/dist/form/frm_req_name.c vendor/ncurses/dist/include/MKterm.h.awk.in vendor/ncurses/dist/include/capdefaults.c vendor/ncurses/dist/include/curses.h.in vendor/ncurses/dist/include/curses.tail vendor/ncurses/dist/include/nc_alloc.h vendor/ncurses/dist/include/nc_panel.h vendor/ncurses/dist/include/ncurses_defs vendor/ncurses/dist/include/term_entry.h vendor/ncurses/dist/man/curs_getcchar.3x vendor/ncurses/dist/man/curs_terminfo.3x vendor/ncurses/dist/man/curs_util.3x vendor/ncurses/dist/man/form.3x vendor/ncurses/dist/man/form_driver.3x vendor/ncurses/dist/man/form_field_buffer.3x vendor/ncurses/dist/man/man_db.renames vendor/ncurses/dist/man/menu_attributes.3x vendor/ncurses/dist/man/menu_driver.3x vendor/ncurses/dist/man/menu_pattern.3x vendor/ncurses/dist/man/ncurses.3x vendor/ncurses/dist/menu/m_driver.c vendor/ncurses/dist/menu/m_req_name.c vendor/ncurses/dist/misc/ncu-indent vendor/ncurses/dist/misc/terminfo.src vendor/ncurses/dist/ncurses/Makefile.in vendor/ncurses/dist/ncurses/base/MKkeyname.awk vendor/ncurses/dist/ncurses/base/MKlib_gen.sh vendor/ncurses/dist/ncurses/base/MKunctrl.awk vendor/ncurses/dist/ncurses/base/lib_addch.c vendor/ncurses/dist/ncurses/base/lib_delwin.c vendor/ncurses/dist/ncurses/base/lib_freeall.c vendor/ncurses/dist/ncurses/base/lib_getch.c vendor/ncurses/dist/ncurses/base/lib_getstr.c vendor/ncurses/dist/ncurses/base/lib_initscr.c vendor/ncurses/dist/ncurses/base/lib_mouse.c vendor/ncurses/dist/ncurses/base/lib_newterm.c vendor/ncurses/dist/ncurses/base/lib_newwin.c vendor/ncurses/dist/ncurses/base/lib_overlay.c vendor/ncurses/dist/ncurses/base/lib_restart.c vendor/ncurses/dist/ncurses/base/lib_screen.c vendor/ncurses/dist/ncurses/base/lib_set_term.c vendor/ncurses/dist/ncurses/base/lib_slk.c vendor/ncurses/dist/ncurses/base/lib_slkrefr.c vendor/ncurses/dist/ncurses/base/lib_ungetch.c vendor/ncurses/dist/ncurses/base/lib_window.c vendor/ncurses/dist/ncurses/base/resizeterm.c vendor/ncurses/dist/ncurses/base/tries.c vendor/ncurses/dist/ncurses/base/use_window.c vendor/ncurses/dist/ncurses/base/wresize.c vendor/ncurses/dist/ncurses/curses.priv.h vendor/ncurses/dist/ncurses/fifo_defs.h vendor/ncurses/dist/ncurses/llib-lncurses vendor/ncurses/dist/ncurses/llib-lncursest vendor/ncurses/dist/ncurses/llib-lncursesw vendor/ncurses/dist/ncurses/tinfo/MKcodes.awk vendor/ncurses/dist/ncurses/tinfo/MKnames.awk vendor/ncurses/dist/ncurses/tinfo/alloc_entry.c vendor/ncurses/dist/ncurses/tinfo/alloc_ttype.c vendor/ncurses/dist/ncurses/tinfo/captoinfo.c vendor/ncurses/dist/ncurses/tinfo/comp_expand.c vendor/ncurses/dist/ncurses/tinfo/comp_hash.c vendor/ncurses/dist/ncurses/tinfo/comp_parse.c vendor/ncurses/dist/ncurses/tinfo/comp_scan.c vendor/ncurses/dist/ncurses/tinfo/entries.c vendor/ncurses/dist/ncurses/tinfo/home_terminfo.c vendor/ncurses/dist/ncurses/tinfo/init_keytry.c vendor/ncurses/dist/ncurses/tinfo/lib_acs.c vendor/ncurses/dist/ncurses/tinfo/lib_baudrate.c vendor/ncurses/dist/ncurses/tinfo/lib_cur_term.c vendor/ncurses/dist/ncurses/tinfo/lib_data.c vendor/ncurses/dist/ncurses/tinfo/lib_options.c vendor/ncurses/dist/ncurses/tinfo/lib_setup.c vendor/ncurses/dist/ncurses/tinfo/lib_termcap.c vendor/ncurses/dist/ncurses/tinfo/lib_tgoto.c vendor/ncurses/dist/ncurses/tinfo/lib_tparm.c vendor/ncurses/dist/ncurses/tinfo/lib_tputs.c vendor/ncurses/dist/ncurses/tinfo/lib_ttyflags.c vendor/ncurses/dist/ncurses/tinfo/make_keys.c vendor/ncurses/dist/ncurses/tinfo/name_match.c vendor/ncurses/dist/ncurses/tinfo/parse_entry.c vendor/ncurses/dist/ncurses/tinfo/read_entry.c vendor/ncurses/dist/ncurses/tinfo/use_screen.c vendor/ncurses/dist/ncurses/tinfo/write_entry.c vendor/ncurses/dist/ncurses/trace/lib_trace.c vendor/ncurses/dist/ncurses/trace/lib_traceatr.c vendor/ncurses/dist/ncurses/trace/lib_tracebits.c vendor/ncurses/dist/ncurses/trace/lib_tracechr.c vendor/ncurses/dist/ncurses/trace/lib_tracedmp.c vendor/ncurses/dist/ncurses/trace/lib_tracemse.c vendor/ncurses/dist/ncurses/trace/trace_buf.c vendor/ncurses/dist/ncurses/trace/trace_tries.c vendor/ncurses/dist/ncurses/trace/varargs.c vendor/ncurses/dist/ncurses/trace/visbuf.c vendor/ncurses/dist/ncurses/tty/hardscroll.c vendor/ncurses/dist/ncurses/tty/lib_mvcur.c vendor/ncurses/dist/ncurses/tty/lib_twait.c vendor/ncurses/dist/ncurses/tty/tty_update.c vendor/ncurses/dist/ncurses/widechar/charable.c vendor/ncurses/dist/ncurses/widechar/lib_get_wch.c vendor/ncurses/dist/ncurses/widechar/lib_get_wstr.c vendor/ncurses/dist/ncurses/widechar/lib_key_name.c vendor/ncurses/dist/ncurses/widechar/lib_unget_wch.c vendor/ncurses/dist/panel/p_new.c vendor/ncurses/dist/panel/panel.priv.h vendor/ncurses/dist/progs/MKtermsort.sh vendor/ncurses/dist/progs/Makefile.in vendor/ncurses/dist/progs/dump_entry.c vendor/ncurses/dist/progs/dump_entry.h vendor/ncurses/dist/progs/infocmp.c vendor/ncurses/dist/progs/progs.priv.h vendor/ncurses/dist/progs/tic.c vendor/ncurses/dist/progs/toe.c vendor/ncurses/dist/progs/tput.c vendor/ncurses/dist/progs/tset.c Modified: vendor/ncurses/dist/ANNOUNCE ============================================================================== --- vendor/ncurses/dist/ANNOUNCE Sun Nov 9 14:06:44 2008 (r184797) +++ vendor/ncurses/dist/ANNOUNCE Sun Nov 9 14:08:54 2008 (r184798) @@ -1,4 +1,4 @@ - Announcing ncurses 5.6 + Announcing ncurses 5.7 The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, @@ -27,205 +27,217 @@ Release Notes This release is designed to be upward compatible from ncurses 5.0 - through 5.5; very few applications will require recompilation, + through 5.6; very few applications will require recompilation, depending on the platform. These are the highlights from the - change-log since ncurses 5.5 release. + change-log since ncurses 5.6 release. Interface changes: * generate linkable stubs for some macros: - getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx, - getpary, getpary, - and (for libncursesw) - wgetbkgrnd + getattrs New features and improvements: * library - + support hashed databases for the terminal descriptions. This - uses the Berkeley database, has been tested for several - versions on different platforms. - + add use_legacy_coding() function to support lynx's - font-switching feature. - + add extension nofilter(), to cancel a prior filter() call. - + add/install a package config script, e.g., ncurses5-config or - ncursesw5-config, according to configuration options. - + provide ifdef for NCURSES_NOMACROS which suppresses most - macro definitions from curses.h, i.e., where a macro is - defined to override a function to improve performance. - + make ifdef's consistent in curses.h for the extended colors - so the header file can be used for the normal curses library. - The header file installed for extended colors is a variation - of the wide-character configuration. - + improve tgetstr() by making the return value point into the - user's buffer, if provided. - + add ifdef's allowing ncurses to be built with tparm() using - either varargs (the existing status), or using a - fixed-parameter list (to match X/Open). - + widen the test for xterm kmous a little to allow for other - strings than "\E[M", e.g., for xterm-sco functionality in - xterm. - + modify wgetnstr() to return KEY_RESIZE if a sigwinch occurs. - + move prototypes for wide-character trace functions from - curses.tail to curses.wide to avoid accidental reference to - those if _XOPEN_SOURCE_EXTENDED is defined without ensuring - that is included. - + change the way shared libraries (other than libtool) are - installed. Rather than copying the build-tree's libraries, - link the shared objects into the install directory. This - makes the --with-rpath option work except with $(DESTDIR). - + several improvements for rendering in hpterm. These are only - available if the library is configured using - --enable-xmc-glitch. - + Add NCURSES_NO_HARD_TABS and NCURSES_NO_MAGIC_COOKIE - environment variables to allow runtime suppression of the - related hard-tabs and xmc-glitch features. + + new flavor of the ncurses library provides rudimentary + support for POSIX threads. Several functions are reentrant, + but most require either a window-level or screen-level mutex. + (This is API-compatible, but not ABI-compatible with the + normal library). + + add NCURSES_OPAQUE symbol to curses.h, will use to make + structs opaque in selected configurations. + + add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to + curses.h to make it simpler to tell if the extended functions + and/or colors are declared. + + add wresize() to C++ binding + + eliminate fixed-buffer vsprintf() calls in C++ binding. + + add several functions to C++ binding which wrap C functions + that pass a WINDOW* parameter. + + adapt mouse-handling code from menu library in form-library + + improve tracing for form library, showing created forms, + fields, etc. + + make $NCURSES_NO_PADDING feature work for termcap interface . + + add check to trace-file open, if the given name is a + directory, add ".log" to the name and try again. + + several new manpages: curs_legacy.3x, curs_memleaks.3x, + curs_opaque.3x and curs_threads.3x * programs: - + add new test programs: chgat.c, demo_altkeys.c, echochar.c, - foldkeys.c, movewindow.c, redraw.c, (noting that existing - test programs also were modified to test additional - features). - + modify tack to test extended capability function-key strings. - + modify toe to access termcap data, e.g., via cgetent() - functions, or as a text file if those are not available. - + improve infocmp/tic -f option formatting. - + add toe -a option, to show all databases. This uses new - private interfaces in the ncurses library for iterating - through the list of databases. - + modify MKfallback.sh to use tic -x when constructing fallback - tables to allow extended capabilities to be retrieved from a - fallback entry. + + modified three test-programs to demonstrate the threading + support in this version: ditto, rain, worm. + + several new test-programs: demo_panels, dots_mvcur, + inch_wide, inchs, key_name, key_names, savescreen, + savescreen.sh test_arrays, test_get_wstr, test_getstr, + test_instr, test_inwstr and test_opaque. + + add adacurses-config to the Ada95 install. + + modify tic -f option to format spaces as \s to prevent them + from being lost when that is read back in unformatted + strings. + + The tack program is now distributed separately from ncurses. * terminal database - + add terminfo entries for xfce terminal (xfce) and multi gnome - terminal (mgt) - + add nsterm-16color entry - + updated mlterm terminfo entry - + add kon, kon2 and jfbterm terminfo entry - + remove invis capability from klone+sgr, mainly used by linux - entry, since it does not really do this - + add ka2, kb1, kb3, kc2 to vt220-keypad as an extension - + add shifted up/down arrow codes to xterm-new as kind/kri - strings - + add hpterm-color terminfo entry - + add 256color variants of terminfo entries for programs which - are reported to implement this feature - + correct order of use-clauses in rxvt-basic entry which made - codes for f1-f4 vt100-style rather than vt220-style. + + added entries: + o Eterm-256color, Eterm-88color and rxvt-88color + o aterm + o konsole-256color + o mrxvt + o screen.mlterm + o screen.rxvt + o teraterm4.59 is now the primary primary teraterm entry, + renamed original to teraterm2.3 + o 9term terminal + o Newbury Data entries + + updated/improved entries: + o gnome to version 2.22.3 + o h19, z100 + o konsole to version 1.6.6 + o mlterm, mlterm+pcfkeys + o xterm, and building-blocks for function-keys to [3]xterm + patch #230. Major bug fixes: - * correct a typo in configure --with-bool option for the case where - --without-cxx is used. - * move assignment from environment variable ESCDELAY from initscr() - down to newterm() so the environment variable affects timeouts for - terminals opened with newterm() as well. - * modify werase to clear multicolumn characters that extend into a - derived window. - * modify wchgat() to mark updated cells as changed so a refresh will - repaint those cells. - * correct logic in wadd_wch() and wecho_wch(), which did not guard - against passing the multi-column attribute into a call on - waddch(), e.g., using data returned by win_wch() - * fix redrawing of windows other than stdscr using wredrawln() by - touching the corresponding rows in curscr. - * reduce memory leaks in repeated calls to tgetent() by remembering - the last TERMINAL* value allocated to hold the corresponding data - and freeing that if the tgetent() result buffer is the same as the - previous call. - * modify read_termtype() so the term_names data is always allocated - as part of the str_table, a better fix for a memory leak. - * fix wins_nwstr(), which did not handle single-column non-8bit - codes. - * modify wbkgrnd() to avoid clearing the A_CHARTEXT attribute bits - since those record the state of multicolumn characters. - * improve SIGWINCH handling by postponing its effect during - newterm(), etc., when allocating screens. - * remove 970913 feature for copying subwindows as they are moved in - mvwin(). - * add checks in waddchnstr() and wadd_wchnstr() to stop copying when - a null character is found. - * add some checks to ensure current position is within scrolling - region before scrolling on a new line. - * add a workaround to ACS mapping to allow applications such as - test/blue.c to use the "PC ROM" characters by masking them with - A_ALTCHARSET. This worked up til 5.5, but was lost in the revision - of legacy coding. + * add logic to tic for cancelling strings in user-defined + capabilities (this is needed for current konsole terminfo entry). + * modify mk-1st.awk so the generated makefile rules for linking or + installing shared libraries do not first remove the library, in + case it is in use, e.g., libncurses.so by /bin/sh. + * correct check for notimeout() in wgetch(). + * fix a sign-extension bug in infocmp's repair_acsc() function. + * change winnstr() to stop at the end of the line. + * make Ada95 demo_panels() example work. + * fix for adding a non-spacing character at the beginning of a line. + * fill in extended-color pair to make colors work for + wide-characters using extended-colors. + * improve refresh of window on top of multi-column characters, + taking into account split characters on left/right window + boundaries. + * modify win_wchnstr() to ensure that only a base cell is returned + for each multi-column character. + * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by + using unctrl() to display illegal bytes rather than trying to + append further bytes to make up a valid sequence. + * restore curs_set() state after endwin()/refresh() + * modify keyname() to use "^X" form only if meta() has been called, + or if keyname() is called without initializing curses, e.g., via + initscr() or newterm(). + * modify unctrl() to check codes in 128-255 range versus isprint(). + If they are not printable, and locale was set, use a "M-" or "~" + sequence. + * improve resizeterm() by moving ripped-off lines, and repainting + the soft-keys. + * modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris. + * use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., + to make those work properly with the --enable-ext-mouse + configuration + * correct some functions in Ada95 binding which were using return + value from C where none was returned. + * reviewed/fixed issues reported by Coverity and Klocwork tools. Portability: * configure script: + new options: - --with-hashed-db - Use Berkeley hashed database for storing terminfo - data rather than storing each compiled entry in a - separate binary file within a directory tree. + --disable-big-strings + control whether static string tables are generated + as single large strings (to improve startup + performance), or as array of individual strings. + + --disable-relink + control whether shared libraries are relinked + (during install) when rpath is enabled. + + --disable-tic-depends + make explicit whether tic library depends on + ncurses/ncursesw library. + + --enable-mixed-case + override the configure script's check if the + filesystem supports mixed-case filenames. This + allows one to control how the terminal database + maps to the filesystem. For filesystems that do not + support mixed-case, the library uses generate + 2-character (hexadecimal) codes for the lower-level + of the filesystem terminfo database + + --enable-reentrant + builds a different flavor of the ncurses library + (ncursest) which improves reentrant use of the + library by reducing global and static variables + (see the "--with-pthread" option for the threaded + support). + + --enable-weak-symbols + use weak-symbols for linking to the POSIX thread + library, and use the same soname for the ncurses + shared library as the normal library (caveat: the + ABI is for the threaded library, which makes global + data accessed via functions). + + --with-pthread + build with the POSIX thread library (tested with + AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64, + Solaris, Tru64). + + --with-ticlib + build/install the tic-support functions in a + separate library - --without-dlsym - Do not use dlsym() to load GPM dynamically. + + improved options: - --with-valgrind - Simplify building for testing with valgrind. + --enable-ext-colors + requires the wide-character configuration. - --enable-wgetch-events - Compile with experimental wgetch-events code. + --with-chtype + ignore option value "unsigned" is always added to + the type in curses.h; do the same for + --with-mmask-t. - --enable-signed-char - Store booleans in "signed char" rather than "char". + --with-dmalloc + build-fix for redefinition of strndup. - + improved options: + --with-hashed-db + accepts a parameter which is the install-prefix of + a given Berkeley Database. - --disable-largefile - make the option work both ways. + --with-hashed-db + the $LIBS environment variable overrides the search + for the db library. - --with-gpm - The option now accepts a parameter, i.e., the name - of the dynamic GPM library to load via dlopen() - - --disable-symlinks - The option now allows one to disable symlink() in - tic even when link() does not work. + --without-hashed-db + assumed when "--disable-database" is used. * other configure/build issues: - + remove special case for Darwin in CF_XOPEN_SOURCE configure - macro. - + add configure check to ensure that SIGWINCH is defined on - platforms such as OS X which exclude that when _XOPEN_SOURCE, - etc., are defined - + use ld's -search_paths_first option on Darwin to work around - odd search rules on that platform. - + improve ifdef's for _POSIX_VDISABLE in tset to work with Mac - OS X. - + modify configure script to ensure that if the C compiler is - used rather than the loader in making shared libraries, the - $(CFLAGS) variable is also used. - + use ${CC} rather than ${LD} in shared library rules for - IRIX64, Solaris to help ensure that initialization sections - are provided for extra linkage requirements, e.g., of C++ - applications. - + improve some shared-library configure scripting for Linux, - FreeBSD and NetBSD to make --with-shlib-version work. - + split up dependency of names.c and codes.c in - ncurses/Makefile to work with parallel make. - + modify MKlib_gen.sh to change preprocessor-expanded _Bool - back to bool. - + modify progs/Makefile.in to make tput init work properly with - cygwin, i.e., do not pass a .exe in the reference string used - in check_aliases. + + build-fixes for LynxOS + + modify shared-library rules to allow FreeBSD 3.x to use + rpath. + + build-fix for FreeBSD "contemporary" TTY interface. + + build-fixes for AIX with libtool. + + build-fixes for Darwin and libtool. + + modify BeOS-specific ifdef's to build on Haiku. + + corrected gcc options for building shared libraries on + Solaris and IRIX64. + + change shared-library configuration for OpenBSD, make rpath + work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + + add "-e" option in ncurses/Makefile.in when generating + source-files to force earlier exit if the build environment + fails unexpectedly. + + add support for shared libraries for QNX. + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to + digraphs. * library: - + ignore wide-acs line-drawing characters that wcwidth() claims - are not one-column. This is a workaround for Solaris' broken - locale support. - + reduce name-pollution in term.h by removing #define's for - HAVE_xxx symbols. - + fix #ifdef in c++/internal.h for QNX 6.1 + + rewrite wrapper for wcrtomb(), making it work on Solaris. + This is used in the form library to determine the length of + the buffer needed by field_buffer. + + add/use configure script macro CF_SIG_ATOMIC_T, use the + corresponding type for data manipulated by signal handlers. + + set locale in misc/ncurses-config.in since it uses a range + + disable GPM mouse support when $TERM does not happen to + contain "linux", since Gpm_Open() no longer limits its + assertion to terminals that it might handle, e.g., within + "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library. * test programs: - + modify test/configure script to allow building test programs - with PDCurses/X11. - + modified test programs to allow some to work with NetBSD - curses. Several do not because NetBSD curses implements a - subset of X/Open curses, and also lacks much of SVr4 - additions. But it is enough for comparison. - + improved test/configure to build test/ncurses on HPUX 11 - using the vendor curses. - + change configure script to produce test/Makefile from data - file. + + update test programs to build/work with various UNIX curses + for comparisons. Features of Ncurses @@ -271,6 +283,8 @@ the use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by defining more than one control sequence to map to a given key code. + * Support for 256-color terminals, such as modern xterm, when + configured using the --enable-ext-colors option. * Support for 16-color terminals, such as aixterm and modern xterm. * Better cursor-movement optimization. The package now features a cursor-local-movement computation more efficient than either BSD's @@ -342,49 +356,45 @@ cdk Curses Development Kit - [3]http://invisible-island.net/cdk/ - [4]http://www.vexus.ca/products/CDK/ + [4]http://invisible-island.net/cdk/ + [5]http://www.vexus.ca/products/CDK/ ded directory-editor - [5]http://invisible-island.net/ded/ + [6]http://invisible-island.net/ded/ dialog the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. - [6]http://invisible-island.net/dialog/ + [7]http://invisible-island.net/dialog/ lynx the character-screen WWW browser - [7]http://lynx.isc.org/release/ + [8]http://lynx.isc.org/release/ Midnight Commander file manager - [8]http://www.ibiblio.org/mc/ + [9]http://www.ibiblio.org/mc/ mutt mail utility - [9]http://www.mutt.org/ + [10]http://www.mutt.org/ ncftp file-transfer utility - [10]http://www.ncftp.com/ + [11]http://www.ncftp.com/ nvi New vi versions 1.50 are able to use ncurses versions 1.9.7 and later. - [11]http://www.bostic.com/vi/ + [12]http://www.bostic.com/vi/ pinfo Lynx-like info browser. - [12]http://dione.ids.pl/~pborys/software/pinfo/ + [13]https://alioth.debian.org/projects/pinfo/ tin - newsreader, supporting color, MIME [13]http://www.tin.org/ - - vh-1.6 - Volks-Hypertext browser for the Jargon File - [14]http://www.debian.org/Packages/unstable/text/vh.html + newsreader, supporting color, MIME [14]http://www.tin.org/ as well as some that use ncurses for the terminfo support alone: @@ -402,7 +412,7 @@ Who's Who and What's What Zeyd Ben-Halim started it from a previous package pcurses, written by - Pavel Curtis. Eric S. Raymond continued development. Juergen Pfeifer + Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer wrote most of the form and menu libraries. Ongoing work is being done by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. @@ -442,18 +452,18 @@ References 1. ftp://ftp.gnu.org/gnu/ncurses/ 2. ftp://invisible-island.net/ncurses/ - 3. http://invisible-island.net/cdk/ - 4. http://www.vexus.ca/products/CDK/ - 5. http://invisible-island.net/ded/ - 6. http://invisible-island.net/dialog/ - 7. http://lynx.isc.org/release/ - 8. http://www.ibiblio.org/mc/ - 9. http://www.mutt.org/ - 10. http://www.ncftp.com/ - 11. http://www.bostic.com/vi/ - 12. http://dione.ids.pl/~pborys/software/pinfo/ - 13. http://www.tin.org/ - 14. http://www.debian.org/Packages/unstable/text/vh.html + 3. http://invisible-island.net/xterm/xterm.log.html#xterm_230 + 4. http://invisible-island.net/cdk/ + 5. http://www.vexus.ca/products/CDK/ + 6. http://invisible-island.net/ded/ + 7. http://invisible-island.net/dialog/ + 8. http://lynx.isc.org/release/ + 9. http://www.ibiblio.org/mc/ + 10. http://www.mutt.org/ + 11. http://www.ncftp.com/ + 12. http://www.bostic.com/vi/ + 13. https://alioth.debian.org/projects/pinfo/ + 14. http://www.tin.org/ 15. http://alioth.debian.org/projects/minicom/ 16. http://invisible-island.net/vile/ 17. mailto:dickey@invisible-island.net Modified: vendor/ncurses/dist/INSTALL ============================================================================== --- vendor/ncurses/dist/INSTALL Sun Nov 9 14:06:44 2008 (r184797) +++ vendor/ncurses/dist/INSTALL Sun Nov 9 14:08:54 2008 (r184798) @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.124 2008/03/29 18:07:32 tom Exp $ +-- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -393,6 +393,18 @@ SUMMARY OF CONFIGURE OPTIONS: Compile without scroll-hints code. This option is ignored when hashmap scrolling is configured, which is the default. + --disable-tic-depends + When building shared libraries, normally the tic library is linked to + depend upon the ncurses library (and in turn, on the term-library if + the --with-termlib option was given). The tic- and term-libraries + ABI does not depend on the --enable-widec option. Some packagers have + used this to reduce the number of library files which are packaged + by using only one copy of those libraries. To make this work properly, + the tic library must be built without an explicit dependency on the + ncurses (or ncursesw) library. Use this configure option to do that. + For example + configure --with-ticlib --with-shared --disable-tic-depends + --disable-tparm-varargs Portable programs should call tparm() using the fixed-length parameter list documented in X/Open. ncurses provides varargs support for this @@ -572,6 +584,13 @@ SUMMARY OF CONFIGURE OPTIONS: --enable-warnings Turn on GCC compiler warnings. There should be only a few. + --enable-weak-symbols + If the --with-pthread option is set, check if the compiler supports + weak-symbols. If it does, then name the thread-capable library without + the "t" (libncurses rather than libncursest), and provide for + dynamically loading the pthreads entrypoints at runtime. This allows + one to reduce the number of library files for ncurses. + --enable-wgetch-events Compile with experimental wgetch-events code. See ncurses/README.IZ @@ -598,6 +617,9 @@ SUMMARY OF CONFIGURE OPTIONS: Normally this is the same as the release version; some ports have special requirements for compatibility. + This option does not affect linking with libtool, which uses the + release major/minor numbers. + --with-ada-compiler=CMD Specify the Ada95 compiler command (default "gnatmake") @@ -625,20 +647,32 @@ SUMMARY OF CONFIGURE OPTIONS: to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CFLAGS rather than + use this option. + --with-build-cppflags=XXX If cross-compiling, specify the host C preprocessor-flags. You might need to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CPPFLAGS rather than + use this option. + --with-build-ldflags=XXX If cross-compiling, specify the host linker-flags. You might need to do this if the target linker has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_LDFLAGS rather than + use this option. + --with-build-libs=XXX If cross-compiling, the host libraries. You might need to do this if the target environment requires unusual libraries. + You can also set the environment variable $BUILD_LIBS rather than + use this option. + --with-caps=XXX Specify an alternate terminfo capabilities file, which makes the configure script look for "include/Caps.XXX". A few systems, e.g., @@ -795,6 +829,14 @@ SUMMARY OF CONFIGURE OPTIONS: may be unsigned. Use this option if you need to preserve compatibility with 64-bit executables. + --with-normal + Generate normal (i.e., static) libraries (default). + + Note: on Linux, the configure script will attempt to use the GPM + library via the dlsym() function call. Use --without-dlsym to disable + this feature, or --without-gpm, depending on whether you wish to use + GPM. + --with-ospeed=TYPE Override type of ospeed variable, which is part of the termcap compatibility interface. In termcap, this is a 'short', which works @@ -808,14 +850,6 @@ SUMMARY OF CONFIGURE OPTIONS: those using termcap, do not use the higher speeds. Your application (or system, in general) may or may not. - --with-normal - Generate normal (i.e., static) libraries (default). - - Note: on Linux, the configure script will attempt to use the GPM - library via the dlsym() function call. Use --without-dlsym to disable - this feature, or --without-gpm, depending on whether you wish to use - GPM. - --with-profile Generate profile-libraries These are named by adding "_p" to the root, e.g., libncurses_p.a @@ -898,6 +932,12 @@ SUMMARY OF CONFIGURE OPTIONS: library. As in termlib, there is no ABI difference between the "wide" libticw.so and libtic.so + NOTE: Overriding the name of the tic library may be useful if you are + also using the --with-termlib option to rename libtinfo. If you are + not doing that, renaming the tic library can result in conflicting + library dependencies for tic and other programs built with the tic + library. + --with-trace Configure the trace() function as part of the all models of the ncurses library. Normally it is part of the debug (libncurses_g) library only. @@ -961,6 +1001,94 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCU you may encounter when building a system with different versions of ncurses: + 5.7 (November 2, 2008) + Interface changes: + + + generate linkable stubs for some macros: + getattrs + + + Add new library configuration for tic-library (the non-curses portion + of the ncurses library used for the tic program as well as some + others such as tack. There is no API change, but makefiles would be + changed to use the tic-library built separately. + + tack, distributed separately from ncurses, uses some of the internal + _nc_XXX functions, which are declared in the tic.h header file. + + The reason for providing this separate library is that none of the + functions in it are suitable for threaded applications. + + + Add new library configuration (ncursest, ncurseswt) which provides + rudimentary support for POSIX threads. This introduces opaque + access functions to the WINDOW structure and adds a parameter to + several internal functions. + + + move most internal variables (except tic-library) into data blocks + _nc_globals and _nc_prescreen to simplify analysis. Those were + globally accessible, but since they were not part of the documented + API, there is no ABI change. + + + changed static tables of strings to be indices into long strings, to + improve startup performance. This changes parameter lists for some + of the internal functions. + + Added extensions: + + + add NCURSES_OPAQUE definition in curses.h to control whether internal + details of the WINDOW structure are visible to an application. This + is always defined when the threaded library is built, and is optional + otherwise. New functions for this: is_cleared, is_idcok, is_idlok, + is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, + is_scrollok, is_syncok, wgetparent and wgetscrreg. + + + the threaded library (ncursest) also disallows direct updating of + global curses-level variables, providing functions (via macros) for + obtaining their value. A few of those variables can be modified by + the application, using new functions: set_escdelay, set_tabsize + + + added functions use_window() and use_screen() which wrap a mutex + (if threading is configured) around a call to a user-supplied + function. + + Added internal functions: + _nc_get_alias_table + _nc_get_screensize + _nc_keyname + _nc_screen_of + _nc_set_no_padding + _nc_tracechar + _nc_tracemouse + _nc_unctrl + _nc_ungetch + + These are used for leak-testing, and are stubs for + ABI compatibility when ncurses is not configured for that + using the --disable-leaks configure script option: + + _nc_free_and_exit + _nc_leaks_tinfo + + Removed internal functions: + none + + Modified internal functions: + _nc_fifo_dump + _nc_find_entry + _nc_handle_sigwinch + _nc_init_keytry + _nc_keypad + _nc_locale_breaks_acs + _nc_timed_wait + _nc_update_screensize + + Use new typedef TRIES to replace "struct tries": + + _nc_add_to_try + _nc_expand_try + _nc_remove_key + _nc_remove_string + _nc_trace_tries + 5.6 (December 17, 2006) Interface changes: Modified: vendor/ncurses/dist/MANIFEST ============================================================================== --- vendor/ncurses/dist/MANIFEST Sun Nov 9 14:06:44 2008 (r184797) +++ vendor/ncurses/dist/MANIFEST Sun Nov 9 14:08:54 2008 (r184798) @@ -349,8 +349,10 @@ ./doc/html/man/curs_instr.3x.html ./doc/html/man/curs_inwstr.3x.html ./doc/html/man/curs_kernel.3x.html +./doc/html/man/curs_legacy.3x.html ./doc/html/man/curs_mouse.3x.html ./doc/html/man/curs_move.3x.html +./doc/html/man/curs_opaque.3x.html ./doc/html/man/curs_outopts.3x.html ./doc/html/man/curs_overlay.3x.html ./doc/html/man/curs_pad.3x.html @@ -364,6 +366,7 @@ ./doc/html/man/curs_termattrs.3x.html ./doc/html/man/curs_termcap.3x.html ./doc/html/man/curs_terminfo.3x.html +./doc/html/man/curs_threads.3x.html ./doc/html/man/curs_touch.3x.html ./doc/html/man/curs_trace.3x.html ./doc/html/man/curs_util.3x.html @@ -555,6 +558,7 @@ ./man/curs_inwstr.3x ./man/curs_kernel.3x ./man/curs_legacy.3x +./man/curs_memleaks.3x ./man/curs_mouse.3x ./man/curs_move.3x ./man/curs_opaque.3x @@ -700,6 +704,7 @@ ./misc/ncurses-config.in ./misc/ncurses.def ./misc/ncurses.ref +./misc/ncurses.supp ./misc/panel.def ./misc/panel.ref ./misc/run_tic.in Modified: vendor/ncurses/dist/NEWS ============================================================================== --- vendor/ncurses/dist/NEWS Sun Nov 9 14:06:44 2008 (r184797) +++ vendor/ncurses/dist/NEWS Sun Nov 9 14:08:54 2008 (r184798) @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1233 2008/05/03 23:14:39 tom Exp $ +-- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,238 @@ See the AUTHORS file for the correspondi Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20081102 5.7 release for upload to ftp.gnu.org + +20081025 + + add a manpage to discuss memory leaks. + + add support for shared libraries for QNX (other than libtool, which + does not work well on that platform). + + build-fix for QNX C++ binding. + +20081018 + + build-fixes for OS/2 EMX. + + modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris (report by + Nit Khair). + + modify configure script to assume --without-hashed-db when + --disable-database is used. + + add "-e" option in ncurses/Makefile.in when generating source-files + to force earlier exit if the build environment fails unexpectedly + (prompted by patch by Adrian Bunk). + + change configure script to use CF_UTF8_LIB, improved variant of + CF_LIBUTF8. + +20081012 + + add teraterm4.59 terminfo entry, use that as primary teraterm entry, rename + original to teraterm2.3 -TD + + update "gnome" terminfo to 2.22.3 -TD + + update "konsole" terminfo to 1.6.6, needs today's fix for tic -TD + + add "aterm" terminfo -TD + + add "linux2.6.26" terminfo -TD + + add logic to tic for cancelling strings in user-defined capabilities, + overlooked til now. + +20081011 + + update html documentation. + + add -m and -s options to test/keynames.c and test/key_names.c to test + the meta() function with keyname() or key_name(), respectively. + + correct return value of key_name() on error; it is null. + + document some unresolved issues for rpath and pthreads in TO-DO. + + fix a missing prototype for ioctl() on OpenBSD in tset.c + + add configure option --disable-tic-depends to make explicit whether + tic library depends on ncurses/ncursesw library, amends change from + 20080823 (prompted by Debian #501421). + +20081004 + + some build-fixes for configure --disable-ext-funcs (incomplete, but + works for C/C++ parts). + + improve configure-check for awks unable to handle large strings, e.g. + AIX 5.1 whose awk silently gives up on large printf's. + +20080927 + + fix build for --with-dmalloc by workaround for redefinition of + strndup between string.h and dmalloc.h + + fix build for --disable-sigwinch + + add environment variable NCURSES_GPM_TERMS to allow override to use + GPM on terminals other than "linux", etc. + + disable GPM mouse support when $TERM does not happen to contain + "linux", since Gpm_Open() no longer limits its assertion to terminals + that it might handle, e.g., within "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library (report by + Miroslav Lichvar). + + fix build for --disable-leaks --enable-widec --with-termlib + > patch by Juergen Pfeifer: + + use improved initialization for soft-label keys in Ada95 sample code. + + discard internal symbol _nc_slk_format (unused since 20080112). + + move call of slk_paint_info() from _nc_slk_initialize() to + slk_intern_refresh(), improving initialization. + +20080925 + + fix bug in mouse code for GPM from 20080920 changes (reported in + Debian #500103, also Miroslav Lichvar). + +20080920 + + fix shared-library rules for cygwin with tic- and tinfo-libraries. + + fix a memory leak when failure to connect to GPM. + + correct check for notimeout() in wgetch() (report on linux.redhat + newsgroup by FurtiveBertie). + + add an example warning-suppression file for valgrind, + misc/ncurses.supp (based on example from Reuben Thomas) + +20080913 + + change shared-library configuration for OpenBSD, make rpath work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + +20080907 + + corrected fix for --enable-weak-symbols (report by Frederic L W + Meunier). + +20080906 + + corrected gcc options for building shared libraries on IRIX64. + + add configure check for awk programs unable to handle big-strings, + use that to improve the default for --enable-big-strings option. + + makefile-fixes for --enable-weak-symbols (report by Frederic L W + Meunier). + + update test/configure script. + + adapt ifdef's from library to make test/view.c build when mbrtowc() + is unavailable, e.g., with HPUX 10.20. + + add configure check for wcsrtombs, mbsrtowcs, which are used in + test/ncurses.c, and use wcstombs, mbstowcs instead if available, + fixing build of ncursew for HPUX 11.00 + +20080830 + + fixes to make Ada95 demo_panels() example work. + + modify Ada95 'rain' test program to accept keyboard commands like the + C-version. + + modify BeOS-specific ifdef's to build on Haiku (patch by Scott + Mccreary). + + add configure-check to see if the std namespace is legal for cerr + and endl, to fix a build issue with Tru64. + + consistently use NCURSES_BOOL in lib_gen.c + + filter #line's from lib_gen.c + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to digraphs. + + update config.guess, config.sub from + http://savannah.gnu.org/projects/config + (caveat - its maintainer removed support for older Linux systems). + +20080823 + + modify configure check for pthread library to work with OSF/1 5.1, + which uses #define's to associate its header and library. + + use pthread_mutexattr_init() for initializing pthread_mutexattr_t, + makes threaded code work on HPUX 11.23 + + fix a bug in demo_menus in freeing menus (cf: 20080804). + + modify configure script for the case where tic library is used (and + possibly renamed) to remove its dependency upon ncurses/ncursew + library (patch by Dr Werner Fink). + + correct manpage for menu_fore() which gave wrong default for + the attribute used to display a selected entry (report by Mike Gran). + + add Eterm-256color, Eterm-88color and rxvt-88color (prompted by + Debian #495815) -TD + +20080816 + + add configure option --enable-weak-symbols to turn on new feature. + + add configure-check for availability of weak symbols. + + modify linkage with pthread library to use weak symbols so that + applications not linked to that library will not use the mutexes, + etc. This relies on gcc, and may be platform-specific (patch by Dr + Werner Fink). + + add note to INSTALL to document limitation of renaming of tic library + using the --with-ticlib configure option (report by Dr Werner Fink). + + document (in manpage) why tputs does not detect I/O errors (prompted + by comments by Samuel Thibault). + + fix remaining warnings from Klocwork report. + +20080804 + + modify _nc_panelhook() data to account for a permanent memory leak. + + fix memory leaks in test/demo_menus + + fix most warnings from Klocwork tool (report by Larry Zhou). + + modify configure script CF_XOPEN_SOURCE macro to add case for + "dragonfly" from xterm #236 changes. + + modify configure script --with-hashed-db to let $LIBS override the + search for the db library (prompted by report by Samson Pierre). + +20080726 + + build-fixes for gcc 4.3.1 (changes to gnat "warnings", and C inlining + thresholds). + +20080713 + + build-fix (reports by Christian Ebert, Funda Wang). + +20080712 + + compiler-warning fixes for Solaris. + +20080705 + + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to + make those work properly with the "--enable-ext-mouse" configuration + (cf: 20050205). + + improve documentation of build-cc options in INSTALL. + + work-around a bug in gcc 4.2.4 on AIX, which does not pass the + -static/-dynamic flags properly to linker, causing test/bs to + not link. + +20080628 + + correct some ifdef's needed for the broken-linker configuration. + + make debugging library's $BAUDRATE feature work for termcap + interface. + + make $NCURSES_NO_PADDING feature work for termcap interface (prompted + by comment on FreeBSD mailing list). + + add screen.mlterm terminfo entry -TD + + improve mlterm and mlterm+pcfkeys terminfo entries -TD + +20080621 + + regenerated html documentation. + + expand manpage description of parameters for form_driver() and + menu_driver() (prompted by discussion with Adam Spragg). + + add null-pointer checks for cur_term in baudrate() and + def_shell_mode(), def_prog_mode() + + fix some memory leaks in delscreen() and wide acs. + +20080614 + + modify test/ditto.c to illustrate multi-threaded use_screen(). + + change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris. + + add "-shared" option to MK_SHARED_LIB for gcc on Solaris (report + by Poor Yorick). + +20080607 + + finish changes to wgetch(), making it switch as needed to the + window's actual screen when calling wrefresh() and wgetnstr(). That + allows wgetch() to get used concurrently in different threads with + some minor restrictions, e.g., the application should not delete a + window which is being used in a wgetch(). + + simplify mutex's, combining the window- and screen-mutex's. + +20080531 + + modify wgetch() to use the screen which corresponds to its window + parameter rather than relying on SP; some dependent functions still + use SP internally. + + factor out most use of SP in lib_mouse.c, using parameter. + + add internal _nc_keyname(), replacing keyname() to associate with a + particular SCREEN rather than the global SP. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 14:10:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34A0D10656AE; Sun, 9 Nov 2008 14:10:20 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 068638FC20; Sun, 9 Nov 2008 14:10:20 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9EAJDD043263; Sun, 9 Nov 2008 14:10:19 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9EAJjo043262; Sun, 9 Nov 2008 14:10:19 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811091410.mA9EAJjo043262@svn.freebsd.org> From: Rong-En Fan Date: Sun, 9 Nov 2008 14:10:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184799 - vendor/ncurses/5.7-20081102 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:10:20 -0000 Author: rafan Date: Sun Nov 9 14:10:19 2008 New Revision: 184799 URL: http://svn.freebsd.org/changeset/base/184799 Log: - Tag ncurses 5.7-20081102 Added: vendor/ncurses/5.7-20081102/ - copied from r184798, vendor/ncurses/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 14:38:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B090A106567B; Sun, 9 Nov 2008 14:38:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 471568FC14; Sun, 9 Nov 2008 14:38:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KzBQl-0003HM-5z; Sun, 09 Nov 2008 16:38:23 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mA9EcKSq053172 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Nov 2008 16:38:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mA9EcKr3074052; Sun, 9 Nov 2008 16:38:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mA9EcJA6074051; Sun, 9 Nov 2008 16:38:19 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 9 Nov 2008 16:38:19 +0200 From: Kostik Belousov To: Matteo Riondato Message-ID: <20081109143819.GO18100@deviant.kiev.zoral.com.ua> References: <200811090644.mA96ira1032670@svn.freebsd.org> <20081109132026.GL18100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hA47Z5c7pMOLFxYj" Content-Disposition: inline In-Reply-To: <20081109132026.GL18100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KzBQl-0003HM-5z 57a501e97732323432956a453b2bb400 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184779 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:38:25 -0000 --hA47Z5c7pMOLFxYj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 09, 2008 at 03:20:26PM +0200, Kostik Belousov wrote: > On Sun, Nov 09, 2008 at 06:44:53AM +0000, Matteo Riondato wrote: > > Author: matteo > > Date: Sun Nov 9 06:44:53 2008 > > New Revision: 184779 > > URL: http://svn.freebsd.org/changeset/base/184779 > >=20 > > Log: > > Be paranoid and use snprintf > > =20 > > PR: bin/122137 > > Submitted by: Steven Kreuzer > > MFC after: 3 days > >=20 > > Modified: > > head/usr.sbin/cron/crontab/crontab.c > >=20 > > Modified: head/usr.sbin/cron/crontab/crontab.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 01:53:06 2008 (r184= 778) > > +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 06:44:53 2008 (r184= 779) > > @@ -263,7 +263,7 @@ list_cmd() { > > FILE *f; > > =20 > > log_it(RealUser, Pid, "LIST", User); > > - (void) sprintf(n, CRON_TAB(User)); > > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); > This note is probably also about paranoia instead of exploitable bug. > I think that it is better to use %s format explicitely instead of > expecting no '%' in the CRON_TAB(User). Please, ignore this. I should have looked at the actual code. --hA47Z5c7pMOLFxYj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkW9dsACgkQC3+MBN1Mb4gG/ACfcYQ3yoHewHoYFlrDkrcPGfeV oWEAoN3/Q004t/j0zoJ6oNwuFu5wiqI5 =hS4L -----END PGP SIGNATURE----- --hA47Z5c7pMOLFxYj-- From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 17:07:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4339F1065676; Sun, 9 Nov 2008 17:07:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32F7B8FC0A; Sun, 9 Nov 2008 17:07:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9H7rwU046479; Sun, 9 Nov 2008 17:07:53 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9H7rVL046478; Sun, 9 Nov 2008 17:07:53 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811091707.mA9H7rVL046478@svn.freebsd.org> From: Joseph Koshy Date: Sun, 9 Nov 2008 17:07:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184801 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 17:07:53 -0000 Author: jkoshy Date: Sun Nov 9 17:07:52 2008 New Revision: 184801 URL: http://svn.freebsd.org/changeset/base/184801 Log: Style tweak. Modified: head/sys/dev/hwpmc/hwpmc_logging.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_logging.c Sun Nov 9 14:32:58 2008 (r184800) +++ head/sys/dev/hwpmc/hwpmc_logging.c Sun Nov 9 17:07:52 2008 (r184801) @@ -973,8 +973,8 @@ pmclog_initialize() /* create global pool of log buffers */ for (n = 0; n < pmc_nlogbuffers; n++) { - plb = malloc(1024 * pmclog_buffer_size, - M_PMC, M_ZERO|M_WAITOK); + plb = malloc(1024 * pmclog_buffer_size, M_PMC, + M_WAITOK|M_ZERO); PMCLOG_INIT_BUFFER_DESCRIPTOR(plb); TAILQ_INSERT_HEAD(&pmc_bufferlist, plb, plb_next); } From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 17:37:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A27C9106567F; Sun, 9 Nov 2008 17:37:54 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9128B8FC0A; Sun, 9 Nov 2008 17:37:54 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9HbsCI047045; Sun, 9 Nov 2008 17:37:54 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9HbssM047036; Sun, 9 Nov 2008 17:37:54 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811091737.mA9HbssM047036@svn.freebsd.org> From: Joseph Koshy Date: Sun, 9 Nov 2008 17:37:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184802 - in head/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 17:37:54 -0000 Author: jkoshy Date: Sun Nov 9 17:37:54 2008 New Revision: 184802 URL: http://svn.freebsd.org/changeset/base/184802 Log: - Separate PMC class dependent code from other kinds of machine dependencies. A 'struct pmc_classdep' structure describes operations on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep' structures depending on the CPU in question. Inside PMC class dependent code, row indices are relative to the PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates global row indices before invoking class dependent operations. - Augment the OP_GETCPUINFO request with the number of PMCs present in a PMC class. - Move code common to Intel CPUs to file "hwpmc_intel.c". - Move TSC handling to file "hwpmc_tsc.c". Added: head/sys/dev/hwpmc/hwpmc_intel.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_tsc.c (contents, props changed) head/sys/dev/hwpmc/hwpmc_tsc.h (contents, props changed) Modified: head/sys/amd64/include/pmc_mdep.h head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/dev/hwpmc/hwpmc_amd.c head/sys/dev/hwpmc/hwpmc_amd.h head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hwpmc/hwpmc_pentium.c head/sys/dev/hwpmc/hwpmc_pentium.h head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_piv.h head/sys/dev/hwpmc/hwpmc_ppro.c head/sys/dev/hwpmc/hwpmc_ppro.h head/sys/dev/hwpmc/hwpmc_x86.c head/sys/i386/include/pmc_mdep.h head/sys/modules/hwpmc/Makefile head/sys/sys/pmc.h Modified: head/sys/amd64/include/pmc_mdep.h ============================================================================== --- head/sys/amd64/include/pmc_mdep.h Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/amd64/include/pmc_mdep.h Sun Nov 9 17:37:54 2008 (r184802) @@ -35,8 +35,34 @@ #ifndef _MACHINE_PMC_MDEP_H #define _MACHINE_PMC_MDEP_H 1 +#ifdef _KERNEL +struct pmc_mdep; +#endif + #include #include +#include + +/* + * Intel processors implementing V2 and later of the Intel performance + * measurement architecture have PMCs of the following classes: TSC, + * IAF and IAP. + */ +#define PMC_MDEP_CLASS_INDEX_TSC 0 +#define PMC_MDEP_CLASS_INDEX_K8 1 +#define PMC_MDEP_CLASS_INDEX_P4 1 +#define PMC_MDEP_CLASS_INDEX_IAF 1 +#define PMC_MDEP_CLASS_INDEX_IAP 2 + +/* + * On the amd64 platform we support the following PMCs. + * + * TSC The timestamp counter + * K8 AMD Athlon64 and Opteron PMCs in 64 bit mode. + * PIV Intel P4/HTT and P4/EMT64 + * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. + * IAF Intel fixed-function PMCs in Core2 and later CPUs. + */ union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; @@ -55,8 +81,6 @@ union pmc_md_pmc { struct pmc_md_p4_pmc pm_p4; }; -struct pmc; - #define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_rip) #define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_rbp) #define PMC_TRAPFRAME_TO_USER_SP(TF) ((TF)->tf_rsp) @@ -88,5 +112,10 @@ struct pmc; void start_exceptions(void), end_exceptions(void); void pmc_x86_lapic_enable_pmc_interrupt(void); -#endif +struct pmc_mdep *pmc_amd_initialize(void); +void pmc_amd_finalize(struct pmc_mdep *_md); +struct pmc_mdep *pmc_intel_initialize(void); +void pmc_intel_finalize(struct pmc_mdep *_md); + +#endif /* _KERNEL */ #endif /* _MACHINE_PMC_MDEP_H */ Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/conf/files.amd64 Sun Nov 9 17:37:54 2008 (r184802) @@ -188,7 +188,9 @@ dev/hptrr/hptrr_os_bsd.c optional hptrr dev/hptrr/hptrr_osm_bsd.c optional hptrr dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc +dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc +dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/k8temp/k8temp.c optional k8temp dev/kbd/kbd.c optional atkbd | sc | ukbd Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/conf/files.i386 Sun Nov 9 17:37:54 2008 (r184802) @@ -186,9 +186,11 @@ dev/hptrr/hptrr_os_bsd.c optional hptrr dev/hptrr/hptrr_osm_bsd.c optional hptrr dev/hptrr/hptrr_config.c optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc +dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc +dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/ichwd/ichwd.c optional ichwd dev/if_ndis/if_ndis.c optional ndis Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/conf/files.pc98 Sun Nov 9 17:37:54 2008 (r184802) @@ -110,9 +110,11 @@ dev/ed/if_ed_wd80x3.c optional ed isa dev/fb/fb.c optional fb | gdc dev/fe/if_fe_cbus.c optional fe isa dev/hwpmc/hwpmc_amd.c optional hwpmc +dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_pentium.c optional hwpmc dev/hwpmc/hwpmc_piv.c optional hwpmc dev/hwpmc/hwpmc_ppro.c optional hwpmc +dev/hwpmc/hwpmc_tsc.c optional hwpmc dev/hwpmc/hwpmc_x86.c optional hwpmc dev/io/iodev.c optional io dev/kbd/kbd.c optional pckbd | sc | ukbd Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/dev/hwpmc/hwpmc_amd.c Sun Nov 9 17:37:54 2008 (r184802) @@ -26,7 +26,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * */ #include @@ -64,18 +63,6 @@ static struct amd_descr amd_pmcdesc[AMD { .pm_descr = { - .pd_name = "TSC", - .pd_class = PMC_CLASS_TSC, - .pd_caps = PMC_CAP_READ, - .pd_width = 64 - }, - .pm_evsel = MSR_TSC, - .pm_perfctr = 0 /* unused */ - }, - - { - .pm_descr = - { .pd_name = "", .pd_class = -1, .pd_caps = AMD_PMC_CAPS, @@ -258,6 +245,16 @@ const int amd_event_codes_size = sizeof(amd_event_codes) / sizeof(amd_event_codes[0]); /* + * Per-processor information + */ + +struct amd_cpu { + struct pmc_hw pc_amdpmcs[AMD_NPMCS]; +}; + +static struct amd_cpu **amd_pcpu; + +/* * read a pmc register */ @@ -267,17 +264,17 @@ amd_read_pmc(int cpu, int ri, pmc_value_ enum pmc_mode mode; const struct amd_descr *pd; struct pmc *pm; - const struct pmc_hw *phw; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); + KASSERT(amd_pcpu[cpu], + ("[amd,%d] null per-cpu, cpu %d", __LINE__, cpu)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; - pd = &amd_pmcdesc[ri]; - pm = phw->phw_pmc; + pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; + pd = &amd_pmcdesc[ri]; KASSERT(pm != NULL, ("[amd,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, @@ -287,15 +284,6 @@ amd_read_pmc(int cpu, int ri, pmc_value_ PMCDBG(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); - /* Reading the TSC is a special case */ - if (pd->pm_descr.pd_class == PMC_CLASS_TSC) { - KASSERT(PMC_IS_COUNTING_MODE(mode), - ("[amd,%d] TSC counter in non-counting mode", __LINE__)); - *v = rdtsc(); - PMCDBG(MDP,REA,2,"amd-read id=%d -> %jd", ri, *v); - return 0; - } - #ifdef DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, @@ -324,18 +312,16 @@ static int amd_write_pmc(int cpu, int ri, pmc_value_t v) { const struct amd_descr *pd; - struct pmc *pm; - const struct pmc_hw *phw; enum pmc_mode mode; + struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; - pd = &amd_pmcdesc[ri]; - pm = phw->phw_pmc; + pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; + pd = &amd_pmcdesc[ri]; KASSERT(pm != NULL, ("[amd,%d] PMC not owned (cpu%d,pmc%d)", __LINE__, @@ -343,9 +329,6 @@ amd_write_pmc(int cpu, int ri, pmc_value mode = PMC_TO_MODE(pm); - if (pd->pm_descr.pd_class == PMC_CLASS_TSC) - return 0; - #ifdef DEBUG KASSERT(pd->pm_descr.pd_class == amd_pmc_class, ("[amd,%d] unknown PMC class (%d)", __LINE__, @@ -380,7 +363,7 @@ amd_config_pmc(int cpu, int ri, struct p KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; + phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; KASSERT(pm == NULL || phw->phw_pmc == NULL, ("[amd,%d] pm=%p phw->pm=%p hwpmc not unconfigured", @@ -397,7 +380,7 @@ amd_config_pmc(int cpu, int ri, struct p static int amd_get_config(int cpu, int ri, struct pmc **ppm) { - *ppm = pmc_pcpu[cpu]->pc_hwpmcs[ri]->phw_pmc; + *ppm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; return 0; } @@ -474,18 +457,6 @@ amd_allocate_pmc(int cpu, int ri, struct if ((pd->pd_caps & caps) != caps) return EPERM; - if (pd->pd_class == PMC_CLASS_TSC) { - /* TSC's are always allocated in system-wide counting mode */ - if (a->pm_ev != PMC_EV_TSC_TSC || - a->pm_mode != PMC_MODE_SC) - return EINVAL; - return 0; - } - -#ifdef DEBUG - KASSERT(pd->pd_class == amd_pmc_class, - ("[amd,%d] Unknown PMC class (%d)", __LINE__, pd->pd_class)); -#endif pe = a->pm_ev; @@ -556,7 +527,7 @@ amd_release_pmc(int cpu, int ri, struct KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; + phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; KASSERT(phw->phw_pmc == NULL, ("[amd,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); @@ -588,7 +559,7 @@ amd_start_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; + phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; pm = phw->phw_pmc; pd = &amd_pmcdesc[ri]; @@ -598,15 +569,6 @@ amd_start_pmc(int cpu, int ri) PMCDBG(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); - if (pd->pm_descr.pd_class == PMC_CLASS_TSC) - return 0; /* TSCs are always running */ - -#ifdef DEBUG - KASSERT(pd->pm_descr.pd_class == amd_pmc_class, - ("[amd,%d] unknown PMC class (%d)", __LINE__, - pd->pm_descr.pd_class)); -#endif - KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] pmc%d,cpu%d: Starting active PMC \"%s\"", __LINE__, ri, cpu, pd->pm_descr.pd_name)); @@ -637,24 +599,13 @@ amd_stop_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; + phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; pm = phw->phw_pmc; pd = &amd_pmcdesc[ri]; KASSERT(pm != NULL, ("[amd,%d] cpu%d,pmc%d no PMC to stop", __LINE__, cpu, ri)); - - /* can't stop a TSC */ - if (pd->pm_descr.pd_class == PMC_CLASS_TSC) - return 0; - -#ifdef DEBUG - KASSERT(pd->pm_descr.pd_class == amd_pmc_class, - ("[amd,%d] unknown PMC class (%d)", __LINE__, - pd->pm_descr.pd_class)); -#endif - KASSERT(!AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] PMC%d, CPU%d \"%s\" already stopped", __LINE__, ri, cpu, pd->pm_descr.pd_name)); @@ -677,10 +628,10 @@ amd_stop_pmc(int cpu, int ri) static int amd_intr(int cpu, struct trapframe *tf) { - int i, error, retval, ri; + int i, error, retval; uint32_t config, evsel, perfctr; struct pmc *pm; - struct pmc_cpu *pc; + struct amd_cpu *pac; struct pmc_hw *phw; pmc_value_t v; @@ -692,11 +643,10 @@ amd_intr(int cpu, struct trapframe *tf) retval = 0; - pc = pmc_pcpu[cpu]; + pac = amd_pcpu[cpu]; /* * look for all PMCs that have interrupted: - * - skip over the TSC [PMC#0] * - look for a running, sampling PMC which has overflowed * and which has a valid 'struct pmc' association * @@ -708,14 +658,12 @@ amd_intr(int cpu, struct trapframe *tf) * interrupt at a time. */ - for (i = 0; retval == 0 && i < AMD_NPMCS-1; i++) { - - ri = i + 1; /* row index; TSC is at ri == 0 */ + for (i = 0; retval == 0 && i < AMD_NPMCS; i++) { if (!AMD_PMC_HAS_OVERFLOWED(i)) continue; - phw = pc->pc_hwpmcs[ri]; + phw = &pac->pc_amdpmcs[i]; KASSERT(phw != NULL, ("[amd,%d] null PHW pointer", __LINE__)); @@ -769,7 +717,7 @@ amd_describe(int cpu, int ri, struct pmc KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] row-index %d out of range", __LINE__, ri)); - phw = pmc_pcpu[cpu]->pc_hwpmcs[ri]; + phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; pd = &amd_pmcdesc[ri]; if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, @@ -804,33 +752,20 @@ amd_get_msr(int ri, uint32_t *msr) ("[amd,%d] ri %d out of range", __LINE__, ri)); *msr = amd_pmcdesc[ri].pm_perfctr - AMD_PMC_PERFCTR_0; - return 0; + + return (0); } /* * processor dependent initialization. */ -/* - * Per-processor data structure - * - * [common stuff] - * [5 struct pmc_hw pointers] - * [5 struct pmc_hw structures] - */ - -struct amd_cpu { - struct pmc_cpu pc_common; - struct pmc_hw *pc_hwpmcs[AMD_NPMCS]; - struct pmc_hw pc_amdpmcs[AMD_NPMCS]; -}; - - static int -amd_init(int cpu) +amd_pcpu_init(struct pmc_mdep *md, int cpu) { - int n; - struct amd_cpu *pcs; + int classindex, first_ri, n; + struct pmc_cpu *pc; + struct amd_cpu *pac; struct pmc_hw *phw; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -838,29 +773,32 @@ amd_init(int cpu) PMCDBG(MDP,INI,1,"amd-init cpu=%d", cpu); - pcs = malloc(sizeof(struct amd_cpu), M_PMC, + amd_pcpu[cpu] = pac = malloc(sizeof(struct amd_cpu), M_PMC, M_WAITOK|M_ZERO); - phw = &pcs->pc_amdpmcs[0]; - /* - * Initialize the per-cpu mutex and set the content of the - * hardware descriptors to a known state. + * Set the content of the hardware descriptors to a known + * state and initialize pointers in the MI per-cpu descriptor. */ + pc = pmc_pcpu[cpu]; +#if defined(__amd64__) + classindex = PMC_MDEP_CLASS_INDEX_K8; +#elif defined(__i386__) + classindex = md->pmd_cputype == PMC_CPU_AMD_K8 ? + PMC_MDEP_CLASS_INDEX_K8 : PMC_MDEP_CLASS_INDEX_K7; +#endif + first_ri = md->pmd_classdep[classindex].pcd_ri; - for (n = 0; n < AMD_NPMCS; n++, phw++) { + KASSERT(pc != NULL, ("[amd,%d] NULL per-cpu pointer", __LINE__)); + + for (n = 0, phw = pac->pc_amdpmcs; n < AMD_NPMCS; n++, phw++) { phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n); phw->phw_pmc = NULL; - pcs->pc_hwpmcs[n] = phw; + pc->pc_hwpmcs[n + first_ri] = phw; } - /* Mark the TSC as shareable */ - pcs->pc_hwpmcs[0]->phw_state |= PMC_PHW_FLAG_IS_SHAREABLE; - - pmc_pcpu[cpu] = (struct pmc_cpu *) pcs; - - return 0; + return (0); } @@ -870,11 +808,12 @@ amd_init(int cpu) */ static int -amd_cleanup(int cpu) +amd_pcpu_fini(struct pmc_mdep *md, int cpu) { - int i; + int classindex, first_ri, i; uint32_t evsel; - struct pmc_cpu *pcs; + struct pmc_cpu *pc; + struct amd_cpu *pac; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -884,7 +823,6 @@ amd_cleanup(int cpu) /* * First, turn off all PMCs on this CPU. */ - for (i = 0; i < 4; i++) { /* XXX this loop is now not needed */ evsel = rdmsr(AMD_PMC_EVSEL_0 + i); evsel &= ~AMD_PMC_ENABLE; @@ -894,25 +832,42 @@ amd_cleanup(int cpu) /* * Next, free up allocated space. */ + if ((pac = amd_pcpu[cpu]) == NULL) + return (0); - if ((pcs = pmc_pcpu[cpu]) == NULL) - return 0; + amd_pcpu[cpu] = NULL; #ifdef DEBUG - /* check the TSC */ - KASSERT(pcs->pc_hwpmcs[0]->phw_pmc == NULL, - ("[amd,%d] CPU%d,PMC0 still in use", __LINE__, cpu)); - for (i = 1; i < AMD_NPMCS; i++) { - KASSERT(pcs->pc_hwpmcs[i]->phw_pmc == NULL, + for (i = 0; i < AMD_NPMCS; i++) { + KASSERT(pac->pc_amdpmcs[i].phw_pmc == NULL, ("[amd,%d] CPU%d/PMC%d in use", __LINE__, cpu, i)); KASSERT(AMD_PMC_IS_STOPPED(AMD_PMC_EVSEL_0 + (i-1)), ("[amd,%d] CPU%d/PMC%d not stopped", __LINE__, cpu, i)); } #endif - pmc_pcpu[cpu] = NULL; - free(pcs, M_PMC); - return 0; + pc = pmc_pcpu[cpu]; + KASSERT(pc != NULL, ("[amd,%d] NULL per-cpu state", __LINE__)); + +#if defined(__amd64__) + classindex = PMC_MDEP_CLASS_INDEX_K8; +#elif defined(__i386__) + classindex = md->pmd_cputype == PMC_CPU_AMD_K8 ? PMC_MDEP_CLASS_INDEX_K8 : + PMC_MDEP_CLASS_INDEX_K7; +#endif + first_ri = md->pmd_classdep[classindex].pcd_ri; + + /* + * Reset pointers in the MI 'per-cpu' state. + */ + for (i = 0; i < AMD_NPMCS; i++) { + pc->pc_hwpmcs[i + first_ri] = NULL; + } + + + free(pac, M_PMC); + + return (0); } /* @@ -922,11 +877,12 @@ amd_cleanup(int cpu) struct pmc_mdep * pmc_amd_initialize(void) { + int classindex, error, i, nclasses, ncpus; + struct pmc_classdep *pcd; enum pmc_cputype cputype; - enum pmc_class class; struct pmc_mdep *pmc_mdep; + enum pmc_class class; char *name; - int i; /* * The presence of hardware performance counters on the AMD @@ -939,12 +895,16 @@ pmc_amd_initialize(void) class = cputype = -1; name = NULL; switch (cpu_id & 0xF00) { +#if defined(__i386__) case 0x600: /* Athlon(tm) processor */ + classindex = PMC_MDEP_CLASS_INDEX_K7; cputype = PMC_CPU_AMD_K7; class = PMC_CLASS_K7; name = "K7"; break; +#endif case 0xF00: /* Athlon64/Opteron processor */ + classindex = PMC_MDEP_CLASS_INDEX_K8; cputype = PMC_CPU_AMD_K8; class = PMC_CLASS_K8; name = "K8"; @@ -960,53 +920,121 @@ pmc_amd_initialize(void) amd_pmc_class = class; #endif - pmc_mdep = malloc(sizeof(struct pmc_mdep), - M_PMC, M_WAITOK|M_ZERO); + /* + * Allocate space for pointers to PMC HW descriptors and for + * the MDEP structure used by MI code. + */ + amd_pcpu = malloc(sizeof(struct amd_cpu *) * pmc_cpu_max(), M_PMC, + M_WAITOK|M_ZERO); - pmc_mdep->pmd_cputype = cputype; - pmc_mdep->pmd_npmc = AMD_NPMCS; + /* + * These processors have two classes of PMCs: the TSC and + * programmable PMCs. + */ + nclasses = 2; + pmc_mdep = malloc(sizeof(struct pmc_mdep) + nclasses * sizeof (struct pmc_classdep), + M_PMC, M_WAITOK|M_ZERO); - /* this processor has two classes of usable PMCs */ - pmc_mdep->pmd_nclass = 2; + pmc_mdep->pmd_cputype = cputype; + pmc_mdep->pmd_nclass = nclasses; - /* TSC */ - pmc_mdep->pmd_classes[0].pm_class = PMC_CLASS_TSC; - pmc_mdep->pmd_classes[0].pm_caps = PMC_CAP_READ; - pmc_mdep->pmd_classes[0].pm_width = 64; - - /* AMD K7/K8 PMCs */ - pmc_mdep->pmd_classes[1].pm_class = class; - pmc_mdep->pmd_classes[1].pm_caps = AMD_PMC_CAPS; - pmc_mdep->pmd_classes[1].pm_width = 48; + ncpus = pmc_cpu_max(); - pmc_mdep->pmd_nclasspmcs[0] = 1; - pmc_mdep->pmd_nclasspmcs[1] = (AMD_NPMCS-1); + /* Initialize the TSC. */ + error = pmc_tsc_initialize(pmc_mdep, ncpus); + if (error) + goto error; + + /* Initialize AMD K7 and K8 PMC handling. */ + pcd = &pmc_mdep->pmd_classdep[classindex]; + + pcd->pcd_caps = AMD_PMC_CAPS; + pcd->pcd_class = class; + pcd->pcd_num = AMD_NPMCS; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 48; /* fill in the correct pmc name and class */ - for (i = 1; i < AMD_NPMCS; i++) { + for (i = 0; i < AMD_NPMCS; i++) { (void) snprintf(amd_pmcdesc[i].pm_descr.pd_name, sizeof(amd_pmcdesc[i].pm_descr.pd_name), "%s-%d", name, i-1); amd_pmcdesc[i].pm_descr.pd_class = class; } - pmc_mdep->pmd_init = amd_init; - pmc_mdep->pmd_cleanup = amd_cleanup; - pmc_mdep->pmd_switch_in = amd_switch_in; - pmc_mdep->pmd_switch_out = amd_switch_out; - pmc_mdep->pmd_read_pmc = amd_read_pmc; - pmc_mdep->pmd_write_pmc = amd_write_pmc; - pmc_mdep->pmd_config_pmc = amd_config_pmc; - pmc_mdep->pmd_get_config = amd_get_config; - pmc_mdep->pmd_allocate_pmc = amd_allocate_pmc; - pmc_mdep->pmd_release_pmc = amd_release_pmc; - pmc_mdep->pmd_start_pmc = amd_start_pmc; - pmc_mdep->pmd_stop_pmc = amd_stop_pmc; - pmc_mdep->pmd_intr = amd_intr; - pmc_mdep->pmd_describe = amd_describe; - pmc_mdep->pmd_get_msr = amd_get_msr; /* i386 */ + pcd->pcd_allocate_pmc = amd_allocate_pmc; + pcd->pcd_config_pmc = amd_config_pmc; + pcd->pcd_describe = amd_describe; + pcd->pcd_get_config = amd_get_config; + pcd->pcd_get_msr = amd_get_msr; + pcd->pcd_pcpu_fini = amd_pcpu_fini; + pcd->pcd_pcpu_init = amd_pcpu_init; + pcd->pcd_read_pmc = amd_read_pmc; + pcd->pcd_release_pmc = amd_release_pmc; + pcd->pcd_start_pmc = amd_start_pmc; + pcd->pcd_stop_pmc = amd_stop_pmc; + pcd->pcd_write_pmc = amd_write_pmc; + + pmc_mdep->pmd_pcpu_init = NULL; + pmc_mdep->pmd_pcpu_fini = NULL; + pmc_mdep->pmd_intr = amd_intr; + pmc_mdep->pmd_switch_in = amd_switch_in; + pmc_mdep->pmd_switch_out = amd_switch_out; + + pmc_mdep->pmd_npmc += AMD_NPMCS; PMCDBG(MDP,INI,0,"%s","amd-initialize"); - return pmc_mdep; + return (pmc_mdep); + + error: + if (error) { + free(pmc_mdep, M_PMC); + pmc_mdep = NULL; + } + + return (NULL); +} + +/* + * Finalization code for AMD CPUs. + */ + +void +pmc_amd_finalize(struct pmc_mdep *md) +{ +#if defined(INVARIANTS) + int classindex, i, ncpus, pmcclass; +#endif + + pmc_tsc_finalize(md); + + KASSERT(amd_pcpu != NULL, ("[amd,%d] NULL per-cpu array pointer", + __LINE__)); + +#if defined(INVARIANTS) + switch (md->pmd_cputype) { +#if defined(__i386__) + case PMC_CPU_AMD_K7: + classindex = PMC_MDEP_CLASS_INDEX_K7; + pmcclass = PMC_CLASS_K7; + break; +#endif + default: + classindex = PMC_MDEP_CLASS_INDEX_K8; + pmcclass = PMC_CLASS_K8; + } + + KASSERT(md->pmd_classdep[classindex].pcd_class == pmcclass, + ("[amd,%d] pmc class mismatch", __LINE__)); + + ncpus = pmc_cpu_max(); + + for (i = 0; i < ncpus; i++) + KASSERT(amd_pcpu[i] == NULL, ("[amd,%d] non-null pcpu", + __LINE__)); +#endif + + free(amd_pcpu, M_PMC); + amd_pcpu = NULL; } Modified: head/sys/dev/hwpmc/hwpmc_amd.h ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.h Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/dev/hwpmc/hwpmc_amd.h Sun Nov 9 17:37:54 2008 (r184802) @@ -44,7 +44,7 @@ #define AMD_PMC_PERFCTR_3 0xC0010007 -#define AMD_NPMCS 5 /* 1 TSC + 4 PMCs */ +#define AMD_NPMCS 4 #define AMD_PMC_COUNTERMASK 0xFF000000 #define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK) @@ -93,11 +93,5 @@ struct pmc_md_amd_pmc { uint32_t pm_amd_evsel; }; -/* - * Prototypes - */ - -struct pmc_mdep *pmc_amd_initialize(void); /* AMD K7/K8 PMCs */ - #endif /* _KERNEL */ #endif /* _DEV_HWPMC_AMD_H_ */ Added: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hwpmc/hwpmc_intel.c Sun Nov 9 17:37:54 2008 (r184802) @@ -0,0 +1,227 @@ +/*- + * Copyright (c) 2008 Joseph Koshy + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Common code for handling Intel CPUs. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include +#include + +static int +intel_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) +{ + (void) pc; + + PMCDBG(MDP,SWI,1, "pc=%p pp=%p enable-msr=%d", pc, pp, + pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS); + + /* allow the RDPMC instruction if needed */ + if (pp->pp_flags & PMC_PP_ENABLE_MSR_ACCESS) + load_cr4(rcr4() | CR4_PCE); + + PMCDBG(MDP,SWI,1, "cr4=0x%jx", (uintmax_t) rcr4()); + + return 0; +} + +static int +intel_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) +{ + (void) pc; + (void) pp; /* can be NULL */ + + PMCDBG(MDP,SWO,1, "pc=%p pp=%p cr4=0x%jx", pc, pp, + (uintmax_t) rcr4()); + + /* always turn off the RDPMC instruction */ + load_cr4(rcr4() & ~CR4_PCE); + + return 0; +} + +struct pmc_mdep * +pmc_intel_initialize(void) +{ + struct pmc_mdep *pmc_mdep; + enum pmc_cputype cputype; + int error, model, nclasses, ncpus; + + KASSERT(strcmp(cpu_vendor, "GenuineIntel") == 0, + ("[intel,%d] Initializing non-intel processor", __LINE__)); + + PMCDBG(MDP,INI,0, "intel-initialize cpuid=0x%x", cpu_id); + + cputype = -1; + nclasses = 2; + + switch (cpu_id & 0xF00) { +#if defined(__i386__) + case 0x500: /* Pentium family processors */ + cputype = PMC_CPU_INTEL_P5; + break; + case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ + switch ((cpu_id & 0xF0) >> 4) { /* model number field */ + case 0x1: + cputype = PMC_CPU_INTEL_P6; + break; + case 0x3: case 0x5: + cputype = PMC_CPU_INTEL_PII; + break; + case 0x6: + cputype = PMC_CPU_INTEL_CL; + break; + case 0x7: case 0x8: case 0xA: case 0xB: + cputype = PMC_CPU_INTEL_PIII; + break; + case 0x9: case 0xD: + cputype = PMC_CPU_INTEL_PM; + break; + } + break; +#endif +#if defined(__i386__) || defined(__amd64__) + case 0xF00: /* P4 */ + model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); + if (model >= 0 && model <= 6) /* known models */ + cputype = PMC_CPU_INTEL_PIV; + break; + } +#endif + + if ((int) cputype == -1) { + printf("pmc: Unknown Intel CPU.\n"); + return (NULL); + } + + pmc_mdep = malloc(sizeof(struct pmc_mdep) + nclasses * + sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO); + + pmc_mdep->pmd_cputype = cputype; + pmc_mdep->pmd_nclass = nclasses; + + pmc_mdep->pmd_switch_in = intel_switch_in; + pmc_mdep->pmd_switch_out = intel_switch_out; + + ncpus = pmc_cpu_max(); + + error = pmc_tsc_initialize(pmc_mdep, ncpus); + if (error) + goto error; + + switch (cputype) { +#if defined(__i386__) || defined(__amd64__) + + /* + * Intel Pentium 4 Processors, and P4/EMT64 processors. + */ + + case PMC_CPU_INTEL_PIV: + error = pmc_p4_initialize(pmc_mdep, ncpus); + + KASSERT(md->pmd_npmc == TSC_NPMCS + P4_NPMCS, ("[intel,%d] " + "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + break; +#endif + +#if defined(__i386__) + /* + * P6 Family Processors + */ + + case PMC_CPU_INTEL_P6: + case PMC_CPU_INTEL_CL: + case PMC_CPU_INTEL_PII: + case PMC_CPU_INTEL_PIII: + case PMC_CPU_INTEL_PM: + error = pmc_p6_initialize(pmc_mdep, ncpus); + + KASSERT(md->pmd_npmc == TSC_NPMCS + P6_NPMCS, ("[intel,%d] " + "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + break; + + /* + * Intel Pentium PMCs. + */ + + case PMC_CPU_INTEL_P5: + error = pmc_p5_initialize(pmc_mdep, ncpus); + + KASSERT(md->pmd_npmc == TSC_NPMCS + PENTIUM_NPMCS, ("[intel,%d] " + "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + break; +#endif + + default: + KASSERT(0, ("[intel,%d] Unknown CPU type", __LINE__)); + } + + + error: + if (error) { + free(pmc_mdep, M_PMC); + pmc_mdep = NULL; + } + + return (pmc_mdep); +} + +void +pmc_intel_finalize(struct pmc_mdep *md) +{ + pmc_tsc_finalize(md); + + switch (md->pmd_cputype) { +#if defined(__i386__) || defined(__amd64__) + case PMC_CPU_INTEL_PIV: + pmc_p4_finalize(md); + break; +#endif +#if defined(__i386__) + case PMC_CPU_INTEL_P6: + case PMC_CPU_INTEL_CL: + case PMC_CPU_INTEL_PII: + case PMC_CPU_INTEL_PIII: + case PMC_CPU_INTEL_PM: + pmc_p6_finalize(md); + break; + case PMC_CPU_INTEL_P5: + pmc_p5_finalize(md); + break; +#endif + default: + KASSERT(0, ("[intel,%d] unknown CPU type", __LINE__)); + } +} Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sun Nov 9 17:07:52 2008 (r184801) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sun Nov 9 17:37:54 2008 (r184802) @@ -154,6 +154,11 @@ static LIST_HEAD(, pmc_owner) pmc_ss_o /* + * A map of row indices to classdep structures. + */ +static struct pmc_classdep **pmc_rowindex_to_classdep; + +/* * Prototypes */ @@ -463,7 +468,7 @@ pmc_debugflags_sysctl_handler(SYSCTL_HAN (void) arg1; (void) arg2; /* unused parameters */ n = sizeof(pmc_debugstr); - newstr = malloc(n, M_PMC, M_ZERO|M_WAITOK); + newstr = malloc(n, M_PMC, M_WAITOK|M_ZERO); (void) strlcpy(newstr, pmc_debugstr, n); error = sysctl_handle_string(oidp, newstr, n, req); @@ -483,6 +488,33 @@ pmc_debugflags_sysctl_handler(SYSCTL_HAN #endif /* + * Map a row index to a classdep structure and return the adjusted row + * index for the PMC class index. + */ +static struct pmc_classdep * +pmc_ri_to_classdep(struct pmc_mdep *md, int ri, int *adjri) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 20:17:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CFA511065674; Sun, 9 Nov 2008 20:17:22 +0000 (UTC) Date: Sun, 9 Nov 2008 20:17:22 +0000 From: Alexey Dokuchaev To: Joseph Koshy Message-ID: <20081109201722.GA15911@FreeBSD.org> References: <200811091707.mA9H7rVL046478@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <200811091707.mA9H7rVL046478@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184801 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 20:17:22 -0000 On Sun, Nov 09, 2008 at 05:07:53PM +0000, Joseph Koshy wrote: > Author: jkoshy > Date: Sun Nov 9 17:07:52 2008 > New Revision: 184801 > URL: http://svn.freebsd.org/changeset/base/184801 > > Log: > Style tweak. > > Modified: > head/sys/dev/hwpmc/hwpmc_logging.c > > /* create global pool of log buffers */ > for (n = 0; n < pmc_nlogbuffers; n++) { > - plb = malloc(1024 * pmclog_buffer_size, > - M_PMC, M_ZERO|M_WAITOK); > + plb = malloc(1024 * pmclog_buffer_size, M_PMC, > + M_WAITOK|M_ZERO); Style also suggests spaces around `|' (as does readability). ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Nov 9 23:44:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 883841065680; Sun, 9 Nov 2008 23:44:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F54D8FC08; Sun, 9 Nov 2008 23:44:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA9NiWeJ053451; Sun, 9 Nov 2008 23:44:32 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA9NiW6g053450; Sun, 9 Nov 2008 23:44:32 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200811092344.mA9NiW6g053450@svn.freebsd.org> From: Maxim Sobolev Date: Sun, 9 Nov 2008 23:44:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184804 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 23:44:32 -0000 Author: sobomax Date: Sun Nov 9 23:44:32 2008 New Revision: 184804 URL: http://svn.freebsd.org/changeset/base/184804 Log: Improve on 184781 - instead of ignoring the file when the only difference is CVS Id, replace the old one with the new one automatically. While I don't see much difference, some people think it's somehow better that way. Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Nov 9 20:36:13 2008 (r184803) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Nov 9 23:44:32 2008 (r184804) @@ -956,8 +956,14 @@ for COMPFILE in `find . -type f -size +0 sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ /dev/null 2>&1; then - echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, deleting" - rm "${COMPFILE}" + echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" + if mm_install "${COMPFILE}"; then + echo " *** ${COMPFILE} upgraded successfully" + echo '' + rm "${COMPFILE}" + else + echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" + fi fi rm -f "${TMPFILE1}" "${TMPFILE2}" ;; From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 01:24:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F82D1065689; Mon, 10 Nov 2008 01:24:20 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5785F8FC1A; Mon, 10 Nov 2008 01:24:20 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA1OK8V055266; Mon, 10 Nov 2008 01:24:20 GMT (envelope-from kris@svn.freebsd.org) Received: (from kris@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAA1OK0g055265; Mon, 10 Nov 2008 01:24:20 GMT (envelope-from kris@svn.freebsd.org) Message-Id: <200811100124.mAA1OK0g055265@svn.freebsd.org> From: Kris Kennaway Date: Mon, 10 Nov 2008 01:24:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184805 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 01:24:20 -0000 Author: kris Date: Mon Nov 10 01:24:19 2008 New Revision: 184805 URL: http://svn.freebsd.org/changeset/base/184805 Log: Reclaim src commit bits from the following committers who have been inactive in src for >2 years: andreas babkin bakul billf bmilekic cracauer damien dmlb eik hoek hosokawa hsu ikob imura jake jayanth jlemon jmz matk matusita nik onoe pdeuskar rsm sah shiba sumikawa tackerman twinterg wosch Thankyou for all your hard work in the past! Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Nov 9 23:44:32 2008 (r184804) +++ svnadmin/conf/access Mon Nov 10 01:24:19 2008 (r184805) @@ -23,19 +23,14 @@ alc alfred ambrisko andre -andreas antoine ariff attilio avatar -babkin -bakul bde benjsc benno -billf bmah -bmilekic bms brian freebsd-committers@Awfulhak.org brooks @@ -48,10 +43,8 @@ charnier cognet cokane cperciva -cracauer csjp daichi -damien darrenr das davidc @@ -65,14 +58,12 @@ des dfr dg dhartmei -dmlb dougb dumbbell dwhite dwmalone dwmalone=freebsd-committers@maths.tcd.ie ed edwin -eik eivind emaste emax @@ -96,19 +87,12 @@ guido harti hm hmp -hoek -hosokawa hrs -hsu iedowse -ikob imp -imura ivoras iwasaki -jake jasone -jayanth jb jeff jfv @@ -117,11 +101,9 @@ jhb jinmei jkim jkoshy -jlemon jls jmallett jmg -jmz joerg freebsd-devel@uriah.heep.sax.de jon julian @@ -146,9 +128,7 @@ marcel marius markm markus -matk matteo -matusita mav maxim mbr @@ -166,15 +146,12 @@ murray mux n_hibma devnull netchild -nik nwhitehorn nyan obrien oleg olli -onoe pb -pdeuskar peadar peter peter@wemm.org phantom @@ -196,10 +173,8 @@ rodrigc rpaulo rrs rse -rsm ru rwatson bb+lists.freebsd.cvs-committers@cyrus.watson.org -sah sam sanpei sbruno @@ -209,7 +184,6 @@ scottl se sephe sepotvin -shiba silby simokawa simon @@ -219,10 +193,8 @@ sson ssouhlal stas stefanf -sumikawa suz syrinx -tackerman takawata tanimura thomas @@ -231,7 +203,6 @@ ticso trasz trhodes truckman -twinterg ume ups vanhu @@ -241,7 +212,6 @@ wes wes@opensail.org wilko freebsd-commits@freebie.xs4all.nl wkoszek wollman -wosch wpaul wsalamon yar From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 01:42:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BAC61065688; Mon, 10 Nov 2008 01:42:47 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 825028FC08; Mon, 10 Nov 2008 01:42:47 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA1glEe055602; Mon, 10 Nov 2008 01:42:47 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAA1glCJ055598; Mon, 10 Nov 2008 01:42:47 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <200811100142.mAA1glCJ055598@svn.freebsd.org> From: David Xu Date: Mon, 10 Nov 2008 01:42:47 +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: r184806 - in stable/7: include sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 01:42:47 -0000 Author: davidxu Date: Mon Nov 10 01:42:46 2008 New Revision: 184806 URL: http://svn.freebsd.org/changeset/base/184806 Log: MFC: Add POSIX clock id CLOCK_THREAD_CPUTIME_ID support. Approved by: re (kib) Modified: stable/7/include/time.h stable/7/include/unistd.h stable/7/sys/kern/kern_time.c stable/7/sys/sys/time.h Modified: stable/7/include/time.h ============================================================================== --- stable/7/include/time.h Mon Nov 10 01:24:19 2008 (r184805) +++ stable/7/include/time.h Mon Nov 10 01:42:46 2008 (r184806) @@ -108,6 +108,7 @@ typedef __timer_t timer_t; #define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ +#define CLOCK_THREAD_CPUTIME_ID 14 #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 Modified: stable/7/include/unistd.h ============================================================================== --- stable/7/include/unistd.h Mon Nov 10 01:24:19 2008 (r184805) +++ stable/7/include/unistd.h Mon Nov 10 01:42:46 2008 (r184806) @@ -111,7 +111,7 @@ typedef __useconds_t useconds_t; #define _POSIX_SPIN_LOCKS 200112L #define _POSIX_THREAD_ATTR_STACKADDR 200112L #define _POSIX_THREAD_ATTR_STACKSIZE 200112L -#define _POSIX_THREAD_CPUTIME -1 +#define _POSIX_THREAD_CPUTIME 200112L #define _POSIX_THREAD_PRIO_INHERIT 200112L #define _POSIX_THREAD_PRIO_PROTECT 200112L #define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L Modified: stable/7/sys/kern/kern_time.c ============================================================================== --- stable/7/sys/kern/kern_time.c Mon Nov 10 01:24:19 2008 (r184805) +++ stable/7/sys/kern/kern_time.c Mon Nov 10 01:42:46 2008 (r184806) @@ -201,6 +201,7 @@ kern_clock_gettime(struct thread *td, cl { struct timeval sys, user; struct proc *p; + uint64_t runtime, curtime, switchtime; p = td->td_proc; switch (clock_id) { @@ -242,6 +243,16 @@ kern_clock_gettime(struct thread *td, cl ats->tv_sec = time_second; ats->tv_nsec = 0; break; + case CLOCK_THREAD_CPUTIME_ID: + critical_enter(); + switchtime = PCPU_GET(switchtime); + curtime = cpu_ticks(); + runtime = td->td_runtime; + critical_exit(); + runtime = cputick2usec(runtime + curtime - switchtime); + ats->tv_sec = runtime / 1000000; + ats->tv_nsec = runtime % 1000000 * 1000; + break; default: return (EINVAL); } Modified: stable/7/sys/sys/time.h ============================================================================== --- stable/7/sys/sys/time.h Mon Nov 10 01:24:19 2008 (r184805) +++ stable/7/sys/sys/time.h Mon Nov 10 01:42:46 2008 (r184806) @@ -246,6 +246,7 @@ struct clockinfo { #define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ +#define CLOCK_THREAD_CPUTIME_ID 14 #endif #ifndef TIMER_ABSTIME From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 05:04:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6966D106567C; Mon, 10 Nov 2008 05:04:56 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A39E8FC0A; Mon, 10 Nov 2008 05:04:56 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA54uot059389; Mon, 10 Nov 2008 05:04:56 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAA54ts7059386; Mon, 10 Nov 2008 05:04:55 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811100504.mAA54ts7059386@svn.freebsd.org> From: Tim Kientzle Date: Mon, 10 Nov 2008 05:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184807 - in head/usr.bin/tar: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 05:04:56 -0000 Author: kientzle Date: Mon Nov 10 05:04:55 2008 New Revision: 184807 URL: http://svn.freebsd.org/changeset/base/184807 Log: Test --strip-components and fix it to actually work. Jaakko did a good job writing this test; it exercises a lot of subtle cases. The trickiest one is that a hardlink to something that didn't get extracted should not itself be extracted. In some sense, this is not the desired behavior (we'd rather restore the file), but it's the best you can do in a single-pass restore of a tar archive. The test here should be extended to exercise cpio and newc formats as well, since their hardlink models are different, which will lead to different handling of some of these edge cases. Submitted by: Jaakko Heinonen MFC after: 30 days Added: head/usr.bin/tar/test/test_strip_components.c (contents, props changed) Modified: head/usr.bin/tar/test/Makefile head/usr.bin/tar/util.c Modified: head/usr.bin/tar/test/Makefile ============================================================================== --- head/usr.bin/tar/test/Makefile Mon Nov 10 01:42:46 2008 (r184806) +++ head/usr.bin/tar/test/Makefile Mon Nov 10 05:04:55 2008 (r184807) @@ -18,6 +18,7 @@ TESTS= \ test_option_q.c \ test_patterns.c \ test_stdio.c \ + test_strip_components.c \ test_symlink_dir.c \ test_version.c Added: head/usr.bin/tar/test/test_strip_components.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/tar/test/test_strip_components.c Mon Nov 10 05:04:55 2008 (r184807) @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +static int +touch(const char *fn) +{ + int fd = open(fn, O_RDWR | O_CREAT | 0644); + failure("Couldn't create file '%s', fd=%d, errno=%d (%s)\n", + fn, fd, errno, strerror(errno)); + if (!assert(fd > 0)) + return (0); /* Failure. */ + close(fd); + return (1); /* Success */ +} + +DEFINE_TEST(test_strip_components) +{ + struct stat st; + + assertEqualInt(0, mkdir("d0", 0755)); + assertEqualInt(0, chdir("d0")); + assertEqualInt(0, mkdir("d1", 0755)); + assertEqualInt(0, mkdir("d1/d2", 0755)); + assertEqualInt(0, mkdir("d1/d2/d3", 0755)); + assertEqualInt(1, touch("d1/d2/f1")); + assertEqualInt(0, link("d1/d2/f1", "l1")); + assertEqualInt(0, link("d1/d2/f1", "d1/l2")); + assertEqualInt(0, symlink("d1/d2/f1", "s1")); + assertEqualInt(0, symlink("d2/f1", "d1/s2")); + assertEqualInt(0, chdir("..")); + + assertEqualInt(0, systemf("%s -cf test.tar d0", testprog)); + + assertEqualInt(0, mkdir("target", 0755)); + assertEqualInt(0, systemf("%s -x -C target --strip-components 2 " + "-f test.tar", testprog)); + + failure("d0/ is too short and should not get restored"); + assertEqualInt(-1, lstat("target/d0", &st)); + failure("d0/d1/ is too short and should not get restored"); + assertEqualInt(-1, lstat("target/d1", &st)); + failure("d0/l1 is too short and should not get restored"); + assertEqualInt(-1, lstat("target/l1", &st)); + failure("d0/d1/l2 is a hardlink to file whose name was too short"); + assertEqualInt(-1, lstat("target/l2", &st)); + assertEqualInt(0, lstat("target/s2", &st)); + failure("d0/d1/s2 is a symlink to something that won't be extracted"); + assertEqualInt(-1, stat("target/s2", &st)); + failure("d0/d1/d2 should be extracted"); + assertEqualInt(0, lstat("target/d2", &st)); + failure("d0/d1/d2/f1 is a hardlink to file whose name was too short"); + assertEqualInt(-1, lstat("target/d2/f1", &st)); +} Modified: head/usr.bin/tar/util.c ============================================================================== --- head/usr.bin/tar/util.c Mon Nov 10 01:42:46 2008 (r184806) +++ head/usr.bin/tar/util.c Mon Nov 10 05:04:55 2008 (r184807) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); static void bsdtar_vwarnc(struct bsdtar *, int code, const char *fmt, va_list ap); +static const char *strip_components(const char *path, int elements); /* * Print a string, taking care with any non-printable characters. @@ -346,6 +347,31 @@ do_chdir(struct bsdtar *bsdtar) bsdtar->pending_chdir = NULL; } +const char * +strip_components(const char *path, int elements) +{ + const char *p = path; + + while (elements > 0) { + switch (*p++) { + case '/': + elements--; + path = p; + break; + case '\0': + /* Path is too short, skip it. */ + return (NULL); + } + } + + while (*path == '/') + ++path; + if (*path == '\0') + return (NULL); + + return (path); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -402,24 +428,20 @@ edit_pathname(struct bsdtar *bsdtar, str #endif /* Strip leading dir names as per --strip-components option. */ - if ((r = bsdtar->strip_components) > 0) { - const char *p = name; + if (bsdtar->strip_components > 0) { + const char *linkname = archive_entry_hardlink(entry); + + name = strip_components(name, bsdtar->strip_components); + if (name == NULL) + return (1); - while (r > 0) { - switch (*p++) { - case '/': - r--; - name = p; - break; - case '\0': - /* Path is too short, skip it. */ + if (linkname != NULL) { + linkname = strip_components(linkname, + bsdtar->strip_components); + if (linkname == NULL) return (1); - } + archive_entry_copy_hardlink(entry, linkname); } - while (*name == '/') - ++name; - if (*name == '\0') - return (1); } /* Strip redundant leading '/' characters. */ From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 05:24:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEA36106567F; Mon, 10 Nov 2008 05:24:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3FC8FC14; Mon, 10 Nov 2008 05:24:13 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA5ODPs059747; Mon, 10 Nov 2008 05:24:13 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAA5ODJL059746; Mon, 10 Nov 2008 05:24:13 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811100524.mAA5ODJL059746@svn.freebsd.org> From: Tim Kientzle Date: Mon, 10 Nov 2008 05:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184808 - head/usr.bin/tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 05:24:13 -0000 Author: kientzle Date: Mon Nov 10 05:24:13 2008 New Revision: 184808 URL: http://svn.freebsd.org/changeset/base/184808 Log: Include more detailed explanation of this case, since it's pretty subtle why it comes out the way it does. Once you realize that it depends on the archiving order, it's also important to realize that filesystem differences aren't going to break this case. (Some of the other tests have had to be extensively rewritten to make them independent of the order in which a particular filesystem returns file entries.) (This commit also serves to note the PR number that I accidentally omitted from the previous commit.) PR: bin/128562 MFC after: 30 days Modified: head/usr.bin/tar/test/test_strip_components.c Modified: head/usr.bin/tar/test/test_strip_components.c ============================================================================== --- head/usr.bin/tar/test/test_strip_components.c Mon Nov 10 05:04:55 2008 (r184807) +++ head/usr.bin/tar/test/test_strip_components.c Mon Nov 10 05:24:13 2008 (r184808) @@ -63,15 +63,44 @@ DEFINE_TEST(test_strip_components) assertEqualInt(-1, lstat("target/d0", &st)); failure("d0/d1/ is too short and should not get restored"); assertEqualInt(-1, lstat("target/d1", &st)); - failure("d0/l1 is too short and should not get restored"); - assertEqualInt(-1, lstat("target/l1", &st)); - failure("d0/d1/l2 is a hardlink to file whose name was too short"); - assertEqualInt(-1, lstat("target/l2", &st)); - assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/s2 is a symlink to something that won't be extracted"); assertEqualInt(-1, stat("target/s2", &st)); + assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/d2 should be extracted"); assertEqualInt(0, lstat("target/d2", &st)); + + /* + * This next is a complicated case. d0/l1, d0/d1/l2, and + * d0/d1/d2/f1 are all hardlinks to the same file; d0/l1 can't + * be extracted with --strip-components=2 and the other two + * can. Remember that tar normally stores the first file with + * a body and the other as hardlink entries to the first + * appearance. So the final result depends on the order in + * which these three names get archived. If d0/l1 is first, + * none of the three can be restored. If either of the longer + * names are first, then the two longer ones can both be + * restored. + * + * The tree-walking code used by bsdtar always visits files + * before subdirectories, so bsdtar's behavior is fortunately + * deterministic: d0/l1 will always get stored first and the + * other two will be stored as hardlinks to d0/l1. Since + * d0/l1 can't be extracted, none of these three will be + * extracted. + * + * It may be worth extending this test to force a particular + * archiving order so as to exercise both of the cases described + * above. + * + * Of course, this is all totally different for cpio and newc + * formats because the hardlink management is different. + * TODO: Rename this to test_strip_components_tar and create + * parallel tests for cpio and newc formats. + */ + failure("d0/l1 is too short and should not get restored"); + assertEqualInt(-1, lstat("target/l1", &st)); + failure("d0/d1/l2 is a hardlink to file whose name was too short"); + assertEqualInt(-1, lstat("target/l2", &st)); failure("d0/d1/d2/f1 is a hardlink to file whose name was too short"); assertEqualInt(-1, lstat("target/d2/f1", &st)); } From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 06:35:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68BD3106564A; Mon, 10 Nov 2008 06:35:31 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56C7B8FC12; Mon, 10 Nov 2008 06:35:31 +0000 (UTC) (envelope-from matteo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA6ZVI2060972; Mon, 10 Nov 2008 06:35:31 GMT (envelope-from matteo@svn.freebsd.org) Received: (from matteo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAA6ZUWV060966; Mon, 10 Nov 2008 06:35:30 GMT (envelope-from matteo@svn.freebsd.org) Message-Id: <200811100635.mAA6ZUWV060966@svn.freebsd.org> From: Matteo Riondato Date: Mon, 10 Nov 2008 06:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184809 - in head/usr.sbin/cron: cron crontab lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 06:35:31 -0000 Author: matteo Date: Mon Nov 10 06:35:30 2008 New Revision: 184809 URL: http://svn.freebsd.org/changeset/base/184809 Log: Make usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean Tested with: make universe MFC after: 3 days Modified: head/usr.sbin/cron/cron/cron.h head/usr.sbin/cron/crontab/Makefile head/usr.sbin/cron/crontab/crontab.c head/usr.sbin/cron/lib/Makefile head/usr.sbin/cron/lib/entry.c head/usr.sbin/cron/lib/misc.c Modified: head/usr.sbin/cron/cron/cron.h ============================================================================== --- head/usr.sbin/cron/cron/cron.h Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/cron/cron.h Mon Nov 10 06:35:30 2008 (r184809) @@ -221,6 +221,7 @@ int job_runqueue(void), get_char(FILE *), get_string(char *, int, FILE *, char *), swap_uids(void), + swap_uids_back(void), load_env(char *, FILE *), cron_pclose(FILE *), strcmp_until(char *, char *, int), @@ -238,7 +239,7 @@ char *env_get(char *, char **), user *load_user(int, struct passwd *, char *), *find_user(cron_db *, char *); -entry *load_entry(FILE *, void (*)(), +entry *load_entry(FILE *, void (*)(char *), struct passwd *, char **); FILE *cron_popen(char *, char *, entry *); Modified: head/usr.sbin/cron/crontab/Makefile ============================================================================== --- head/usr.sbin/cron/crontab/Makefile Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/crontab/Makefile Mon Nov 10 06:35:30 2008 (r184809) @@ -8,6 +8,8 @@ BINOWN= root BINMODE=4555 PRECIOUSPROG= +WARNS=3 + CFLAGS+= -I${.CURDIR}/../cron DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL} Modified: head/usr.sbin/cron/crontab/crontab.c ============================================================================== --- head/usr.sbin/cron/crontab/crontab.c Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/crontab/crontab.c Mon Nov 10 06:35:30 2008 (r184809) @@ -73,8 +73,7 @@ static int replace_cmd(void); static void -usage(msg) - char *msg; +usage(char *msg) { fprintf(stderr, "crontab: usage error: %s\n", msg); fprintf(stderr, "%s\n%s\n", @@ -85,9 +84,7 @@ usage(msg) int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { int exitstatus; @@ -219,7 +216,7 @@ parse_args(argc, argv) err(ERROR_EXIT, "swapping uids"); if (!(NewCrontab = fopen(Filename, "r"))) err(ERROR_EXIT, "%s", Filename); - if (swap_uids() < OK) + if (swap_uids_back() < OK) err(ERROR_EXIT, "swapping uids back"); } } @@ -414,14 +411,14 @@ edit_cmd() { /* parent */ { - void (*f[4])(); - f[0] = signal(SIGHUP, SIG_IGN); - f[1] = signal(SIGINT, SIG_IGN); - f[2] = signal(SIGTERM, SIG_IGN); + void (*sig[3])(int signal); + sig[0] = signal(SIGHUP, SIG_IGN); + sig[1] = signal(SIGINT, SIG_IGN); + sig[2] = signal(SIGTERM, SIG_IGN); xpid = wait(&waiter); - signal(SIGHUP, f[0]); - signal(SIGINT, f[1]); - signal(SIGTERM, f[2]); + signal(SIGHUP, sig[0]); + signal(SIGINT, sig[1]); + signal(SIGTERM, sig[2]); } if (xpid != pid) { warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor); @@ -498,7 +495,6 @@ replace_cmd() { entry *e; time_t now = time(NULL); char **envp = env_init(); - void (*f[3])(); if (envp == NULL) { warnx("cannot allocate memory"); Modified: head/usr.sbin/cron/lib/Makefile ============================================================================== --- head/usr.sbin/cron/lib/Makefile Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/lib/Makefile Mon Nov 10 06:35:30 2008 (r184809) @@ -4,6 +4,8 @@ LIB= cron INTERNALLIB= SRCS= entry.c env.c misc.c +WARNS = 3 + CFLAGS+= -I${.CURDIR}/../cron CFLAGS+= -DLOGIN_CAP -DPAM Modified: head/usr.sbin/cron/lib/entry.c ============================================================================== --- head/usr.sbin/cron/lib/entry.c Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/lib/entry.c Mon Nov 10 06:35:30 2008 (r184809) @@ -87,7 +87,7 @@ free_entry(e) entry * load_entry(file, error_func, pw, envp) FILE *file; - void (*error_func)(); + void (*error_func)(char *); struct passwd *pw; char **envp; { Modified: head/usr.sbin/cron/lib/misc.c ============================================================================== --- head/usr.sbin/cron/lib/misc.c Mon Nov 10 05:24:13 2008 (r184808) +++ head/usr.sbin/cron/lib/misc.c Mon Nov 10 06:35:30 2008 (r184809) @@ -48,6 +48,7 @@ static const char rcsid[] = static int LogFD = ERR; +void mkprint(register char*, register unsigned char*, register int); int @@ -324,9 +325,7 @@ skip_comments(file) * FALSE otherwise. */ static int -in_file(string, file) - char *string; - FILE *file; +in_file(char *string, FILE *file) { char line[MAX_TEMPSTR]; @@ -521,10 +520,7 @@ first_word(s, t) * heavily ascii-dependent. */ void -mkprint(dst, src, len) - register char *dst; - register unsigned char *src; - register int len; +mkprint(register char *dst, register unsigned char *src, register int len) { while (len-- > 0) { From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 10:07:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E88F106567F; Mon, 10 Nov 2008 10:07:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4108FC23; Mon, 10 Nov 2008 10:07:40 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 1E3726D452; Mon, 10 Nov 2008 10:07:39 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 053C484490; Mon, 10 Nov 2008 11:07:39 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev References: <200811090734.mA97YBld033553@svn.freebsd.org> <20081109084817.GA23323@FreeBSD.org> Date: Mon, 10 Nov 2008 11:07:38 +0100 In-Reply-To: <20081109084817.GA23323@FreeBSD.org> (Alexey Dokuchaev's message of "Sun, 9 Nov 2008 08:48:17 +0000") Message-ID: <861vxj6gid.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Matteo Riondato , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184780 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 10:07:40 -0000 Alexey Dokuchaev writes: > Matteo Riondato writes: > > +void > > +static remove_tmp(int sig) > > +{ > > + if (tmp_path) { > > + unlink(tmp_path); > > + } > > + exit(ERROR_EXIT); > > +} > This looks weird: `static' should be on same line as `void' as `static > void' (so ^remove_tmp would match). It will also always exit with > ERROR_EXIT, which does not look right, does it? The correct solution would be: static void remove_tmp(int sig) { (void)sig; if (tmp_path) unlink(tmp_path); _exit(1) } This assumes that tmp_path is atomic. In theory, the only type of global variable you can access from a signal handler is sig_atomic_t, but in practice, any volatile variable will work. (yes, the unconditional _exit() is correct) For bonus points, you should re-throw the signal rather than _exit(): static void remove_tmp(int sig) { if (tmp_path) unlink(tmp_path); signal(sig, SIG_DFL); raise(sig); } BTW, the "void (*f[3])()" thing in replace_cmd() is pointless; just reset the three signals to SIG_DFL. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 10:11:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1082410656A7; Mon, 10 Nov 2008 10:11:54 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id B25858FC25; Mon, 10 Nov 2008 10:11:53 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C496B6D43F; Mon, 10 Nov 2008 10:11:52 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A8ED284497; Mon, 10 Nov 2008 11:11:52 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Kostik Belousov References: <200811090644.mA96ira1032670@svn.freebsd.org> <20081109132026.GL18100@deviant.kiev.zoral.com.ua> Date: Mon, 10 Nov 2008 11:11:52 +0100 In-Reply-To: <20081109132026.GL18100@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sun, 9 Nov 2008 15:20:26 +0200") Message-ID: <86wsfb51qv.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Matteo Riondato , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184779 - head/usr.sbin/cron/crontab X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 10:11:56 -0000 Kostik Belousov writes: > Matteo Riondato writes: > > - (void) sprintf(n, CRON_TAB(User)); > > + (void) snprintf(n, sizeof(n), CRON_TAB(User)); > This note is probably also about paranoia instead of exploitable bug. > I think that it is better to use %s format explicitely instead of > expecting no '%' in the CRON_TAB(User). Better still would be to replace the vile CRON_TAB() macro with a function: static inline int cron_tab(char *str, size_t len, const char *user) { return (snprintf(str, len, "%s/%s", SPOOL_DIR, user)) } DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 12:07:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1043F1065698; Mon, 10 Nov 2008 12:07:55 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id D26D38FC2B; Mon, 10 Nov 2008 12:07:53 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so342386ugs.39 for ; Mon, 10 Nov 2008 04:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=2FyDX9nYJIbtl93Od5uHOg6OYsKe4GSnRTWYvfxFyas=; b=yA7Dp2AxG8sR6F9iEbv+5sE4MPCZa4EHTb1rk0con74WvYfBQrRgH4NBKPPZjKeQtu iF66lyYSAfmoJU+v1g3IdUf6ki3ckJuiIQaGvWly1cMhgdSK55L37vMP9eW+CxO7dJTF up/GPxNJ9CWSUBAEdUAnT0sShDEBMO1vwJdv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=K/P8XrxiGgwzUvh4dve0bIwqRAt64BRYKOu2/AkAGbjd4CaMkvAr9wMNL7vfibaKw3 3okunx2s3U6kn9RrG5vBo3K9lvMk4n8TktDg6SLKOrO1lf5OSQWvdzJFFpe3QQoSN6fV o/yhtXm3q13VSnEiiP7ymZhZyFpOJV1COLX6A= Received: by 10.103.252.17 with SMTP id e17mr3648064mus.14.1226318872422; Mon, 10 Nov 2008 04:07:52 -0800 (PST) Received: from ndenev.cmotd.com (blah.sun-fish.com [217.18.249.150]) by mx.google.com with ESMTPS id u9sm30883850muf.9.2008.11.10.04.07.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Nov 2008 04:07:49 -0800 (PST) Message-Id: <217D0CE9-905B-4AAC-81E7-AE7AA8A00866@gmail.com> From: Nikolay Denev To: David Xu In-Reply-To: <200811100142.mAA1glCJ055598@svn.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Mon, 10 Nov 2008 14:07:45 +0200 References: <200811100142.mAA1glCJ055598@svn.freebsd.org> X-Pgp-Agent: GPGMail d53 (v53, Leopard) X-Mailer: Apple Mail (2.929.2) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r184806 - in stable/7: include sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 12:07:55 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10 Nov, 2008, at 03:42 , David Xu wrote: > Author: davidxu > Date: Mon Nov 10 01:42:46 2008 > New Revision: 184806 > URL: http://svn.freebsd.org/changeset/base/184806 > > Log: > MFC: > Add POSIX clock id CLOCK_THREAD_CPUTIME_ID support. > > Approved by: re (kib) Thanks! - -- Regards, Nikolay Denev -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (Darwin) iEYEARECAAYFAkkYJBEACgkQHNAJ/fLbfrkh+gCgvT3i9t4Ulle7cJx4Us8NxfZS mqAAn0V+t6DFTDEuOCN4Mnrj4TR8d48K =GQgC -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 17:30:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB49C1065672; Mon, 10 Nov 2008 17:30:49 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98EFD8FC20; Mon, 10 Nov 2008 17:30:49 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAHUncE076012; Mon, 10 Nov 2008 17:30:49 GMT (envelope-from jasone@svn.freebsd.org) Received: (from jasone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAHUnIt076010; Mon, 10 Nov 2008 17:30:49 GMT (envelope-from jasone@svn.freebsd.org) Message-Id: <200811101730.mAAHUnIt076010@svn.freebsd.org> From: Jason Evans Date: Mon, 10 Nov 2008 17:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184819 - in stable/7/lib/libc: . stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 17:30:49 -0000 Author: jasone Date: Mon Nov 10 17:30:49 2008 New Revision: 184819 URL: http://svn.freebsd.org/changeset/base/184819 Log: MFC: Revert to preferring mmap(2) over sbrk(2) when mapping memory, due to potential extreme contention in the kernel for multi-threaded applications on SMP systems. Approved by: re (kib) Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdlib/malloc.3 stable/7/lib/libc/stdlib/malloc.c Modified: stable/7/lib/libc/stdlib/malloc.3 ============================================================================== --- stable/7/lib/libc/stdlib/malloc.3 Mon Nov 10 16:44:25 2008 (r184818) +++ stable/7/lib/libc/stdlib/malloc.3 Mon Nov 10 17:30:49 2008 (r184819) @@ -250,7 +250,7 @@ If both the .Dq D and .Dq M -options are enabled, the allocator prefers the DSS over anonymous mappings, +options are enabled, the allocator prefers anonymous mappings over the DSS, but allocation only fails if memory cannot be acquired via either method. If neither option is enabled, then the .Dq M Modified: stable/7/lib/libc/stdlib/malloc.c ============================================================================== --- stable/7/lib/libc/stdlib/malloc.c Mon Nov 10 16:44:25 2008 (r184818) +++ stable/7/lib/libc/stdlib/malloc.c Mon Nov 10 17:30:49 2008 (r184819) @@ -1275,11 +1275,6 @@ base_pages_alloc(size_t minsize) { #ifdef MALLOC_DSS - if (opt_dss) { - if (base_pages_alloc_dss(minsize) == false) - return (false); - } - if (opt_mmap && minsize != 0) #endif { @@ -1287,6 +1282,14 @@ base_pages_alloc(size_t minsize) return (false); } +#ifdef MALLOC_DSS + if (opt_dss) { + if (base_pages_alloc_dss(minsize) == false) + return (false); + } + +#endif + return (true); } @@ -1709,6 +1712,15 @@ chunk_alloc(size_t size, bool zero) assert((size & chunksize_mask) == 0); #ifdef MALLOC_DSS + if (opt_mmap) +#endif + { + ret = chunk_alloc_mmap(size); + if (ret != NULL) + goto RETURN; + } + +#ifdef MALLOC_DSS if (opt_dss) { ret = chunk_recycle_dss(size, zero); if (ret != NULL) { @@ -1719,14 +1731,7 @@ chunk_alloc(size_t size, bool zero) if (ret != NULL) goto RETURN; } - - if (opt_mmap) #endif - { - ret = chunk_alloc_mmap(size); - if (ret != NULL) - goto RETURN; - } /* All strategies for allocation failed. */ ret = NULL; From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 18:24:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B5041065677; Mon, 10 Nov 2008 18:24:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 186D88FC0C; Mon, 10 Nov 2008 18:24:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAIOCMm077221; Mon, 10 Nov 2008 18:24:12 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAIOBdY077218; Mon, 10 Nov 2008 18:24:11 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811101824.mAAIOBdY077218@svn.freebsd.org> From: Robert Watson Date: Mon, 10 Nov 2008 18:24:11 +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: r184823 - in stable/7/sys: . modules/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 18:24:12 -0000 Author: rwatson Date: Mon Nov 10 18:24:11 2008 New Revision: 184823 URL: http://svn.freebsd.org/changeset/base/184823 Log: Merge r184298 from head to stable/7: Remove endearing but syntactically unnecessary "return;" statements directly before the final closeing brackets of some TCP functions. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/modules/cxgb/ (props changed) stable/7/sys/netinet/tcp_input.c stable/7/sys/netinet/tcp_sack.c stable/7/sys/netinet/tcp_syncache.c Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Mon Nov 10 18:09:52 2008 (r184822) +++ stable/7/sys/netinet/tcp_input.c Mon Nov 10 18:24:11 2008 (r184823) @@ -878,7 +878,6 @@ drop: free(s, M_TCPLOG); if (m != NULL) m_freem(m); - return; } static void @@ -2445,7 +2444,6 @@ drop: if (headlocked) INP_INFO_WUNLOCK(&tcbinfo); m_freem(m); - return; } /* @@ -2504,7 +2502,6 @@ tcp_dropwithreset(struct mbuf *m, struct return; drop: m_freem(m); - return; } /* Modified: stable/7/sys/netinet/tcp_sack.c ============================================================================== --- stable/7/sys/netinet/tcp_sack.c Mon Nov 10 18:09:52 2008 (r184822) +++ stable/7/sys/netinet/tcp_sack.c Mon Nov 10 18:24:11 2008 (r184823) @@ -677,5 +677,4 @@ tcp_sack_adjust(struct tcpcb *tp) if (SEQ_LT(tp->snd_nxt, cur->end)) return; tp->snd_nxt = tp->snd_fack; - return; } Modified: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Mon Nov 10 18:09:52 2008 (r184822) +++ stable/7/sys/netinet/tcp_syncache.c Mon Nov 10 18:24:11 2008 (r184823) @@ -1297,7 +1297,6 @@ done: #endif *lsop = NULL; m_freem(m); - return; } static int @@ -1624,7 +1623,6 @@ syncookie_generate(struct syncache_head } tcpstat.tcps_sc_sendcookie++; - return; } static struct syncache * From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 19:17:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42CE6106567C; Mon, 10 Nov 2008 19:17:07 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E73A08FC1C; Mon, 10 Nov 2008 19:17:06 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 73F976D449; Mon, 10 Nov 2008 19:17:05 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6316284497; Mon, 10 Nov 2008 20:17:05 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Matteo Riondato References: <200811100635.mAA6ZUWV060966@svn.freebsd.org> Date: Mon, 10 Nov 2008 20:17:05 +0100 In-Reply-To: <200811100635.mAA6ZUWV060966@svn.freebsd.org> (Matteo Riondato's message of "Mon, 10 Nov 2008 06:35:30 +0000 (UTC)") Message-ID: <86wsfb1jda.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184809 - in head/usr.sbin/cron: cron crontab lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 19:17:07 -0000 Matteo Riondato writes: > +WARNS=3D3 SOP is to use ?=3D instead of =3D here so you can override it on the command line. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 20:14:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 194DE106568A; Mon, 10 Nov 2008 20:14:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 89CB88FC14; Mon, 10 Nov 2008 20:14:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mAAKE4ag066594; Mon, 10 Nov 2008 15:14:10 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Peter Wemm" Date: Mon, 10 Nov 2008 11:33:51 -0500 User-Agent: KMail/1.9.7 References: <200811041904.mA4J41dL005103@svn.freebsd.org> <200811041750.08355.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811101133.51947.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 10 Nov 2008 15:14:10 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8599/Mon Nov 10 11:43:18 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ivan Voras Subject: Re: svn commit: r184652 - in head/sys: dev/hwpmc fs/procfs kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 20:14:17 -0000 On Thursday 06 November 2008 10:21:37 am Peter Wemm wrote: > On Tue, Nov 4, 2008 at 2:50 PM, John Baldwin wrote: > > On Tuesday 04 November 2008 05:22:47 pm Ivan Voras wrote: > >> 2008/11/4 John Baldwin : > >> > Author: jhb > >> > Date: Tue Nov 4 19:04:01 2008 > >> > New Revision: 184652 > >> > URL: http://svn.freebsd.org/changeset/base/184652 > >> > > >> > Log: > >> > Remove unnecessary locking around vn_fullpath(). The vnode lock for the > >> > >> Does this affect realpath(3)? (whose non-scalability is often reported > >> for PHP web servers). > > > > realpath(3) calls getcwd(3) (which devolves to __getcwd(2) I think) once per > > invocation (and that already did not lock the vnode). It then calls lstat() > > for each component in the path. The lstat() calls should be using shared > > locks (at least with the recent changes to use shared lookups for UFS in > > HEAD). I imagine the bottleneck is more with lstat() than getcwd(3). > > Neither is helped by the specific changes above. > > Hmm. Would it make sense to provide a helper syscall specifically for > php to use for this? Without having looked at the php code, it sounds > like it might be helpful to have a syscall that returns the path and > an array of stat structs for each path component. Or is php only > doing this because of compatability with non-atomic getcwd() > implementations? Does php even need to do it? We could possibly move realpath(3) into the kernel. svr4 compat has svr4_resolvepath() which I think is basically a realpath(3) in the kernel that only does one pathname lookup rather than N. If that really works then it would probably be a boon. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 20:15:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 175801065693; Mon, 10 Nov 2008 20:15:29 +0000 (UTC) (envelope-from blue@white.lv) Received: from mx2.nttmcl.com (MX2.nttmcl.com [216.69.68.200]) by mx1.freebsd.org (Postfix) with ESMTP id E9EC68FC08; Mon, 10 Nov 2008 20:15:28 +0000 (UTC) (envelope-from blue@white.lv) Received: from localhost (localhost [127.0.0.1]) by mx2.nttmcl.com (Postfix) with ESMTP id 4AE5E4DD4F; Mon, 10 Nov 2008 11:53:17 -0800 (PST) X-Spam-Score: -3.714 X-Spam-Level: X-Spam-Status: No, score=-3.714 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.684, BAYES_00=-2.599, DNS_FROM_SECURITYSAGE=0.001] Received: from mx2.nttmcl.com ([127.0.0.1]) by localhost (mx2.nttmcl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WWtvTrCMsvcn; Mon, 10 Nov 2008 11:53:16 -0800 (PST) Received: from [216.69.69.190] (dhcp190.nttmcl.com [216.69.69.190]) by mx2.nttmcl.com (Postfix) with ESMTP id E22C74DD4D; Mon, 10 Nov 2008 11:53:16 -0800 (PST) Message-ID: <4918912D.2040100@white.lv> Date: Mon, 10 Nov 2008 11:53:17 -0800 From: "Eugene M. Kim" User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <200811100635.mAA6ZUWV060966@svn.freebsd.org> <86wsfb1jda.fsf@ds4.des.no> In-Reply-To: <86wsfb1jda.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Matteo Riondato , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184809 - in head/usr.sbin/cron: cron crontab lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 20:15:29 -0000 A (very) minor correction: Command-line variable assignments override even "="-style ones: $ cat Makefile OMG= OH MY GOD .error ${OMG} $ make "/home/ab/Makefile", line 3: OH MY GOD $ make OMG=OMIGOD "/home/ab/Makefile", line 3: OMIGOD But "="-style assignments does nullify overrides stored in src.conf or make.conf, so I believe your overall point is still quite valid. : ) Cheers, Eugene Dag-Erling Smørgrav wrote: > Matteo Riondato writes: > >> +WARNS=3 >> > > SOP is to use ?= instead of = here so you can override it on the command > line. > > DES > From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 20:54:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B78A10656A4; Mon, 10 Nov 2008 20:54:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458E78FC0A; Mon, 10 Nov 2008 20:54:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAKsWRW082229; Mon, 10 Nov 2008 20:54:32 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAKsVAQ082218; Mon, 10 Nov 2008 20:54:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200811102054.mAAKsVAQ082218@svn.freebsd.org> From: Andrew Thompson Date: Mon, 10 Nov 2008 20:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184824 - in head/sys/dev/usb2: controller core serial storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 20:54:33 -0000 Author: thompsa Date: Mon Nov 10 20:54:31 2008 New Revision: 184824 URL: http://svn.freebsd.org/changeset/base/184824 Log: Convert the two main locking areas into macros to make it clear on what we are grabbing and why. These are now: USB_BUS_LOCK/USB_BUS_UNLOCK USB_XFER_LOCK/USB_XFER_UNLOCK Reviewed by: alfred Modified: head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/at91dci_atmelarm.c head/sys/dev/usb2/controller/ehci2.c head/sys/dev/usb2/controller/ehci2_pci.c head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/musb2_otg_atmelarm.c head/sys/dev/usb2/controller/ohci2.c head/sys/dev/usb2/controller/ohci2_atmelarm.c head/sys/dev/usb2/controller/ohci2_pci.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/uhci2_pci.c head/sys/dev/usb2/controller/usb2_bus.h head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/controller/uss820dci_atmelarm.c head/sys/dev/usb2/controller/uss820dci_pccard.c head/sys/dev/usb2/core/usb2_busdma.c head/sys/dev/usb2/core/usb2_core.h head/sys/dev/usb2/core/usb2_device.c head/sys/dev/usb2/core/usb2_handle_request.c head/sys/dev/usb2/core/usb2_hub.c head/sys/dev/usb2/core/usb2_request.c head/sys/dev/usb2/core/usb2_sw_transfer.c head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/core/usb2_transfer.h head/sys/dev/usb2/serial/uvscom2.c head/sys/dev/usb2/storage/ata-usb2.c Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/at91dci.c Mon Nov 10 20:54:31 2008 (r184824) @@ -291,7 +291,7 @@ at91dci_rem_wakeup_set(struct usb2_devic DPRINTFN(5, "is_on=%u\n", is_on); - mtx_assert(&udev->bus->mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); sc = AT9100_DCI_BUS2SC(udev->bus); @@ -766,7 +766,7 @@ at91dci_vbus_interrupt(struct usb2_bus * DPRINTFN(5, "vbus = %u\n", is_on); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); if (is_on) { if (!sc->sc_flags.status_vbus) { sc->sc_flags.status_vbus = 1; @@ -791,7 +791,7 @@ at91dci_vbus_interrupt(struct usb2_bus * } } - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -801,13 +801,13 @@ at91dci_interrupt(struct at91dci_softc * { uint32_t status; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); status = AT91_UDP_READ_4(sc, AT91_UDP_ISR); status &= AT91_UDP_INT_DEFAULT; if (!status) { - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } /* acknowledge interrupts */ @@ -879,7 +879,7 @@ at91dci_interrupt(struct at91dci_softc * at91dci_interrupt_poll(sc); } - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1065,12 +1065,12 @@ at91dci_timeout(void *arg) DPRINTF("xfer=%p\n", xfer); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); /* transfer is transferred */ at91dci_device_done(xfer, USB_ERR_TIMEOUT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1115,7 +1115,7 @@ at91dci_root_intr_done(struct usb2_xfer DPRINTFN(9, "\n"); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_PRE_DATA) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -1255,7 +1255,7 @@ at91dci_device_done(struct usb2_xfer *xf struct at91dci_softc *sc = xfer->usb2_sc; uint8_t ep_no; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", xfer, xfer->pipe, error); @@ -1281,7 +1281,7 @@ at91dci_set_stall(struct usb2_device *ud uint32_t csr_val; uint8_t csr_reg; - mtx_assert(&udev->bus->mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); DPRINTFN(5, "pipe=%p\n", pipe); @@ -1405,7 +1405,7 @@ at91dci_clear_stall(struct usb2_device * DPRINTFN(5, "pipe=%p\n", pipe); - mtx_assert(&udev->bus->mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); /* check mode */ if (udev->flags.usb2_mode != USB_MODE_DEVICE) { @@ -1438,7 +1438,7 @@ at91dci_init(struct at91dci_softc *sc) sc->sc_bus.usbrev = USB_REV_1_1; sc->sc_bus.methods = &at91dci_bus_methods; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); /* turn on clocks */ @@ -1446,7 +1446,7 @@ at91dci_init(struct at91dci_softc *sc) (sc->sc_clocks_on) (sc->sc_clocks_arg); } /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); /* disable and clear all interrupts */ @@ -1483,7 +1483,7 @@ at91dci_init(struct at91dci_softc *sc) at91dci_clocks_off(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); /* catch any lost interrupts */ @@ -1495,7 +1495,7 @@ at91dci_init(struct at91dci_softc *sc) void at91dci_uninit(struct at91dci_softc *sc) { - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); /* disable and clear all interrupts */ AT91_UDP_WRITE_4(sc, AT91_UDP_IDR, 0xFFFFFFFF); @@ -1510,7 +1510,7 @@ at91dci_uninit(struct at91dci_softc *sc) at91dci_pull_down(sc); at91dci_clocks_off(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1532,10 +1532,10 @@ at91dci_do_poll(struct usb2_bus *bus) { struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); at91dci_interrupt_poll(sc); at91dci_root_ctrl_poll(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1897,7 +1897,7 @@ at91dci_root_ctrl_done(struct usb2_xfer uint16_t index; uint8_t use_polling; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_SETUP) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -1913,7 +1913,7 @@ at91dci_root_ctrl_done(struct usb2_xfer value = UGETW(std->req.wValue); index = UGETW(std->req.wIndex); - use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; /* demultiplex the control request */ Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci_atmelarm.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/at91dci_atmelarm.c Mon Nov 10 20:54:31 2008 (r184824) @@ -210,7 +210,7 @@ at91_udp_attach(device_t dev) device_set_ivars(sc->sc_dci.sc_bus.bdev, &sc->sc_dci.sc_bus); err = usb2_config_td_setup(&sc->sc_dci.sc_config_td, sc, - &sc->sc_dci.sc_bus.mtx, NULL, 0, 4); + &sc->sc_dci.sc_bus.bus_mtx, NULL, 0, 4); if (err) { device_printf(dev, "could not setup config thread!\n"); goto error; Modified: head/sys/dev/usb2/controller/ehci2.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/ehci2.c Mon Nov 10 20:54:31 2008 (r184824) @@ -164,7 +164,7 @@ ehci_hc_reset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ for (n = 0; n != 100; n++) { - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); hcr = EOREAD4(sc, EHCI_USBSTS); if (hcr & EHCI_STS_HCH) { hcr = 0; @@ -180,7 +180,7 @@ ehci_hc_reset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (n = 0; n != 100; n++) { - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); hcr = EOREAD4(sc, EHCI_USBCMD); if (!(hcr & EHCI_CMD_HCRESET)) { hcr = 0; @@ -208,11 +208,11 @@ ehci_init(ehci_softc_t *sc) uint16_t bit; usb2_error_t err = 0; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); DPRINTF("start\n"); - usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.mtx, + usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, CALLOUT_RETURNUNLOCKED); #if USB_DEBUG @@ -465,7 +465,7 @@ ehci_init(ehci_softc_t *sc) EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); for (i = 0; i < 100; i++) { - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; if (!hcr) { break; @@ -477,7 +477,7 @@ ehci_init(ehci_softc_t *sc) goto done; } done: - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); if (!err) { /* catch any lost interrupts */ @@ -492,7 +492,7 @@ done: void ehci_detach(struct ehci_softc *sc) { - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); usb2_callout_stop(&sc->sc_tmo_pcd); @@ -502,9 +502,9 @@ ehci_detach(struct ehci_softc *sc) DPRINTF("reset failed!\n"); } /* XXX let stray task complete */ - usb2_pause_mtx(&sc->sc_bus.mtx, 50); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 50); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); usb2_callout_drain(&sc->sc_tmo_pcd); @@ -518,7 +518,7 @@ ehci_suspend(struct ehci_softc *sc) uint32_t hcr; uint8_t i; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); for (i = 1; i <= sc->sc_noport; i++) { cmd = EOREAD4(sc, EHCI_PORTSC(i)); @@ -541,7 +541,7 @@ ehci_suspend(struct ehci_softc *sc) if (hcr == 0) { break; } - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); } if (hcr != 0) { @@ -555,14 +555,14 @@ ehci_suspend(struct ehci_softc *sc) if (hcr == EHCI_STS_HCH) { break; } - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); } if (hcr != EHCI_STS_HCH) { device_printf(sc->sc_bus.bdev, "config timeout\n"); } - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -574,7 +574,7 @@ ehci_resume(struct ehci_softc *sc) uint32_t hcr; uint8_t i; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); /* restore things in case the bios doesn't */ EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); @@ -599,7 +599,7 @@ ehci_resume(struct ehci_softc *sc) } if (hcr) { - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_WAIT); for (i = 1; i <= sc->sc_noport; i++) { @@ -618,15 +618,15 @@ ehci_resume(struct ehci_softc *sc) if (hcr != EHCI_STS_HCH) { break; } - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); } if (hcr == EHCI_STS_HCH) { device_printf(sc->sc_bus.bdev, "config timeout\n"); } - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_WAIT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); /* catch any lost interrupts */ ehci_do_poll(&sc->sc_bus); @@ -639,12 +639,12 @@ ehci_shutdown(ehci_softc_t *sc) { DPRINTF("stopping the HC\n"); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); if (ehci_hc_reset(sc)) { DPRINTF("reset failed!\n"); } - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); } #if USB_DEBUG @@ -1415,7 +1415,7 @@ transferred: static void ehci_pcd_enable(ehci_softc_t *sc) { - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); sc->sc_eintrs |= EHCI_STS_PCD; EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); @@ -1426,7 +1426,7 @@ ehci_pcd_enable(ehci_softc_t *sc) usb2_sw_transfer(&sc->sc_root_intr, &ehci_root_intr_done); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1460,7 +1460,7 @@ ehci_interrupt(ehci_softc_t *sc) { uint32_t status; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); DPRINTFN(16, "real interrupt\n"); @@ -1517,7 +1517,7 @@ ehci_interrupt(ehci_softc_t *sc) ehci_interrupt_poll(sc); done: - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1532,12 +1532,12 @@ ehci_timeout(void *arg) DPRINTF("xfer=%p\n", xfer); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); /* transfer is transferred */ ehci_device_done(xfer, USB_ERR_TIMEOUT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1547,10 +1547,10 @@ ehci_do_poll(struct usb2_bus *bus) { struct ehci_softc *sc = EHCI_BUS2SC(bus); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); ehci_interrupt_poll(sc); ehci_root_ctrl_poll(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1965,7 +1965,7 @@ ehci_root_intr_done(struct usb2_xfer *xf uint16_t i; uint16_t m; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_PRE_DATA) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -2124,7 +2124,7 @@ ehci_device_done(struct usb2_xfer *xfer, struct usb2_pipe_methods *methods = xfer->pipe->methods; ehci_softc_t *sc = xfer->usb2_sc; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", xfer, xfer->pipe, error); @@ -3076,7 +3076,7 @@ ehci_root_ctrl_done(struct usb2_xfer *xf uint8_t l; uint8_t use_polling; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_SETUP) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -3092,7 +3092,7 @@ ehci_root_ctrl_done(struct usb2_xfer *xf value = UGETW(std->req.wValue); index = UGETW(std->req.wIndex); - use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; DPRINTFN(3, "type=0x%02x request=0x%02x wLen=0x%04x " "wValue=0x%04x wIndex=0x%04x\n", @@ -3373,7 +3373,7 @@ ehci_root_ctrl_done(struct usb2_xfer *xf DELAY(USB_PORT_ROOT_RESET_DELAY * 1000); } else { /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_PORT_ROOT_RESET_DELAY); } @@ -3385,7 +3385,7 @@ ehci_root_ctrl_done(struct usb2_xfer *xf DELAY(EHCI_PORT_RESET_COMPLETE * 1000); } else { /* Wait for HC to complete reset. */ - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, EHCI_PORT_RESET_COMPLETE); } Modified: head/sys/dev/usb2/controller/ehci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2_pci.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/ehci2_pci.c Mon Nov 10 20:54:31 2008 (r184824) @@ -337,7 +337,7 @@ ehci_pci_attach(device_t self) sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self)); } - err = usb2_config_td_setup(&sc->sc_config_td, sc, &sc->sc_bus.mtx, + err = usb2_config_td_setup(&sc->sc_config_td, sc, &sc->sc_bus.bus_mtx, NULL, 0, 4); if (err) { device_printf(self, "could not setup config thread!\n"); Modified: head/sys/dev/usb2/controller/musb2_otg.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/musb2_otg.c Mon Nov 10 20:54:31 2008 (r184824) @@ -221,7 +221,7 @@ musbotg_wakeup_peer(struct usb2_xfer *xf if (!(sc->sc_flags.status_suspend)) { return; } - use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); temp |= MUSB2_MASK_RESUME; @@ -233,7 +233,7 @@ musbotg_wakeup_peer(struct usb2_xfer *xf DELAY(8000); } else { /* Wait for reset to complete. */ - usb2_pause_mtx(&sc->sc_bus.mtx, 8); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); } temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); @@ -982,7 +982,7 @@ musbotg_vbus_interrupt(struct usb2_bus * DPRINTFN(4, "vbus = %u\n", is_on); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); if (is_on) { if (!sc->sc_flags.status_vbus) { sc->sc_flags.status_vbus = 1; @@ -1007,7 +1007,7 @@ musbotg_vbus_interrupt(struct usb2_bus * } } - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1021,7 +1021,7 @@ musbotg_interrupt(struct musbotg_softc * uint8_t temp; uint8_t to = 2; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); repeat: @@ -1116,7 +1116,7 @@ repeat: if (--to) goto repeat; - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1273,12 +1273,12 @@ musbotg_timeout(void *arg) DPRINTFN(1, "xfer=%p\n", xfer); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); /* transfer is transferred */ musbotg_device_done(xfer, USB_ERR_TIMEOUT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1356,7 +1356,7 @@ musbotg_root_intr_done(struct usb2_xfer DPRINTFN(8, "\n"); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_PRE_DATA) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -1516,7 +1516,7 @@ musbotg_set_stall(struct usb2_device *ud struct musbotg_softc *sc; uint8_t ep_no; - mtx_assert(&udev->bus->mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); DPRINTFN(4, "pipe=%p\n", pipe); @@ -1702,7 +1702,7 @@ musbotg_clear_stall(struct usb2_device * DPRINTFN(4, "pipe=%p\n", pipe); - mtx_assert(&udev->bus->mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); /* check mode */ if (udev->flags.usb2_mode != USB_MODE_DEVICE) { @@ -1741,7 +1741,7 @@ musbotg_init(struct musbotg_softc *sc) sc->sc_bus.usbrev = USB_REV_2_0; sc->sc_bus.methods = &musbotg_bus_methods; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); /* turn on clocks */ @@ -1749,7 +1749,7 @@ musbotg_init(struct musbotg_softc *sc) (sc->sc_clocks_on) (sc->sc_clocks_arg); } /* wait a little for things to stabilise */ - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); /* disable all interrupts */ @@ -1762,7 +1762,7 @@ musbotg_init(struct musbotg_softc *sc) musbotg_pull_common(sc, 0); /* wait a little bit (10ms) */ - usb2_pause_mtx(&sc->sc_bus.mtx, 10); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 10); /* disable double packet buffering */ MUSB2_WRITE_2(sc, MUSB2_REG_RXDBDIS, 0xFFFF); @@ -1871,7 +1871,7 @@ musbotg_init(struct musbotg_softc *sc) musbotg_clocks_off(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); /* catch any lost interrupts */ @@ -1883,7 +1883,7 @@ musbotg_init(struct musbotg_softc *sc) void musbotg_uninit(struct musbotg_softc *sc) { - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); /* disable all interrupts */ MUSB2_WRITE_1(sc, MUSB2_REG_INTUSBE, 0); @@ -1899,7 +1899,7 @@ musbotg_uninit(struct musbotg_softc *sc) musbotg_pull_down(sc); musbotg_clocks_off(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1921,10 +1921,10 @@ musbotg_do_poll(struct usb2_bus *bus) { struct musbotg_softc *sc = MUSBOTG_BUS2SC(bus); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); musbotg_interrupt_poll(sc); musbotg_root_ctrl_poll(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -2293,7 +2293,7 @@ musbotg_root_ctrl_done(struct usb2_xfer uint16_t index; uint8_t use_polling; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_SETUP) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -2309,7 +2309,7 @@ musbotg_root_ctrl_done(struct usb2_xfer value = UGETW(std->req.wValue); index = UGETW(std->req.wIndex); - use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; /* demultiplex the control request */ Modified: head/sys/dev/usb2/controller/musb2_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Mon Nov 10 20:54:31 2008 (r184824) @@ -138,7 +138,7 @@ musbotg_attach(device_t dev) device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus); err = usb2_config_td_setup(&sc->sc_otg.sc_config_td, sc, - &sc->sc_otg.sc_bus.mtx, NULL, 0, 4); + &sc->sc_otg.sc_bus.bus_mtx, NULL, 0, 4); if (err) { device_printf(dev, "could not setup config thread!\n"); goto error; Modified: head/sys/dev/usb2/controller/ohci2.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/ohci2.c Mon Nov 10 20:54:31 2008 (r184824) @@ -173,7 +173,7 @@ ohci_controller_init(ohci_softc_t *sc) DPRINTF("SMM active, request owner change\n"); OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) { - usb2_pause_mtx(&sc->sc_bus.mtx, 1); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 1); ctl = OREAD4(sc, OHCI_CONTROL); } if (ctl & OHCI_IR) { @@ -186,7 +186,7 @@ ohci_controller_init(ohci_softc_t *sc) DPRINTF("cold started\n"); reset: /* controller was cold started */ - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_BUS_RESET_DELAY); } @@ -197,7 +197,7 @@ reset: DPRINTF("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev)); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_BUS_RESET_DELAY); /* we now own the host controller and the bus has been reset */ @@ -260,7 +260,7 @@ reset: desca = OREAD4(sc, OHCI_RH_DESCRIPTOR_A); OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca | OHCI_NOCP); OWRITE4(sc, OHCI_RH_STATUS, OHCI_LPSC); /* Enable port power */ - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, OHCI_ENABLE_POWER_DELAY); OWRITE4(sc, OHCI_RH_DESCRIPTOR_A, desca); @@ -270,7 +270,7 @@ reset: */ sc->sc_noport = 0; for (i = 0; (i < 10) && (sc->sc_noport == 0); i++) { - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, OHCI_READ_DESC_DELAY); sc->sc_noport = OHCI_GET_NDP(OREAD4(sc, OHCI_RH_DESCRIPTOR_A)); } @@ -309,7 +309,7 @@ ohci_init(ohci_softc_t *sc) uint16_t x; uint16_t y; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); DPRINTF("start\n"); @@ -391,7 +391,7 @@ ohci_init(ohci_softc_t *sc) /* set up the bus struct */ sc->sc_bus.methods = &ohci_bus_methods; - usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.mtx, + usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx, CALLOUT_RETURNUNLOCKED); #if USB_DEBUG @@ -408,10 +408,10 @@ ohci_init(ohci_softc_t *sc) sc->sc_bus.usbrev = USB_REV_1_0; if (ohci_controller_init(sc)) { - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return (USB_ERR_INVAL); } else { - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); /* catch any lost interrupts */ ohci_do_poll(&sc->sc_bus); return (USB_ERR_NORMAL_COMPLETION); @@ -424,7 +424,7 @@ ohci_init(ohci_softc_t *sc) void ohci_detach(struct ohci_softc *sc) { - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); usb2_callout_stop(&sc->sc_tmo_rhsc); @@ -432,9 +432,9 @@ ohci_detach(struct ohci_softc *sc) OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); /* XXX let stray task complete */ - usb2_pause_mtx(&sc->sc_bus.mtx, 50); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 50); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); usb2_callout_drain(&sc->sc_tmo_rhsc); @@ -449,7 +449,7 @@ ohci_suspend(ohci_softc_t *sc) { uint32_t ctl; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); #if USB_DEBUG DPRINTF("\n"); @@ -470,10 +470,10 @@ ohci_suspend(ohci_softc_t *sc) ctl |= OHCI_HCFS_SUSPEND; OWRITE4(sc, OHCI_CONTROL, ctl); - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_WAIT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -482,7 +482,7 @@ ohci_resume(ohci_softc_t *sc) { uint32_t ctl; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); #if USB_DEBUG DPRINTF("\n"); @@ -503,13 +503,13 @@ ohci_resume(ohci_softc_t *sc) ctl = OREAD4(sc, OHCI_CONTROL); ctl |= OHCI_HCFS_RESUME; OWRITE4(sc, OHCI_CONTROL, ctl); - usb2_pause_mtx(&sc->sc_bus.mtx, USB_RESUME_DELAY); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_DELAY); ctl = (ctl & ~OHCI_HCFS_MASK) | OHCI_HCFS_OPERATIONAL; OWRITE4(sc, OHCI_CONTROL, ctl); - usb2_pause_mtx(&sc->sc_bus.mtx, USB_RESUME_RECOVERY); + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_RESUME_RECOVERY); sc->sc_control = sc->sc_intre = 0; - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); /* catch any lost interrupts */ ohci_do_poll(&sc->sc_bus); @@ -699,7 +699,7 @@ _ohci_append_qh(ohci_ed_t *sed, uint32_t { DPRINTFN(11, "%p to %p\n", sed, last); - /* (sc->sc_bus.mtx) must be locked */ + /* (sc->sc_bus.bus_mtx) must be locked */ sed->next = last->next; sed->ed_next = last->ed_next; @@ -728,7 +728,7 @@ _ohci_remove_qh(ohci_ed_t *sed, ohci_ed_ { DPRINTFN(11, "%p from %p\n", sed, last); - /* (sc->sc_bus.mtx) must be locked */ + /* (sc->sc_bus.bus_mtx) must be locked */ /* only remove if not removed from a queue */ if (sed->prev) { @@ -1099,7 +1099,7 @@ ohci_rhsc_enable(ohci_softc_t *sc) { DPRINTFN(5, "\n"); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); sc->sc_eintrs |= OHCI_RHSC; OWRITE4(sc, OHCI_INTERRUPT_ENABLE, OHCI_RHSC); @@ -1110,7 +1110,7 @@ ohci_rhsc_enable(ohci_softc_t *sc) usb2_sw_transfer(&sc->sc_root_intr, &ohci_root_intr_done); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1146,7 +1146,7 @@ ohci_interrupt(ohci_softc_t *sc) uint32_t status; uint32_t done; - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); hcca = ohci_get_hcca(sc); @@ -1246,7 +1246,7 @@ ohci_interrupt(ohci_softc_t *sc) ohci_interrupt_poll(sc); done: - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1261,12 +1261,12 @@ ohci_timeout(void *arg) DPRINTF("xfer=%p\n", xfer); - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); /* transfer is transferred */ ohci_device_done(xfer, USB_ERR_TIMEOUT); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1276,10 +1276,10 @@ ohci_do_poll(struct usb2_bus *bus) { struct ohci_softc *sc = OHCI_BUS2SC(bus); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); ohci_interrupt_poll(sc); ohci_root_ctrl_poll(sc); - mtx_unlock(&sc->sc_bus.mtx); + USB_BUS_UNLOCK(&sc->sc_bus); return; } @@ -1617,7 +1617,7 @@ ohci_root_intr_done(struct usb2_xfer *xf uint16_t i; uint16_t m; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_PRE_DATA) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -1663,7 +1663,7 @@ ohci_device_done(struct usb2_xfer *xfer, ohci_softc_t *sc = xfer->usb2_sc; ohci_ed_t *ed; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", @@ -2198,7 +2198,7 @@ ohci_root_ctrl_done(struct usb2_xfer *xf uint8_t l; uint8_t use_polling; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); if (std->state != USB_SW_TR_SETUP) { if (std->state == USB_SW_TR_PRE_CALLBACK) { @@ -2214,7 +2214,7 @@ ohci_root_ctrl_done(struct usb2_xfer *xf value = UGETW(std->req.wValue); index = UGETW(std->req.wIndex); - use_polling = mtx_owned(xfer->priv_mtx) ? 1 : 0; + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; DPRINTFN(3, "type=0x%02x request=0x%02x wLen=0x%04x " "wValue=0x%04x wIndex=0x%04x\n", @@ -2375,7 +2375,7 @@ ohci_root_ctrl_done(struct usb2_xfer *xf /* enable RHSC interrupt if condition is cleared. */ if ((OREAD4(sc, port) >> 16) == 0) { ohci_rhsc_enable(sc); - mtx_lock(&sc->sc_bus.mtx); + USB_BUS_LOCK(&sc->sc_bus); } break; default: @@ -2456,7 +2456,7 @@ ohci_root_ctrl_done(struct usb2_xfer *xf /* polling */ DELAY(USB_PORT_ROOT_RESET_DELAY * 1000); } else { - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_PORT_ROOT_RESET_DELAY); } Modified: head/sys/dev/usb2/controller/ohci2_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_atmelarm.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/ohci2_atmelarm.c Mon Nov 10 20:54:31 2008 (r184824) @@ -111,7 +111,7 @@ ohci_atmelarm_attach(device_t dev) strlcpy(sc->sc_ohci.sc_vendor, "Atmel", sizeof(sc->sc_ohci.sc_vendor)); err = usb2_config_td_setup(&sc->sc_ohci.sc_config_td, sc, - &sc->sc_ohci.sc_bus.mtx, NULL, 0, 4); + &sc->sc_ohci.sc_bus.bus_mtx, NULL, 0, 4); if (err) { device_printf(dev, "could not setup config thread!\n"); goto error; Modified: head/sys/dev/usb2/controller/ohci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_pci.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/ohci2_pci.c Mon Nov 10 20:54:31 2008 (r184824) @@ -280,7 +280,7 @@ ohci_pci_attach(device_t self) sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self)); } - err = usb2_config_td_setup(&sc->sc_config_td, sc, &sc->sc_bus.mtx, + err = usb2_config_td_setup(&sc->sc_config_td, sc, &sc->sc_bus.bus_mtx, NULL, 0, 4); if (err) { device_printf(self, "could not setup config thread!\n"); Modified: head/sys/dev/usb2/controller/uhci2.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2.c Mon Nov 10 18:24:11 2008 (r184823) +++ head/sys/dev/usb2/controller/uhci2.c Mon Nov 10 20:54:31 2008 (r184824) @@ -265,7 +265,7 @@ uhci_reset(uhci_softc_t *sc) struct usb2_page_search buf_res; uint16_t n; - mtx_assert(&sc->sc_bus.mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTF("resetting the HC\n"); @@ -279,7 +279,7 @@ uhci_reset(uhci_softc_t *sc) /* wait */ - usb2_pause_mtx(&sc->sc_bus.mtx, + usb2_pause_mtx(&sc->sc_bus.bus_mtx, USB_BUS_RESET_DELAY); /* terminate all transfers */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 22:06:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D8E7106564A; Mon, 10 Nov 2008 22:06:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38BCD8FC23; Mon, 10 Nov 2008 22:06:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAM6OGO083615; Mon, 10 Nov 2008 22:06:24 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAM6Otj083614; Mon, 10 Nov 2008 22:06:24 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811102206.mAAM6Otj083614@svn.freebsd.org> From: Robert Watson Date: Mon, 10 Nov 2008 22:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184825 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 22:06:24 -0000 Author: rwatson Date: Mon Nov 10 22:06:24 2008 New Revision: 184825 URL: http://svn.freebsd.org/changeset/base/184825 Log: Wrap sx locking of the audit worker sleep lock in macros, update comments. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_worker.c Modified: head/sys/security/audit/audit_worker.c ============================================================================== --- head/sys/security/audit/audit_worker.c Mon Nov 10 20:54:31 2008 (r184824) +++ head/sys/security/audit/audit_worker.c Mon Nov 10 22:06:24 2008 (r184825) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2005 Apple Inc. + * Copyright (c) 1999-2008 Apple Inc. * Copyright (c) 2006-2008 Robert N. M. Watson * All rights reserved. * @@ -78,17 +78,24 @@ static struct proc *audit_thread; /* * audit_cred and audit_vp are the stored credential and vnode to use for - * active audit trail. They are protected by audit_worker_sx, which will be - * held across all I/O and all rotation to prevent them from being replaced - * (rotated) while in use. The audit_file_rotate_wait flag is set when the - * kernel has delivered a trigger to auditd to rotate the trail, and is - * cleared when the next rotation takes place. It is also protected by - * audit_worker_sx. + * active audit trail. They are protected by the audit worker lock, which + * will be held across all I/O and all rotation to prevent them from being + * replaced (rotated) while in use. The audit_file_rotate_wait flag is set + * when the kernel has delivered a trigger to auditd to rotate the trail, and + * is cleared when the next rotation takes place. It is also protected by + * the audit worker lock. */ static int audit_file_rotate_wait; -static struct sx audit_worker_sx; static struct ucred *audit_cred; static struct vnode *audit_vp; +static struct sx audit_worker_lock; + +#define AUDIT_WORKER_LOCK_INIT() sx_init(&audit_worker_lock, \ + "audit_worker_lock"); +#define AUDIT_WORKER_LOCK_ASSERT() sx_assert(&audit_worker_lock, \ + SA_XLOCKED) +#define AUDIT_WORKER_LOCK() sx_xlock(&audit_worker_lock) +#define AUDIT_WORKER_UNLOCK() sx_xunlock(&audit_worker_lock) /* * Write an audit record to a file, performed as the last stage after both @@ -111,7 +118,7 @@ audit_record_write(struct vnode *vp, str struct vattr vattr; long temp; - sx_assert(&audit_worker_sx, SA_LOCKED); /* audit_file_rotate_wait. */ + AUDIT_WORKER_LOCK_ASSERT(); if (vp == NULL) return; @@ -191,7 +198,7 @@ audit_record_write(struct vnode *vp, str */ if ((audit_fstat.af_filesz != 0) && (audit_file_rotate_wait == 0) && (vattr.va_size >= audit_fstat.af_filesz)) { - sx_assert(&audit_worker_sx, SA_XLOCKED); + AUDIT_WORKER_LOCK_ASSERT(); audit_file_rotate_wait = 1; (void)audit_send_trigger(AUDIT_TRIGGER_ROTATE_KERNEL); @@ -300,20 +307,20 @@ audit_worker_process_record(struct kaudi au_event_t event; au_id_t auid; int error, sorf; - int trail_locked; + int locked; /* - * We hold the audit_worker_sx lock over both writes, if there are - * two, so that the two records won't be split across a rotation and - * end up in two different trail files. + * We hold the audit worker lock over both writes, if there are two, + * so that the two records won't be split across a rotation and end + * up in two different trail files. */ if (((ar->k_ar_commit & AR_COMMIT_USER) && (ar->k_ar_commit & AR_PRESELECT_USER_TRAIL)) || (ar->k_ar_commit & AR_PRESELECT_TRAIL)) { - sx_xlock(&audit_worker_sx); - trail_locked = 1; + AUDIT_WORKER_LOCK(); + locked = 1; } else - trail_locked = 0; + locked = 0; /* * First, handle the user record, if any: commit to the system trail @@ -321,7 +328,7 @@ audit_worker_process_record(struct kaudi */ if ((ar->k_ar_commit & AR_COMMIT_USER) && (ar->k_ar_commit & AR_PRESELECT_USER_TRAIL)) { - sx_assert(&audit_worker_sx, SA_XLOCKED); + AUDIT_WORKER_LOCK_ASSERT(); audit_record_write(audit_vp, audit_cred, ar->k_udata, ar->k_ulen); } @@ -360,7 +367,7 @@ audit_worker_process_record(struct kaudi } if (ar->k_ar_commit & AR_PRESELECT_TRAIL) { - sx_assert(&audit_worker_sx, SA_XLOCKED); + AUDIT_WORKER_LOCK_ASSERT(); audit_record_write(audit_vp, audit_cred, bsm->data, bsm->len); } @@ -371,8 +378,8 @@ audit_worker_process_record(struct kaudi kau_free(bsm); out: - if (trail_locked) - sx_xunlock(&audit_worker_sx); + if (locked) + AUDIT_WORKER_UNLOCK(); } /* @@ -453,14 +460,14 @@ audit_rotate_vnode(struct ucred *cred, s * Rotate the vnode/cred, and clear the rotate flag so that we will * send a rotate trigger if the new file fills. */ - sx_xlock(&audit_worker_sx); + AUDIT_WORKER_LOCK(); old_audit_cred = audit_cred; old_audit_vp = audit_vp; audit_cred = cred; audit_vp = vp; audit_file_rotate_wait = 0; audit_enabled = (audit_vp != NULL); - sx_xunlock(&audit_worker_sx); + AUDIT_WORKER_UNLOCK(); /* * If there was an old vnode/credential, close and free. @@ -479,7 +486,7 @@ audit_worker_init(void) { int error; - sx_init(&audit_worker_sx, "audit_worker_sx"); + AUDIT_WORKER_LOCK_INIT(); error = kproc_create(audit_worker, NULL, &audit_thread, RFHIGHPID, 0, "audit"); if (error) From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 22:40:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BA301065678; Mon, 10 Nov 2008 22:40:17 +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 EA9B48FC18; Mon, 10 Nov 2008 22:40:16 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAMeHQM084288; Mon, 10 Nov 2008 22:40:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAAMeGfs084286; Mon, 10 Nov 2008 22:40:16 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200811102240.mAAMeGfs084286@svn.freebsd.org> From: Xin LI Date: Mon, 10 Nov 2008 22:40: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: r184826 - in stable/7/sys: . dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 22:40:17 -0000 Author: delphij Date: Mon Nov 10 22:40:16 2008 New Revision: 184826 URL: http://svn.freebsd.org/changeset/base/184826 Log: Merge the following bce(4) changes: r176448,178132,178853,179436,179695,179771,182293 r176448 (davidch) - Added loose RX MTU functionality to allow frames larger than 1500 bytes to be accepted even though the interface MTU is set to 1500. - Implemented new TCP header splitting/jumbo frame support which uses two chains for receive traffic rather than the original single receive chain. - Added additional debug support code. r178132 (davidch) - Fixed a problem with the send chain consumer index which would cause TX traffic to sit in the send chain until a received packet kick started the interrupt handler. This would cause extremely slow performance when used with NFS over UDP. - Removed untested polling code. - Updated copyright year in the file header. - Removed inadvertent ^M's created by DOS text editor. r178853 (scottl) The BCE chips appear to have an undocumented requirement that RX frames be aligned on an 8 byte boundary. Prior to rev 1.36 (now r176448) this wasn't a problem because mbuf clusters tend be naturally aligned. The switch to using split buffers with the first buffer being the embedded data area of the mbuf has broken this assumption, at least on i386, causing a complete failure of RX functionality. Fix this for now by using a full cluster for the first RX buffer. A more sophisticated approach could be done with the old buffer scheme to realign the m_data pointer with m_adj(), but I'm also not clear on performance benefits of this old scheme or the performance implications of adding an m_adj() call to every allocation. r179436 (jhb) Trim an extra semi-colon. r179695 (davidch) - Fixed kern/123696 by increasing firmware timeout value from 100 to 1000. - Fixed a problem on i386 architecture when using split header/jumbo frame firmware caused by hardware alignment requirements. - Added #define BCE_USE_SPLIT_HEADER to allow the feature to be enabled/disabled. Enabled by default. PR: kern/123696 r179771 (davidch) - Added support for BCM5709 and BCM5716 controllers. r182293 (davidch) - Updated support for 5716. - Added some additional code for debug builds. - Fixed a problem printing physical memory on 64bit system during debugging. - Modified some of the context memory and mailbox register names to more clearly distinguish their use. - Added memory barriers for Intel CPUs when accessing host memory data structures which are written by hardware. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcefw.h stable/7/sys/dev/bce/if_bcereg.h Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Mon Nov 10 22:06:24 2008 (r184825) +++ stable/7/sys/dev/bce/if_bce.c Mon Nov 10 22:40:16 2008 (r184826) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2007 Broadcom Corporation + * Copyright (c) 2006-2008 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,13 +34,19 @@ __FBSDID("$FreeBSD$"); /* * The following controllers are supported by this driver: * BCM5706C A2, A3 + * BCM5706S A2, A3 * BCM5708C B1, B2 + * BCM5708S B1, B2 + * BCM5709C A1, C0 + * BCM5716 C0 * * The following controllers are not supported by this driver: - * BCM5706C A0, A1 - * BCM5706S A0, A1, A2, A3 - * BCM5708C A0, B0 - * BCM5708S A0, B0, B1, B2 + * BCM5706C A0, A1 (pre-production) + * BCM5706S A0, A1 (pre-production) + * BCM5708C A0, B0 (pre-production) + * BCM5708S A0, B0 (pre-production) + * BCM5709C A0 B0, B1, B2 (pre-production) + * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) */ #include "opt_bce.h" @@ -80,6 +86,12 @@ __FBSDID("$FreeBSD$"); int bce_debug_bootcode_running_failure = 0; #endif +/****************************************************************************/ +/* BCE Build Time Options */ +/****************************************************************************/ +#define BCE_USE_SPLIT_HEADER 1 +/* #define BCE_NVRAM_WRITE_SUPPORT 1 */ + /****************************************************************************/ /* PCI Device ID Table */ @@ -110,6 +122,19 @@ static struct bce_type bce_devs[] = { /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, "Broadcom NetXtreme II BCM5708 1000Base-SX" }, + + /* BCM5709C controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5709 1000Base-T" }, + + /* BCM5709S controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5709 1000Base-SX" }, + + /* BCM5716 controllers and OEM boards. */ + { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, + "Broadcom NetXtreme II BCM5716 1000Base-T" }, + { 0, 0, 0, 0, NULL } }; @@ -119,91 +144,110 @@ static struct bce_type bce_devs[] = { /****************************************************************************/ static struct flash_spec flash_table[] = { +#define BUFFERED_FLAGS (BCE_NV_BUFFERED | BCE_NV_TRANSLATE) +#define NONBUFFERED_FLAGS (BCE_NV_WREN) + /* Slow EEPROM */ {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400, - 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - slow"}, /* Expansion entry 0001 */ {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0001"}, /* Saifun SA25F010 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2, "Non-buffered flash (128kB)"}, /* Saifun SA25F020 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4, "Non-buffered flash (256kB)"}, /* Expansion entry 0100 */ {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0100"}, /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, - 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, /* Entry 0110: ST M45PE20 (non-buffered flash)*/ {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406, - 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4, "Entry 0110: ST M45PE20 (256kB non-bufferred)"}, /* Saifun SA25F005 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE, "Non-buffered flash (64kB)"}, /* Fast EEPROM */ {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400, - 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - fast"}, /* Expansion entry 1001 */ {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1001"}, /* Expansion entry 1010 */ {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1010"}, /* ATMEL AT45DB011B (buffered flash) */ {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE, "Buffered flash (128kB)"}, /* Expansion entry 1100 */ {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1100"}, /* Expansion entry 1101 */ {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406, - 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1101"}, /* Ateml Expansion entry 1110 */ {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, 0, "Entry 1110 (Atmel)"}, /* ATMEL AT45DB021B (buffered flash) */ {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400, - 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2, "Buffered flash (256kB)"}, }; +/* + * The BCM5709 controllers transparently handle the + * differences between Atmel 264 byte pages and all + * flash devices which use 256 byte pages, so no + * logical-to-physical mapping is required in the + * driver. + */ +static struct flash_spec flash_5709 = { + .flags = BCE_NV_BUFFERED, + .page_bits = BCM5709_FLASH_PAGE_BITS, + .page_size = BCM5709_FLASH_PAGE_SIZE, + .addr_mask = BCM5709_FLASH_BYTE_ADDR_MASK, + .total_size = BUFFERED_FLASH_TOTAL_SIZE * 2, + .name = "5709/5716 buffered flash (256kB)", +}; + /****************************************************************************/ /* FreeBSD device entry points. */ @@ -218,19 +262,41 @@ static int bce_shutdown (device_t); /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG +static u32 bce_reg_rd (struct bce_softc *, u32); +static void bce_reg_wr (struct bce_softc *, u32, u32); +static void bce_reg_wr16 (struct bce_softc *, u32, u16); +static u32 bce_ctx_rd (struct bce_softc *, u32, u32); +static void bce_dump_enet (struct bce_softc *, struct mbuf *); static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); -static void bce_dump_tx_mbuf_chain (struct bce_softc *, int, int); -static void bce_dump_rx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); +#ifdef BCE_USE_SPLIT_HEADER +static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); +#endif static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); +#ifdef BCE_USE_SPLIT_HEADER +static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); +#endif static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_tx_chain (struct bce_softc *, int, int); -static void bce_dump_rx_chain (struct bce_softc *, int, int); +static void bce_dump_ctx (struct bce_softc *, u16); +static void bce_dump_ftqs (struct bce_softc *); +static void bce_dump_tx_chain (struct bce_softc *, u16, int); +static void bce_dump_rx_chain (struct bce_softc *, u16, int); +#ifdef BCE_USE_SPLIT_HEADER +static void bce_dump_pg_chain (struct bce_softc *, u16, int); +#endif static void bce_dump_status_block (struct bce_softc *); static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); +static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); +static void bce_dump_txp_state (struct bce_softc *, int); +static void bce_dump_rxp_state (struct bce_softc *, int); +static void bce_dump_tpat_state (struct bce_softc *, int); +static void bce_dump_cp_state (struct bce_softc *, int); +static void bce_dump_com_state (struct bce_softc *, int); static void bce_breakpoint (struct bce_softc *); #endif @@ -268,6 +334,7 @@ static int bce_nvram_write (struct bc /****************************************************************************/ /* */ /****************************************************************************/ +static void bce_get_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -279,19 +346,34 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); +static void bce_init_rxp_cpu (struct bce_softc *); +static void bce_init_txp_cpu (struct bce_softc *); +static void bce_init_tpat_cpu (struct bce_softc *); +static void bce_init_cp_cpu (struct bce_softc *); +static void bce_init_com_cpu (struct bce_softc *); static void bce_init_cpus (struct bce_softc *); +static void bce_print_adapter_info (struct bce_softc *); +static void bce_probe_pci_caps (device_t, struct bce_softc *); static void bce_stop (struct bce_softc *); static int bce_reset (struct bce_softc *, u32); static int bce_chipinit (struct bce_softc *); static int bce_blockinit (struct bce_softc *); -static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_tx_chain (struct bce_softc *); -static void bce_fill_rx_chain (struct bce_softc *); +static void bce_free_tx_chain (struct bce_softc *); + +static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_rx_chain (struct bce_softc *); +static void bce_fill_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); -static void bce_free_tx_chain (struct bce_softc *); + +#ifdef BCE_USE_SPLIT_HEADER +static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); +static int bce_init_pg_chain (struct bce_softc *); +static void bce_fill_pg_chain (struct bce_softc *); +static void bce_free_pg_chain (struct bce_softc *); +#endif static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); @@ -305,19 +387,16 @@ static void bce_init_locked (struct bc static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_context (struct bce_softc *); +static void bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); static void bce_phy_intr (struct bce_softc *); +static inline u16 bce_get_hw_rx_cons(struct bce_softc *); static void bce_rx_intr (struct bce_softc *); static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *); +static void bce_enable_intr (struct bce_softc *, int); -#ifdef DEVICE_POLLING -static void bce_poll_locked (struct ifnet *, enum poll_cmd, int); -static void bce_poll (struct ifnet *, enum poll_cmd, int); -#endif static void bce_intr (void *); static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); @@ -330,20 +409,28 @@ static void bce_add_sysctls (struct bc /* FreeBSD device dispatch table. */ /****************************************************************************/ static device_method_t bce_methods[] = { - /* Device interface */ + /* Device interface (device_if.h) */ DEVMETHOD(device_probe, bce_probe), DEVMETHOD(device_attach, bce_attach), DEVMETHOD(device_detach, bce_detach), DEVMETHOD(device_shutdown, bce_shutdown), +/* Supported by device interface but not used here. */ +/* DEVMETHOD(device_identify, bce_identify), */ +/* DEVMETHOD(device_suspend, bce_suspend), */ +/* DEVMETHOD(device_resume, bce_resume), */ +/* DEVMETHOD(device_quiesce, bce_quiesce), */ - /* bus interface */ + /* Bus interface (bus_if.h) */ DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ + /* MII interface (miibus_if.h) */ DEVMETHOD(miibus_readreg, bce_miibus_read_reg), DEVMETHOD(miibus_writereg, bce_miibus_write_reg), DEVMETHOD(miibus_statchg, bce_miibus_statchg), +/* Supported by MII interface but not used here. */ +/* DEVMETHOD(miibus_linkchg, bce_miibus_linkchg), */ +/* DEVMETHOD(miibus_mediainit, bce_miibus_mediainit), */ { 0, 0 } }; @@ -367,19 +454,26 @@ DRIVER_MODULE(miibus, bce, miibus_driver /****************************************************************************/ /* Tunable device values */ /****************************************************************************/ -static int bce_tso_enable = TRUE; -static int bce_msi_enable = 1; +SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); /* Allowable values are TRUE or FALSE */ +static int bce_tso_enable = TRUE; TUNABLE_INT("hw.bce.tso_enable", &bce_tso_enable); -/* Allowable values are 0 (IRQ only) and 1 (IRQ or MSI) */ -TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); - -SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, "TSO Enable/Disable"); + +/* Allowable values are 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-X/MSI/IRQ) */ +/* ToDo: Add MSI-X support. */ +static int bce_msi_enable = 1; +TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, -"MSI | INTx selector"); +"MSI-X|MSI|INTx selector"); + +/* ToDo: Add tunable to enable/disable strict MTU handling. */ +/* Currently allows "loose" RX MTU checking (i.e. sets the */ +/* H/W RX MTU to the size of the largest receive buffer, or */ +/* 2048 bytes). */ + /****************************************************************************/ /* Device probe function. */ @@ -411,14 +505,14 @@ bce_probe(device_t dev) svid = pci_get_subvendor(dev); sdid = pci_get_subdevice(dev); - DBPRINT(sc, BCE_VERBOSE_LOAD, + DBPRINT(sc, BCE_EXTREME_LOAD, "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { - if ((vid == t->bce_vid) && (did == t->bce_did) && + if ((vid == t->bce_vid) && (did == t->bce_did) && ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { @@ -428,7 +522,7 @@ bce_probe(device_t dev) return(ENOMEM); /* Print out the device identity. */ - snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", t->bce_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); @@ -445,6 +539,109 @@ bce_probe(device_t dev) /****************************************************************************/ +/* PCI Capabilities Probe Function. */ +/* */ +/* Walks the PCI capabiites list for the device to find what features are */ +/* supported. */ +/* */ +/* Returns: */ +/* None. */ +/****************************************************************************/ +static void +bce_print_adapter_info(struct bce_softc *sc) +{ + DBENTER(BCE_VERBOSE_LOAD); + + BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); + printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + + /* Bus info. */ + if (sc->bce_flags & BCE_PCIE_FLAG) { + printf("Bus (PCIe x%d, ", sc->link_width); + switch (sc->link_speed) { + case 1: printf("2.5Gbps); "); break; + case 2: printf("5Gbps); "); break; + default: printf("Unknown link speed); "); + } + } else { + printf("Bus (PCI%s, %s, %dMHz); ", + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), + sc->bus_speed_mhz); + } + + /* Firmware version and device features. */ + printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); +#ifdef BCE_USE_SPLIT_HEADER + printf("SPLT "); +#endif + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) + printf("MFW "); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + printf("MSI "); + if (sc->bce_flags & BCE_USING_MSIX_FLAG) + printf("MSI-X "); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + printf("2.5G "); + printf(")\n"); + + DBEXIT(BCE_VERBOSE_LOAD); +} + + +/****************************************************************************/ +/* PCI Capabilities Probe Function. */ +/* */ +/* Walks the PCI capabiites list for the device to find what features are */ +/* supported. */ +/* */ +/* Returns: */ +/* None. */ +/****************************************************************************/ +static void +bce_probe_pci_caps(device_t dev, struct bce_softc *sc) +{ + u32 reg; + + DBENTER(BCE_VERBOSE_LOAD); + + /* Check if PCI-X capability is enabled. */ + if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_PCIX_CAPABLE_FLAG; + } + + /* Check if PCIe capability is enabled. */ + if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { + if (reg != 0) { + u16 link_status = pci_read_config(dev, reg + 0x12, 2); + DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", + link_status); + sc->link_speed = link_status & 0xf; + sc->link_width = (link_status >> 4) & 0x3f; + sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; + sc->bce_flags |= BCE_PCIE_FLAG; + } + } + + /* Check if MSI capability is enabled. */ + if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_MSI_CAPABLE_FLAG; + } + + /* Check if MSI-X capability is enabled. */ + if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) { + if (reg != 0) + sc->bce_cap_flags |= BCE_MSIX_CAPABLE_FLAG; + } + + DBEXIT(BCE_VERBOSE_LOAD); +} + + +/****************************************************************************/ /* Device attach function. */ /* */ /* Allocates device resources, performs secondary chip identification, */ @@ -460,21 +657,19 @@ bce_attach(device_t dev) struct bce_softc *sc; struct ifnet *ifp; u32 val; - int count, mbuf, rid, rc = 0; + int error, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; - DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + DBENTER(BCE_VERBOSE_LOAD | BCE_VERBOSE_RESET); - mbuf = device_get_unit(dev); + sc->bce_unit = device_get_unit(dev); /* Set initial device and PHY flags */ sc->bce_flags = 0; sc->bce_phy_flags = 0; - sc->bce_unit = mbuf; - pci_enable_busmaster(dev); /* Allocate PCI memory resources. */ @@ -483,7 +678,7 @@ bce_attach(device_t dev) &rid, RF_ACTIVE | PCI_RF_DENSE); if (sc->bce_res_mem == NULL) { - BCE_PRINTF("%s(%d): PCI memory allocation failed\n", + BCE_PRINTF("%s(%d): PCI memory allocation failed\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -494,25 +689,74 @@ bce_attach(device_t dev) sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem); sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem); - /* If MSI is enabled in the driver, get the vector count. */ - count = bce_msi_enable ? pci_msi_count(dev) : 0; + bce_probe_pci_caps(dev, sc); - /* Allocate PCI IRQ resources. */ - if (count == 1 && pci_alloc_msi(dev, &count) == 0 && count == 1) { - rid = 1; - sc->bce_flags |= BCE_USING_MSI_FLAG; - DBPRINT(sc, BCE_VERBOSE_LOAD, - "Allocating %d MSI interrupt(s)\n", count); - } else { + rid = 1; +#if 0 + /* Try allocating MSI-X interrupts. */ + if ((sc->bce_cap_flags & BCE_MSIX_CAPABLE_FLAG) && + (bce_msi_enable >= 2) && + ((sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &rid, RF_ACTIVE)) != NULL)) { + + msi_needed = sc->bce_msi_count = 1; + + if (((error = pci_alloc_msix(dev, &sc->bce_msi_count)) != 0) || + (sc->bce_msi_count != msi_needed)) { + BCE_PRINTF("%s(%d): MSI-X allocation failed! Requested = %d," + "Received = %d, error = %d\n", __FILE__, __LINE__, + msi_needed, sc->bce_msi_count, error); + sc->bce_msi_count = 0; + pci_release_msi(dev); + bus_release_resource(dev, SYS_RES_MEMORY, rid, + sc->bce_res_irq); + sc->bce_res_irq = NULL; + } else { + DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI-X interrupt.\n", + __FUNCTION__); + sc->bce_flags |= BCE_USING_MSIX_FLAG; + sc->bce_intr = bce_intr; + } + } +#endif + + /* Try allocating a MSI interrupt. */ + if ((sc->bce_cap_flags & BCE_MSI_CAPABLE_FLAG) && + (bce_msi_enable >= 1) && (sc->bce_msi_count == 0)) { + sc->bce_msi_count = 1; + if ((error = pci_alloc_msi(dev, &sc->bce_msi_count)) != 0) { + BCE_PRINTF("%s(%d): MSI allocation failed! error = %d\n", + __FILE__, __LINE__, error); + sc->bce_msi_count = 0; + pci_release_msi(dev); + } else { + DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI interrupt.\n", + __FUNCTION__); + sc->bce_flags |= BCE_USING_MSI_FLAG; + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || + (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; + sc->bce_irq_rid = 1; + sc->bce_intr = bce_intr; + } + } + + /* Try allocating a legacy interrupt. */ + if (sc->bce_msi_count == 0) { + DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using INTx interrupt.\n", + __FUNCTION__); rid = 0; - DBPRINT(sc, BCE_VERBOSE_LOAD, "Allocating IRQ interrupt\n"); + sc->bce_intr = bce_intr; } - sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_SHAREABLE | RF_ACTIVE); + sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &rid, RF_SHAREABLE | RF_ACTIVE); + + sc->bce_irq_rid = rid; + /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { - BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", + BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -540,18 +784,22 @@ bce_attach(device_t dev) case BCE_CHIP_ID_5706_A1: case BCE_CHIP_ID_5708_A0: case BCE_CHIP_ID_5708_B0: + case BCE_CHIP_ID_5709_A0: + case BCE_CHIP_ID_5709_B0: + case BCE_CHIP_ID_5709_B1: + case BCE_CHIP_ID_5709_B2: BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, + __FILE__, __LINE__, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); rc = ENODEV; goto bce_attach_fail; } - /* - * The embedded PCIe to PCI-X bridge (EPB) - * in the 5708 cannot address memory above - * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). + /* + * The embedded PCIe to PCI-X bridge (EPB) + * in the 5708 cannot address memory above + * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). */ if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708) sc->max_bus_addr = BCE_BUS_SPACE_MAXADDR; @@ -565,25 +813,23 @@ bce_attach(device_t dev) */ val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE); if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) - sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0); + /* Multi-port devices use different offsets in shared memory. */ + sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + + (pci_get_function(sc->bce_dev) << 2)); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; - DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", + DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", __FUNCTION__, sc->bce_shmem_base); - sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + + /* Fetch the bootcode revision. */ + sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + BCE_DEV_INFO_BC_REV); - DBPRINT(sc, BCE_INFO_FIRMWARE, "%s(): bce_fw_ver = 0x%08X\n", - __FUNCTION__, sc->bce_fw_ver); /* Check if any management firmware is running. */ val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE); - if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) { + if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) sc->bce_flags |= BCE_MFW_ENABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "%s(): BCE_MFW_ENABLE_FLAG\n", - __FUNCTION__); - } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -632,7 +878,7 @@ bce_attach(device_t dev) /* Reset the controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { - BCE_PRINTF("%s(%d): Controller reset failed!\n", + BCE_PRINTF("%s(%d): Controller reset failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -662,7 +908,7 @@ bce_attach(device_t dev) * should be ready before generating an * interrupt while ticks control how long * a BD can sit in the chain before - * generating an interrupt. Set the default + * generating an interrupt. Set the default * values for the RX and TX chains. */ @@ -693,33 +939,14 @@ bce_attach(device_t dev) /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; - /* - * The SerDes based NetXtreme II controllers - * that support 2.5Gb operation (currently - * 5708S) use a PHY at address 2, otherwise - * the PHY is present at address 1. - */ - sc->bce_phy_addr = 1; - - if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { - sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; - sc->bce_flags |= BCE_NO_WOL_FLAG; - if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { - sc->bce_phy_addr = 2; - val = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); - if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { - sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; - DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); - } - } - } + /* Find the media type for the adapter. */ + bce_get_media(sc); /* Store data needed by PHY driver for backplane applications */ sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG); sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_SHARED_HW_CFG_CONFIG); + BCE_PORT_HW_CFG_CONFIG); /* Allocate DMA memory resources. */ if (bce_dma_alloc(dev)) { @@ -732,7 +959,7 @@ bce_attach(device_t dev) /* Allocate an ifnet structure. */ ifp = sc->bce_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - BCE_PRINTF("%s(%d): Interface allocation failed!\n", + BCE_PRINTF("%s(%d): Interface allocation failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -757,10 +984,24 @@ bce_attach(device_t dev) ifp->if_capenable = ifp->if_capabilities; - /* Assume a standard 1500 byte MTU size for mbuf allocations. */ - sc->mbuf_alloc_size = MCLBYTES; -#ifdef DEVICE_POLLING - ifp->if_capabilities |= IFCAP_POLLING; + /* + * Assume standard mbuf sizes for buffer allocation. + * This may change later if the MTU size is set to + * something other than 1500. + */ +#ifdef BCE_USE_SPLIT_HEADER + sc->rx_bd_mbuf_alloc_size = MHLEN; + /* Make sure offset is 16 byte aligned for hardware. */ + sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - + (MSIZE - MHLEN); + sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - + sc->rx_bd_mbuf_align_pad; + sc->pg_bd_mbuf_alloc_size = MCLBYTES; +#else + sc->rx_bd_mbuf_alloc_size = MCLBYTES; + sc->rx_bd_mbuf_align_pad = roundup2(MCLBYTES, 16) - MCLBYTES; + sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - + sc->rx_bd_mbuf_align_pad; #endif ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; @@ -775,7 +1016,7 @@ bce_attach(device_t dev) /* Check for an MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { - BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", + BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -793,30 +1034,31 @@ bce_attach(device_t dev) #endif /* Hookup IRQ last. */ - rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, NULL, - bce_intr, sc, &sc->bce_intrhand); + rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, + NULL, bce_intr, sc, &sc->bce_intrhand); if (rc) { - BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", + BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", __FILE__, __LINE__); bce_detach(dev); goto bce_attach_exit; } - /* - * At this point we've acquired all the resources + /* + * At this point we've acquired all the resources * we need to run so there's no turning back, we're * cleared for launch. */ /* Print some important debugging info. */ - DBRUN(BCE_INFO, bce_dump_driver_state(sc)); + DBRUNMSG(BCE_INFO, bce_dump_driver_state(sc)); /* Add the supported sysctls to the kernel. */ bce_add_sysctls(sc); BCE_LOCK(sc); - /* + + /* * The chip reset earlier notified the bootcode that * a driver is present. We now need to start our pulse * routine so that the bootcode is reminded that we're @@ -828,21 +1070,9 @@ bce_attach(device_t dev) BCE_UNLOCK(sc); /* Finally, print some useful adapter info */ - BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); - printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); - printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); - printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) - printf("MFW "); - if (sc->bce_flags & BCE_USING_MSI_FLAG) - printf("MSI "); - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) - printf("2.5G "); - printf(")\n"); + bce_print_adapter_info(sc); + DBPRINT(sc, BCE_FATAL, "%s(): sc = %p\n", + __FUNCTION__, sc); goto bce_attach_exit; @@ -851,7 +1081,7 @@ bce_attach_fail: bce_attach_exit: - DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + DBEXIT(BCE_VERBOSE_LOAD | BCE_VERBOSE_RESET); return(rc); } @@ -872,26 +1102,23 @@ bce_detach(device_t dev) struct ifnet *ifp; u32 msg; - DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); + DBENTER(BCE_VERBOSE_UNLOAD | BCE_VERBOSE_RESET); ifp = sc->bce_ifp; -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif + /* Stop and reset the controller. */ + BCE_LOCK(sc); /* Stop the pulse so the bootcode can go to driver absent state. */ callout_stop(&sc->bce_pulse_callout); - /* Stop and reset the controller. */ - BCE_LOCK(sc); bce_stop(sc); if (sc->bce_flags & BCE_NO_WOL_FLAG) msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; else msg = BCE_DRV_MSG_CODE_UNLOAD; bce_reset(sc, msg); + BCE_UNLOCK(sc); ether_ifdetach(ifp); @@ -903,7 +1130,7 @@ bce_detach(device_t dev) /* Release all remaining resources. */ bce_release_resources(sc); - DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); + DBEXIT(BCE_VERBOSE_UNLOAD | BCE_VERBOSE_RESET); return(0); } @@ -923,7 +1150,7 @@ bce_shutdown(device_t dev) struct bce_softc *sc = device_get_softc(dev); u32 msg; - DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Entering %s()\n", __FUNCTION__); + DBENTER(BCE_VERBOSE); BCE_LOCK(sc); bce_stop(sc); @@ -933,13 +1160,60 @@ bce_shutdown(device_t dev) msg = BCE_DRV_MSG_CODE_UNLOAD; bce_reset(sc, msg); BCE_UNLOCK(sc); - - DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Exiting %s()\n", __FUNCTION__); + + DBEXIT(BCE_VERBOSE); return (0); } +#ifdef BCE_DEBUG +/****************************************************************************/ +/* Register read. */ +/* */ +/* Returns: */ +/* The value of the register. */ +/****************************************************************************/ +static u32 +bce_reg_rd(struct bce_softc *sc, u32 offset) +{ + u32 val = bus_space_read_4(sc->bce_btag, sc->bce_bhandle, offset); + DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", + __FUNCTION__, offset, val); + return val; +} + + +/****************************************************************************/ +/* Register write (16 bit). */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_reg_wr16(struct bce_softc *sc, u32 offset, u16 val) +{ + DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%04X\n", + __FUNCTION__, offset, val); + bus_space_write_2(sc->bce_btag, sc->bce_bhandle, offset, val); +} + + +/****************************************************************************/ +/* Register write. */ +/* */ +/* Returns: */ +/* Nothing. */ +/****************************************************************************/ +static void +bce_reg_wr(struct bce_softc *sc, u32 offset, u32 val) +{ + DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", + __FUNCTION__, offset, val); + bus_space_write_4(sc->bce_btag, sc->bce_bhandle, offset, val); +} +#endif + /****************************************************************************/ /* Indirect register read. */ /* */ @@ -961,7 +1235,7 @@ bce_reg_rd_ind(struct bce_softc *sc, u32 { u32 val; val = pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); - DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", + DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", __FUNCTION__, offset, val); return val; } @@ -987,7 +1261,7 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 device_t dev; dev = sc->bce_dev; - DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", + DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", __FUNCTION__, offset, val); pci_write_config(dev, BCE_PCICFG_REG_WINDOW_ADDRESS, offset, 4); @@ -995,6 +1269,58 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 23:18:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 790931065674; Mon, 10 Nov 2008 23:18:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6909B8FC0A; Mon, 10 Nov 2008 23:18:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAANIAQb084973; Mon, 10 Nov 2008 23:18:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAANIAlH084972; Mon, 10 Nov 2008 23:18:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200811102318.mAANIAlH084972@svn.freebsd.org> From: Andrew Thompson Date: Mon, 10 Nov 2008 23:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184827 - head/sys/dev/usb2/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 23:18:10 -0000 Author: thompsa Date: Mon Nov 10 23:18:10 2008 New Revision: 184827 URL: http://svn.freebsd.org/changeset/base/184827 Log: Add missing USB_BUS_LOCK* change from r184824. Modified: head/sys/dev/usb2/controller/musb2_otg.c Modified: head/sys/dev/usb2/controller/musb2_otg.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg.c Mon Nov 10 22:40:16 2008 (r184826) +++ head/sys/dev/usb2/controller/musb2_otg.c Mon Nov 10 23:18:10 2008 (r184827) @@ -1493,7 +1493,7 @@ done: static void musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error) { - mtx_assert(xfer->usb2_mtx, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); DPRINTFN(2, "xfer=%p, pipe=%p, error=%d\n", xfer, xfer->pipe, error); From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 23:26:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DBD71065670; Mon, 10 Nov 2008 23:26:52 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E6C58FC14; Mon, 10 Nov 2008 23:26:52 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAANQqan085164; Mon, 10 Nov 2008 23:26:52 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAANQqEJ085163; Mon, 10 Nov 2008 23:26:52 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811102326.mAANQqEJ085163@svn.freebsd.org> From: Peter Wemm Date: Mon, 10 Nov 2008 23:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184828 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 23:26:52 -0000 Author: peter Date: Mon Nov 10 23:26:52 2008 New Revision: 184828 URL: http://svn.freebsd.org/changeset/base/184828 Log: Fix a signal emulation bug introduced in r163018 (and present in 7.x). This prevents 32 bit signal handlers from finding out what the faulting address is. Both the secret 4th argument and siginfo->si_addr are zero. Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 10 23:18:10 2008 (r184827) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 10 23:26:52 2008 (r184828) @@ -2442,7 +2442,7 @@ siginfo_to_siginfo32(siginfo_t *src, str dst->si_pid = src->si_pid; dst->si_uid = src->si_uid; dst->si_status = src->si_status; - dst->si_addr = dst->si_addr; + dst->si_addr = src->si_addr; dst->si_value.sigval_int = src->si_value.sival_int; dst->si_timerid = src->si_timerid; dst->si_overrun = src->si_overrun; From owner-svn-src-all@FreeBSD.ORG Mon Nov 10 23:36:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B49E21065690; Mon, 10 Nov 2008 23:36:20 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A556F8FC0A; Mon, 10 Nov 2008 23:36:20 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAANaKAi085369; Mon, 10 Nov 2008 23:36:20 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAANaKgZ085368; Mon, 10 Nov 2008 23:36:20 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811102336.mAANaKgZ085368@svn.freebsd.org> From: Peter Wemm Date: Mon, 10 Nov 2008 23:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184829 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 23:36:20 -0000 Author: peter Date: Mon Nov 10 23:36:20 2008 New Revision: 184829 URL: http://svn.freebsd.org/changeset/base/184829 Log: Sigh. Fix a pointer/int compile error. Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 10 23:26:52 2008 (r184828) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Nov 10 23:36:20 2008 (r184829) @@ -2442,7 +2442,7 @@ siginfo_to_siginfo32(siginfo_t *src, str dst->si_pid = src->si_pid; dst->si_uid = src->si_uid; dst->si_status = src->si_status; - dst->si_addr = src->si_addr; + dst->si_addr = (uintptr_t)src->si_addr; dst->si_value.sigval_int = src->si_value.sival_int; dst->si_timerid = src->si_timerid; dst->si_overrun = src->si_overrun; From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 00:14:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F59810656BB; Tue, 11 Nov 2008 00:14:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29E5E8FC1A; Tue, 11 Nov 2008 00:14:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB0EBcu086215; Tue, 11 Nov 2008 00:14:11 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB0EBVH086214; Tue, 11 Nov 2008 00:14:11 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200811110014.mAB0EBVH086214@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 11 Nov 2008 00:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184830 - head/sys/dev/ispfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 00:14:11 -0000 Author: jkim Date: Tue Nov 11 00:14:10 2008 New Revision: 184830 URL: http://svn.freebsd.org/changeset/base/184830 Log: Make ispfw(4) play nice with individual firmware modules. - Do not let individual KLD module unregister firmware image loaded by ispfw or vice versa. - Make 'kldunload ispfw' actually unregister all firmware images loaded by ispfw, not just 'isp_1040'. - Print which KLD module actually loaded the firmware image. - Remove unused return value from do_load_fw() and do_unload_fw() and remove duplicate sys/param.h while I am here. Modified: head/sys/dev/ispfw/ispfw.c Modified: head/sys/dev/ispfw/ispfw.c ============================================================================== --- head/sys/dev/ispfw/ispfw.c Mon Nov 10 23:36:20 2008 (r184829) +++ head/sys/dev/ispfw/ispfw.c Tue Nov 11 00:14:10 2008 (r184830) @@ -30,14 +30,16 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include #include -#include #include -#include -#include #if defined(ISP_ALL) || !defined(KLD_MODULE) +#ifdef __sparc64__ +#define ISP_1000 1 +#endif #define ISP_1040 1 #define ISP_1040_IT 1 #define ISP_1080 1 @@ -49,12 +51,19 @@ __FBSDID("$FreeBSD$"); #define ISP_2300 1 #define ISP_2322 1 #define ISP_2400 1 -#ifdef __sparc64__ -#define ISP_1000 1 #endif + +#ifndef MODULE_NAME #define MODULE_NAME "ispfw" #endif +#if defined(ISP_1000) +#ifdef __sparc64__ +#include +#else +#error "firmware not compatible with this platform" +#endif +#endif #if defined(ISP_1040) || defined(ISP_1040_IT) #include #endif @@ -79,27 +88,75 @@ __FBSDID("$FreeBSD$"); #if defined(ISP_2400) #include #endif + #if defined(ISP_1000) -#include +static int isp_1000_loaded; +#endif +#if defined(ISP_1040) +static int isp_1040_loaded; +#endif +#if defined(ISP_1040_IT) +static int isp_1040_it_loaded; +#endif +#if defined(ISP_1080) +static int isp_1080_loaded; +#endif +#if defined(ISP_1080_IT) +static int isp_1080_it_loaded; +#endif +#if defined(ISP_12160) +static int isp_12160_loaded; +#endif +#if defined(ISP_12160_IT) +static int isp_12160_it_loaded; +#endif +#if defined(ISP_2100) +static int isp_2100_loaded; +#endif +#if defined(ISP_2200) +static int isp_2200_loaded; +#endif +#if defined(ISP_2300) +static int isp_2300_loaded; +#endif +#if defined(ISP_2322) +static int isp_2322_loaded; +#endif +#if defined(ISP_2400) +static int isp_2400_loaded; #endif #define ISPFW_VERSION 1 -#define RMACRO(token) \ +#define RMACRO(token) do { \ + if (token##_loaded) \ + break; \ if (firmware_register(#token, token##_risc_code, \ - token##_risc_code [3] * sizeof token##_risc_code [3], \ + token##_risc_code[3] * sizeof(token##_risc_code[3]), \ ISPFW_VERSION, NULL) == NULL) { \ - printf("unable to register firmware '%s'\n", #token); \ - } else { \ - printf("registered firmware set <%s>\n", #token); \ - } + printf("%s: unable to register firmware <%s>\n", \ + MODULE_NAME, #token); \ + break; \ + } \ + token##_loaded++; \ + printf("%s: registered firmware <%s>\n", MODULE_NAME, #token); \ +} while (0) -#define UMACRO(token) \ - firmware_unregister(#token); \ - printf("unregistered firmware set <%s>\n", #token); +#define UMACRO(token) do { \ + if (!token##_loaded) \ + break; \ + if (firmware_unregister(#token) != 0) { \ + printf("%s: unable to unregister firmware <%s>\n", \ + MODULE_NAME, #token); \ + break; \ + } \ + token##_loaded--; \ + printf("%s: unregistered firmware <%s>\n", MODULE_NAME, #token);\ +} while (0) -static int +static void do_load_fw(void) { + #if defined(ISP_1000) RMACRO(isp_1000); #endif @@ -136,64 +193,74 @@ do_load_fw(void) #if defined(ISP_2400) RMACRO(isp_2400); #endif - return (0); } -static int +static void do_unload_fw(void) { + #if defined(ISP_1000) UMACRO(isp_1000); -#elif defined(ISP_1040) +#endif +#if defined(ISP_1040) UMACRO(isp_1040); -#elif defined(ISP_1040_IT) +#endif +#if defined(ISP_1040_IT) UMACRO(isp_1040_it); -#elif defined(ISP_1080) +#endif +#if defined(ISP_1080) UMACRO(isp_1080); -#elif defined(ISP_1080_IT) +#endif +#if defined(ISP_1080_IT) UMACRO(isp_1080_it); -#elif defined(ISP_12160) +#endif +#if defined(ISP_12160) UMACRO(isp_12160); -#elif defined(ISP_12160_IT) +#endif +#if defined(ISP_12160_IT) UMACRO(isp_12160_it); -#elif defined(ISP_2100) +#endif +#if defined(ISP_2100) UMACRO(isp_2100); -#elif defined(ISP_2200) +#endif +#if defined(ISP_2200) UMACRO(isp_2200); -#elif defined(ISP_2300) +#endif +#if defined(ISP_2300) UMACRO(isp_2300); -#elif defined(ISP_2322) +#endif +#if defined(ISP_2322) UMACRO(isp_2322); -#elif defined(ISP_2400) +#endif +#if defined(ISP_2400) UMACRO(isp_2400); #endif - return (0); } static int module_handler(module_t mod, int what, void *arg) { - int r; + switch (what) { case MOD_LOAD: - r = do_load_fw(); + do_load_fw(); break; case MOD_UNLOAD: - r = do_unload_fw(); + do_unload_fw(); break; - default: - r = EOPNOTSUPP; + case MOD_SHUTDOWN: break; + default: + return (EOPNOTSUPP); } - return (r); + return (0); } static moduledata_t ispfw_mod = { MODULE_NAME, module_handler, NULL }; -#ifndef KLD_MODULE -DECLARE_MODULE(isp, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); -#else -#if defined(ISP_1000) +#if defined(ISP_ALL) || !defined(KLD_MODULE) +DECLARE_MODULE(ispfw, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); +#elif defined(ISP_1000) DECLARE_MODULE(isp_1000, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); #elif defined(ISP_1040) DECLARE_MODULE(isp_1040, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); @@ -217,5 +284,6 @@ DECLARE_MODULE(isp_2300, ispfw_mod, SI_S DECLARE_MODULE(isp_2322, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); #elif defined(ISP_2400) DECLARE_MODULE(isp_2400, ispfw_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); -#endif +#else +#error "firmware not specified" #endif From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 00:32:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 396101065674; Tue, 11 Nov 2008 00:32:56 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6FB8FC1A; Tue, 11 Nov 2008 00:32:56 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB0Wuv0086597; Tue, 11 Nov 2008 00:32:56 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB0WupL086596; Tue, 11 Nov 2008 00:32:56 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <200811110032.mAB0WupL086596@svn.freebsd.org> From: Sean Farley Date: Tue, 11 Nov 2008 00:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184831 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 00:32:56 -0000 Author: scf Date: Tue Nov 11 00:32:55 2008 New Revision: 184831 URL: http://svn.freebsd.org/changeset/base/184831 Log: style(9) fixes. MFC after: 1 week Modified: head/lib/libutil/gr_util.c Modified: head/lib/libutil/gr_util.c ============================================================================== --- head/lib/libutil/gr_util.c Tue Nov 11 00:14:10 2008 (r184830) +++ head/lib/libutil/gr_util.c Tue Nov 11 00:32:55 2008 (r184831) @@ -28,29 +28,27 @@ __FBSDID("$FreeBSD$"); #include + #include #include +#include #include #include #include #include -#include - - static const char GroupLineFormat[] = "%s:%s:%ju:"; - /* * Compares two struct group's. */ int gr_equal(const struct group *gr1, const struct group *gr2) { - bool found; - bool equal; int gr1Ndx; int gr2Ndx; + bool equal; + bool found; /* Check that the non-member information is the same. */ equal = strcmp(gr1->gr_name, gr2->gr_name) == 0 && @@ -81,7 +79,6 @@ gr_equal(const struct group *gr1, const return (equal); } - /* * Make a group line out of a struct group. */ @@ -89,8 +86,8 @@ char * gr_make(const struct group *gr) { char *line; - int ndx; size_t lineSize; + int ndx; /* Calculate the length of the group line. */ lineSize = snprintf(NULL, 0, GroupLineFormat, gr->gr_name, @@ -114,17 +111,16 @@ gr_make(const struct group *gr) return (line); } - /* * Duplicate a struct group. */ struct group * gr_dup(const struct group *gr) { - int ndx; - int numMem; size_t len; struct group *ngr; + int ndx; + int numMem; /* Calculate size of group. */ len = sizeof(*gr) + @@ -134,7 +130,7 @@ gr_dup(const struct group *gr) if (gr->gr_mem != NULL) { for (; gr->gr_mem[numMem] != NULL; numMem++) len += strlen(gr->gr_mem[numMem]) + 1; - len += (numMem + 1) * sizeof(*(gr->gr_mem)); + len += (numMem + 1) * sizeof(*gr->gr_mem); } /* Create new group and copy old group into it. */ @@ -152,7 +148,7 @@ gr_dup(const struct group *gr) } if (gr->gr_mem != NULL) { ngr->gr_mem = (char **)((char *)ngr + len); - len += (numMem + 1) * sizeof(*(ngr->gr_mem)); + len += (numMem + 1) * sizeof(*ngr->gr_mem); for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { ngr->gr_mem[ndx] = (char *)ngr + len; len += sprintf(ngr->gr_mem[ndx], "%s", @@ -164,7 +160,6 @@ gr_dup(const struct group *gr) return (ngr); } - /* * Scan a line and place it into a group structure. */ @@ -180,14 +175,14 @@ __gr_scan(char *line, struct group *gr) return (false); *loc = '\0'; gr->gr_passwd = loc + 1; - if (*(gr->gr_passwd) == ':') - *(gr->gr_passwd) = '\0'; + if (*gr->gr_passwd == ':') + *gr->gr_passwd = '\0'; else { if ((loc = strchr(loc + 1, ':')) == NULL) return (false); *loc = '\0'; } - if (sscanf(loc + 1, "%u", &(gr->gr_gid)) != 1) + if (sscanf(loc + 1, "%u", &gr->gr_gid) != 1) return (false); /* Assign member information to structure. */ @@ -199,7 +194,7 @@ __gr_scan(char *line, struct group *gr) ndx = 0; do { if ((gr->gr_mem = reallocf(gr->gr_mem, - sizeof(*(gr->gr_mem)) * (ndx + 1))) == NULL) + sizeof(*gr->gr_mem) * (ndx + 1))) == NULL) return (false); gr->gr_mem[ndx] = strsep(&line, ","); } while (gr->gr_mem[ndx++] != NULL); @@ -208,16 +203,15 @@ __gr_scan(char *line, struct group *gr) return (true); } - /* * Create a struct group from a line. */ struct group * gr_scan(const char *line) { + struct group gr; char *lineCopy; struct group *newGr; - struct group gr; if ((lineCopy = strdup(line)) == NULL) return (NULL); From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 01:32:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA356106567C; Tue, 11 Nov 2008 01:32:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C7B538FC14; Tue, 11 Nov 2008 01:32:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 41E7A46B0C; Mon, 10 Nov 2008 20:32:13 -0500 (EST) Date: Tue, 11 Nov 2008 01:32:13 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <200811091045.mA9AjDDq037323@svn.freebsd.org> Message-ID: References: <200811091045.mA9AjDDq037323@svn.freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184789 - in head: lib/libc/amd64/sys lib/libc/arm/sys lib/libc/i386/sys lib/libc/ia64/sys lib/libc/mips/sys lib/libc/powerpc/sys lib/libc/sparc64/sys sys/amd64/linux32 sys/compat/freeb... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 01:32:14 -0000 On Sun, 9 Nov 2008, Ed Schouten wrote: > Modified: head/sys/sys/priv.h > ============================================================================== > --- head/sys/sys/priv.h Sun Nov 9 09:24:01 2008 (r184788) > +++ head/sys/sys/priv.h Sun Nov 9 10:45:13 2008 (r184789) > @@ -84,7 +84,6 @@ > #define PRIV_CLOCK_SETTIME 17 /* Can call clock_settime. */ > #define PRIV_SETTIMEOFDAY 18 /* Can call settimeofday. */ > #define PRIV_SETHOSTID 19 /* Can call sethostid. */ > -#define PRIV_SETDOMAINNAME 20 /* Can call setdomainname. */ Because kernel modules and applications may have been compiled with a specific understanding of what privilege '20' is, I think it would be a good idea to leave a placeholder name here to discourage reallocation of the same privilege number to a new privilege. For example: #define _PRIV_SETDOMAINNAME 20 /* Removed. */ This would help prevent future accidents, and we might want to add a note along those lines to the comments in priv.h. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 02:13:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 334EE1065674; Tue, 11 Nov 2008 02:13:22 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24DA78FC17; Tue, 11 Nov 2008 02:13:22 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB2DMat088313; Tue, 11 Nov 2008 02:13:22 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB2DMFw088312; Tue, 11 Nov 2008 02:13:22 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200811110213.mAB2DMFw088312@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 11 Nov 2008 02:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184832 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 02:13:22 -0000 Author: sobomax Date: Tue Nov 11 02:13:21 2008 New Revision: 184832 URL: http://svn.freebsd.org/changeset/base/184832 Log: No need to run rm ${COMPFILE} after mm_install() - mm_install() does it for us. Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Tue Nov 11 00:32:55 2008 (r184831) +++ head/usr.sbin/mergemaster/mergemaster.sh Tue Nov 11 02:13:21 2008 (r184832) @@ -960,7 +960,6 @@ for COMPFILE in `find . -type f -size +0 if mm_install "${COMPFILE}"; then echo " *** ${COMPFILE} upgraded successfully" echo '' - rm "${COMPFILE}" else echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" fi From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 03:36:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB22A1065673; Tue, 11 Nov 2008 03:36:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C68908FC14; Tue, 11 Nov 2008 03:36:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB3aF8g090034; Tue, 11 Nov 2008 03:36:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB3aFEN090033; Tue, 11 Nov 2008 03:36:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200811110336.mAB3aFEN090033@svn.freebsd.org> From: Andrew Thompson Date: Tue, 11 Nov 2008 03:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184833 - head/sys/dev/if_ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 03:36:16 -0000 Author: thompsa Date: Tue Nov 11 03:36:15 2008 New Revision: 184833 URL: http://svn.freebsd.org/changeset/base/184833 Log: Fake the assoc id so that ndis can work on the latest net80211. PR: kern/128750 Submitted by: Paul B. Mahol Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Tue Nov 11 02:13:21 2008 (r184832) +++ head/sys/dev/if_ndis/if_ndis.c Tue Nov 11 03:36:15 2008 (r184833) @@ -2591,6 +2591,10 @@ ndis_get_assoc(sc, assoc) struct ndis_softc *sc; ndis_wlan_bssid_ex **assoc; { + struct ifnet *ifp = sc->ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap; + struct ieee80211_node *ni; ndis_80211_bssid_list_ex *bl; ndis_wlan_bssid_ex *bs; ndis_80211_macaddr bssid; @@ -2606,6 +2610,9 @@ ndis_get_assoc(sc, assoc) return(ENOENT); } + vap = TAILQ_FIRST(&ic->ic_vaps); + ni = vap->iv_bss; + len = sizeof(uint32_t) + (sizeof(ndis_wlan_bssid_ex) * 16); bl = malloc(len, M_TEMP, M_NOWAIT | M_ZERO); if (bl == NULL) @@ -2636,8 +2643,10 @@ ndis_get_assoc(sc, assoc) } bcopy((char *)bs, (char *)*assoc, bs->nwbx_len); free(bl, M_TEMP); + if (ic->ic_opmode == IEEE80211_M_STA) + ni->ni_associd = 1 | 0xc000; /* fake associd */ return(0); - } + } bs = (ndis_wlan_bssid_ex *)((char *)bs + bs->nwbx_len); } From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 09:39:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A488A1065674 for ; Tue, 11 Nov 2008 09:39:25 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml13.kpnxchange.com (hpsmtp-eml13.KPNXCHANGE.COM [213.75.38.113]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2CC8FC17 for ; Tue, 11 Nov 2008 09:39:24 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml10.kpnxchange.com ([213.75.38.110]) by hpsmtp-eml13.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Nov 2008 10:39:23 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by hpsmtp-eml10.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 11 Nov 2008 10:39:22 +0100 Received: (qmail 8442 invoked by uid 98); 11 Nov 2008 09:39:33 -0000 Received: from 10.66.0.147 (nick@10.66.0.147) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.147):. Processed in 0.05655 secs); 11 Nov 2008 09:39:33 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.147) by uitsmijter.van-laarhoven.org with SMTP; 11 Nov 2008 09:39:33 -0000 Received: (nullmailer pid 6430 invoked by uid 1001); Tue, 11 Nov 2008 09:39:18 -0000 From: Nick Hibma To: svn-src-all@freebsd.org Date: Tue, 11 Nov 2008 10:39:17 +0100 User-Agent: KMail/1.9.7 References: <200811082040.mA8KeewQ021788@svn.freebsd.org> In-Reply-To: <200811082040.mA8KeewQ021788@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811111039.17864.nick@van-laarhoven.org> X-OriginalArrivalTime: 11 Nov 2008 09:39:23.0228 (UTC) FILETIME=[6115A1C0:01C943E1] Subject: Re: svn commit: r184771 - in head/sys: dev/syscons kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 09:39:25 -0000 > pseudo-terminals have the following buffer sizes: > | LINE RAW CAN OUT IHIWT ILOWT OHWT LWT COL STATE SESS PGID > | DISC ttyv0 0 0 0 7680 6720 2052 256 7 OCcl 1146 > | 1146 term ttyp0 0 0 0 7680 6720 1296 256 0 OCc > | 82033 82033 term With which tool did you produce these overviews? I would like to check buffer sizes on the u3g driver. Thanks. Nick From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 09:40:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A581065672; Tue, 11 Nov 2008 09:40:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD5A8FC0C; Tue, 11 Nov 2008 09:40:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAB9eS65096380; Tue, 11 Nov 2008 09:40:28 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAB9eS23096379; Tue, 11 Nov 2008 09:40:28 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811110940.mAB9eS23096379@svn.freebsd.org> From: Kip Macy Date: Tue, 11 Nov 2008 09:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184837 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 09:40:28 -0000 Author: kmacy Date: Tue Nov 11 09:40:27 2008 New Revision: 184837 URL: http://svn.freebsd.org/changeset/base/184837 Log: - Use RTFREE_LOCKED macro - Don't clone route on lookup (was causing arpresolve to fail) - u_int_32 -> uint32_t Reviewed by: qingli MFC after: 3 days Modified: head/sys/net/radix_mpath.c Modified: head/sys/net/radix_mpath.c ============================================================================== --- head/sys/net/radix_mpath.c Tue Nov 11 08:42:59 2008 (r184836) +++ head/sys/net/radix_mpath.c Tue Nov 11 09:40:27 2008 (r184837) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); /* * give some jitter to hash, to avoid synchronization between routers */ -static u_int32_t hashjitter; +static uint32_t hashjitter; int rn_mpath_capable(struct radix_node_head *rnh) @@ -267,7 +267,7 @@ rtalloc_mpath_fib(struct route *ro, u_in */ if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP)) return; /* XXX */ - ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, 0UL, fibnum); + ro->ro_rt = rtalloc1_fib(&ro->ro_dst, 1, RTF_CLONING, fibnum); /* if the route does not exist or it is not multipath, don't care */ if (ro->ro_rt == NULL) @@ -299,7 +299,7 @@ rtalloc_mpath_fib(struct route *ro, u_in return; } - rtfree(ro->ro_rt); + RTFREE_LOCKED(ro->ro_rt); ro->ro_rt = (struct rtentry *)rn; RT_LOCK(ro->ro_rt); RT_ADDREF(ro->ro_rt); From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 12:25:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78BAF1065698; Tue, 11 Nov 2008 12:25:08 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5868FC20; Tue, 11 Nov 2008 12:25:08 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABCP8ne001611; Tue, 11 Nov 2008 12:25:08 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABCP8pN001610; Tue, 11 Nov 2008 12:25:08 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200811111225.mABCP8pN001610@svn.freebsd.org> From: Andrew Gallatin Date: Tue, 11 Nov 2008 12:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184842 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 12:25:08 -0000 Author: gallatin Date: Tue Nov 11 12:25:08 2008 New Revision: 184842 URL: http://svn.freebsd.org/changeset/base/184842 Log: Avoid scheduling firmware taskqs when cold. This prevents a panic which occurs when a driver attempts to load firmware at boot via firmware_get() when the firmware module has not been preloaded. firmware_get() will enqueue a task using a struct taskqueue allocated on the stack, and the machine will crash much later in the firmware taskq thread when taskqs are started and the struct taskqueue is garbage. Not objected to by: sam Modified: head/sys/kern/subr_firmware.c Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Tue Nov 11 12:01:40 2008 (r184841) +++ head/sys/kern/subr_firmware.c Tue Nov 11 12:25:08 2008 (r184842) @@ -325,9 +325,13 @@ firmware_get(const char *imagename) * may do filesystem i/o which requires root & current dirs, etc. * Also we must not hold any mtx's over this call which is problematic. */ - TASK_INIT(&fwload_task, 0, loadimage, __DECONST(void *, imagename)); - taskqueue_enqueue(firmware_tq, &fwload_task); - msleep(__DECONST(void *, imagename), &firmware_mtx, 0, "fwload", 0); + if (!cold) { + TASK_INIT(&fwload_task, 0, loadimage, __DECONST(void *, + imagename)); + taskqueue_enqueue(firmware_tq, &fwload_task); + msleep(__DECONST(void *, imagename), &firmware_mtx, 0, + "fwload", 0); + } /* * After attempting to load the module, see if the image is registered. */ From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 14:55:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0062106567F; Tue, 11 Nov 2008 14:55:59 +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 B88248FC1A; Tue, 11 Nov 2008 14:55:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABEtxPo004636; Tue, 11 Nov 2008 14:55:59 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABEtxRH004631; Tue, 11 Nov 2008 14:55:59 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811111455.mABEtxRH004631@svn.freebsd.org> From: Ed Schouten Date: Tue, 11 Nov 2008 14:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184849 - in head: lib/libc/sys sys/amd64/linux32 sys/i386/linux sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 14:55:59 -0000 Author: ed Date: Tue Nov 11 14:55:59 2008 New Revision: 184849 URL: http://svn.freebsd.org/changeset/base/184849 Log: Several cleanups related to pipe(2). - Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2) fills an array with two descriptors. - Remove EFAULT from the manual page. Because of the current calling convention, pipe(2) raises a segmentation fault when an invalid address is passed. - Introduce kern_pipe() to make it easier for binary emulations to implement pipe(2). - Make Linux binary emulation use kern_pipe(), which means we don't have to recover td_retval after calling the FreeBSD system call. Approved by: rdivacky Discussed on: arch Modified: head/lib/libc/sys/pipe.2 head/sys/amd64/linux32/linux32_machdep.c head/sys/i386/linux/linux_machdep.c head/sys/kern/sys_pipe.c head/sys/sys/syscallsubr.h Modified: head/lib/libc/sys/pipe.2 ============================================================================== --- head/lib/libc/sys/pipe.2 Tue Nov 11 14:45:27 2008 (r184848) +++ head/lib/libc/sys/pipe.2 Tue Nov 11 14:55:59 2008 (r184849) @@ -39,7 +39,7 @@ .Sh SYNOPSIS .In unistd.h .Ft int -.Fn pipe "int *fildes" +.Fn pipe "int fildes[2]" .Sh DESCRIPTION The .Fn pipe @@ -96,11 +96,6 @@ Too many descriptors are active. The system file table is full. .It Bq Er ENOMEM Not enough kernel memory to establish a pipe. -.It Bq Er EFAULT -The -.Fa fildes -buffer is in an invalid area of the process's address -space. .El .Sh SEE ALSO .Xr sh 1 , Modified: head/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- head/sys/amd64/linux32/linux32_machdep.c Tue Nov 11 14:45:27 2008 (r184848) +++ head/sys/amd64/linux32/linux32_machdep.c Tue Nov 11 14:55:59 2008 (r184849) @@ -977,33 +977,20 @@ linux_iopl(struct thread *td, struct lin int linux_pipe(struct thread *td, struct linux_pipe_args *args) { - int pip[2]; int error; - register_t reg_rdx; + int fildes[2]; #ifdef DEBUG if (ldebug(pipe)) printf(ARGS(pipe, "*")); #endif - reg_rdx = td->td_retval[1]; - error = pipe(td, 0); - if (error) { - td->td_retval[1] = reg_rdx; - return (error); - } - - pip[0] = td->td_retval[0]; - pip[1] = td->td_retval[1]; - error = copyout(pip, args->pipefds, 2 * sizeof(int)); - if (error) { - td->td_retval[1] = reg_rdx; + error = kern_pipe(td, fildes); + if (error) return (error); - } - td->td_retval[1] = reg_rdx; - td->td_retval[0] = 0; - return (0); + /* XXX: Close descriptors on error. */ + return (copyout(fildes, args->pipefds, sizeof fildes)); } int Modified: head/sys/i386/linux/linux_machdep.c ============================================================================== --- head/sys/i386/linux/linux_machdep.c Tue Nov 11 14:45:27 2008 (r184848) +++ head/sys/i386/linux/linux_machdep.c Tue Nov 11 14:55:59 2008 (r184849) @@ -813,29 +813,19 @@ int linux_pipe(struct thread *td, struct linux_pipe_args *args) { int error; - int reg_edx; + int fildes[2]; #ifdef DEBUG if (ldebug(pipe)) printf(ARGS(pipe, "*")); #endif - reg_edx = td->td_retval[1]; - error = pipe(td, 0); - if (error) { - td->td_retval[1] = reg_edx; - return (error); - } - - error = copyout(td->td_retval, args->pipefds, 2*sizeof(int)); - if (error) { - td->td_retval[1] = reg_edx; + error = kern_pipe(td, fildes); + if (error) return (error); - } - td->td_retval[1] = reg_edx; - td->td_retval[0] = 0; - return (0); + /* XXX: Close descriptors on error. */ + return (copyout(fildes, args->pipefds, sizeof fildes)); } int Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Tue Nov 11 14:45:27 2008 (r184848) +++ head/sys/kern/sys_pipe.c Tue Nov 11 14:55:59 2008 (r184849) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -307,13 +308,8 @@ pipe_zone_fini(void *mem, int size) * The pipe system call for the DTYPE_PIPE type of pipes. If we fail, let * the zone pick up the pieces via pipeclose(). */ -/* ARGSUSED */ int -pipe(td, uap) - struct thread *td; - struct pipe_args /* { - int dummy; - } */ *uap; +kern_pipe(struct thread *td, int fildes[2]) { struct filedesc *fdp = td->td_proc->p_fd; struct file *rf, *wf; @@ -357,7 +353,7 @@ pipe(td, uap) return (error); } /* An extra reference on `rf' has been held for us by falloc(). */ - td->td_retval[0] = fd; + fildes[0] = fd; /* * Warning: once we've gotten past allocation of the fd for the @@ -368,7 +364,7 @@ pipe(td, uap) finit(rf, FREAD | FWRITE, DTYPE_PIPE, rpipe, &pipeops); error = falloc(td, &wf, &fd); if (error) { - fdclose(fdp, rf, td->td_retval[0], td); + fdclose(fdp, rf, fildes[0], td); fdrop(rf, td); /* rpipe has been closed by fdrop(). */ pipeclose(wpipe); @@ -377,12 +373,29 @@ pipe(td, uap) /* An extra reference on `wf' has been held for us by falloc(). */ finit(wf, FREAD | FWRITE, DTYPE_PIPE, wpipe, &pipeops); fdrop(wf, td); - td->td_retval[1] = fd; + fildes[1] = fd; fdrop(rf, td); return (0); } +/* ARGSUSED */ +int +pipe(struct thread *td, struct pipe_args *uap) +{ + int error; + int fildes[2]; + + error = kern_pipe(td, fildes); + if (error) + return (error); + + td->td_retval[0] = fildes[0]; + td->td_retval[1] = fildes[1]; + + return (0); +} + /* * Allocate kva for pipe circular buffer, the space is pageable * This routine will 'realloc' the size of a pipe safely, if it fails Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Tue Nov 11 14:45:27 2008 (r184848) +++ head/sys/sys/syscallsubr.h Tue Nov 11 14:55:59 2008 (r184849) @@ -142,6 +142,7 @@ int kern_openat(struct thread *td, int f enum uio_seg pathseg, int flags, int mode); int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name); +int kern_pipe(struct thread *td, int fildes[2]); int kern_preadv(struct thread *td, int fd, struct uio *auio, off_t offset); int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data); From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 17:10:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 345B3106567C; Tue, 11 Nov 2008 17:10:25 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30B1E8FC22; Tue, 11 Nov 2008 17:10:25 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABHAPdF007296; Tue, 11 Nov 2008 17:10:25 GMT (envelope-from dds@svn.freebsd.org) Received: (from dds@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABHAPla007294; Tue, 11 Nov 2008 17:10:25 GMT (envelope-from dds@svn.freebsd.org) Message-Id: <200811111710.mABHAPla007294@svn.freebsd.org> From: Diomidis Spinellis Date: Tue, 11 Nov 2008 17:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184852 - head/tools/regression/usr.bin/sed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 17:10:25 -0000 Author: dds Date: Tue Nov 11 17:10:24 2008 New Revision: 184852 URL: http://svn.freebsd.org/changeset/base/184852 Log: Add a test for the "or more" part of the following POSIX specification. "A function can be preceded by one or more '!' characters, in which case the function shall be applied if the addresses do not select the pattern space." Added: head/tools/regression/usr.bin/sed/regress.not.out (contents, props changed) Modified: head/tools/regression/usr.bin/sed/regress.sh Added: head/tools/regression/usr.bin/sed/regress.not.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/usr.bin/sed/regress.not.out Tue Nov 11 17:10:24 2008 (r184852) @@ -0,0 +1 @@ +foo Modified: head/tools/regression/usr.bin/sed/regress.sh ============================================================================== --- head/tools/regression/usr.bin/sed/regress.sh Tue Nov 11 15:51:45 2008 (r184851) +++ head/tools/regression/usr.bin/sed/regress.sh Tue Nov 11 17:10:24 2008 (r184852) @@ -2,7 +2,7 @@ REGRESSION_START($1) -echo '1..24' +echo '1..25' REGRESSION_TEST(`G', `sed G < regress.in') REGRESSION_TEST(`P', `sed P < regress.in') @@ -69,5 +69,6 @@ REGRESSION_TEST(`icase3', `sed s/SED/Foo REGRESSION_TEST(`hanoi', `echo ":abcd: : :" | sed -f hanoi.sed') REGRESSION_TEST(`math', `echo "4+7*3+2^7/3" | sed -f math.sed') +REGRESSION_TEST(`not', `echo foo | sed "1!!s/foo/bar/"') REGRESSION_END() From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 17:12:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 029FF1065692; Tue, 11 Nov 2008 17:12:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F28CC8FC20; Tue, 11 Nov 2008 17:12:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABHCQVM007374; Tue, 11 Nov 2008 17:12:26 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABHCQZK007373; Tue, 11 Nov 2008 17:12:26 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811111712.mABHCQZK007373@svn.freebsd.org> From: Robert Watson Date: Tue, 11 Nov 2008 17:12: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: r184853 - in stable/7/sys: . modules/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 17:12:27 -0000 Author: rwatson Date: Tue Nov 11 17:12:26 2008 New Revision: 184853 URL: http://svn.freebsd.org/changeset/base/184853 Log: Merge r184304 from head to stable/7: In both dropwithreset paths in tcp_input.c, drop the tcbinfo lock sooner to decomplicate locking and eliminate the need for a rather chatty comment about why we have to handle the global lock in a special way for the benefit of ipfw and pf cred rules. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/modules/cxgb/ (props changed) stable/7/sys/netinet/tcp_input.c Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Tue Nov 11 17:10:24 2008 (r184852) +++ stable/7/sys/netinet/tcp_input.c Tue Nov 11 17:12:26 2008 (r184853) @@ -849,19 +849,12 @@ findpcb: dropwithreset: INP_INFO_WLOCK_ASSERT(&tcbinfo); + INP_INFO_WUNLOCK(&tcbinfo); - /* - * If inp is non-NULL, we call tcp_dropwithreset() holding both inpcb - * and global locks. However, if NULL, we must hold neither as - * firewalls may acquire the global lock in order to look for a - * matching inpcb. - */ if (inp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); INP_WUNLOCK(inp); - } - INP_INFO_WUNLOCK(&tcbinfo); - if (inp == NULL) + } else tcp_dropwithreset(m, th, NULL, tlen, rstreason); m = NULL; /* mbuf chain got consumed. */ goto drop; @@ -2414,19 +2407,12 @@ dropafterack: dropwithreset: KASSERT(headlocked, ("%s: dropwithreset: head not locked", __func__)); + INP_INFO_WUNLOCK(&tcbinfo); - /* - * If tp is non-NULL, we call tcp_dropwithreset() holding both inpcb - * and global locks. However, if NULL, we must hold neither as - * firewalls may acquire the global lock in order to look for a - * matching inpcb. - */ if (tp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); INP_WUNLOCK(tp->t_inpcb); - } - INP_INFO_WUNLOCK(&tcbinfo); - if (tp == NULL) + } else tcp_dropwithreset(m, th, NULL, tlen, rstreason); return; From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 17:15:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8960106567D; Tue, 11 Nov 2008 17:15:57 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63DF8FC26; Tue, 11 Nov 2008 17:15:57 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABHFvbi007469; Tue, 11 Nov 2008 17:15:57 GMT (envelope-from dds@svn.freebsd.org) Received: (from dds@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABHFvAB007468; Tue, 11 Nov 2008 17:15:57 GMT (envelope-from dds@svn.freebsd.org) Message-Id: <200811111715.mABHFvAB007468@svn.freebsd.org> From: Diomidis Spinellis Date: Tue, 11 Nov 2008 17:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184854 - head/usr.bin/sed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 17:15:58 -0000 Author: dds Date: Tue Nov 11 17:15:57 2008 New Revision: 184854 URL: http://svn.freebsd.org/changeset/base/184854 Log: Fix the code to conform to the "or more" part of the following POSIX specification and regression test regress:25. "A function can be preceded by one or more '!' characters, in which case the function shall be applied if the addresses do not select the pattern space." MFC after: 2 weeks Modified: head/usr.bin/sed/compile.c Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Tue Nov 11 17:12:26 2008 (r184853) +++ head/usr.bin/sed/compile.c Tue Nov 11 17:15:57 2008 (r184854) @@ -224,7 +224,7 @@ nonsel: /* Now parse the command */ case NONSEL: /* ! */ p++; EATSPACE(); - cmd->nonsel = ! cmd->nonsel; + cmd->nonsel = 1; goto nonsel; case GROUP: /* { */ p++; From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 21:57:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 411FC106567C; Tue, 11 Nov 2008 21:57:04 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 256688FC12; Tue, 11 Nov 2008 21:57:04 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABLv4s3012390; Tue, 11 Nov 2008 21:57:04 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABLv3aA012382; Tue, 11 Nov 2008 21:57:03 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <200811112157.mABLv3aA012382@svn.freebsd.org> From: "Christian S.J. Peron" Date: Tue, 11 Nov 2008 21:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184856 - in head/sys: bsm security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 21:57:04 -0000 Author: csjp Date: Tue Nov 11 21:57:03 2008 New Revision: 184856 URL: http://svn.freebsd.org/changeset/base/184856 Log: Add support for extended header BSM tokens. Currently we use the regular header tokens. The extended header tokens contain an IP or IPv6 address which makes it possible to identify which host an audit record came from when audit records are centralized. If the host information has not been specified, the system will default to the old style headers. Otherwise, audit records that are created as a result of system calls will contain host information. This implemented has been designed to be consistent with the Solaris implementation. Host information is set/retrieved using the A_GETKAUDIT and A_SETKAUDIT auditon(2) commands. These commands require that a pointer to a auditinfo_addr_t object is passed. Currently only IP and IPv6 address families are supported. The users pace bits associated with this change will follow in an openbsm import. Reviewed by: rwatson, (sson, wsalamon (older version)) MFC after: 1 month Modified: head/sys/bsm/audit_internal.h head/sys/bsm/audit_record.h head/sys/security/audit/audit.c head/sys/security/audit/audit.h head/sys/security/audit/audit_bsm.c head/sys/security/audit/audit_bsm_token.c head/sys/security/audit/audit_private.h head/sys/security/audit/audit_syscalls.c Modified: head/sys/bsm/audit_internal.h ============================================================================== --- head/sys/bsm/audit_internal.h Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/bsm/audit_internal.h Tue Nov 11 21:57:03 2008 (r184856) @@ -72,7 +72,9 @@ typedef struct au_record au_record_t; * token structures may contain pointers of whose contents we do not know the * size (e.g text tokens). */ +#define AUDIT_HEADER_EX_SIZE(a) ((a)->ai_termid.at_type+18+sizeof(u_int32_t)) #define AUDIT_HEADER_SIZE 18 +#define MAX_AUDIT_HEADER_SIZE (5*sizeof(u_int32_t)+18) #define AUDIT_TRAILER_SIZE 7 /* Modified: head/sys/bsm/audit_record.h ============================================================================== --- head/sys/bsm/audit_record.h Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/bsm/audit_record.h Tue Nov 11 21:57:03 2008 (r184856) @@ -244,10 +244,13 @@ token_t *au_to_file(char *file, struct t token_t *au_to_header32_tm(int rec_size, au_event_t e_type, au_emod_t e_mod, struct timeval tm); +token_t *au_to_header32_ex_tm(int rec_size, au_event_t e_type, au_emod_t e_mod, + struct timeval tm, struct auditinfo_addr *aia); token_t *au_to_header64_tm(int rec_size, au_event_t e_type, au_emod_t e_mod, struct timeval tm); #if !defined(KERNEL) && !defined(_KERNEL) token_t *au_to_header(int rec_size, au_event_t e_type, au_emod_t e_mod); +token_t *au_to_header_ex(int rec_size, au_event_t e_type, au_emod_t e_mod); token_t *au_to_header32(int rec_size, au_event_t e_type, au_emod_t e_mod); token_t *au_to_header64(int rec_size, au_event_t e_type, au_emod_t e_mod); #endif Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit.c Tue Nov 11 21:57:03 2008 (r184856) @@ -158,6 +158,45 @@ struct cv audit_watermark_cv; static struct cv audit_fail_cv; /* + * Kernel audit information. This will store the current audit address + * or host information that the kernel will use when it's generating + * audit records. This data is modified by the A_GET{SET}KAUDIT auditon(2) + * command. + */ +static struct auditinfo_addr audit_kinfo; +static struct rwlock audit_kinfo_lock; + +#define KINFO_LOCK_INIT() rw_init(&audit_kinfo_lock, "kernel audit info lock") +#define KINFO_RLOCK() rw_rlock(&audit_kinfo_lock) +#define KINFO_WLOCK() rw_wlock(&audit_kinfo_lock) +#define KINFO_RUNLOCK() rw_runlock(&audit_kinfo_lock) +#define KINFO_WUNLOCK() rw_wunlock(&audit_kinfo_lock) + +void +audit_set_kinfo(struct auditinfo_addr *ak) +{ + + KASSERT(ak->ai_termid.at_type == AU_IPv4 || + ak->ai_termid.at_type == AU_IPv6, + ("audit_set_kinfo: invalid address type")); + KINFO_WLOCK(); + audit_kinfo = *ak; + KINFO_WUNLOCK(); +} + +void +audit_get_kinfo(struct auditinfo_addr *ak) +{ + + KASSERT(audit_kinfo.ai_termid.at_type == AU_IPv4 || + audit_kinfo.ai_termid.at_type == AU_IPv6, + ("audit_set_kinfo: invalid address type")); + KINFO_RLOCK(); + *ak = audit_kinfo; + KINFO_RUNLOCK(); +} + +/* * Construct an audit record for the passed thread. */ static int @@ -241,7 +280,11 @@ audit_init(void) audit_qctrl.aq_bufsz = AQ_BUFSZ; audit_qctrl.aq_minfree = AU_FS_MINFREE; + audit_kinfo.ai_termid.at_type = AU_IPv4; + audit_kinfo.ai_termid.at_addr[0] = INADDR_ANY; + mtx_init(&audit_mtx, "audit_mtx", NULL, MTX_DEF); + KINFO_LOCK_INIT(); cv_init(&audit_worker_cv, "audit_worker_cv"); cv_init(&audit_watermark_cv, "audit_watermark_cv"); cv_init(&audit_fail_cv, "audit_fail_cv"); Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit.h Tue Nov 11 21:57:03 2008 (r184856) @@ -180,6 +180,8 @@ void audit_cred_proc1(struct ucred *cre void audit_proc_coredump(struct thread *td, char *path, int errcode); void audit_thread_alloc(struct thread *td); void audit_thread_free(struct thread *td); +void audit_set_kinfo(struct auditinfo_addr *); +void audit_get_kinfo(struct auditinfo_addr *); /* * Define a macro to wrap the audit_arg_* calls by checking the global Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit_bsm.c Tue Nov 11 21:57:03 2008 (r184856) @@ -113,13 +113,34 @@ kau_close(struct au_record *rec, struct size_t tot_rec_size; token_t *cur, *hdr, *trail; struct timeval tm; - - tot_rec_size = rec->len + AUDIT_HEADER_SIZE + AUDIT_TRAILER_SIZE; + size_t hdrsize; + struct auditinfo_addr ak; + struct in6_addr *ap; + + audit_get_kinfo(&ak); + hdrsize = 0; + switch (ak.ai_termid.at_type) { + case AU_IPv4: + hdrsize = (ak.ai_termid.at_addr[0] == INADDR_ANY) ? + AUDIT_HEADER_SIZE : AUDIT_HEADER_EX_SIZE(&ak); + break; + case AU_IPv6: + ap = (struct in6_addr *)&ak.ai_termid.at_addr[0]; + hdrsize = (IN6_IS_ADDR_UNSPECIFIED(ap)) ? AUDIT_HEADER_SIZE : + AUDIT_HEADER_EX_SIZE(&ak); + break; + default: + panic("kau_close: invalid address family"); + } + tot_rec_size = rec->len + hdrsize + AUDIT_TRAILER_SIZE; rec->data = malloc(tot_rec_size, M_AUDITBSM, M_WAITOK | M_ZERO); tm.tv_usec = ctime->tv_nsec / 1000; tm.tv_sec = ctime->tv_sec; - hdr = au_to_header32_tm(tot_rec_size, event, 0, tm); + if (hdrsize != AUDIT_HEADER_SIZE) + hdr = au_to_header32_ex_tm(tot_rec_size, event, 0, tm, &ak); + else + hdr = au_to_header32_tm(tot_rec_size, event, 0, tm); TAILQ_INSERT_HEAD(&rec->token_q, hdr, tokens); trail = au_to_trailer(tot_rec_size); Modified: head/sys/security/audit/audit_bsm_token.c ============================================================================== --- head/sys/security/audit/audit_bsm_token.c Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit_bsm_token.c Tue Nov 11 21:57:03 2008 (r184856) @@ -1292,6 +1292,51 @@ au_to_exec_env(char **envp) /* * token ID 1 byte * record byte count 4 bytes + * version # 1 byte + * event type 2 bytes + * event modifier 2 bytes + * address type/length 4 bytes + * machine address 4 bytes/16 bytes (IPv4/IPv6 address) + * seconds of time 4 bytes/8 bytes (32/64-bits) + * milliseconds of time 4 bytes/8 bytes (32/64-bits) + */ +token_t * +au_to_header32_ex_tm(int rec_size, au_event_t e_type, au_emod_t e_mod, + struct timeval tm, struct auditinfo_addr *aia) +{ + token_t *t; + u_char *dptr = NULL; + u_int32_t timems; + struct au_tid_addr *tid; + + tid = &aia->ai_termid; + KASSERT(tid->at_type == AU_IPv4 || tid->at_type == AU_IPv6, + ("au_to_header32_ex_tm: invalid address family")); + + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int32_t) + + sizeof(u_char) + 2 * sizeof(u_int16_t) + 3 * sizeof(u_int32_t) + + tid->at_type); + + ADD_U_CHAR(dptr, AUT_HEADER32_EX); + ADD_U_INT32(dptr, rec_size); + ADD_U_CHAR(dptr, AUDIT_HEADER_VERSION_OPENBSM); + ADD_U_INT16(dptr, e_type); + ADD_U_INT16(dptr, e_mod); + ADD_U_INT32(dptr, tid->at_type); + if (tid->at_type == AU_IPv6) + ADD_MEM(dptr, &tid->at_addr[0], 4 * sizeof(u_int32_t)); + else + ADD_MEM(dptr, &tid->at_addr[0], sizeof(u_int32_t)); + timems = tm.tv_usec / 1000; + /* Add the timestamp */ + ADD_U_INT32(dptr, tm.tv_sec); + ADD_U_INT32(dptr, timems); /* We need time in ms. */ + return (t); +} + +/* + * token ID 1 byte + * record byte count 4 bytes * version # 1 byte [2] * event type 2 bytes * event modifier 2 bytes Modified: head/sys/security/audit/audit_private.h ============================================================================== --- head/sys/security/audit/audit_private.h Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit_private.h Tue Nov 11 21:57:03 2008 (r184856) @@ -132,6 +132,7 @@ union auditon_udata { au_qctrl_t au_qctrl; au_stat_t au_stat; au_fstat_t au_fstat; + auditinfo_addr_t au_kau_info; }; struct posix_ipc_perm { Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Tue Nov 11 17:51:38 2008 (r184855) +++ head/sys/security/audit/audit_syscalls.c Tue Nov 11 21:57:03 2008 (r184856) @@ -395,11 +395,14 @@ auditon(struct thread *td, struct audito break; case A_GETKAUDIT: - return (ENOSYS); + audit_get_kinfo(&udata.au_kau_info); break; case A_SETKAUDIT: - return (ENOSYS); + if (udata.au_kau_info.ai_termid.at_type != AU_IPv4 && + udata.au_kau_info.ai_termid.at_type != AU_IPv6) + return (EINVAL); + audit_set_kinfo(&udata.au_kau_info); break; case A_SENDTRIGGER: From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 22:59:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A8C41065677; Tue, 11 Nov 2008 22:59:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6367B8FC13; Tue, 11 Nov 2008 22:59:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABMxfYK013555; Tue, 11 Nov 2008 22:59:41 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABMxf15013554; Tue, 11 Nov 2008 22:59:41 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811112259.mABMxf15013554@svn.freebsd.org> From: Robert Watson Date: Tue, 11 Nov 2008 22:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184857 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 22:59:41 -0000 Author: rwatson Date: Tue Nov 11 22:59:40 2008 New Revision: 184857 URL: http://svn.freebsd.org/changeset/base/184857 Log: Minor style tweaks and change lock name string to use _'s and not spaces to improve parseability. Modified: head/sys/security/audit/audit.c Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Tue Nov 11 21:57:03 2008 (r184856) +++ head/sys/security/audit/audit.c Tue Nov 11 22:59:40 2008 (r184857) @@ -166,7 +166,8 @@ static struct cv audit_fail_cv; static struct auditinfo_addr audit_kinfo; static struct rwlock audit_kinfo_lock; -#define KINFO_LOCK_INIT() rw_init(&audit_kinfo_lock, "kernel audit info lock") +#define KINFO_LOCK_INIT() rw_init(&audit_kinfo_lock, \ + "audit_kinfo_lock") #define KINFO_RLOCK() rw_rlock(&audit_kinfo_lock) #define KINFO_WLOCK() rw_wlock(&audit_kinfo_lock) #define KINFO_RUNLOCK() rw_runlock(&audit_kinfo_lock) @@ -179,6 +180,7 @@ audit_set_kinfo(struct auditinfo_addr *a KASSERT(ak->ai_termid.at_type == AU_IPv4 || ak->ai_termid.at_type == AU_IPv6, ("audit_set_kinfo: invalid address type")); + KINFO_WLOCK(); audit_kinfo = *ak; KINFO_WUNLOCK(); @@ -191,6 +193,7 @@ audit_get_kinfo(struct auditinfo_addr *a KASSERT(audit_kinfo.ai_termid.at_type == AU_IPv4 || audit_kinfo.ai_termid.at_type == AU_IPv6, ("audit_set_kinfo: invalid address type")); + KINFO_RLOCK(); *ak = audit_kinfo; KINFO_RUNLOCK(); From owner-svn-src-all@FreeBSD.ORG Tue Nov 11 23:08:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 526D61065670; Tue, 11 Nov 2008 23:08:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C2248FC14; Tue, 11 Nov 2008 23:08:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mABN8Kim013749; Tue, 11 Nov 2008 23:08:20 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mABN8KMx013747; Tue, 11 Nov 2008 23:08:20 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811112308.mABN8KMx013747@svn.freebsd.org> From: Robert Watson Date: Tue, 11 Nov 2008 23:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184858 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 23:08:20 -0000 Author: rwatson Date: Tue Nov 11 23:08:20 2008 New Revision: 184858 URL: http://svn.freebsd.org/changeset/base/184858 Log: Move audit-internal function definitions for getting and setting audit kinfo state to audit_private.h. Modified: head/sys/security/audit/audit.h head/sys/security/audit/audit_private.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Tue Nov 11 22:59:40 2008 (r184857) +++ head/sys/security/audit/audit.h Tue Nov 11 23:08:20 2008 (r184858) @@ -180,8 +180,6 @@ void audit_cred_proc1(struct ucred *cre void audit_proc_coredump(struct thread *td, char *path, int errcode); void audit_thread_alloc(struct thread *td); void audit_thread_free(struct thread *td); -void audit_set_kinfo(struct auditinfo_addr *); -void audit_get_kinfo(struct auditinfo_addr *); /* * Define a macro to wrap the audit_arg_* calls by checking the global Modified: head/sys/security/audit/audit_private.h ============================================================================== --- head/sys/security/audit/audit_private.h Tue Nov 11 22:59:40 2008 (r184857) +++ head/sys/security/audit/audit_private.h Tue Nov 11 23:08:20 2008 (r184858) @@ -319,6 +319,12 @@ void audit_trigger_init(void); int audit_send_trigger(unsigned int trigger); /* + * Accessor functions to manage global audit state. + */ +void audit_set_kinfo(struct auditinfo_addr *); +void audit_get_kinfo(struct auditinfo_addr *); + +/* * General audit related functions. */ struct kaudit_record *currecord(void); From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 04:43:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 752991065672; Wed, 12 Nov 2008 04:43:55 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1658FC0A; Wed, 12 Nov 2008 04:43:55 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC4htma020179; Wed, 12 Nov 2008 04:43:55 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC4htRu020178; Wed, 12 Nov 2008 04:43:55 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200811120443.mAC4htRu020178@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 12 Nov 2008 04:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184860 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 04:43:55 -0000 Author: obrien Date: Wed Nov 12 04:43:55 2008 New Revision: 184860 URL: http://svn.freebsd.org/changeset/base/184860 Log: Add the kerberos5 libs to the install32 target. (we've been building the all along, but never installing them) Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Nov 12 01:22:25 2008 (r184859) +++ head/Makefile.inc1 Wed Nov 12 04:43:55 2008 (r184860) @@ -506,6 +506,9 @@ distribute32 install32: .if ${MK_CRYPT} != "no" cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif +.if ${MK_KERBEROS} != "no" + cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} +.endif cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 04:45:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B50B81065672; Wed, 12 Nov 2008 04:45:09 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A00708FC18; Wed, 12 Nov 2008 04:45:09 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC4j9Jv020264; Wed, 12 Nov 2008 04:45:09 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC4j9d5020259; Wed, 12 Nov 2008 04:45:09 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811120445.mAC4j9d5020259@svn.freebsd.org> From: Kip Macy Date: Wed, 12 Nov 2008 04:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184861 - in head/sys/dev/cxgb: common ulp/tom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 04:45:09 -0000 Author: kmacy Date: Wed Nov 12 04:45:09 2008 New Revision: 184861 URL: http://svn.freebsd.org/changeset/base/184861 Log: Update firmware version check make ddp a tunable Obtained from: Chelsio Inc. MFC after: 3 days Modified: head/sys/dev/cxgb/common/cxgb_ctl_defs.h head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/dev/cxgb/ulp/tom/cxgb_tom.c head/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c Modified: head/sys/dev/cxgb/common/cxgb_ctl_defs.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_ctl_defs.h Wed Nov 12 04:43:55 2008 (r184860) +++ head/sys/dev/cxgb/common/cxgb_ctl_defs.h Wed Nov 12 04:45:09 2008 (r184861) @@ -85,7 +85,7 @@ struct ddp_params { struct adap_ports { unsigned int nports; /* number of ports on this adapter */ - struct net_device *lldevs[2]; + struct net_device *lldevs[MAX_NPORTS]; }; /* Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Nov 12 04:43:55 2008 (r184860) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Wed Nov 12 04:45:09 2008 (r184861) @@ -740,7 +740,8 @@ enum { SF_ERASE_SECTOR = 0xd8, /* erase sector */ FW_FLASH_BOOT_ADDR = 0x70000, /* start address of FW in flash */ - FW_VERS_ADDR = 0x77ffc, /* flash address holding FW version */ + OLD_FW_VERS_ADDR = 0x77ffc, /* flash address holding FW version */ + FW_VERS_ADDR = 0x7fffc, /* flash address holding FW version */ FW_MIN_SIZE = 8, /* at least version and csum */ FW_MAX_SIZE = FW_VERS_ADDR - FW_FLASH_BOOT_ADDR, @@ -1027,7 +1028,12 @@ enum fw_version_type { */ int t3_get_fw_version(adapter_t *adapter, u32 *vers) { - return t3_read_flash(adapter, FW_VERS_ADDR, 1, vers, 0); + int ret = t3_read_flash(adapter, FW_VERS_ADDR, 1, vers, 0); + + if (!ret && *vers != 0xffffffff) + return 0; + else + return t3_read_flash(adapter, OLD_FW_VERS_ADDR, 1, vers, 0); } /** Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Nov 12 04:43:55 2008 (r184860) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Wed Nov 12 04:45:09 2008 (r184861) @@ -3449,9 +3449,7 @@ process_pass_accept_req(struct socket *s V_TF_DDP_OFF(1) | TP_DDP_TIMER_WORKAROUND_VAL, 1); } else - printf("not offloading\n"); - - + DPRINTF("no DDP\n"); return; reject: Modified: head/sys/dev/cxgb/ulp/tom/cxgb_tom.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_tom.c Wed Nov 12 04:43:55 2008 (r184860) +++ head/sys/dev/cxgb/ulp/tom/cxgb_tom.c Wed Nov 12 04:45:09 2008 (r184861) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -90,13 +89,6 @@ __FBSDID("$FreeBSD$"); #include -static int activated = 1; -TUNABLE_INT("hw.t3toe.activated", &activated); -SYSCTL_NODE(_hw, OID_AUTO, t3toe, CTLFLAG_RD, 0, "T3 toe driver parameters"); -SYSCTL_UINT(_hw_t3toe, OID_AUTO, activated, CTLFLAG_RDTUN, &activated, 0, - "enable TOE at init time"); - - TAILQ_HEAD(, adapter) adapter_list; static struct rwlock adapter_list_lock; @@ -938,7 +930,7 @@ do_act_establish(struct t3cdev *dev, str } else { log(LOG_ERR, "%s: received clientless CPL command 0x%x\n", - dev->name, CPL_PASS_ACCEPT_REQ); + dev->name, CPL_ACT_ESTABLISH); return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; } } @@ -1360,8 +1352,6 @@ t3_toe_attach(struct toedev *dev, const t3_init_tunables(t); mtx_init(&t->listen_lock, "tom data listeners", NULL, MTX_DEF); CTR2(KTR_TOM, "t3_toe_attach dev=%p entry=%p", dev, entry); - /* Adjust TOE activation for this module */ - t->conf.activated = activated; dev->tod_can_offload = can_offload; dev->tod_connect = t3_connect; Modified: head/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c Wed Nov 12 04:43:55 2008 (r184860) +++ head/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c Wed Nov 12 04:45:09 2008 (r184861) @@ -76,6 +76,10 @@ __FBSDID("$FreeBSD$"); #include #include +/* Avoid clutter in the hw.* space, keep all toe tunables within hw.cxgb */ +SYSCTL_DECL(_hw_cxgb); +SYSCTL_NODE(_hw_cxgb, OID_AUTO, toe, CTLFLAG_RD, 0, "TOE parameters"); + static struct tom_tunables default_tunable_vals = { .max_host_sndbuf = 32 * 1024, .tx_hold_thres = 0, @@ -100,11 +104,24 @@ static struct tom_tunables default_tunab .activated = 1, }; +static int activated = 1; +TUNABLE_INT("hw.cxgb.toe.activated", &activated); +SYSCTL_UINT(_hw_cxgb_toe, OID_AUTO, activated, CTLFLAG_RDTUN, &activated, 0, + "enable TOE at init time"); + +static int ddp = 1; +TUNABLE_INT("hw.cxgb.toe.ddp", &ddp); +SYSCTL_UINT(_hw_cxgb_toe, OID_AUTO, ddp, CTLFLAG_RDTUN, &ddp, 0, "enable DDP"); + void t3_init_tunables(struct tom_data *t) { t->conf = default_tunable_vals; + /* Adjust tunables */ + t->conf.activated = activated; + t->conf.ddp = ddp; + /* Now apply device specific fixups. */ t->conf.mss = T3C_DATA(t->cdev)->tx_max_chunk; t->conf.max_wrs = T3C_DATA(t->cdev)->max_wrs; From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 07:07:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E489A106568A; Wed, 12 Nov 2008 07:07:27 +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 D746A8FC25; Wed, 12 Nov 2008 07:07:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC77Rq3022683; Wed, 12 Nov 2008 07:07:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC77RUI022682; Wed, 12 Nov 2008 07:07:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200811120707.mAC77RUI022682@svn.freebsd.org> From: Xin LI Date: Wed, 12 Nov 2008 07:07:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184862 - in stable/7/sys: . dev/et X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 07:07:28 -0000 Author: delphij Date: Wed Nov 12 07:07:27 2008 New Revision: 184862 URL: http://svn.freebsd.org/changeset/base/184862 Log: MFC revision 1801453: Don't leak DMA map if not freed. Submitted by: kevlo Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/dev/et/if_et.c Modified: stable/7/sys/dev/et/if_et.c ============================================================================== --- stable/7/sys/dev/et/if_et.c Wed Nov 12 04:45:09 2008 (r184861) +++ stable/7/sys/dev/et/if_et.c Wed Nov 12 07:07:27 2008 (r184862) @@ -1326,6 +1326,8 @@ et_free_rx_ring(struct et_softc *sc) struct et_rxbuf *rb = &rbd->rbd_buf[i]; if (rb->rb_mbuf != NULL) { + bus_dmamap_unload(sc->sc_mbuf_dtag, + rb->rb_dmap); m_freem(rb->rb_mbuf); rb->rb_mbuf = NULL; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 09:04:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54387106564A; Wed, 12 Nov 2008 09:04:44 +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 470228FC16; Wed, 12 Nov 2008 09:04:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC94iYJ024906; Wed, 12 Nov 2008 09:04:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC94iGf024905; Wed, 12 Nov 2008 09:04:44 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811120904.mAC94iGf024905@svn.freebsd.org> From: Ed Schouten Date: Wed, 12 Nov 2008 09:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184866 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 09:04:44 -0000 Author: ed Date: Wed Nov 12 09:04:44 2008 New Revision: 184866 URL: http://svn.freebsd.org/changeset/base/184866 Log: Don't forget to relock the TTY after uiomove() returns an error. Peter Holm just discovered this funny bug inside the TTY code: if uiomove() in ttydisc_write() returns an error, we forget to relock the TTY before jumping out of ttydisc_write(). Fix it by placing tty_unlock() and tty_lock() around uiomove(). Submitted by: pho Modified: head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Wed Nov 12 08:29:26 2008 (r184865) +++ head/sys/kern/tty_ttydisc.c Wed Nov 12 09:04:44 2008 (r184866) @@ -460,17 +460,15 @@ ttydisc_write(struct tty *tp, struct uio MPASS(oblen == 0); /* Step 1: read data. */ - - tty_unlock(tp); - obstart = ob; nlen = MIN(uio->uio_resid, sizeof ob); + tty_unlock(tp); error = uiomove(ob, nlen, uio); + tty_lock(tp); if (error != 0) break; oblen = nlen; - tty_lock(tp); if (tty_gone(tp)) { error = ENXIO; break; From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 09:35:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 306C71065670; Wed, 12 Nov 2008 09:35:58 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A728FC1F; Wed, 12 Nov 2008 09:35:58 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC9ZvRI025504; Wed, 12 Nov 2008 09:35:57 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC9Zvoc025503; Wed, 12 Nov 2008 09:35:57 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <200811120935.mAC9Zvoc025503@svn.freebsd.org> From: Joerg Wunsch Date: Wed, 12 Nov 2008 09:35:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184867 - stable/7/bin/chio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 09:35:58 -0000 Author: joerg Date: Wed Nov 12 09:35:57 2008 New Revision: 184867 URL: http://svn.freebsd.org/changeset/base/184867 Log: (MFC r184484) When running a "chio return" operation using a physical source unit rather than a voltag name, do not set the CESR_VOLTAGS flags in the CHIOGSTATUS command requesting the current status. As voltags are an optional feature that must be handled as "reserved" by media changers not implementing the feature, always setting CESR_VOLTAGS resulted in the command being aborted with an `Invalid field in CDB', and consequently the "chio return" failed, for media changers that do not support voltags. Approved by: re (kib) Modified: stable/7/bin/chio/ (props changed) stable/7/bin/chio/chio.c Modified: stable/7/bin/chio/chio.c ============================================================================== --- stable/7/bin/chio/chio.c Wed Nov 12 09:04:44 2008 (r184866) +++ stable/7/bin/chio/chio.c Wed Nov 12 09:35:57 2008 (r184867) @@ -69,7 +69,7 @@ static const char *bits_to_string(ces_st static void find_element(char *, uint16_t *, uint16_t *); static struct changer_element_status *get_element_status - (unsigned int, unsigned int); + (unsigned int, unsigned int, int); static int do_move(const char *, int, char **); static int do_exchange(const char *, int, char **); @@ -969,7 +969,8 @@ do_return(const char *cname, int argc, c ++argv; --argc; /* Get the status */ - ces = get_element_status((unsigned int)type, (unsigned int)element); + ces = get_element_status((unsigned int)type, (unsigned int)element, + CHET_VT == type); if (NULL == ces) errx(1, "%s: null element status pointer", cname); @@ -1004,7 +1005,7 @@ usage: * should free() it when done. */ static struct changer_element_status * -get_element_status(unsigned int type, unsigned int element) +get_element_status(unsigned int type, unsigned int element, int use_voltags) { struct changer_element_status_request cesr; struct changer_element_status *ces; @@ -1020,7 +1021,8 @@ get_element_status(unsigned int type, un cesr.cesr_element_type = (uint16_t)type; cesr.cesr_element_base = (uint16_t)element; cesr.cesr_element_count = 1; /* Only this one element */ - cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ + if (use_voltags) + cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ cesr.cesr_element_status = ces; if (ioctl(changer_fd, CHIOGSTATUS, (char *)&cesr) == -1) { From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 09:36:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89DB51065673; Wed, 12 Nov 2008 09:36:35 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5D78FC2D; Wed, 12 Nov 2008 09:36:35 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC9aZVM025553; Wed, 12 Nov 2008 09:36:35 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC9aZxv025552; Wed, 12 Nov 2008 09:36:35 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811120936.mAC9aZxv025552@svn.freebsd.org> From: Doug Rabson Date: Wed, 12 Nov 2008 09:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184868 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 09:36:35 -0000 Author: dfr Date: Wed Nov 12 09:36:35 2008 New Revision: 184868 URL: http://svn.freebsd.org/changeset/base/184868 Log: Allow v3 GETATTR requests even when weakly authenticated. Change the error return for for weakly authenticated requests from REJECTEDCRED to WEAKAUTH for consistency with Solaris. Modified: head/sys/nfsserver/nfs_srvsubs.c Modified: head/sys/nfsserver/nfs_srvsubs.c ============================================================================== --- head/sys/nfsserver/nfs_srvsubs.c Wed Nov 12 09:35:57 2008 (r184867) +++ head/sys/nfsserver/nfs_srvsubs.c Wed Nov 12 09:36:35 2008 (r184868) @@ -1149,7 +1149,8 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla */ mountreq = FALSE; if (v3) { - if (nfsd->nd_procnum == NFSPROC_FSINFO) + if (nfsd->nd_procnum == NFSPROC_FSINFO + || nfsd->nd_procnum == NFSPROC_GETATTR) mountreq = TRUE; } else { if (nfsd->nd_procnum == NFSPROC_FSSTAT @@ -1157,7 +1158,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla mountreq = TRUE; } if (!mountreq) { - error = NFSERR_AUTHERR | AUTH_REJECTCRED; + error = NFSERR_AUTHERR | AUTH_TOOWEAK; goto out; } } From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 09:38:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 844BD106564A; Wed, 12 Nov 2008 09:38:18 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76DCE8FC08; Wed, 12 Nov 2008 09:38:18 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC9cIpJ025632; Wed, 12 Nov 2008 09:38:18 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC9cIFb025631; Wed, 12 Nov 2008 09:38:18 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811120938.mAC9cIFb025631@svn.freebsd.org> From: Doug Rabson Date: Wed, 12 Nov 2008 09:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184869 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 09:38:18 -0000 Author: dfr Date: Wed Nov 12 09:38:18 2008 New Revision: 184869 URL: http://svn.freebsd.org/changeset/base/184869 Log: Turn (NFSERR_AUTHERR|code) status values into svcerr_auth(rqst, code) replies instead of returning a success with a bogus NFS error code. Modified: head/sys/nfsserver/nfs_srvkrpc.c Modified: head/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- head/sys/nfsserver/nfs_srvkrpc.c Wed Nov 12 09:36:35 2008 (r184868) +++ head/sys/nfsserver/nfs_srvkrpc.c Wed Nov 12 09:38:18 2008 (r184869) @@ -388,8 +388,13 @@ nfssvc_program(struct svc_req *rqst, SVC svc_freereq(rqst); return; } - if (!svc_sendreply_mbuf(rqst, mrep)) - svcerr_systemerr(rqst); + if (nd.nd_repstat & NFSERR_AUTHERR) { + svcerr_auth(rqst, nd.nd_repstat & ~NFSERR_AUTHERR); + m_freem(mrep); + } else { + if (!svc_sendreply_mbuf(rqst, mrep)) + svcerr_systemerr(rqst); + } svc_freereq(rqst); } From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 09:52:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92CE0106567C; Wed, 12 Nov 2008 09:52:06 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 820958FC08; Wed, 12 Nov 2008 09:52:06 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAC9q6Ra025918; Wed, 12 Nov 2008 09:52:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAC9q6H3025912; Wed, 12 Nov 2008 09:52:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811120952.mAC9q6H3025912@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Nov 2008 09:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184870 - in head/sys: amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 09:52:06 -0000 Author: yongari Date: Wed Nov 12 09:52:06 2008 New Revision: 184870 URL: http://svn.freebsd.org/changeset/base/184870 Log: Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet controller. The controller is also known as L1E(AR8121) and L2E(AR8113/AR8114). Unlike its predecessor Attansic L1, AR8121/AR8113/AR8114 uses completely different Rx logic such that it requires separate driver. Datasheet for AR81xx is not available to open source driver writers but it shares large part of Tx and PHY logic of L1. I still don't understand some part of register meaning and some MAC statistics counters but the driver seems to have no critical issues for performance and stability. The AR81xx requires copy operation to pass received frames to upper stack such that ale(4) consumes a lot of CPU cycles than that of other controller. A couple of silicon bugs also adds more CPU cycles to address the known hardware bug. However, if you have fast CPU you can still saturate the link. Currently ale(4) supports the following hardware features. - MSI. - TCP Segmentation offload. - Hardware VLAN tag insertion/stripping with checksum offload. - Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload. - Tx/Rx interrupt moderation. - Hardware statistics counters. - Jumbo frame. - WOL. AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick who sent the hardware to me. Without his donation writing a driver for AR81xx would never have been possible. Big thanks to all people who reported feedback or tested patches. HW donated by: koitsu Tested by: bsam, Joao Barros gmail DOT com > Jan Henrik Sylvester janh DOT de > Ivan Brawley < ivan <> brawley DOT id DOT au >, CURRENT ML Added: head/sys/dev/ale/ head/sys/dev/ale/if_ale.c (contents, props changed) head/sys/dev/ale/if_alereg.h (contents, props changed) head/sys/dev/ale/if_alevar.h (contents, props changed) head/sys/modules/ale/ head/sys/modules/ale/Makefile (contents, props changed) Modified: head/sys/amd64/conf/GENERIC head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/files head/sys/i386/conf/GENERIC head/sys/modules/Makefile Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Nov 12 09:38:18 2008 (r184869) +++ head/sys/amd64/conf/GENERIC Wed Nov 12 09:52:06 2008 (r184870) @@ -202,6 +202,7 @@ device vx # 3Com 3c590, 3c595 (``Vorte device miibus # MII bus support device ae # Attansic/Atheros L2 FastEthernet device age # Attansic/Atheros L1 Gigabit Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Wed Nov 12 09:38:18 2008 (r184869) +++ head/sys/boot/forth/loader.conf Wed Nov 12 09:52:06 2008 (r184870) @@ -210,6 +210,7 @@ pf_load="NO" # packet filter miibus_load="NO" # miibus support, needed for some drivers if_ae_load="NO" # Attansic/Atheros L2 FastEthernet if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet +if_ale_load="NO" # Atheros AR8121/AR8113/AR8114 Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i if_ath_load="NO" # Atheros IEEE 802.11 wireless NICs Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Nov 12 09:38:18 2008 (r184869) +++ head/sys/conf/NOTES Wed Nov 12 09:52:06 2008 (r184870) @@ -1718,6 +1718,7 @@ device miibus # L2 PCI-Express FastEthernet controllers. # age: Support for gigabit ethernet adapters based on the Attansic/Atheros # L1 PCI express gigabit ethernet controllers. +# ale: Support for Atheros AR8121/AR8113/AR8114 PCIe ethernet controllers. # bce: Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet # adapters. # bfe: Broadcom BCM4401 Ethernet adapter. @@ -1859,6 +1860,7 @@ device xe # PCI Ethernet NICs that use the common MII bus controller code. device ae # Attansic/Atheros L2 FastEthernet device age # Attansic/Atheros L1 Gigabit Ethernet +device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Nov 12 09:38:18 2008 (r184869) +++ head/sys/conf/files Wed Nov 12 09:52:06 2008 (r184870) @@ -448,6 +448,7 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/ale/if_ale.c optional ale pci dev/amd/amd.c optional amd dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr Added: head/sys/dev/ale/if_ale.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ale/if_ale.c Wed Nov 12 09:52:06 2008 (r184870) @@ -0,0 +1,3075 @@ +/*- + * Copyright (c) 2008, Pyun YongHyeon + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" + +/* For more information about Tx checksum offload issues see ale_encap(). */ +#define ALE_CSUM_FEATURES (CSUM_TCP | CSUM_UDP) +#ifndef IFCAP_VLAN_HWTSO +#define IFCAP_VLAN_HWTSO 0 +#endif + +MODULE_DEPEND(ale, pci, 1, 1, 1); +MODULE_DEPEND(ale, ether, 1, 1, 1); +MODULE_DEPEND(ale, miibus, 1, 1, 1); + +/* Tunables. */ +static int msi_disable = 0; +static int msix_disable = 0; +TUNABLE_INT("hw.ale.msi_disable", &msi_disable); +TUNABLE_INT("hw.ale.msix_disable", &msix_disable); + +/* + * Devices supported by this driver. + */ +static struct ale_dev { + uint16_t ale_vendorid; + uint16_t ale_deviceid; + const char *ale_name; +} ale_devs[] = { + { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR81XX, + "Atheros AR8121/AR8113/AR8114 PCIe Ethernet" }, +}; + +static int ale_attach(device_t); +static int ale_check_boundary(struct ale_softc *); +static int ale_detach(device_t); +static int ale_dma_alloc(struct ale_softc *); +static void ale_dma_free(struct ale_softc *); +static void ale_dmamap_cb(void *, bus_dma_segment_t *, int, int); +static int ale_encap(struct ale_softc *, struct mbuf **); +static void ale_get_macaddr(struct ale_softc *); +static void ale_init(void *); +static void ale_init_locked(struct ale_softc *); +static void ale_init_rx_pages(struct ale_softc *); +static void ale_init_tx_ring(struct ale_softc *); +static void ale_int_task(void *, int); +static int ale_intr(void *); +static int ale_ioctl(struct ifnet *, u_long, caddr_t); +static void ale_link_task(void *, int); +static void ale_mac_config(struct ale_softc *); +static int ale_miibus_readreg(device_t, int, int); +static void ale_miibus_statchg(device_t); +static int ale_miibus_writereg(device_t, int, int, int); +static int ale_mediachange(struct ifnet *); +static void ale_mediastatus(struct ifnet *, struct ifmediareq *); +static void ale_phy_reset(struct ale_softc *); +static int ale_probe(device_t); +static void ale_reset(struct ale_softc *); +static int ale_resume(device_t); +static void ale_rx_update_page(struct ale_softc *, struct ale_rx_page **, + uint32_t, uint32_t *); +static void ale_rxcsum(struct ale_softc *, struct mbuf *, uint32_t); +static int ale_rxeof(struct ale_softc *sc, int); +static void ale_rxfilter(struct ale_softc *); +static void ale_rxvlan(struct ale_softc *); +static void ale_setlinkspeed(struct ale_softc *); +static void ale_setwol(struct ale_softc *); +static int ale_shutdown(device_t); +static void ale_start(struct ifnet *); +static void ale_stats_clear(struct ale_softc *); +static void ale_stats_update(struct ale_softc *); +static void ale_stop(struct ale_softc *); +static void ale_stop_mac(struct ale_softc *); +static int ale_suspend(device_t); +static void ale_sysctl_node(struct ale_softc *); +static void ale_tick(void *); +static void ale_tx_task(void *, int); +static void ale_txeof(struct ale_softc *); +static void ale_watchdog(struct ale_softc *); +static int sysctl_int_range(SYSCTL_HANDLER_ARGS, int, int); +static int sysctl_hw_ale_proc_limit(SYSCTL_HANDLER_ARGS); +static int sysctl_hw_ale_int_mod(SYSCTL_HANDLER_ARGS); + +static device_method_t ale_methods[] = { + /* Device interface. */ + DEVMETHOD(device_probe, ale_probe), + DEVMETHOD(device_attach, ale_attach), + DEVMETHOD(device_detach, ale_detach), + DEVMETHOD(device_shutdown, ale_shutdown), + DEVMETHOD(device_suspend, ale_suspend), + DEVMETHOD(device_resume, ale_resume), + + /* MII interface. */ + DEVMETHOD(miibus_readreg, ale_miibus_readreg), + DEVMETHOD(miibus_writereg, ale_miibus_writereg), + DEVMETHOD(miibus_statchg, ale_miibus_statchg), + + { NULL, NULL } +}; + +static driver_t ale_driver = { + "ale", + ale_methods, + sizeof(struct ale_softc) +}; + +static devclass_t ale_devclass; + +DRIVER_MODULE(ale, pci, ale_driver, ale_devclass, 0, 0); +DRIVER_MODULE(miibus, ale, miibus_driver, miibus_devclass, 0, 0); + +static struct resource_spec ale_res_spec_mem[] = { + { SYS_RES_MEMORY, PCIR_BAR(0), RF_ACTIVE }, + { -1, 0, 0 } +}; + +static struct resource_spec ale_irq_spec_legacy[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0, 0 } +}; + +static struct resource_spec ale_irq_spec_msi[] = { + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static struct resource_spec ale_irq_spec_msix[] = { + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static int +ale_miibus_readreg(device_t dev, int phy, int reg) +{ + struct ale_softc *sc; + uint32_t v; + int i; + + sc = device_get_softc(dev); + + if (phy != sc->ale_phyaddr) + return (0); + + CSR_WRITE_4(sc, ALE_MDIO, MDIO_OP_EXECUTE | MDIO_OP_READ | + MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg)); + for (i = ALE_PHY_TIMEOUT; i > 0; i--) { + DELAY(5); + v = CSR_READ_4(sc, ALE_MDIO); + if ((v & (MDIO_OP_EXECUTE | MDIO_OP_BUSY)) == 0) + break; + } + + if (i == 0) { + device_printf(sc->ale_dev, "phy read timeout : %d\n", reg); + return (0); + } + + return ((v & MDIO_DATA_MASK) >> MDIO_DATA_SHIFT); +} + +static int +ale_miibus_writereg(device_t dev, int phy, int reg, int val) +{ + struct ale_softc *sc; + uint32_t v; + int i; + + sc = device_get_softc(dev); + + if (phy != sc->ale_phyaddr) + return (0); + + CSR_WRITE_4(sc, ALE_MDIO, MDIO_OP_EXECUTE | MDIO_OP_WRITE | + (val & MDIO_DATA_MASK) << MDIO_DATA_SHIFT | + MDIO_SUP_PREAMBLE | MDIO_CLK_25_4 | MDIO_REG_ADDR(reg)); + for (i = ALE_PHY_TIMEOUT; i > 0; i--) { + DELAY(5); + v = CSR_READ_4(sc, ALE_MDIO); + if ((v & (MDIO_OP_EXECUTE | MDIO_OP_BUSY)) == 0) + break; + } + + if (i == 0) + device_printf(sc->ale_dev, "phy write timeout : %d\n", reg); + + return (0); +} + +static void +ale_miibus_statchg(device_t dev) +{ + struct ale_softc *sc; + + sc = device_get_softc(dev); + + taskqueue_enqueue(taskqueue_swi, &sc->ale_link_task); +} + +static void +ale_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) +{ + struct ale_softc *sc; + struct mii_data *mii; + + sc = ifp->if_softc; + ALE_LOCK(sc); + mii = device_get_softc(sc->ale_miibus); + + mii_pollstat(mii); + ALE_UNLOCK(sc); + ifmr->ifm_status = mii->mii_media_status; + ifmr->ifm_active = mii->mii_media_active; +} + +static int +ale_mediachange(struct ifnet *ifp) +{ + struct ale_softc *sc; + struct mii_data *mii; + struct mii_softc *miisc; + int error; + + sc = ifp->if_softc; + ALE_LOCK(sc); + mii = device_get_softc(sc->ale_miibus); + if (mii->mii_instance != 0) { + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + mii_phy_reset(miisc); + } + error = mii_mediachg(mii); + ALE_UNLOCK(sc); + + return (error); +} + +static int +ale_probe(device_t dev) +{ + struct ale_dev *sp; + int i; + uint16_t vendor, devid; + + vendor = pci_get_vendor(dev); + devid = pci_get_device(dev); + sp = ale_devs; + for (i = 0; i < sizeof(ale_devs) / sizeof(ale_devs[0]); i++) { + if (vendor == sp->ale_vendorid && + devid == sp->ale_deviceid) { + device_set_desc(dev, sp->ale_name); + return (BUS_PROBE_DEFAULT); + } + sp++; + } + + return (ENXIO); +} + +static void +ale_get_macaddr(struct ale_softc *sc) +{ + uint32_t ea[2], reg; + int i, vpdc; + + reg = CSR_READ_4(sc, ALE_SPI_CTRL); + if ((reg & SPI_VPD_ENB) != 0) { + reg &= ~SPI_VPD_ENB; + CSR_WRITE_4(sc, ALE_SPI_CTRL, reg); + } + + if (pci_find_extcap(sc->ale_dev, PCIY_VPD, &vpdc) == 0) { + /* + * PCI VPD capability found, let TWSI reload EEPROM. + * This will set ethernet address of controller. + */ + CSR_WRITE_4(sc, ALE_TWSI_CTRL, CSR_READ_4(sc, ALE_TWSI_CTRL) | + TWSI_CTRL_SW_LD_START); + for (i = 100; i > 0; i--) { + DELAY(1000); + reg = CSR_READ_4(sc, ALE_TWSI_CTRL); + if ((reg & TWSI_CTRL_SW_LD_START) == 0) + break; + } + if (i == 0) + device_printf(sc->ale_dev, + "reloading EEPROM timeout!\n"); + } else { + if (bootverbose) + device_printf(sc->ale_dev, + "PCI VPD capability not found!\n"); + } + + ea[0] = CSR_READ_4(sc, ALE_PAR0); + ea[1] = CSR_READ_4(sc, ALE_PAR1); + sc->ale_eaddr[0] = (ea[1] >> 8) & 0xFF; + sc->ale_eaddr[1] = (ea[1] >> 0) & 0xFF; + sc->ale_eaddr[2] = (ea[0] >> 24) & 0xFF; + sc->ale_eaddr[3] = (ea[0] >> 16) & 0xFF; + sc->ale_eaddr[4] = (ea[0] >> 8) & 0xFF; + sc->ale_eaddr[5] = (ea[0] >> 0) & 0xFF; +} + +static void +ale_phy_reset(struct ale_softc *sc) +{ + + /* Reset magic from Linux. */ + CSR_WRITE_2(sc, ALE_GPHY_CTRL, + GPHY_CTRL_HIB_EN | GPHY_CTRL_HIB_PULSE | GPHY_CTRL_SEL_ANA_RESET | + GPHY_CTRL_PHY_PLL_ON); + DELAY(1000); + CSR_WRITE_2(sc, ALE_GPHY_CTRL, + GPHY_CTRL_EXT_RESET | GPHY_CTRL_HIB_EN | GPHY_CTRL_HIB_PULSE | + GPHY_CTRL_SEL_ANA_RESET | GPHY_CTRL_PHY_PLL_ON); + DELAY(1000); +} + +static int +ale_attach(device_t dev) +{ + struct ale_softc *sc; + struct ifnet *ifp; + uint16_t burst; + int error, i, msic, msixc, pmc; + uint32_t rxf_len, txf_len; + + error = 0; + sc = device_get_softc(dev); + sc->ale_dev = dev; + + mtx_init(&sc->ale_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); + callout_init_mtx(&sc->ale_tick_ch, &sc->ale_mtx, 0); + TASK_INIT(&sc->ale_int_task, 0, ale_int_task, sc); + TASK_INIT(&sc->ale_link_task, 0, ale_link_task, sc); + + /* Map the device. */ + pci_enable_busmaster(dev); + sc->ale_res_spec = ale_res_spec_mem; + sc->ale_irq_spec = ale_irq_spec_legacy; + error = bus_alloc_resources(dev, sc->ale_res_spec, sc->ale_res); + if (error != 0) { + device_printf(dev, "cannot allocate memory resources.\n"); + goto fail; + } + + /* Set PHY address. */ + sc->ale_phyaddr = ALE_PHY_ADDR; + + /* Reset PHY. */ + ale_phy_reset(sc); + + /* Reset the ethernet controller. */ + ale_reset(sc); + + /* Get PCI and chip id/revision. */ + sc->ale_rev = pci_get_revid(dev); + if (sc->ale_rev >= 0xF0) { + /* L2E Rev. B. AR8114 */ + sc->ale_flags |= ALE_FLAG_FASTETHER; + } else { + if ((CSR_READ_4(sc, ALE_PHY_STATUS) & PHY_STATUS_100M) != 0) { + /* L1E AR8121 */ + sc->ale_flags |= ALE_FLAG_JUMBO; + } else { + /* L2E Rev. A. AR8113 */ + sc->ale_flags |= ALE_FLAG_FASTETHER; + } + } + /* + * All known controllers seems to require 4 bytes alignment + * of Tx buffers to make Tx checksum offload with custom + * checksum generation method work. + */ + sc->ale_flags |= ALE_FLAG_TXCSUM_BUG; + /* + * All known controllers seems to have issues on Rx checksum + * offload for fragmented IP datagrams. + */ + sc->ale_flags |= ALE_FLAG_RXCSUM_BUG; + /* + * Don't use Tx CMB. It is known to cause RRS update failure + * under certain circumstances. Typical phenomenon of the + * issue would be unexpected sequence number encountered in + * Rx handler. + */ + sc->ale_flags |= ALE_FLAG_TXCMB_BUG; + sc->ale_chip_rev = CSR_READ_4(sc, ALE_MASTER_CFG) >> + MASTER_CHIP_REV_SHIFT; + if (bootverbose) { + device_printf(dev, "PCI device revision : 0x%04x\n", + sc->ale_rev); + device_printf(dev, "Chip id/revision : 0x%04x\n", + sc->ale_chip_rev); + } + txf_len = CSR_READ_4(sc, ALE_SRAM_TX_FIFO_LEN); + rxf_len = CSR_READ_4(sc, ALE_SRAM_RX_FIFO_LEN); + /* + * Uninitialized hardware returns an invalid chip id/revision + * as well as 0xFFFFFFFF for Tx/Rx fifo length. + */ + if (sc->ale_chip_rev == 0xFFFF || txf_len == 0xFFFFFFFF || + rxf_len == 0xFFFFFFF) { + device_printf(dev,"chip revision : 0x%04x, %u Tx FIFO " + "%u Rx FIFO -- not initialized?\n", sc->ale_chip_rev, + txf_len, rxf_len); + error = ENXIO; + goto fail; + } + device_printf(dev, "%u Tx FIFO, %u Rx FIFO\n", txf_len, rxf_len); + + /* Allocate IRQ resources. */ + msixc = pci_msix_count(dev); + msic = pci_msi_count(dev); + if (bootverbose) { + device_printf(dev, "MSIX count : %d\n", msixc); + device_printf(dev, "MSI count : %d\n", msic); + } + + /* Prefer MSIX over MSI. */ + if (msix_disable == 0 || msi_disable == 0) { + if (msix_disable == 0 && msixc == ALE_MSIX_MESSAGES && + pci_alloc_msix(dev, &msixc) == 0) { + if (msic == ALE_MSIX_MESSAGES) { + device_printf(dev, "Using %d MSIX messages.\n", + msixc); + sc->ale_flags |= ALE_FLAG_MSIX; + sc->ale_irq_spec = ale_irq_spec_msix; + } else + pci_release_msi(dev); + } + if (msi_disable == 0 && (sc->ale_flags & ALE_FLAG_MSIX) == 0 && + msic == ALE_MSI_MESSAGES && + pci_alloc_msi(dev, &msic) == 0) { + if (msic == ALE_MSI_MESSAGES) { + device_printf(dev, "Using %d MSI messages.\n", + msic); + sc->ale_flags |= ALE_FLAG_MSI; + sc->ale_irq_spec = ale_irq_spec_msi; + } else + pci_release_msi(dev); + } + } + + error = bus_alloc_resources(dev, sc->ale_irq_spec, sc->ale_irq); + if (error != 0) { + device_printf(dev, "cannot allocate IRQ resources.\n"); + goto fail; + } + + /* Get DMA parameters from PCIe device control register. */ + if (pci_find_extcap(dev, PCIY_EXPRESS, &i) == 0) { + sc->ale_flags |= ALE_FLAG_PCIE; + burst = pci_read_config(dev, i + 0x08, 2); + /* Max read request size. */ + sc->ale_dma_rd_burst = ((burst >> 12) & 0x07) << + DMA_CFG_RD_BURST_SHIFT; + /* Max payload size. */ + sc->ale_dma_wr_burst = ((burst >> 5) & 0x07) << + DMA_CFG_WR_BURST_SHIFT; + if (bootverbose) { + device_printf(dev, "Read request size : %d bytes.\n", + 128 << ((burst >> 12) & 0x07)); + device_printf(dev, "TLP payload size : %d bytes.\n", + 128 << ((burst >> 5) & 0x07)); + } + } else { + sc->ale_dma_rd_burst = DMA_CFG_RD_BURST_128; + sc->ale_dma_wr_burst = DMA_CFG_WR_BURST_128; + } + + /* Create device sysctl node. */ + ale_sysctl_node(sc); + + if ((error = ale_dma_alloc(sc) != 0)) + goto fail; + + /* Load station address. */ + ale_get_macaddr(sc); + + ifp = sc->ale_ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + device_printf(dev, "cannot allocate ifnet structure.\n"); + error = ENXIO; + goto fail; + } + + ifp->if_softc = sc; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_ioctl = ale_ioctl; + ifp->if_start = ale_start; + ifp->if_init = ale_init; + ifp->if_snd.ifq_drv_maxlen = ALE_TX_RING_CNT - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); + ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_TSO4; + ifp->if_hwassist = ALE_CSUM_FEATURES | CSUM_TSO; + if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) { + sc->ale_flags |= ALE_FLAG_PMCAP; + ifp->if_capabilities |= IFCAP_WOL_MAGIC | IFCAP_WOL_MCAST; + } + ifp->if_capenable = ifp->if_capabilities; + + /* Set up MII bus. */ + if ((error = mii_phy_probe(dev, &sc->ale_miibus, ale_mediachange, + ale_mediastatus)) != 0) { + device_printf(dev, "no PHY found!\n"); + goto fail; + } + + ether_ifattach(ifp, sc->ale_eaddr); + + /* VLAN capability setup. */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; + ifp->if_capenable = ifp->if_capabilities; + + /* Tell the upper layer(s) we support long frames. */ + ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + + /* Create local taskq. */ + TASK_INIT(&sc->ale_tx_task, 1, ale_tx_task, ifp); + sc->ale_tq = taskqueue_create_fast("ale_taskq", M_WAITOK, + taskqueue_thread_enqueue, &sc->ale_tq); + if (sc->ale_tq == NULL) { + device_printf(dev, "could not create taskqueue.\n"); + ether_ifdetach(ifp); + error = ENXIO; + goto fail; + } + taskqueue_start_threads(&sc->ale_tq, 1, PI_NET, "%s taskq", + device_get_nameunit(sc->ale_dev)); + + if ((sc->ale_flags & ALE_FLAG_MSIX) != 0) + msic = ALE_MSIX_MESSAGES; + else if ((sc->ale_flags & ALE_FLAG_MSI) != 0) + msic = ALE_MSI_MESSAGES; + else + msic = 1; + for (i = 0; i < msic; i++) { + error = bus_setup_intr(dev, sc->ale_irq[i], + INTR_TYPE_NET | INTR_MPSAFE, ale_intr, NULL, sc, + &sc->ale_intrhand[i]); + if (error != 0) + break; + } + if (error != 0) { + device_printf(dev, "could not set up interrupt handler.\n"); + taskqueue_free(sc->ale_tq); + sc->ale_tq = NULL; + ether_ifdetach(ifp); + goto fail; + } + +fail: + if (error != 0) + ale_detach(dev); + + return (error); +} + +static int +ale_detach(device_t dev) +{ + struct ale_softc *sc; + struct ifnet *ifp; + int i, msic; + + sc = device_get_softc(dev); + + ifp = sc->ale_ifp; + if (device_is_attached(dev)) { + ALE_LOCK(sc); + sc->ale_flags |= ALE_FLAG_DETACH; + ale_stop(sc); + ALE_UNLOCK(sc); + callout_drain(&sc->ale_tick_ch); + taskqueue_drain(sc->ale_tq, &sc->ale_int_task); + taskqueue_drain(sc->ale_tq, &sc->ale_tx_task); + taskqueue_drain(taskqueue_swi, &sc->ale_link_task); + ether_ifdetach(ifp); + } + + if (sc->ale_tq != NULL) { + taskqueue_drain(sc->ale_tq, &sc->ale_int_task); + taskqueue_free(sc->ale_tq); + sc->ale_tq = NULL; + } + + if (sc->ale_miibus != NULL) { + device_delete_child(dev, sc->ale_miibus); + sc->ale_miibus = NULL; + } + bus_generic_detach(dev); + ale_dma_free(sc); + + if (ifp != NULL) { + if_free(ifp); + sc->ale_ifp = NULL; + } + + if ((sc->ale_flags & ALE_FLAG_MSIX) != 0) + msic = ALE_MSIX_MESSAGES; + else if ((sc->ale_flags & ALE_FLAG_MSI) != 0) + msic = ALE_MSI_MESSAGES; + else + msic = 1; + for (i = 0; i < msic; i++) { + if (sc->ale_intrhand[i] != NULL) { + bus_teardown_intr(dev, sc->ale_irq[i], + sc->ale_intrhand[i]); + sc->ale_intrhand[i] = NULL; + } + } + + bus_release_resources(dev, sc->ale_irq_spec, sc->ale_irq); + if ((sc->ale_flags & (ALE_FLAG_MSI | ALE_FLAG_MSIX)) != 0) + pci_release_msi(dev); + bus_release_resources(dev, sc->ale_res_spec, sc->ale_res); + mtx_destroy(&sc->ale_mtx); + + return (0); +} + +#define ALE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ + SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) + +#if __FreeBSD_version > 800000 +#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) +#else +#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ + SYSCTL_ADD_ULONG(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) +#endif + +static void +ale_sysctl_node(struct ale_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child, *parent; + struct sysctl_oid *tree; + struct ale_hw_stats *stats; + int error; + + stats = &sc->ale_stats; + ctx = device_get_sysctl_ctx(sc->ale_dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->ale_dev)); + + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_rx_mod", + CTLTYPE_INT | CTLFLAG_RW, &sc->ale_int_rx_mod, 0, + sysctl_hw_ale_int_mod, "I", "ale Rx interrupt moderation"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_tx_mod", + CTLTYPE_INT | CTLFLAG_RW, &sc->ale_int_tx_mod, 0, + sysctl_hw_ale_int_mod, "I", "ale Tx interrupt moderation"); + /* Pull in device tunables. */ + sc->ale_int_rx_mod = ALE_IM_RX_TIMER_DEFAULT; + error = resource_int_value(device_get_name(sc->ale_dev), + device_get_unit(sc->ale_dev), "int_rx_mod", &sc->ale_int_rx_mod); + if (error == 0) { + if (sc->ale_int_rx_mod < ALE_IM_TIMER_MIN || + sc->ale_int_rx_mod > ALE_IM_TIMER_MAX) { + device_printf(sc->ale_dev, "int_rx_mod value out of " + "range; using default: %d\n", + ALE_IM_RX_TIMER_DEFAULT); + sc->ale_int_rx_mod = ALE_IM_RX_TIMER_DEFAULT; + } + } + sc->ale_int_tx_mod = ALE_IM_TX_TIMER_DEFAULT; + error = resource_int_value(device_get_name(sc->ale_dev), + device_get_unit(sc->ale_dev), "int_tx_mod", &sc->ale_int_tx_mod); + if (error == 0) { + if (sc->ale_int_tx_mod < ALE_IM_TIMER_MIN || + sc->ale_int_tx_mod > ALE_IM_TIMER_MAX) { + device_printf(sc->ale_dev, "int_tx_mod value out of " + "range; using default: %d\n", + ALE_IM_TX_TIMER_DEFAULT); + sc->ale_int_tx_mod = ALE_IM_TX_TIMER_DEFAULT; + } + } + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "process_limit", + CTLTYPE_INT | CTLFLAG_RW, &sc->ale_process_limit, 0, + sysctl_hw_ale_proc_limit, "I", + "max number of Rx events to process"); + /* Pull in device tunables. */ + sc->ale_process_limit = ALE_PROC_DEFAULT; + error = resource_int_value(device_get_name(sc->ale_dev), + device_get_unit(sc->ale_dev), "process_limit", + &sc->ale_process_limit); + if (error == 0) { + if (sc->ale_process_limit < ALE_PROC_MIN || + sc->ale_process_limit > ALE_PROC_MAX) { + device_printf(sc->ale_dev, + "process_limit value out of range; " + "using default: %d\n", ALE_PROC_DEFAULT); + sc->ale_process_limit = ALE_PROC_DEFAULT; + } + } + + /* Misc statistics. */ + ALE_SYSCTL_STAT_ADD32(ctx, child, "reset_brk_seq", + &stats->reset_brk_seq, + "Controller resets due to broken Rx sequnce number"); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "ATE statistics"); + parent = SYSCTL_CHILDREN(tree); + + /* Rx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx", CTLFLAG_RD, + NULL, "Rx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->rx_frames, "Good frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->rx_bcast_frames, "Good broadcast frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->rx_mcast_frames, "Good multicast frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", + &stats->rx_pause_frames, "Pause control frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "control_frames", + &stats->rx_control_frames, "Control frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "crc_errs", + &stats->rx_crcerrs, "CRC errors"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "len_errs", + &stats->rx_lenerrs, "Frames with length mismatched"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->rx_bytes, "Good octets"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_bcast_octets", + &stats->rx_bcast_bytes, "Good broadcast octets"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_mcast_octets", + &stats->rx_mcast_bytes, "Good multicast octets"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "runts", + &stats->rx_runts, "Too short frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "fragments", + &stats->rx_fragments, "Fragmented frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_64", + &stats->rx_pkts_64, "64 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_65_127", + &stats->rx_pkts_65_127, "65 to 127 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_128_255", + &stats->rx_pkts_128_255, "128 to 255 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_256_511", + &stats->rx_pkts_256_511, "256 to 511 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_512_1023", + &stats->rx_pkts_512_1023, "512 to 1023 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_1024_1518", + &stats->rx_pkts_1024_1518, "1024 to 1518 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_1519_max", + &stats->rx_pkts_1519_max, "1519 to max frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "trunc_errs", + &stats->rx_pkts_truncated, "Truncated frames due to MTU size"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "fifo_oflows", + &stats->rx_fifo_oflows, "FIFO overflows"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "rrs_errs", + &stats->rx_rrs_errs, "Return status write-back errors"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "align_errs", + &stats->rx_alignerrs, "Alignment errors"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "filtered", + &stats->rx_pkts_filtered, + "Frames dropped due to address filtering"); + + /* Tx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, + NULL, "Tx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_frames", + &stats->tx_frames, "Good frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_bcast_frames", + &stats->tx_bcast_frames, "Good broadcast frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "good_mcast_frames", + &stats->tx_mcast_frames, "Good multicast frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "pause_frames", + &stats->tx_pause_frames, "Pause control frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "control_frames", + &stats->tx_control_frames, "Control frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "excess_defers", + &stats->tx_excess_defer, "Frames with excessive derferrals"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "defers", + &stats->tx_excess_defer, "Frames with derferrals"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_octets", + &stats->tx_bytes, "Good octets"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_bcast_octets", + &stats->tx_bcast_bytes, "Good broadcast octets"); + ALE_SYSCTL_STAT_ADD64(ctx, child, "good_mcast_octets", + &stats->tx_mcast_bytes, "Good multicast octets"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_64", + &stats->tx_pkts_64, "64 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_65_127", + &stats->tx_pkts_65_127, "65 to 127 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_128_255", + &stats->tx_pkts_128_255, "128 to 255 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_256_511", + &stats->tx_pkts_256_511, "256 to 511 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_512_1023", + &stats->tx_pkts_512_1023, "512 to 1023 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_1024_1518", + &stats->tx_pkts_1024_1518, "1024 to 1518 bytes frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "frames_1519_max", + &stats->tx_pkts_1519_max, "1519 to max frames"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "single_colls", + &stats->tx_single_colls, "Single collisions"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "multi_colls", + &stats->tx_multi_colls, "Multiple collisions"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "late_colls", + &stats->tx_late_colls, "Late collisions"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "excess_colls", + &stats->tx_excess_colls, "Excessive collisions"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "abort", + &stats->tx_abort, "Aborted frames due to Excessive collisions"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "underruns", + &stats->tx_underrun, "FIFO underruns"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "desc_underruns", + &stats->tx_desc_underrun, "Descriptor write-back errors"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "len_errs", + &stats->tx_lenerrs, "Frames with length mismatched"); + ALE_SYSCTL_STAT_ADD32(ctx, child, "trunc_errs", + &stats->tx_pkts_truncated, "Truncated frames due to MTU size"); +} + +#undef ALE_SYSCTL_STAT_ADD32 +#undef ALE_SYSCTL_STAT_ADD64 + +struct ale_dmamap_arg { + bus_addr_t ale_busaddr; +}; + +static void +ale_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct ale_dmamap_arg *ctx; + + if (error != 0) + return; + + KASSERT(nsegs == 1, ("%s: %d segments returned!", __func__, nsegs)); + + ctx = (struct ale_dmamap_arg *)arg; + ctx->ale_busaddr = segs[0].ds_addr; +} + +/* + * Tx descriptors/RXF0/CMB DMA blocks share ALE_DESC_ADDR_HI register + * which specifies high address region of DMA blocks. Therefore these + * blocks should have the same high address of given 4GB address + * space(i.e. crossing 4GB boundary is not allowed). + */ +static int +ale_check_boundary(struct ale_softc *sc) +{ + bus_addr_t rx_cmb_end[ALE_RX_PAGES], tx_cmb_end; + bus_addr_t rx_page_end[ALE_RX_PAGES], tx_ring_end; + + rx_page_end[0] = sc->ale_cdata.ale_rx_page[0].page_paddr + + sc->ale_pagesize; + rx_page_end[1] = sc->ale_cdata.ale_rx_page[1].page_paddr + + sc->ale_pagesize; + tx_ring_end = sc->ale_cdata.ale_tx_ring_paddr + ALE_TX_RING_SZ; + tx_cmb_end = sc->ale_cdata.ale_tx_cmb_paddr + ALE_TX_CMB_SZ; + rx_cmb_end[0] = sc->ale_cdata.ale_rx_page[0].cmb_paddr + ALE_RX_CMB_SZ; + rx_cmb_end[1] = sc->ale_cdata.ale_rx_page[1].cmb_paddr + ALE_RX_CMB_SZ; + + if ((ALE_ADDR_HI(tx_ring_end) != + ALE_ADDR_HI(sc->ale_cdata.ale_tx_ring_paddr)) || + (ALE_ADDR_HI(rx_page_end[0]) != + ALE_ADDR_HI(sc->ale_cdata.ale_rx_page[0].page_paddr)) || + (ALE_ADDR_HI(rx_page_end[1]) != + ALE_ADDR_HI(sc->ale_cdata.ale_rx_page[1].page_paddr)) || + (ALE_ADDR_HI(tx_cmb_end) != + ALE_ADDR_HI(sc->ale_cdata.ale_tx_cmb_paddr)) || + (ALE_ADDR_HI(rx_cmb_end[0]) != + ALE_ADDR_HI(sc->ale_cdata.ale_rx_page[0].cmb_paddr)) || + (ALE_ADDR_HI(rx_cmb_end[1]) != + ALE_ADDR_HI(sc->ale_cdata.ale_rx_page[1].cmb_paddr))) + return (EFBIG); + + if ((ALE_ADDR_HI(tx_ring_end) != ALE_ADDR_HI(rx_page_end[0])) || *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 10:01:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79AD1106567A; Wed, 12 Nov 2008 10:01:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BEF38FC17; Wed, 12 Nov 2008 10:01:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACA1GL2026165; Wed, 12 Nov 2008 10:01:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACA1GE8026164; Wed, 12 Nov 2008 10:01:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811121001.mACA1GE8026164@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Nov 2008 10:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184871 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 10:01:16 -0000 Author: yongari Date: Wed Nov 12 10:01:16 2008 New Revision: 184871 URL: http://svn.freebsd.org/changeset/base/184871 Log: Add ale(4) to the list of supported network interface. Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Wed Nov 12 09:52:06 2008 (r184870) +++ head/usr.sbin/sysinstall/devices.c Wed Nov 12 10:01:16 2008 (r184871) @@ -95,6 +95,7 @@ static struct _devname { SERIAL("cuad%d", "%s on device %s (COM%d)", 16), NETWORK("ae", "Attansic/Atheros L2 FastEthernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), + NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), NETWORK("ath", "Atheros IEEE 802.11 wireless adapter"), NETWORK("aue", "ADMtek USB Ethernet adapter"), From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 10:20:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7F98106568B; Wed, 12 Nov 2008 10:20:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B85C48FC1E; Wed, 12 Nov 2008 10:20:29 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACAKTHR027734; Wed, 12 Nov 2008 10:20:29 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACAKTPx027729; Wed, 12 Nov 2008 10:20:29 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811121020.mACAKTPx027729@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Nov 2008 10:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184872 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 10:20:30 -0000 Author: yongari Date: Wed Nov 12 10:20:29 2008 New Revision: 184872 URL: http://svn.freebsd.org/changeset/base/184872 Log: Add ale(4) man page and hook up ale(4) to the build. Also add Xr to appropriate man pages. Added: head/share/man/man4/ale.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/altq.4 head/share/man/man4/miibus.4 head/share/man/man4/vlan.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Nov 12 10:01:16 2008 (r184871) +++ head/share/man/man4/Makefile Wed Nov 12 10:20:29 2008 (r184872) @@ -23,6 +23,7 @@ MAN= aac.4 \ ahc.4 \ ahd.4 \ aio.4 \ + ale.4 \ altq.4 \ amd.4 \ ${_amdsmb.4} \ Added: head/share/man/man4/ale.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ale.4 Wed Nov 12 10:20:29 2008 (r184872) @@ -0,0 +1,162 @@ +.\" Copyright (c) 2008 Pyun YongHyeon +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 12, 2008 +.Dt ALE 4 +.Os +.Sh NAME +.Nm ale +.Nd Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device miibus" +.Cd "device ale" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ale_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for Atheros AR8121 PCI Express +Gigabit Ethernet controller and Atheros AR8113/AR8114 PCI +Express Fast Ethernet controllers. +.Pp +All LOMs supported by the +.Nm +driver have TCP/UDP/IP checksum offload for both receive and transmit, +TCP segmentation offload (TSO), hardware VLAN tag stripping/insertion +features, Wake On Lan (WOL) and an interrupt coalescing/moderation +mechanism as well as a 64-bit multicast hash filter. +.Pp +The AR8121 also supports Jumbo Frames (up to 8132 bytes), which can +be configured via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually override +the autoselected mode by adding media options to +.Xr rc.conf 5 . +.It Cm 10baseT/UTP +Set 10Mbps operation. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +.It Cm 1000baseTX +Set 1000baseTX operation over twisted pair. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width ".Cm full-duplex" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +device driver provides support for the following Ethernet controllers: +.Pp +.Bl -bullet -compact +.It +Atheros AR8113 PCI Express Fast Ethernet controller +.It +Atheros AR8114 PCI Express Fast Ethernet controller +.It +Atheros AR8121 PCI Express Gigabit Ethernet controller +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.ale.msi_disable +This tunable disables MSI support on the Ethernet hardware. +The default value is 0. +.It Va hw.ale.msix_disable +This tunable disables MSI-X support on the Ethernet hardware. +The default value is 0. +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.ale.%d.int_rx_mod +Maximum amount of time to delay receive interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 30(30us). +Value 0 completely disables the interrupt moderation. +.It Va dev.ale.%d.int_tx_mod +Maximum amount of time to delay transmit interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 1000(1ms). +Value 0 completely disables the interrupt moderation. +.It Va dev.ale.%d.process_limit +Maximum amount of Rx frames to be processed in the event loop before +rescheduling a taskqueue. +The accepted range is 32 to 255, the default value is 128 events. +The interface does not need to be brought down and up again before +a change takes effect. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Pyun YongHyeon +.Aq yongari@FreeBSD.org . +It first appeared in +.Fx 7.1 . Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Wed Nov 12 10:01:16 2008 (r184871) +++ head/share/man/man4/altq.4 Wed Nov 12 10:20:29 2008 (r184872) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2008 +.Dd November 22, 2008 .Dt ALTQ 4 .Os .Sh NAME @@ -116,6 +116,7 @@ are required to use a certain network ca .Nm . They have been applied to the following hardware drivers: .Xr age 4 , +.Xr ale 4 , .Xr an 4 , .Xr ath 4 , .Xr aue 4 , Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Wed Nov 12 10:01:16 2008 (r184871) +++ head/share/man/man4/miibus.4 Wed Nov 12 10:20:29 2008 (r184872) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 20, 2008 +.Dd November 22, 2008 .Dt MIIBUS 4 .Os .Sh NAME @@ -47,6 +47,8 @@ interface: .Bl -tag -compact -width ".Xr fxp 4" .It Xr age 4 Attansic/Atheros L1 Gigabit Ethernet +.It Xr ale 4 +Atheros AR8121/AR8113/AR8114 PCIe Ethernet .It Xr aue 4 ADMtek USB Ethernet .It Xr axe 4 @@ -125,6 +127,7 @@ and but as a result are not well behaved newbus device drivers. .Sh SEE ALSO .Xr age 4 , +.Xr ale 4 , .Xr arp 4 , .Xr aue 4 , .Xr axe 4 , Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Wed Nov 12 10:01:16 2008 (r184871) +++ head/share/man/man4/vlan.4 Wed Nov 12 10:20:29 2008 (r184872) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2008 +.Dd November 22, 2008 .Dt VLAN 4 .Os .Sh NAME @@ -124,6 +124,7 @@ By now, the list of physical interfaces in the hardware is limited to the following devices: .Xr ae 4 , .Xr age 4 , +.Xr ale 4 , .Xr bce 4 , .Xr bge 4 , .Xr cxgb 4 , From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 10:31:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 574BE1065678; Wed, 12 Nov 2008 10:31:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 497698FC20; Wed, 12 Nov 2008 10:31:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACAV70l027949; Wed, 12 Nov 2008 10:31:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACAV6SO027946; Wed, 12 Nov 2008 10:31:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811121031.mACAV6SO027946@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 12 Nov 2008 10:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184873 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 10:31:07 -0000 Author: yongari Date: Wed Nov 12 10:31:06 2008 New Revision: 184873 URL: http://svn.freebsd.org/changeset/base/184873 Log: Correct .Dd Pointed out by: maxim Modified: head/share/man/man4/altq.4 head/share/man/man4/miibus.4 head/share/man/man4/vlan.4 Modified: head/share/man/man4/altq.4 ============================================================================== --- head/share/man/man4/altq.4 Wed Nov 12 10:20:29 2008 (r184872) +++ head/share/man/man4/altq.4 Wed Nov 12 10:31:06 2008 (r184873) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2008 +.Dd November 12, 2008 .Dt ALTQ 4 .Os .Sh NAME Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Wed Nov 12 10:20:29 2008 (r184872) +++ head/share/man/man4/miibus.4 Wed Nov 12 10:31:06 2008 (r184873) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2008 +.Dd November 12, 2008 .Dt MIIBUS 4 .Os .Sh NAME Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Wed Nov 12 10:20:29 2008 (r184872) +++ head/share/man/man4/vlan.4 Wed Nov 12 10:31:06 2008 (r184873) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2008 +.Dd November 12, 2008 .Dt VLAN 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 12:21:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 475C6106567C; Wed, 12 Nov 2008 12:21:19 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 231248FC18; Wed, 12 Nov 2008 12:21:19 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACCLJXB030058; Wed, 12 Nov 2008 12:21:19 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACCLJUa030057; Wed, 12 Nov 2008 12:21:19 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811121221.mACCLJUa030057@svn.freebsd.org> From: Doug Rabson Date: Wed, 12 Nov 2008 12:21:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184877 - head/sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 12:21:19 -0000 Author: dfr Date: Wed Nov 12 12:21:18 2008 New Revision: 184877 URL: http://svn.freebsd.org/changeset/base/184877 Log: Add a missing call to mtx_destroy(). Modified: head/sys/rpc/clnt_vc.c Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Wed Nov 12 10:54:04 2008 (r184876) +++ head/sys/rpc/clnt_vc.c Wed Nov 12 12:21:18 2008 (r184877) @@ -299,6 +299,7 @@ clnt_vc_create( err: if (cl) { if (ct) { + mtx_destroy(&ct->ct_lock); mem_free(ct, sizeof (struct ct_data)); } if (cl) From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 13:11:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F43B106564A; Wed, 12 Nov 2008 13:11:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A943D8FC0C; Wed, 12 Nov 2008 13:11:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mACDBNK6084446; Wed, 12 Nov 2008 08:11:35 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ed Schouten Date: Tue, 11 Nov 2008 11:25:33 -0500 User-Agent: KMail/1.9.7 References: <200811111455.mABEtxRH004631@svn.freebsd.org> In-Reply-To: <200811111455.mABEtxRH004631@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811111125.33478.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 12 Nov 2008 08:11:35 -0500 (EST) X-Virus-Scanned: ClamAV 0.93.1/8620/Wed Nov 12 04:05:38 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_12_24,NO_RELAYS autolearn=no version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184849 - in head: lib/libc/sys sys/amd64/linux32 sys/i386/linux sys/kern sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:11:42 -0000 On Tuesday 11 November 2008 09:55:59 am Ed Schouten wrote: > Author: ed > Date: Tue Nov 11 14:55:59 2008 > New Revision: 184849 > URL: http://svn.freebsd.org/changeset/base/184849 > > Log: > Several cleanups related to pipe(2). > > - Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2) > fills an array with two descriptors. > > - Remove EFAULT from the manual page. Because of the current calling > convention, pipe(2) raises a segmentation fault when an invalid > address is passed. > > - Introduce kern_pipe() to make it easier for binary emulations to > implement pipe(2). > > - Make Linux binary emulation use kern_pipe(), which means we don't have > to recover td_retval after calling the FreeBSD system call. To close fd's safely on error you need to use fdclose(). That would mean returning the actual 'struct file *' pointers from kern_pipe() and requiring the caller to fdrop(), but that is not a big deal. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 13:32:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C762106564A; Wed, 12 Nov 2008 13:32:20 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43A408FC12; Wed, 12 Nov 2008 13:32:20 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACDWKnT031603; Wed, 12 Nov 2008 13:32:20 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACDWKa0031601; Wed, 12 Nov 2008 13:32:20 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200811121332.mACDWKa0031601@svn.freebsd.org> From: Colin Percival Date: Wed, 12 Nov 2008 13:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184881 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:32:20 -0000 Author: cperciva Date: Wed Nov 12 13:32:19 2008 New Revision: 184881 URL: http://svn.freebsd.org/changeset/base/184881 Log: Add support for the Microsoft Comfort Optical Mouse 3000 (model 1043). PR: usb/128760 Submitted by: Arjan de Vet Modified: head/sys/dev/usb/usb_quirks.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usb_quirks.c ============================================================================== --- head/sys/dev/usb/usb_quirks.c Wed Nov 12 12:38:48 2008 (r184880) +++ head/sys/dev/usb/usb_quirks.c Wed Nov 12 13:32:19 2008 (r184881) @@ -90,6 +90,8 @@ static const struct usbd_quirk_entry { ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }}, { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_WLINTELLIMOUSE, ANY, { UQ_MS_LEADING_BYTE }}, + { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_COMFORT3000, + ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }}, { USB_VENDOR_SONY, USB_PRODUCT_SONY_RF_RECEIVER, ANY,{ UQ_MS_BAD_CLASS }}, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Nov 12 12:38:48 2008 (r184880) +++ head/sys/dev/usb/usbdevs Wed Nov 12 13:32:19 2008 (r184881) @@ -1702,6 +1702,7 @@ product MICROSOFT MN510 0x006e MN510 Wi product MICROSOFT MN110 0x007a 10/100 USB NIC product MICROSOFT WLINTELLIMOUSE 0x008c Wireless Optical IntelliMouse product MICROSOFT WLNOTEBOOK 0x00b9 Wireless Optical Mouse (Model 1023) +product MICROSOFT COMFORT3000 0x00d1 Comfort Optical Mouse 3000 (Model 1043) product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 13:58:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2C36106567C; Wed, 12 Nov 2008 13:58:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CABAA8FC14; Wed, 12 Nov 2008 13:58:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACDwxOJ032149; Wed, 12 Nov 2008 13:58:59 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACDwxuH032147; Wed, 12 Nov 2008 13:58:59 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200811121358.mACDwxuH032147@svn.freebsd.org> From: Giorgos Keramidas Date: Wed, 12 Nov 2008 13:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184882 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 13:58:59 -0000 Author: keramida (doc committer) Date: Wed Nov 12 13:58:59 2008 New Revision: 184882 URL: http://svn.freebsd.org/changeset/base/184882 Log: Add a quirk for Belkin USB Bluetooth adapters (F8T012xx1 series) The same (vendor, product) tuple is used for aue(4) adapters, but I am not sure if the quirk is correct. I'm using the USB device 'release' info to skip aue(4) detection right now, but if there's a better way to differentiate between USB-LAN and USB Bluetooth we should update the quirk. Reviewed by: imp, rink MFC after: 2 weeks Modified: head/sys/dev/usb/if_aue.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/if_aue.c ============================================================================== --- head/sys/dev/usb/if_aue.c Wed Nov 12 13:32:19 2008 (r184881) +++ head/sys/dev/usb/if_aue.c Wed Nov 12 13:58:59 2008 (r184882) @@ -630,6 +630,15 @@ aue_match(device_t self) if (uaa->iface != NULL) return (UMATCH_NONE); + /* + * Belkin USB Bluetooth dongles of the F8T012xx1 model series conflict + * with older Belkin USB2LAN adapters. Skip if_aue if we detect one of + * the devices that look like Bluetooth adapters. + */ + if (uaa->vendor == USB_VENDOR_BELKIN && + uaa->product == USB_PRODUCT_BELKIN_F8T012 && uaa->release == 0x0413) + return (UMATCH_NONE); + return (aue_lookup(uaa->vendor, uaa->product) != NULL ? UMATCH_VENDOR_PRODUCT : UMATCH_NONE); } Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Nov 12 13:32:19 2008 (r184881) +++ head/sys/dev/usb/usbdevs Wed Nov 12 13:58:59 2008 (r184882) @@ -932,6 +932,7 @@ product BELKIN FBT003V 0x0084 FBT003v2 product BELKIN F5U103 0x0103 F5U103 Serial product BELKIN F5U109 0x0109 F5U109 Serial product BELKIN USB2SCSI 0x0115 USB to SCSI +product BELKIN F8T012 0x0121 F8T012xx1 Bluetooth USB Adapter product BELKIN USB2LAN 0x0121 USB to LAN product BELKIN F5U208 0x0208 F5U208 VideoBus II product BELKIN F5U237 0x0237 F5U237 USB 2.0 7-Port Hub From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 14:16:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D588106564A; Wed, 12 Nov 2008 14:16:40 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 152E68FC14; Wed, 12 Nov 2008 14:16:40 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACEGdIJ032499; Wed, 12 Nov 2008 14:16:39 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACEGdfX032493; Wed, 12 Nov 2008 14:16:39 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200811121416.mACEGdfX032493@svn.freebsd.org> From: Randall Stewart Date: Wed, 12 Nov 2008 14:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184883 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 14:16:40 -0000 Author: rrs Date: Wed Nov 12 14:16:39 2008 New Revision: 184883 URL: http://svn.freebsd.org/changeset/base/184883 Log: -Improvement: Add '\n' on debug output in sctp_lower_sosend(). -Improvement: panic() on INVARIANTS kernels if memory allocation fails for a tagblock in sctp_add_vtag_to_timewait(). -Bugfix: Protect code in sctp_is_in_timewait() by SCTP_INP_INFO_WLOCK/SCTP_INP_INFO_WUNLOCK. -Cleanup: Get rid of unused variable now in sctp_init_asoc(). -Bugfix: Reuse the correct vtag in sctp_add_vtag_to_timewait(). -Cleanup: Get rid of unused constant SCTP_TIME_WAIT_SHORT in sctp_constants.h. -Improvement: Use all hash buckets of the vtag hash table. -Cleanup: Get rid of then unused constant SCTP_STACK_VTAG_HASH_SIZE_A. -Bugfix: Handle SHUTDOWN;SACK packet correctly. -Bugfix: Last TSN in a gap ack block was not being "ack'd" in the internal scoreboard. Obtained from: (with help from Michael Tuexen) Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctp_constants.h Wed Nov 12 14:16:39 2008 (r184883) @@ -1001,8 +1001,7 @@ __FBSDID("$FreeBSD$"); * entries must be searched to see if the tag is in timed wait. If so we * reject it. */ -#define SCTP_STACK_VTAG_HASH_SIZE 31 -#define SCTP_STACK_VTAG_HASH_SIZE_A 32 +#define SCTP_STACK_VTAG_HASH_SIZE 32 /* @@ -1016,12 +1015,6 @@ __FBSDID("$FreeBSD$"); */ #define SCTP_TIME_WAIT 60 -/* This time wait is the same as the default cookie life - * since we now enter a tag in every time we send a cookie. - * We want this shorter to avoid vtag depletion. - */ -#define SCTP_TIME_WAIT_SHORT 60 - /* The system retains a cache of free chunks such to * cut down on calls the memory allocation system. There * is a per association limit of free items and a overall Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctp_indata.c Wed Nov 12 14:16:39 2008 (r184883) @@ -2766,8 +2766,8 @@ sctp_handle_segments(struct mbuf *m, int struct sctp_sack *sack; struct sctp_gap_ack_block *frag, block; struct sctp_tmit_chunk *tp1; - int i; - unsigned int j; + int i, j; + unsigned int theTSN; int num_frs = 0; uint16_t frag_strt, frag_end, primary_flag_set; @@ -2835,7 +2835,8 @@ sctp_handle_segments(struct mbuf *m, int } last_frag_high = frag_end + last_tsn; } - for (j = frag_strt + last_tsn; (compare_with_wrap((frag_end + last_tsn), j, MAX_TSN)); j++) { + for (j = frag_strt; j <= frag_end; j++) { + theTSN = j + last_tsn; while (tp1) { if (tp1->rec.data.doing_fast_retransmit) num_frs++; @@ -2858,7 +2859,7 @@ sctp_handle_segments(struct mbuf *m, int tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; tp1->whoTo->find_rtx_pseudo_cumack = 0; } - if (tp1->rec.data.TSN_seq == j) { + if (tp1->rec.data.TSN_seq == theTSN) { if (tp1->sent != SCTP_DATAGRAM_UNSENT) { /* * must be held until @@ -3030,8 +3031,8 @@ sctp_handle_segments(struct mbuf *m, int } } break; - } /* if (tp1->TSN_seq == j) */ - if (compare_with_wrap(tp1->rec.data.TSN_seq, j, + } /* if (tp1->TSN_seq == theTSN) */ + if (compare_with_wrap(tp1->rec.data.TSN_seq, theTSN, MAX_TSN)) break; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctp_input.c Wed Nov 12 14:16:39 2008 (r184883) @@ -4280,7 +4280,6 @@ process_control_chunks: if ((stcb == NULL) || (chk_length < sizeof(struct sctp_sack_chunk))) { SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on sack chunk, too small\n"); - ignore_sack: *offset = length; if (locked_tcb) { SCTP_TCB_UNLOCK(locked_tcb); @@ -4293,7 +4292,7 @@ process_control_chunks: * attention to a sack sent in to us since * we don't care anymore. */ - goto ignore_sack; + break; } sack = (struct sctp_sack_chunk *)ch; nonce_sum_flag = ch->chunk_flags & SCTP_SACK_NONCE_SUM; Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctp_pcb.c Wed Nov 12 14:16:39 2008 (r184883) @@ -4196,6 +4196,7 @@ sctp_is_in_timewait(uint32_t tag) int found = 0; int i; + SCTP_INP_INFO_WLOCK(); chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; if (!SCTP_LIST_EMPTY(chain)) { LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { @@ -4209,6 +4210,7 @@ sctp_is_in_timewait(uint32_t tag) break; } } + SCTP_INP_INFO_WUNLOCK(); return (found); } @@ -4241,8 +4243,8 @@ sctp_add_vtag_to_timewait(uint32_t tag, twait_block->vtag_block[i].v_tag = 0; if (set == 0) { /* Reuse it for my new tag */ - twait_block->vtag_block[0].tv_sec_at_expire = now.tv_sec + time; - twait_block->vtag_block[0].v_tag = tag; + twait_block->vtag_block[i].tv_sec_at_expire = now.tv_sec + time; + twait_block->vtag_block[i].v_tag = tag; set = 1; } } @@ -4261,6 +4263,9 @@ sctp_add_vtag_to_timewait(uint32_t tag, SCTP_MALLOC(twait_block, struct sctp_tagblock *, sizeof(struct sctp_tagblock), SCTP_M_TIMW); if (twait_block == NULL) { +#ifdef INVARIANTS + panic("Can not alloc tagblock"); +#endif return; } memset(twait_block, 0, sizeof(struct sctp_tagblock)); @@ -5397,7 +5402,7 @@ sctp_pcb_init() SCTP_OS_TIMER_INIT(&SCTP_BASE_INFO(addr_wq_timer.timer)); /* Init the TIMEWAIT list */ - for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE_A; i++) { + for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait[i])); } @@ -5467,7 +5472,7 @@ sctp_pcb_finish(void) * free the TIMEWAIT list elements malloc'd in the function * sctp_add_vtag_to_timewait()... */ - for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE_A; i++) { + for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { chain = &SCTP_BASE_INFO(vtag_timewait)[i]; if (!SCTP_LIST_EMPTY(chain)) { prev_twait_block = NULL; Modified: head/sys/netinet/sctp_pcb.h ============================================================================== --- head/sys/netinet/sctp_pcb.h Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctp_pcb.h Wed Nov 12 14:16:39 2008 (r184883) @@ -228,7 +228,7 @@ struct sctp_epinfo { uint32_t ipi_free_strmoq; - struct sctpvtaghead vtag_timewait[SCTP_STACK_VTAG_HASH_SIZE_A]; + struct sctpvtaghead vtag_timewait[SCTP_STACK_VTAG_HASH_SIZE]; /* address work queue handling */ #if defined(SCTP_USE_THREAD_BASED_ITERATOR) Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Wed Nov 12 13:58:59 2008 (r184882) +++ head/sys/netinet/sctputil.c Wed Nov 12 14:16:39 2008 (r184883) @@ -910,9 +910,6 @@ sctp_init_asoc(struct sctp_inpcb *m, str #endif asoc->sb_send_resv = 0; if (override_tag) { - struct timeval now; - - (void)SCTP_GETTIME_TIMEVAL(&now); if (sctp_is_in_timewait(override_tag)) { /* * It must be in the time-wait hash, we put it there @@ -1466,6 +1463,9 @@ sctp_timeout_handler(void *t) SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == 0) && ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && + (tmr->type != SCTP_TIMER_TYPE_SEND) && + (tmr->type != SCTP_TIMER_TYPE_RECV) && + (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && (tmr->type != SCTP_TIMER_TYPE_SHUTDOWN) && (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNACK) && (tmr->type != SCTP_TIMER_TYPE_SHUTDOWNGUARD) && From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 15:30:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6D81065674; Wed, 12 Nov 2008 15:30:30 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5497D8FC13; Wed, 12 Nov 2008 15:30:30 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACFUUmx033936; Wed, 12 Nov 2008 15:30:30 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACFUUBK033935; Wed, 12 Nov 2008 15:30:30 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811121530.mACFUUBK033935@svn.freebsd.org> From: Doug Rabson Date: Wed, 12 Nov 2008 15:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184886 - head/sys/nlm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 15:30:30 -0000 Author: dfr Date: Wed Nov 12 15:30:30 2008 New Revision: 184886 URL: http://svn.freebsd.org/changeset/base/184886 Log: Don't call svc_freereq() before svc_freeargs(). Modified: head/sys/nlm/nlm_prot_svc.c Modified: head/sys/nlm/nlm_prot_svc.c ============================================================================== --- head/sys/nlm/nlm_prot_svc.c Wed Nov 12 14:45:51 2008 (r184885) +++ head/sys/nlm/nlm_prot_svc.c Wed Nov 12 15:30:30 2008 (r184886) @@ -83,11 +83,11 @@ nlm_prog_0(struct svc_req *rqstp, SVCXPR if (retval > 0 && !svc_sendreply(rqstp, xdr_result, (char *)&result)) { svcerr_systemerr(rqstp); } - svc_freereq(rqstp); if (!svc_freeargs(rqstp, xdr_argument, (char *)(caddr_t) &argument)) { printf("unable to free arguments"); //exit(1); } + svc_freereq(rqstp); return; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 15:31:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 140371065679; Wed, 12 Nov 2008 15:31:06 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7FDE8FC27; Wed, 12 Nov 2008 15:31:05 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACFV5Ya033985; Wed, 12 Nov 2008 15:31:05 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACFV5ZY033984; Wed, 12 Nov 2008 15:31:05 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811121531.mACFV5ZY033984@svn.freebsd.org> From: Doug Rabson Date: Wed, 12 Nov 2008 15:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184887 - head/sys/kgssapi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 15:31:06 -0000 Author: dfr Date: Wed Nov 12 15:31:05 2008 New Revision: 184887 URL: http://svn.freebsd.org/changeset/base/184887 Log: Call svc_freereq() before returning from the service proc. Modified: head/sys/kgssapi/gsstest.c Modified: head/sys/kgssapi/gsstest.c ============================================================================== --- head/sys/kgssapi/gsstest.c Wed Nov 12 15:30:30 2008 (r184886) +++ head/sys/kgssapi/gsstest.c Wed Nov 12 15:31:05 2008 (r184887) @@ -970,6 +970,7 @@ server_program_1(struct svc_req *rqstp, } out: + svc_freereq(rqstp); return; } From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 15:40:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F26AD1065688; Wed, 12 Nov 2008 15:40:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id BD6E28FC19; Wed, 12 Nov 2008 15:40:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id 0FA322BC47; Thu, 13 Nov 2008 04:40:14 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aSyWV1nB1-uj; Thu, 13 Nov 2008 04:40:09 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Thu, 13 Nov 2008 04:40:09 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 85EEC1142D; Thu, 13 Nov 2008 04:40:09 +1300 (NZDT) Date: Wed, 12 Nov 2008 07:40:09 -0800 From: Andrew Thompson To: Pyun YongHyeon Message-ID: <20081112154009.GD45411@citylink.fud.org.nz> References: <200811120952.mAC9q6H3025912@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811120952.mAC9q6H3025912@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184870 - in head/sys: amd64/conf boot/forth conf dev/ale i386/conf modules modules/ale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 15:40:15 -0000 On Wed, Nov 12, 2008 at 09:52:06AM +0000, Pyun YongHyeon wrote: > Author: yongari > Date: Wed Nov 12 09:52:06 2008 > New Revision: 184870 > URL: http://svn.freebsd.org/changeset/base/184870 > > Log: > Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet > controller. The controller is also known as L1E(AR8121) and > L2E(AR8113/AR8114). Unlike its predecessor Attansic L1, > AR8121/AR8113/AR8114 uses completely different Rx logic such that > it requires separate driver. Datasheet for AR81xx is not available > to open source driver writers but it shares large part of Tx and > PHY logic of L1. I still don't understand some part of register > meaning and some MAC statistics counters but the driver seems to > have no critical issues for performance and stability. > Yay! thanks for yet another great driver Pyun. From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 17:33:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBFD11065674; Wed, 12 Nov 2008 17:33: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 D26A38FC0A; Wed, 12 Nov 2008 17:33:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACHXa94036327; Wed, 12 Nov 2008 17:33:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACHXaUq036326; Wed, 12 Nov 2008 17:33:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200811121733.mACHXaUq036326@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 12 Nov 2008 17:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184890 - head/sys/dev/adb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 17:33:38 -0000 Author: nwhitehorn Date: Wed Nov 12 17:33:36 2008 New Revision: 184890 URL: http://svn.freebsd.org/changeset/base/184890 Log: Probe ADB miscellaneous devices (ID 7) instead of stopping at ID 6. This allows us to probe the brightness and volume control buttons on PPC Apple laptops, though there is not yet a driver to do anything useful with them. Modified: head/sys/dev/adb/adb_bus.c Modified: head/sys/dev/adb/adb_bus.c ============================================================================== --- head/sys/dev/adb/adb_bus.c Wed Nov 12 15:49:11 2008 (r184889) +++ head/sys/dev/adb/adb_bus.c Wed Nov 12 17:33:36 2008 (r184890) @@ -134,7 +134,7 @@ adb_bus_enumerate(void *xdev) /* Enumerate bus */ next_free = 8; - for (i = 1; i < 7; i++) { + for (i = 1; i <= 7; i++) { int8_t first_relocated = -1; int reply = 0; From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 17:38:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D5551065672; Wed, 12 Nov 2008 17:38:24 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04A458FC08; Wed, 12 Nov 2008 17:38:24 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACHcN1Z036454; Wed, 12 Nov 2008 17:38:23 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACHcNRH036453; Wed, 12 Nov 2008 17:38:23 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811121738.mACHcNRH036453@svn.freebsd.org> From: Joseph Koshy Date: Wed, 12 Nov 2008 17:38:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184891 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 17:38:24 -0000 Author: jkoshy Date: Wed Nov 12 17:38:23 2008 New Revision: 184891 URL: http://svn.freebsd.org/changeset/base/184891 Log: Use spellings that are close to vendor documentation. Modified: head/lib/libpmc/pmc.iaf.3 Modified: head/lib/libpmc/pmc.iaf.3 ============================================================================== --- head/lib/libpmc/pmc.iaf.3 Wed Nov 12 17:33:36 2008 (r184890) +++ head/lib/libpmc/pmc.iaf.3 Wed Nov 12 17:38:23 2008 (r184891) @@ -91,13 +91,13 @@ qualifiers are specified, the default is The fixed function PMCs are selectable using the following event names: .Bl -tag -width indent -.It Li FIXED.INSTR_RETIRED.ANY +.It Li INSTR_RETIRED.ANY .Pq Fixed Function Counter 0 The number of instructions retired. -.It Li FIXED.CPU_CLK_UNHALTED.CORE +.It Li CPU_CLK_UNHALTED.CORE .Pq Fixed Function Counter 1 The number of core cycles for which the core is not halted. -.It Li FIXED.CPU_CLK_UNHALTED.REF +.It Li CPU_CLK_UNHALTED.REF .Pq Fixed Function Counter 2 The number of reference cycles for which the core is not halted. .El From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 17:43:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C409D1065678; Wed, 12 Nov 2008 17:43:37 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8EEB8FC19; Wed, 12 Nov 2008 17:43:37 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACHhbUt036589; Wed, 12 Nov 2008 17:43:37 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACHhbVb036586; Wed, 12 Nov 2008 17:43:37 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811121743.mACHhbVb036586@svn.freebsd.org> From: Joseph Koshy Date: Wed, 12 Nov 2008 17:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184892 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 17:43:37 -0000 Author: jkoshy Date: Wed Nov 12 17:43:37 2008 New Revision: 184892 URL: http://svn.freebsd.org/changeset/base/184892 Log: Document the alternate event names supported for "architectural" PMC events. Modified: head/lib/libpmc/pmc.atom.3 head/lib/libpmc/pmc.core.3 head/lib/libpmc/pmc.core2.3 Modified: head/lib/libpmc/pmc.atom.3 ============================================================================== --- head/lib/libpmc/pmc.atom.3 Wed Nov 12 17:38:23 2008 (r184891) +++ head/lib/libpmc/pmc.atom.3 Wed Nov 12 17:43:37 2008 (r184892) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2008 +.Dd November 12, 2008 .Os .Dt PMC.ATOM 3 .Sh NAME @@ -273,13 +273,17 @@ The number of branch instructions decode The number of branches executed, but not necessarily retired. .It Li BR_INST_RETIRED.ANY .Pq Event C4H , Umask 00H +.Pq Alias Qq "Branch Instruction Retired" The number of branch instructions retired. +This is an architectural performance event. .It Li BR_INST_RETIRED.ANY1 .Pq Event C4H , Umask 0FH The number of branch instructions retired that were mispredicted. .It Li BR_INST_RETIRED.MISPRED .Pq Event C5, Umask 00H +.Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. +This is an architectural performance event. .It Li BR_INST_RETIRED.MISPRED_NOT_TAKEN .Pq Event C4H , Umask 02H The number of not taken branch instructions retired that were @@ -458,10 +462,14 @@ The number of times the L1 data cache is the same processor. .It Li CPU_CLK_UNHALTED.BUS .Pq Event 3CH , Umask 01H +.Pq Alias Qq "Unhalted Reference Cycles" The number of bus cycles when the core is not in the halt state. +This is an architectural performance event. .It Li CPU_CLK_UNHALTED.CORE_P .Pq Event 3CH , Umask 00H +.Pq Alias Qq "Unhalted Core Cycles" The number of core cycles while the core is not in a halt state. +This is an architectural performance event. .It Li CPU_CLK_UNHALTED.NO_OTHER .Pq Event 3CH , Umask 02H The number of bus cycles during which the core remains unhalted and @@ -597,7 +605,9 @@ length changing prefix. The number of cycles during which the instruction queue is full. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H +.Pq Alias Qq "Instruction Retired" The number of instructions retired. +This is an architectural performance event. .It Li INST_RETIRED.LOADS .Pq Event C0H , Umask 01H The number of instructions retired that contained a load operation. @@ -744,10 +754,13 @@ The number of L2 cache requests that wer The number of completed L2 cache requests. .It Li L2_RQSTS.SELF.DEMAND.I_STATE .Pq Event 2EH , Umask 41H +.Pq Alias Qq "LLC Misses" The number of completed L2 cache demand requests from this core that missed the L2 cache. +This is an architectural performance event. .It Li L2_RQSTS.SELF.DEMAND.MESI .Pq Event 2EH , Umask 4FH +.Pq Alias Qq "LLC References" The number of completed L2 cache demand requests from this core. .It Li L2_ST Xo .Op ,cachestate= Ns Ar state @@ -1154,16 +1167,15 @@ instructions retired. The following table shows the mapping between the PMC-independent aliases supported by .Lb libpmc -and the underlying hardware events used. -.Bl -column "branch-mispredicts" "Description" -.It Em Alias Ta Em Event -.It Li branches Ta Li BR_INST_RETIRED.ANY -.It Li branch-mispredicts Ta Li BR_INST_RETIRED.MISPRED -.It Li dc-misses Ta Li L2_ST,core=this,cachestate=mesi -.It Li ic-misses Ta Li ICACHE.MISSES -.It Li instructions Ta Li INST_RETIRED.ANY_P -.It Li interrupts Ta Li HW_INT_RCV -.It Li unhalted-cycles Ta Li CPU_CLK_UNHALTED.CORE_P +and the underlying hardware events used on these CPUs. +.Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p" "PMC Class" +.It Em Alias Ta Em Event Ta Em PMC Class +.It Li branches Ta Li BR_INST_RETIRED.ANY Ta Li PMC_CLASS_IAP +.It Li branch-mispredicts Ta Li BR_INST_RETIRED.MISPRED Ta Li PMC_CLASS_IAP +.It Li ic-misses Ta Li ICACHE.MISSES Ta Li PMC_CLASS_IAP +.It Li instructions Ta Li INST_RETIRED.ANY_P Ta Li PMC_CLASS_IAF +.It Li interrupts Ta Li HW_INT_RCV Ta Li PMC_CLASS_IAP +.It Li unhalted-cycles Ta Li CPU_CLK_UNHALTED.CORE_P Ta Li PMC_CLASS_IAF .El .Sh SEE ALSO .Xr pmc 3 , Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Wed Nov 12 17:38:23 2008 (r184891) +++ head/lib/libpmc/pmc.core.3 Wed Nov 12 17:43:37 2008 (r184892) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 21, 2008 +.Dd November 12, 2008 .Os .Dt PMC.CORE 3 .Sh NAME @@ -234,11 +234,15 @@ The number of branch instructions execut .Pq Event E0H The number of branch instructions decoded. .It Li Br_Instr_Ret -.Pq Event C4H +.Pq Event C4H, Umask 00H +.Pq Alias Qq "Branch Instruction Retired" The number of branch instructions retired. +This is an architectural performance event. .It Li Br_MisPred_Ret -.Pq Event C5H +.Pq Event C5H, Umask 00H +.Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. +This is an architectural performance event. .It Li Br_MisPred_Taken_Ret .Pq Event CAH The number of taken and mispredicted branches retired. @@ -475,7 +479,9 @@ The number of instruction TLB misses. The number of instructions decoded. .It Li Instr_Ret .Pq Event C0H +.Pq Alias Qq "Instruction Retired" The number of instructions retired. +This is an architectural performance event. .It Li L1_Pref_Req .Pq Event 4FH The number of L1 prefetch request due to data cache misses. @@ -546,6 +552,17 @@ The number of L2 cache writes including .It Li LD_Blocks .Pq Event 03H The number of load operations delayed due to store buffer blocks. +.It Li LLC_Misses +.Pq Event 2EH, Umask 41H +The number of cache misses for references to the last level cache, +excluding misses due to hardware prefetches. +This is an architectural performance event. +.It Li LLC_Reference +The number of references to the last level cache, +excluding those due to hardware prefetches. +This is an architectural performance event. +.Pq Event 2EH, Umask 4FH +This is an architectural performance event. .It Li MMX_Assist .Pq Event CDH The number of EMMX instructions executed. @@ -573,7 +590,9 @@ and integer multiplies. This event is available on PMC1 only. .It Li NonHlt_Ref_Cycles .Pq Event 3CH , Umask 01H +.Pq Alias Qq "Unhalted Reference Cycles" The number of non-halted bus cycles. +This is an architectural performance event. .It Li Pref_Rqsts_Dn .Pq Event F8H The number of hardware prefetch requests issued in backward streams. @@ -690,6 +709,11 @@ The duration in a thermal trip based on .It Li Unfusion .Pq Event DBH The number of unfusion events. +.It Li "Unhalted_Core_Cycles" +.Pq Event 3CH , Umask 00H +The number of core clock cycles when the clock signal on a specific +core is not halted. +This is an architectural performance event. .It Li Uops_Ret .Pq Event C2H The number of micro-ops retired. Modified: head/lib/libpmc/pmc.core2.3 ============================================================================== --- head/lib/libpmc/pmc.core2.3 Wed Nov 12 17:38:23 2008 (r184891) +++ head/lib/libpmc/pmc.core2.3 Wed Nov 12 17:43:37 2008 (r184892) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2008 +.Dd November 12, 2008 .Os .Dt PMC.CORE2 3 .Sh NAME @@ -271,10 +271,14 @@ The number of branch instructions decode The number of branches executed, but not necessarily retired. .It Li BR_INST_RETIRED.ANY .Pq Event C4H , Umask 00H +.Pq Alias Qq "Branch Instruction Retired" The number of branch instructions retired. +This is an architectural performance event. .It Li BR_INST_RETIRED.MISPRED -.Pq Event C5H +.Pq Event C5H, Umask 00H +.Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. +This is an architectural performance event. .It Li BR_INST_RETIRED.MISPRED_NOT_TAKEN .Pq Event C4H , Umask 02H The number of not taken branch instructions retired that were @@ -446,10 +450,14 @@ The number of times the L1 data cache is the same processor. .It Li CPU_CLK_UNHALTED.BUS .Pq Event 3CH , Umask 01H +.Pq Alias Qq "Unhalted Reference Cycles" The number of bus cycles when the core is not in the halt state. +This is an architectural performance event. .It Li CPU_CLK_UNHALTED.CORE_P .Pq Event 3CH , Umask 00H +.Pq Alias Qq "Unhalted Core Cycles" The number of core cycles while the core is not in a halt state. +This is an architectural performance event. .It Li CPU_CLK_UNHALTED.NO_OTHER .Pq Event 3CH , Umask 02H The number of bus cycles during which the core remains unhalted and @@ -553,7 +561,9 @@ length changing prefix. The number of cycles during which the instruction queue is full. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H +.Pq Alias Qq "Instruction Retired" The number of instructions retired. +This is an architectural performance event. .It Li INST_RETIRED.LOADS .Pq Event C0H , Umask 01H The number of instructions retired that contained a load operation. @@ -705,11 +715,15 @@ The number of L2 cache requests that wer The number of completed L2 cache requests. .It Li L2_RQSTS.SELF.DEMAND.I_STATE .Pq Event 2EH , Umask 41H +.Pq Alias Qq "LLC Misses" The number of completed L2 cache demand requests from this core that missed the L2 cache. +This is an architectural performance event. .It Li L2_RQSTS.SELF.DEMAND.MESI .Pq Event 2EH , Umask 4FH +.Pq Alias Qq "LLC References" The number of completed L2 cache demand requests from this core. +This is an architectural performance event. .It Li L2_ST Xo .Op ,cachestate= Ns Ar state .Op ,core= Ns Ar core @@ -1075,15 +1089,14 @@ The following table shows the mapping be aliases supported by .Lb libpmc and the underlying hardware events used. -.Bl -column "branch-mispredicts" "Description" -.It Em Alias Ta Em Event -.It Li branches Ta Li BR_INST_RETIRED.ANY -.It Li branch-mispredicts Ta Li BR_INST_RETIRED.MISPRED -.It Li dc-misses Ta Li L2_ST,core=this,cachestate=mesi -.It Li ic-misses Ta Li L1I_MISSES -.It Li instructions Ta Li INST_RETIRED.ANY_P -.It Li interrupts Ta Li HW_INT_RCV -.It Li unhalted-cycles Ta Li CPU_CLK_UNHALTED.CORE_P +.Bl -column "branch-mispredicts" "cpu_clk_unhalted.core_p" "PMC Class" +.It Em Alias Ta Em Event Ta Em PMC Class +.It Li branches Ta Li BR_INST_RETIRED.ANY Ta Li PMC_CLASS_IAP +.It Li branch-mispredicts Ta Li BR_INST_RETIRED.MISPRED Ta Li PMC_CLASS_IAP +.It Li ic-misses Ta Li L1I_MISSES Ta Li PMC_CLASS_IAP +.It Li instructions Ta Li INST_RETIRED.ANY_P Ta Li PMC_CLASS_IAF +.It Li interrupts Ta Li HW_INT_RCV Ta Li PMC_CLASS_IAP +.It Li unhalted-cycles Ta Li CPU_CLK_UNHALTED.CORE_P Ta Li PMC_CLASS_IAF .El .Sh SEE ALSO .Xr pmc 3 , From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 21:30:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA14D1065672; Wed, 12 Nov 2008 21:30:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B65DE8FC12; Wed, 12 Nov 2008 21:30:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACLUdk8040592; Wed, 12 Nov 2008 21:30:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACLUdY6040591; Wed, 12 Nov 2008 21:30:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811122130.mACLUdY6040591@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Nov 2008 21:30:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184893 - head/sys/modules/cxgb/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 21:30:39 -0000 Author: bz Date: Wed Nov 12 21:30:39 2008 New Revision: 184893 URL: http://svn.freebsd.org/changeset/base/184893 Log: Add opt_inet.h which has been needed since r184714, r184715 introducing checks for #ifdef INET. Submitted by: kmacy (r184876, I splitted lines) MFC after: 54 days Modified: head/sys/modules/cxgb/cxgb/Makefile Modified: head/sys/modules/cxgb/cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/cxgb/Makefile Wed Nov 12 17:43:37 2008 (r184892) +++ head/sys/modules/cxgb/cxgb/Makefile Wed Nov 12 21:30:39 2008 (r184893) @@ -7,7 +7,8 @@ KMOD= if_cxgb SRCS= cxgb_mc5.c cxgb_vsc8211.c cxgb_ael1002.c cxgb_mv88e1xxx.c SRCS+= cxgb_xgmac.c cxgb_vsc7323.c cxgb_t3_hw.c cxgb_main.c SRCS+= cxgb_sge.c cxgb_offload.c cxgb_tn1010.c -SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h opt_sched.h +SRCS+= device_if.h bus_if.h pci_if.h +SRCS+= opt_inet.h opt_zero.h opt_sched.h SRCS+= uipc_mvec.c cxgb_support.c cxgb_multiq.c CFLAGS+= -g -DDEFAULT_JUMBO -I${CXGB} From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 21:32:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 019BC1065673; Wed, 12 Nov 2008 21:32:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E21738FC0A; Wed, 12 Nov 2008 21:32:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACLWnRq040673; Wed, 12 Nov 2008 21:32:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACLWnrk040672; Wed, 12 Nov 2008 21:32:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811122132.mACLWnrk040672@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Nov 2008 21:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184894 - head/sys/modules/em X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 21:32:50 -0000 Author: bz Date: Wed Nov 12 21:32:49 2008 New Revision: 184894 URL: http://svn.freebsd.org/changeset/base/184894 Log: Add opt_inet.h which has been needed since r184717 introducing checks for #ifdef INET. MFC after: 54 days Modified: head/sys/modules/em/Makefile Modified: head/sys/modules/em/Makefile ============================================================================== --- head/sys/modules/em/Makefile Wed Nov 12 21:30:39 2008 (r184893) +++ head/sys/modules/em/Makefile Wed Nov 12 21:32:49 2008 (r184894) @@ -1,7 +1,7 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em -SRCS = device_if.h bus_if.h pci_if.h +SRCS = device_if.h bus_if.h pci_if.h opt_inet.h SRCS += if_em.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 21:33:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F20FF1065672; Wed, 12 Nov 2008 21:33:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEC438FC1A; Wed, 12 Nov 2008 21:33:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACLXjEu040744; Wed, 12 Nov 2008 21:33:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACLXjk2040743; Wed, 12 Nov 2008 21:33:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811122133.mACLXjk2040743@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 12 Nov 2008 21:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184895 - head/sys/modules/igb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 21:33:46 -0000 Author: bz Date: Wed Nov 12 21:33:45 2008 New Revision: 184895 URL: http://svn.freebsd.org/changeset/base/184895 Log: Add opt_inet.h which has been needed since r184718, which had introduced checks for #ifdef INET. MFC after: 54 days Modified: head/sys/modules/igb/Makefile Modified: head/sys/modules/igb/Makefile ============================================================================== --- head/sys/modules/igb/Makefile Wed Nov 12 21:32:49 2008 (r184894) +++ head/sys/modules/igb/Makefile Wed Nov 12 21:33:45 2008 (r184895) @@ -1,7 +1,7 @@ #$FreeBSD$ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_igb -SRCS = device_if.h bus_if.h pci_if.h +SRCS = device_if.h bus_if.h pci_if.h opt_inet.h SRCS += if_igb.c $(SHARED_SRCS) SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 22:14:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE1A1065672; Wed, 12 Nov 2008 22:14:05 +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 4A95A8FC0A; Wed, 12 Nov 2008 22:14:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACME56J041560; Wed, 12 Nov 2008 22:14:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACME5Ud041559; Wed, 12 Nov 2008 22:14:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200811122214.mACME5Ud041559@svn.freebsd.org> From: John Baldwin Date: Wed, 12 Nov 2008 22:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184896 - head/sys/dev/ppbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 22:14:05 -0000 Author: jhb Date: Wed Nov 12 22:14:05 2008 New Revision: 184896 URL: http://svn.freebsd.org/changeset/base/184896 Log: Various style and whitespace fixes. Previously parts of this file used 8 space indent, parts used 4 space indent, and other parts used a weird mixture (8 spaces for first indent, 4 spaces for the rest). Modified: head/sys/dev/ppbus/if_plip.c Modified: head/sys/dev/ppbus/if_plip.c ============================================================================== --- head/sys/dev/ppbus/if_plip.c Wed Nov 12 21:33:45 2008 (r184895) +++ head/sys/dev/ppbus/if_plip.c Wed Nov 12 22:14:05 2008 (r184896) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); /* * Update for ppbus, PLIP support only - Nicolas Souchu - */ + */ #include "opt_plip.h" @@ -110,7 +110,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef LPMTU /* MTU for the lp# interfaces */ -#define LPMTU 1500 +#define LPMTU 1500 #endif #ifndef LPMAXSPIN1 /* DELAY factor for the lp# interfaces */ @@ -156,14 +156,14 @@ struct lp_data { /* Tables for the lp# interface */ static u_char *txmith; -#define txmitl (txmith+(1*LPIPTBLSIZE)) -#define trecvh (txmith+(2*LPIPTBLSIZE)) -#define trecvl (txmith+(3*LPIPTBLSIZE)) +#define txmitl (txmith + (1 * LPIPTBLSIZE)) +#define trecvh (txmith + (2 * LPIPTBLSIZE)) +#define trecvl (txmith + (3 * LPIPTBLSIZE)) static u_char *ctxmith; -#define ctxmitl (ctxmith+(1*LPIPTBLSIZE)) -#define ctrecvh (ctxmith+(2*LPIPTBLSIZE)) -#define ctrecvl (ctxmith+(3*LPIPTBLSIZE)) +#define ctxmitl (ctxmith + (1 * LPIPTBLSIZE)) +#define ctrecvh (ctxmith + (2 * LPIPTBLSIZE)) +#define ctrecvl (ctxmith + (3 * LPIPTBLSIZE)) /* Functions for the lp# interface */ static int lpinittables(void); @@ -186,9 +186,7 @@ lp_identify(driver_t *driver, device_t p if (!dev) BUS_ADD_CHILD(parent, 0, "plip", -1); } -/* - * lpprobe() - */ + static int lp_probe(device_t dev) { @@ -199,7 +197,7 @@ lp_probe(device_t dev) } static int -lp_attach (device_t dev) +lp_attach(device_t dev) { struct lp_data *lp = DEVTOSOFTC(dev); struct ifnet *ifp; @@ -211,7 +209,7 @@ lp_attach (device_t dev) * Reserve the interrupt resource. If we don't have one, the * attach fails. */ - lp->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + lp->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE); if (lp->res_irq == 0) { device_printf(dev, "cannot reserve interrupt, failed.\n"); @@ -245,190 +243,191 @@ lp_attach (device_t dev) * precalculate them when we initialize. */ static int -lpinittables (void) +lpinittables(void) { - int i; + int i; - if (!txmith) - txmith = malloc(4*LPIPTBLSIZE, M_DEVBUF, M_NOWAIT); + if (txmith == NULL) + txmith = malloc(4 * LPIPTBLSIZE, M_DEVBUF, M_NOWAIT); - if (!txmith) - return 1; + if (txmith == NULL) + return (1); - if (!ctxmith) + if (ctxmith == NULL) ctxmith = malloc(4*LPIPTBLSIZE, M_DEVBUF, M_NOWAIT); - if (!ctxmith) - return 1; + if (ctxmith == NULL) + return (1); + + for (i = 0; i < LPIPTBLSIZE; i++) { + ctxmith[i] = (i & 0xF0) >> 4; + ctxmitl[i] = 0x10 | (i & 0x0F); + ctrecvh[i] = (i & 0x78) << 1; + ctrecvl[i] = (i & 0x78) >> 3; + } - for (i=0; i < LPIPTBLSIZE; i++) { - ctxmith[i] = (i & 0xF0) >> 4; - ctxmitl[i] = 0x10 | (i & 0x0F); - ctrecvh[i] = (i & 0x78) << 1; - ctrecvl[i] = (i & 0x78) >> 3; - } - - for (i=0; i < LPIPTBLSIZE; i++) { - txmith[i] = ((i & 0x80) >> 3) | ((i & 0x70) >> 4) | 0x08; - txmitl[i] = ((i & 0x08) << 1) | (i & 0x07); - trecvh[i] = ((~i) & 0x80) | ((i & 0x38) << 1); - trecvl[i] = (((~i) & 0x80) >> 4) | ((i & 0x38) >> 3); - } + for (i = 0; i < LPIPTBLSIZE; i++) { + txmith[i] = ((i & 0x80) >> 3) | ((i & 0x70) >> 4) | 0x08; + txmitl[i] = ((i & 0x08) << 1) | (i & 0x07); + trecvh[i] = ((~i) & 0x80) | ((i & 0x38) << 1); + trecvl[i] = (((~i) & 0x80) >> 4) | ((i & 0x38) >> 3); + } - return 0; + return (0); } /* * Process an ioctl request. */ - static int -lpioctl (struct ifnet *ifp, u_long cmd, caddr_t data) +lpioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { - struct lp_data *sc = ifp->if_softc; - device_t dev = sc->sc_dev; - device_t ppbus = device_get_parent(dev); - struct ifaddr *ifa = (struct ifaddr *)data; - struct ifreq *ifr = (struct ifreq *)data; - u_char *ptr; - void *ih; - int error; - - switch (cmd) { - - case SIOCSIFDSTADDR: - case SIOCAIFADDR: - case SIOCSIFADDR: - if (ifa->ifa_addr->sa_family != AF_INET) - return EAFNOSUPPORT; - - ifp->if_flags |= IFF_UP; - /* FALLTHROUGH */ - case SIOCSIFFLAGS: - if ((!(ifp->if_flags & IFF_UP)) && - (ifp->if_drv_flags & IFF_DRV_RUNNING)) { - - ppb_wctr(ppbus, 0x00); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - - /* IFF_UP is not set, try to release the bus anyway */ - ppb_release_bus(ppbus, dev); - break; - } - if (((ifp->if_flags & IFF_UP)) && - (!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { - - /* XXX - * Should the request be interruptible? - */ - if ((error = ppb_request_bus(ppbus, dev, PPB_WAIT|PPB_INTR))) - return (error); - - /* Now IFF_UP means that we own the bus */ - - ppb_set_mode(ppbus, PPB_COMPATIBLE); - - if (lpinittables()) { - ppb_release_bus(ppbus, dev); - return ENOBUFS; - } - - sc->sc_ifbuf = malloc(sc->sc_ifp->if_mtu + MLPIPHDRLEN, - M_DEVBUF, M_WAITOK); - if (!sc->sc_ifbuf) { - ppb_release_bus(ppbus, dev); - return ENOBUFS; - } - - /* attach our interrupt handler, later detached when the bus is released */ - if ((error = bus_setup_intr(dev, sc->res_irq, - INTR_TYPE_NET, NULL, lp_intr, dev, &ih))) { - ppb_release_bus(ppbus, dev); - return (error); - } - - ppb_wctr(ppbus, IRQENABLE); - ifp->if_drv_flags |= IFF_DRV_RUNNING; - } - break; - - case SIOCSIFMTU: - ptr = sc->sc_ifbuf; - sc->sc_ifbuf = malloc(ifr->ifr_mtu+MLPIPHDRLEN, M_DEVBUF, M_NOWAIT); - if (!sc->sc_ifbuf) { - sc->sc_ifbuf = ptr; - return ENOBUFS; - } - if (ptr) - free(ptr,M_DEVBUF); - sc->sc_ifp->if_mtu = ifr->ifr_mtu; - break; - - case SIOCGIFMTU: - ifr->ifr_mtu = sc->sc_ifp->if_mtu; - break; - - case SIOCADDMULTI: - case SIOCDELMULTI: - if (ifr == 0) { - return EAFNOSUPPORT; /* XXX */ - } - switch (ifr->ifr_addr.sa_family) { + struct lp_data *sc = ifp->if_softc; + device_t dev = sc->sc_dev; + device_t ppbus = device_get_parent(dev); + struct ifaddr *ifa = (struct ifaddr *)data; + struct ifreq *ifr = (struct ifreq *)data; + u_char *ptr; + void *ih; + int error; + + switch (cmd) { + case SIOCSIFDSTADDR: + case SIOCAIFADDR: + case SIOCSIFADDR: + if (ifa->ifa_addr->sa_family != AF_INET) + return (EAFNOSUPPORT); + + ifp->if_flags |= IFF_UP; + /* FALLTHROUGH */ + case SIOCSIFFLAGS: + if ((!(ifp->if_flags & IFF_UP)) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) { + + ppb_wctr(ppbus, 0x00); + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + + /* IFF_UP is not set, try to release the bus anyway */ + ppb_release_bus(ppbus, dev); + break; + } + if (((ifp->if_flags & IFF_UP)) && + (!(ifp->if_drv_flags & IFF_DRV_RUNNING))) { - case AF_INET: - break; + /* XXX + * Should the request be interruptible? + */ + if ((error = ppb_request_bus(ppbus, dev, PPB_WAIT | + PPB_INTR))) + return (error); + + /* Now IFF_UP means that we own the bus */ + ppb_set_mode(ppbus, PPB_COMPATIBLE); + + if (lpinittables()) { + ppb_release_bus(ppbus, dev); + return (ENOBUFS); + } + + sc->sc_ifbuf = malloc(sc->sc_ifp->if_mtu + MLPIPHDRLEN, + M_DEVBUF, M_WAITOK); + if (sc->sc_ifbuf == NULL) { + ppb_release_bus(ppbus, dev); + return (ENOBUFS); + } + + /* + * Attach our interrupt handler. It is + * detached later when the bus is released. + */ + if ((error = bus_setup_intr(dev, sc->res_irq, + INTR_TYPE_NET, NULL, lp_intr, dev, &ih))) { + ppb_release_bus(ppbus, dev); + return (error); + } - default: - return EAFNOSUPPORT; - } - break; + ppb_wctr(ppbus, IRQENABLE); + ifp->if_drv_flags |= IFF_DRV_RUNNING; + } + break; - case SIOCGIFMEDIA: - /* - * No ifmedia support at this stage; maybe use it - * in future for eg. protocol selection. - */ - return EINVAL; + case SIOCSIFMTU: + ptr = sc->sc_ifbuf; + sc->sc_ifbuf = malloc(ifr->ifr_mtu + MLPIPHDRLEN, M_DEVBUF, + M_NOWAIT); + if (sc->sc_ifbuf == NULL) { + sc->sc_ifbuf = ptr; + return (ENOBUFS); + } + if (ptr) + free(ptr, M_DEVBUF); + sc->sc_ifp->if_mtu = ifr->ifr_mtu; + break; + + case SIOCGIFMTU: + ifr->ifr_mtu = sc->sc_ifp->if_mtu; + break; + + case SIOCADDMULTI: + case SIOCDELMULTI: + if (ifr == 0) { + return (EAFNOSUPPORT); /* XXX */ + } + switch (ifr->ifr_addr.sa_family) { + case AF_INET: + break; + default: + return (EAFNOSUPPORT); + } + break; + + case SIOCGIFMEDIA: + /* + * No ifmedia support at this stage; maybe use it + * in future for eg. protocol selection. + */ + return (EINVAL); - default: - lprintf("LP:ioctl(0x%lx)\n", cmd); - return EINVAL; - } - return 0; + default: + lprintf("LP:ioctl(0x%lx)\n", cmd); + return (EINVAL); + } + return (0); } static __inline int -clpoutbyte (u_char byte, int spin, device_t ppbus) +clpoutbyte(u_char byte, int spin, device_t ppbus) { + ppb_wdtr(ppbus, ctxmitl[byte]); while (ppb_rstr(ppbus) & CLPIP_SHAKE) if (--spin == 0) { - return 1; + return (1); } ppb_wdtr(ppbus, ctxmith[byte]); while (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) if (--spin == 0) { - return 1; + return (1); } - return 0; + return (0); } static __inline int -clpinbyte (int spin, device_t ppbus) +clpinbyte(int spin, device_t ppbus) { u_char c, cl; while((ppb_rstr(ppbus) & CLPIP_SHAKE)) - if(!--spin) { - return -1; - } + if (!--spin) { + return (-1); + } cl = ppb_rstr(ppbus); ppb_wdtr(ppbus, 0x10); while(!(ppb_rstr(ppbus) & CLPIP_SHAKE)) - if(!--spin) { - return -1; - } + if (!--spin) { + return (-1); + } c = ppb_rstr(ppbus); ppb_wdtr(ppbus, 0x00); @@ -439,11 +438,12 @@ static void lptap(struct ifnet *ifp, struct mbuf *m) { u_int32_t af = AF_INET; + bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m); } static void -lp_intr (void *arg) +lp_intr(void *arg) { device_t dev = (device_t)arg; device_t ppbus = device_get_parent(dev); @@ -457,96 +457,105 @@ lp_intr (void *arg) if (sc->sc_ifp->if_flags & IFF_LINK0) { - /* Ack. the request */ - ppb_wdtr(ppbus, 0x01); + /* Ack. the request */ + ppb_wdtr(ppbus, 0x01); + + /* Get the packet length */ + j = clpinbyte(LPMAXSPIN2, ppbus); + if (j == -1) + goto err; + len = j; + j = clpinbyte(LPMAXSPIN2, ppbus); + if (j == -1) + goto err; + len = len + (j << 8); + if (len > sc->sc_ifp->if_mtu + MLPIPHDRLEN) + goto err; + + bp = sc->sc_ifbuf; - /* Get the packet length */ - j = clpinbyte(LPMAXSPIN2, ppbus); - if (j == -1) - goto err; - len = j; - j = clpinbyte(LPMAXSPIN2, ppbus); - if (j == -1) - goto err; - len = len + (j << 8); - if (len > sc->sc_ifp->if_mtu + MLPIPHDRLEN) - goto err; - - bp = sc->sc_ifbuf; - - while (len--) { - j = clpinbyte(LPMAXSPIN2, ppbus); - if (j == -1) { - goto err; - } - *bp++ = j; - } - /* Get and ignore checksum */ - j = clpinbyte(LPMAXSPIN2, ppbus); - if (j == -1) { - goto err; - } - - len = bp - sc->sc_ifbuf; - if (len <= CLPIPHDRLEN) - goto err; - - sc->sc_iferrs = 0; - - len -= CLPIPHDRLEN; - sc->sc_ifp->if_ipackets++; - sc->sc_ifp->if_ibytes += len; - top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp, 0); - if (top) { - if (bpf_peers_present(sc->sc_ifp->if_bpf)) - lptap(sc->sc_ifp, top); - netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ - } - goto done; + while (len--) { + j = clpinbyte(LPMAXSPIN2, ppbus); + if (j == -1) { + goto err; + } + *bp++ = j; + } + + /* Get and ignore checksum */ + j = clpinbyte(LPMAXSPIN2, ppbus); + if (j == -1) { + goto err; + } + + len = bp - sc->sc_ifbuf; + if (len <= CLPIPHDRLEN) + goto err; + + sc->sc_iferrs = 0; + + len -= CLPIPHDRLEN; + sc->sc_ifp->if_ipackets++; + sc->sc_ifp->if_ibytes += len; + top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, sc->sc_ifp, + 0); + if (top) { + if (bpf_peers_present(sc->sc_ifp->if_bpf)) + lptap(sc->sc_ifp, top); + + /* mbuf is free'd on failure. */ + netisr_queue(NETISR_IP, top); + } + goto done; } while ((ppb_rstr(ppbus) & LPIP_SHAKE)) { - len = sc->sc_ifp->if_mtu + LPIPHDRLEN; - bp = sc->sc_ifbuf; - while (len--) { - - cl = ppb_rstr(ppbus); - ppb_wdtr(ppbus, 8); - - j = LPMAXSPIN2; - while((ppb_rstr(ppbus) & LPIP_SHAKE)) - if(!--j) goto err; - - c = ppb_rstr(ppbus); - ppb_wdtr(ppbus, 0); + len = sc->sc_ifp->if_mtu + LPIPHDRLEN; + bp = sc->sc_ifbuf; + while (len--) { - *bp++= trecvh[cl] | trecvl[c]; + cl = ppb_rstr(ppbus); + ppb_wdtr(ppbus, 8); - j = LPMAXSPIN2; - while (!((cl=ppb_rstr(ppbus)) & LPIP_SHAKE)) { - if (cl != c && - (((cl = ppb_rstr(ppbus)) ^ 0xb8) & 0xf8) == - (c & 0xf8)) - goto end; - if (!--j) goto err; + j = LPMAXSPIN2; + while((ppb_rstr(ppbus) & LPIP_SHAKE)) + if (!--j) + goto err; + + c = ppb_rstr(ppbus); + ppb_wdtr(ppbus, 0); + + *bp++= trecvh[cl] | trecvl[c]; + + j = LPMAXSPIN2; + while (!((cl = ppb_rstr(ppbus)) & LPIP_SHAKE)) { + if (cl != c && + (((cl = ppb_rstr(ppbus)) ^ 0xb8) & 0xf8) == + (c & 0xf8)) + goto end; + if (!--j) + goto err; + } } - } end: - len = bp - sc->sc_ifbuf; - if (len <= LPIPHDRLEN) - goto err; - - sc->sc_iferrs = 0; - - len -= LPIPHDRLEN; - sc->sc_ifp->if_ipackets++; - sc->sc_ifp->if_ibytes += len; - top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp, 0); - if (top) { - if (bpf_peers_present(sc->sc_ifp->if_bpf)) - lptap(sc->sc_ifp, top); - netisr_queue(NETISR_IP, top); /* mbuf is free'd on failure. */ - } + len = bp - sc->sc_ifbuf; + if (len <= LPIPHDRLEN) + goto err; + + sc->sc_iferrs = 0; + + len -= LPIPHDRLEN; + sc->sc_ifp->if_ipackets++; + sc->sc_ifp->if_ibytes += len; + top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, sc->sc_ifp, + 0); + if (top) { + if (bpf_peers_present(sc->sc_ifp->if_bpf)) + lptap(sc->sc_ifp, top); + + /* mbuf is free'd on failure. */ + netisr_queue(NETISR_IP, top); + } } goto done; @@ -561,182 +570,181 @@ lp_intr (void *arg) * so stop wasting our time */ if (sc->sc_iferrs > LPMAXERRS) { - if_printf(sc->sc_ifp, "Too many errors, Going off-line.\n"); - ppb_wctr(ppbus, 0x00); - sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - sc->sc_iferrs=0; + if_printf(sc->sc_ifp, "Too many errors, Going off-line.\n"); + ppb_wctr(ppbus, 0x00); + sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sc->sc_iferrs = 0; } done: splx(s); - return; } static __inline int lpoutbyte (u_char byte, int spin, device_t ppbus) { - ppb_wdtr(ppbus, txmith[byte]); - while (!(ppb_rstr(ppbus) & LPIP_SHAKE)) - if (--spin == 0) - return 1; - ppb_wdtr(ppbus, txmitl[byte]); - while (ppb_rstr(ppbus) & LPIP_SHAKE) - if (--spin == 0) - return 1; - return 0; + + ppb_wdtr(ppbus, txmith[byte]); + while (!(ppb_rstr(ppbus) & LPIP_SHAKE)) + if (--spin == 0) + return (1); + ppb_wdtr(ppbus, txmitl[byte]); + while (ppb_rstr(ppbus) & LPIP_SHAKE) + if (--spin == 0) + return (1); + return (0); } static int -lpoutput (struct ifnet *ifp, struct mbuf *m, - struct sockaddr *dst, struct rtentry *rt) +lpoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, + struct rtentry *rt) { - struct lp_data *sc = ifp->if_softc; - device_t dev = sc->sc_dev; - device_t ppbus = device_get_parent(dev); - int s, err; - struct mbuf *mm; - u_char *cp = "\0\0"; - u_char chksum = 0; - int count = 0; - int i, len, spin; + struct lp_data *sc = ifp->if_softc; + device_t dev = sc->sc_dev; + device_t ppbus = device_get_parent(dev); + int s, err; + struct mbuf *mm; + u_char *cp = "\0\0"; + u_char chksum = 0; + int count = 0; + int i, len, spin; + + /* We need a sensible value if we abort */ + cp++; + ifp->if_drv_flags |= IFF_DRV_RUNNING; + + err = 1; /* assume we're aborting because of an error */ - /* We need a sensible value if we abort */ - cp++; - ifp->if_drv_flags |= IFF_DRV_RUNNING; + s = splhigh(); - err = 1; /* assume we're aborting because of an error */ + /* Suspend (on laptops) or receive-errors might have taken us offline */ + ppb_wctr(ppbus, IRQENABLE); - s = splhigh(); + if (ifp->if_flags & IFF_LINK0) { + if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { + lprintf("&"); + lp_intr(dev); + } - /* Suspend (on laptops) or receive-errors might have taken us offline */ - ppb_wctr(ppbus, IRQENABLE); + /* Alert other end to pending packet */ + spin = LPMAXSPIN1; + ppb_wdtr(ppbus, 0x08); + while ((ppb_rstr(ppbus) & 0x08) == 0) + if (--spin == 0) { + goto nend; + } - if (ifp->if_flags & IFF_LINK0) { + /* Calculate length of packet, then send that */ - if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { - lprintf("&"); - lp_intr(dev); - } + count += 14; /* Ethernet header len */ - /* Alert other end to pending packet */ - spin = LPMAXSPIN1; - ppb_wdtr(ppbus, 0x08); - while ((ppb_rstr(ppbus) & 0x08) == 0) - if (--spin == 0) { + mm = m; + for (mm = m; mm; mm = mm->m_next) { + count += mm->m_len; + } + if (clpoutbyte(count & 0xFF, LPMAXSPIN1, ppbus)) + goto nend; + if (clpoutbyte((count >> 8) & 0xFF, LPMAXSPIN1, ppbus)) goto nend; + + /* Send dummy ethernet header */ + for (i = 0; i < 12; i++) { + if (clpoutbyte(i, LPMAXSPIN1, ppbus)) + goto nend; + chksum += i; } - /* Calculate length of packet, then send that */ + if (clpoutbyte(0x08, LPMAXSPIN1, ppbus)) + goto nend; + if (clpoutbyte(0x00, LPMAXSPIN1, ppbus)) + goto nend; + chksum += 0x08 + 0x00; /* Add into checksum */ - count += 14; /* Ethernet header len */ + mm = m; + do { + cp = mtod(mm, u_char *); + len = mm->m_len; + while (len--) { + chksum += *cp; + if (clpoutbyte(*cp++, LPMAXSPIN2, ppbus)) + goto nend; + } + } while ((mm = mm->m_next)); - mm = m; - for (mm = m; mm; mm = mm->m_next) { - count += mm->m_len; - } - if (clpoutbyte(count & 0xFF, LPMAXSPIN1, ppbus)) - goto nend; - if (clpoutbyte((count >> 8) & 0xFF, LPMAXSPIN1, ppbus)) - goto nend; - - /* Send dummy ethernet header */ - for (i = 0; i < 12; i++) { - if (clpoutbyte(i, LPMAXSPIN1, ppbus)) + /* Send checksum */ + if (clpoutbyte(chksum, LPMAXSPIN2, ppbus)) goto nend; - chksum += i; + + /* Go quiescent */ + ppb_wdtr(ppbus, 0); + + err = 0; /* No errors */ + + nend: + if (err) { /* if we didn't timeout... */ + ifp->if_oerrors++; + lprintf("X"); + } else { + ifp->if_opackets++; + ifp->if_obytes += m->m_pkthdr.len; + if (bpf_peers_present(ifp->if_bpf)) + lptap(ifp, m); + } + + m_freem(m); + + if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { + lprintf("^"); + lp_intr(dev); + } + (void) splx(s); + return (0); + } + + if (ppb_rstr(ppbus) & LPIP_SHAKE) { + lprintf("&"); + lp_intr(dev); } - if (clpoutbyte(0x08, LPMAXSPIN1, ppbus)) - goto nend; - if (clpoutbyte(0x00, LPMAXSPIN1, ppbus)) - goto nend; - chksum += 0x08 + 0x00; /* Add into checksum */ + if (lpoutbyte(0x08, LPMAXSPIN1, ppbus)) + goto end; + if (lpoutbyte(0x00, LPMAXSPIN2, ppbus)) + goto end; mm = m; do { cp = mtod(mm, u_char *); len = mm->m_len; - while (len--) { - chksum += *cp; - if (clpoutbyte(*cp++, LPMAXSPIN2, ppbus)) - goto nend; - } + while (len--) + if (lpoutbyte(*cp++, LPMAXSPIN2, ppbus)) + goto end; } while ((mm = mm->m_next)); - /* Send checksum */ - if (clpoutbyte(chksum, LPMAXSPIN2, ppbus)) - goto nend; - - /* Go quiescent */ - ppb_wdtr(ppbus, 0); + err = 0; /* no errors were encountered */ - err = 0; /* No errors */ +end: + --cp; + ppb_wdtr(ppbus, txmitl[*cp] ^ 0x17); - nend: - if (err) { /* if we didn't timeout... */ + if (err) { /* if we didn't timeout... */ ifp->if_oerrors++; lprintf("X"); } else { ifp->if_opackets++; ifp->if_obytes += m->m_pkthdr.len; if (bpf_peers_present(ifp->if_bpf)) - lptap(ifp, m); + lptap(ifp, m); } m_freem(m); - if (!(ppb_rstr(ppbus) & CLPIP_SHAKE)) { + if (ppb_rstr(ppbus) & LPIP_SHAKE) { lprintf("^"); lp_intr(dev); } - (void) splx(s); - return 0; - } - - if (ppb_rstr(ppbus) & LPIP_SHAKE) { - lprintf("&"); - lp_intr(dev); - } - - if (lpoutbyte(0x08, LPMAXSPIN1, ppbus)) - goto end; - if (lpoutbyte(0x00, LPMAXSPIN2, ppbus)) - goto end; - - mm = m; - do { - cp = mtod(mm,u_char *); - len = mm->m_len; - while (len--) - if (lpoutbyte(*cp++, LPMAXSPIN2, ppbus)) - goto end; - } while ((mm = mm->m_next)); - - err = 0; /* no errors were encountered */ - - end: - --cp; - ppb_wdtr(ppbus, txmitl[*cp] ^ 0x17); - - if (err) { /* if we didn't timeout... */ - ifp->if_oerrors++; - lprintf("X"); - } else { - ifp->if_opackets++; - ifp->if_obytes += m->m_pkthdr.len; - if (bpf_peers_present(ifp->if_bpf)) - lptap(ifp, m); - } - - m_freem(m); - - if (ppb_rstr(ppbus) & LPIP_SHAKE) { - lprintf("^"); - lp_intr(dev); - } - (void) splx(s); - return 0; + (void) splx(s); + return (0); } static device_method_t lp_methods[] = { @@ -749,9 +757,9 @@ static device_method_t lp_methods[] = { }; static driver_t lp_driver = { - "plip", - lp_methods, - sizeof(struct lp_data), + "plip", + lp_methods, + sizeof(struct lp_data), }; DRIVER_MODULE(plip, ppbus, lp_driver, lp_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 22:44:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABF11065673; Wed, 12 Nov 2008 22:44:51 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352828FC12; Wed, 12 Nov 2008 22:44:51 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACMipf2042204; Wed, 12 Nov 2008 22:44:51 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACMioux042199; Wed, 12 Nov 2008 22:44:50 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200811122244.mACMioux042199@svn.freebsd.org> From: Doug Ambrisko Date: Wed, 12 Nov 2008 22:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184897 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 22:44:51 -0000 Author: ambrisko Date: Wed Nov 12 22:44:50 2008 New Revision: 184897 URL: http://svn.freebsd.org/changeset/base/184897 Log: - Fix from jhb for failing I/O request when bus_dmamap_load fails. - Fix to ioctl path in which the length could be 0 which means no data in/out from LSI. - Fix to ioctl path in which the data in the sense data space of the ioctl packet is a really a pointer to some location in user-space. From LSI re-worked a bit by me. - Add HW support for next gen cards from LSI. Thanks to LSI for their support! Submitted by: jhb, LSI MFC after: 3 days Modified: head/sys/dev/mfi/mfi.c head/sys/dev/mfi/mfi_ioctl.h head/sys/dev/mfi/mfi_pci.c head/sys/dev/mfi/mfireg.h head/sys/dev/mfi/mfivar.h Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Wed Nov 12 22:14:05 2008 (r184896) +++ head/sys/dev/mfi/mfi.c Wed Nov 12 22:44:50 2008 (r184897) @@ -163,7 +163,11 @@ static void mfi_enable_intr_ppc(struct mfi_softc *sc) { MFI_WRITE4(sc, MFI_ODCR0, 0xFFFFFFFF); - MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); + if (sc->mfi_flags & MFI_FLAGS_1078) { + MFI_WRITE4(sc, MFI_OMSK, ~MFI_1078_EIM); + } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + MFI_WRITE4(sc, MFI_OMSK, ~MFI_GEN2_EIM); + } } static int32_t @@ -171,14 +175,14 @@ mfi_read_fw_status_xscale(struct mfi_sof { return MFI_READ4(sc, MFI_OMSG0); } - + static int32_t mfi_read_fw_status_ppc(struct mfi_softc *sc) { return MFI_READ4(sc, MFI_OSP0); } -static int +static int mfi_check_clear_intr_xscale(struct mfi_softc *sc) { int32_t status; @@ -191,26 +195,33 @@ mfi_check_clear_intr_xscale(struct mfi_s return 0; } -static int +static int mfi_check_clear_intr_ppc(struct mfi_softc *sc) { int32_t status; status = MFI_READ4(sc, MFI_OSTS); - if (!status) - return 1; + if (sc->mfi_flags & MFI_FLAGS_1078) { + if (!(status & MFI_1078_RM)) { + return 1; + } + } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + if (!(status & MFI_GEN2_RM)) { + return 1; + } + } MFI_WRITE4(sc, MFI_ODCR0, status); return 0; } -static void +static void mfi_issue_cmd_xscale(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) { MFI_WRITE4(sc, MFI_IQP,(bus_add >>3)|frame_cnt); } - -static void + +static void mfi_issue_cmd_ppc(struct mfi_softc *sc,uint32_t bus_add,uint32_t frame_cnt) { MFI_WRITE4(sc, MFI_IQP, (bus_add |frame_cnt <<1)|1 ); @@ -1399,6 +1410,8 @@ mfi_bio_complete(struct mfi_command *cm) device_printf(sc->mfi_dev, "I/O error, status= %d " "scsi_status= %d\n", hdr->cmd_status, hdr->scsi_status); mfi_print_sense(cm->cm_sc, cm->cm_sense); + } else if (cm->cm_error != 0) { + bio->bio_flags |= BIO_ERROR; } mfi_release_command(cm); @@ -1815,6 +1828,9 @@ mfi_check_command_post(struct mfi_softc case MFI_DCMD_CFG_ADD: mfi_ldprobe(sc); break; + case MFI_DCMD_CFG_FOREIGN_IMPORT: + mfi_ldprobe(sc); + break; } } @@ -1904,7 +1920,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, struct mfi_ioc_aen *aen; struct mfi_command *cm = NULL; uint32_t context; - uint8_t *sense_ptr; + union mfi_sense_ptr sense_ptr; uint8_t *data = NULL, *temp; int i; struct mfi_ioc_passthru *iop = (struct mfi_ioc_passthru *)arg; @@ -1986,8 +2002,9 @@ mfi_ioctl(struct cdev *dev, u_long cmd, context = cm->cm_frame->header.context; bcopy(ioc->mfi_frame.raw, cm->cm_frame, - 2 * MFI_DCMD_FRAME_SIZE); /* this isn't quite right */ - cm->cm_total_frame_size = (sizeof(union mfi_sgl) * ioc->mfi_sge_count) + ioc->mfi_sgl_off; + 2 * MFI_DCMD_FRAME_SIZE); /* this isn't quite right */ + cm->cm_total_frame_size = (sizeof(union mfi_sgl) + * ioc->mfi_sge_count) + ioc->mfi_sgl_off; if (ioc->mfi_sge_count) { cm->cm_sg = (union mfi_sgl *)&cm->cm_frame->bytes[ioc->mfi_sgl_off]; @@ -2001,7 +2018,8 @@ mfi_ioctl(struct cdev *dev, u_long cmd, if (cm->cm_flags == 0) cm->cm_flags |= MFI_CMD_DATAIN | MFI_CMD_DATAOUT; cm->cm_len = cm->cm_frame->header.data_len; - if (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT)) { + if (cm->cm_len && + (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) { cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF, M_WAITOK | M_ZERO); if (cm->cm_data == NULL) { @@ -2102,10 +2120,12 @@ mfi_ioctl(struct cdev *dev, u_long cmd, } if (ioc->mfi_sense_len) { - /* copy out sense */ - sense_ptr = &((struct mfi_ioc_packet*)arg) - ->mfi_frame.raw[0]; - error = copyout(cm->cm_sense, sense_ptr, + /* get user-space sense ptr then copy out sense */ + bcopy(&((struct mfi_ioc_packet*)arg) + ->mfi_frame.raw[ioc->mfi_sense_off], + &sense_ptr.sense_ptr_data[0], + sizeof(sense_ptr.sense_ptr_data)); + error = copyout(cm->cm_sense, sense_ptr.user_space, ioc->mfi_sense_len); if (error != 0) { device_printf(sc->mfi_dev, @@ -2207,7 +2227,7 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ struct mfi_linux_ioc_aen l_aen; struct mfi_command *cm = NULL; struct mfi_aen *mfi_aen_entry; - uint8_t *sense_ptr; + union mfi_sense_ptr sense_ptr; uint32_t context; uint8_t *data = NULL, *temp; int i; @@ -2241,7 +2261,8 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ bcopy(l_ioc.lioc_frame.raw, cm->cm_frame, 2 * MFI_DCMD_FRAME_SIZE); /* this isn't quite right */ - cm->cm_total_frame_size = (sizeof(union mfi_sgl) * l_ioc.lioc_sge_count) + l_ioc.lioc_sgl_off; + cm->cm_total_frame_size = (sizeof(union mfi_sgl) + * l_ioc.lioc_sge_count) + l_ioc.lioc_sgl_off; if (l_ioc.lioc_sge_count) cm->cm_sg = (union mfi_sgl *)&cm->cm_frame->bytes[l_ioc.lioc_sgl_off]; @@ -2251,7 +2272,8 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ if (cm->cm_frame->header.flags & MFI_FRAME_DATAOUT) cm->cm_flags |= MFI_CMD_DATAOUT; cm->cm_len = cm->cm_frame->header.data_len; - if (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT)) { + if (cm->cm_len && + (cm->cm_flags & (MFI_CMD_DATAIN | MFI_CMD_DATAOUT))) { cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF, M_WAITOK | M_ZERO); if (cm->cm_data == NULL) { @@ -2316,10 +2338,12 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ } if (l_ioc.lioc_sense_len) { - /* copy out sense */ - sense_ptr = &((struct mfi_linux_ioc_packet*)arg) - ->lioc_frame.raw[0]; - error = copyout(cm->cm_sense, sense_ptr, + /* get user-space sense ptr then copy out sense */ + bcopy(&((struct mfi_linux_ioc_packet*)arg) + ->lioc_frame.raw[l_ioc.lioc_sense_off], + &sense_ptr.sense_ptr_data[0], + sizeof(sense_ptr.sense_ptr_data)); + error = copyout(cm->cm_sense, sense_ptr.user_space, l_ioc.lioc_sense_len); if (error != 0) { device_printf(sc->mfi_dev, Modified: head/sys/dev/mfi/mfi_ioctl.h ============================================================================== --- head/sys/dev/mfi/mfi_ioctl.h Wed Nov 12 22:14:05 2008 (r184896) +++ head/sys/dev/mfi/mfi_ioctl.h Wed Nov 12 22:44:50 2008 (r184897) @@ -50,6 +50,16 @@ union mfi_statrequest { struct mfi_qstat ms_qstat; }; +#define MAX_SPACE_FOR_SENSE_PTR 32 +union mfi_sense_ptr { + uint8_t sense_ptr_data[MAX_SPACE_FOR_SENSE_PTR]; + void *user_space; + struct { + uint32_t low; + uint32_t high; + } addr; +} __packed; + #define MAX_IOCTL_SGE 16 struct mfi_ioc_packet { Modified: head/sys/dev/mfi/mfi_pci.c ============================================================================== --- head/sys/dev/mfi/mfi_pci.c Wed Nov 12 22:14:05 2008 (r184896) +++ head/sys/dev/mfi/mfi_pci.c Wed Nov 12 22:44:50 2008 (r184897) @@ -118,7 +118,14 @@ struct mfi_ident { {0x1000, 0x0413, 0xffff, 0xffff, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, /* Verde ZCR */ {0x1028, 0x0015, 0xffff, 0xffff, MFI_FLAGS_1064R, "Dell PERC 5/i"}, {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, - {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, + {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, + {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2, "Dell PERC 607E Adapter"}, + {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2, "Dell PERC 607I Adapter"}, + {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2, "Dell PERC 607I Integrated"}, + {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2, "Dell PERC 607I Modular"}, + {0x1000, 0x0078, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, + {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, + {0x1000, 0x007c, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, {0, 0, 0, 0, 0, NULL} }; @@ -163,6 +170,8 @@ mfi_pci_attach(device_t dev) sc = device_get_softc(dev); bzero(sc, sizeof(*sc)); sc->mfi_dev = dev; + m = mfi_find_ident(dev); + sc->mfi_flags = m->flags; /* Verify that the adapter can be set up in PCI space */ command = pci_read_config(dev, PCIR_COMMAND, 2); @@ -179,7 +188,14 @@ mfi_pci_attach(device_t dev) } /* Allocate PCI registers */ - sc->mfi_regs_rid = PCIR_BAR(0); + if ((sc->mfi_flags & MFI_FLAGS_1064R) || + (sc->mfi_flags & MFI_FLAGS_1078)) { + /* 1068/1078: Memory mapped BAR is at offset 0x10 */ + sc->mfi_regs_rid = PCIR_BAR(0); + } else if (sc->mfi_flags & MFI_FLAGS_GEN2) { + /* GEN2: Memory mapped BAR is at offset 0x14 */ + sc->mfi_regs_rid = PCIR_BAR(1); + } if ((sc->mfi_regs_resource = bus_alloc_resource_any(sc->mfi_dev, SYS_RES_MEMORY, &sc->mfi_regs_rid, RF_ACTIVE)) == NULL) { device_printf(dev, "Cannot allocate PCI registers\n"); @@ -206,9 +222,6 @@ mfi_pci_attach(device_t dev) goto out; } - m = mfi_find_ident(dev); - sc->mfi_flags = m->flags; - error = mfi_attach(sc); out: if (error) { Modified: head/sys/dev/mfi/mfireg.h ============================================================================== --- head/sys/dev/mfi/mfireg.h Wed Nov 12 22:14:05 2008 (r184896) +++ head/sys/dev/mfi/mfireg.h Wed Nov 12 22:44:50 2008 (r184897) @@ -89,10 +89,16 @@ __FBSDID("$FreeBSD$"); #define MFI_ODCR0 0xa0 /* outbound doorbell clear register0 */ #define MFI_OSP0 0xb0 /* outbound scratch pad0 */ #define MFI_1078_EIM 0x80000004 /* 1078 enable intrrupt mask */ -#define MFI_RMI 0x2 /* reply message interrupt */ +#define MFI_RMI 0x2 /* reply message interrupt */ #define MFI_1078_RM 0x80000000 /* reply 1078 message interrupt */ #define MFI_ODC 0x4 /* outbound doorbell change interrupt */ +/* + * GEN2 specific changes + */ +#define MFI_GEN2_EIM 0x00000005 /* GEN2 enable interrupt mask */ +#define MFI_GEN2_RM 0x00000001 /* reply GEN2 message interrupt */ + /* Bits for MFI_OSTS */ #define MFI_OSTS_INTR_VALID 0x00000002 @@ -153,6 +159,7 @@ typedef enum { MFI_DCMD_CFG_READ = 0x04010000, MFI_DCMD_CFG_ADD = 0x04020000, MFI_DCMD_CFG_CLEAR = 0x04030000, + MFI_DCMD_CFG_FOREIGN_IMPORT = 0x04060400, MFI_DCMD_CLUSTER = 0x08000000, MFI_DCMD_CLUSTER_RESET_ALL = 0x08010100, MFI_DCMD_CLUSTER_RESET_LD = 0x08010200 Modified: head/sys/dev/mfi/mfivar.h ============================================================================== --- head/sys/dev/mfi/mfivar.h Wed Nov 12 22:14:05 2008 (r184896) +++ head/sys/dev/mfi/mfivar.h Wed Nov 12 22:44:50 2008 (r184897) @@ -133,6 +133,7 @@ struct mfi_softc { #define MFI_FLAGS_STOP (1<<3) #define MFI_FLAGS_1064R (1<<4) #define MFI_FLAGS_1078 (1<<5) +#define MFI_FLAGS_GEN2 (1<<6) struct mfi_hwcomms *mfi_comms; TAILQ_HEAD(,mfi_command) mfi_free; From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 23:40:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 914C210656A9; Wed, 12 Nov 2008 23:40:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64F068FC25; Wed, 12 Nov 2008 23:40:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACNeaWA043261; Wed, 12 Nov 2008 23:40:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACNeawE043260; Wed, 12 Nov 2008 23:40:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811122340.mACNeawE043260@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Nov 2008 23:40:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184898 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 23:40:36 -0000 Author: rwatson Date: Wed Nov 12 23:40:35 2008 New Revision: 184898 URL: http://svn.freebsd.org/changeset/base/184898 Log: Open vendor/openbsm for use. Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Wed Nov 12 22:44:50 2008 (r184897) +++ svnadmin/conf/paths Wed Nov 12 23:40:35 2008 (r184898) @@ -50,6 +50,7 @@ ^vendor/ncurses ^vendor/netcat ^vendor/ntp +^vendor/openbsm ^vendor/sendmail ^vendor/tcsh ^vendor/top From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 23:48:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E930106567C; Wed, 12 Nov 2008 23:48:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06C7A8FC1C; Wed, 12 Nov 2008 23:48:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACNmKvc043433; Wed, 12 Nov 2008 23:48:20 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACNmKYu043426; Wed, 12 Nov 2008 23:48:20 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811122348.mACNmKYu043426@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Nov 2008 23:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184899 - in vendor/openbsm/dist: . bin bsm compat config contrib etc libbsm man modules test tools X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 23:48:21 -0000 Author: rwatson Date: Wed Nov 12 23:48:20 2008 New Revision: 184899 URL: http://svn.freebsd.org/changeset/base/184899 Log: Flatten OpenBSM vendor tree in preparation for new OpenBSM vendor import. Added: vendor/openbsm/dist/CHANGELOG - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/CHANGELOG vendor/openbsm/dist/HISTORY - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/HISTORY vendor/openbsm/dist/LICENSE - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/LICENSE vendor/openbsm/dist/Makefile - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile vendor/openbsm/dist/Makefile.am - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.am vendor/openbsm/dist/Makefile.in - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.in vendor/openbsm/dist/README - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/README vendor/openbsm/dist/TODO - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/TODO vendor/openbsm/dist/VERSION - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/VERSION vendor/openbsm/dist/aclocal.m4 - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/aclocal.m4 vendor/openbsm/dist/autogen.sh - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/autogen.sh vendor/openbsm/dist/bin/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/bin/ vendor/openbsm/dist/bsm/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/bsm/ vendor/openbsm/dist/compat/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/compat/ vendor/openbsm/dist/config/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/config/ vendor/openbsm/dist/configure - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/configure vendor/openbsm/dist/configure.ac - copied unchanged from r184898, vendor/openbsm/dist/contrib/openbsm/configure.ac vendor/openbsm/dist/etc/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/etc/ vendor/openbsm/dist/libbsm/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/libbsm/ vendor/openbsm/dist/man/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/man/ vendor/openbsm/dist/modules/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/modules/ vendor/openbsm/dist/test/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/test/ vendor/openbsm/dist/tools/ - copied from r184898, vendor/openbsm/dist/contrib/openbsm/tools/ Deleted: vendor/openbsm/dist/contrib/ Copied: vendor/openbsm/dist/CHANGELOG (from r184898, vendor/openbsm/dist/contrib/openbsm/CHANGELOG) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/CHANGELOG Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/CHANGELOG) @@ -0,0 +1,97 @@ +OpenBSM 1.0 alpha 4 + +- Remove "audit" user example from audit_user, as it's not present on most + systems. +- Add cannot_audit() function non-Darwin systems that wraps auditon(); + required by OpenSSH BSM support. Convert Darwin cannot_audit() into a + function rather than a macro. +- Library build fixed on Darwin following include file tweaks. The native + Darwin sys/audit.h conflicts with bsm/audit.h due to duplicate types, so + for now we force bsm_wrappers.c to not perform a nested include of + sys/audit.h. + +OpenBSM 1.0 alpha 3 + +- Man page formatting, cross reference, mlinks, and accuracy improvements. +- auditd and tools now compile and run on FreeBSD/arm. +- auditd will now fchown() the trail file to the audit review group, if + defined at compile-time. +- Added AUE_SYSARCH for FreeBSD. +- Definition of AUE_SETFSGID fixed for Linux. + +OpenBSM 1.0 alpha 2 + +- Man page formatting improvements. +- A number of new audit event identifiers for FreeBSD, Linux, and POSIX.1b + events. +- Remove 'tfm' class, unused in OpenBSM. + +OpenBSM 1.0 alpha 1 + +- Import of Darwin74 BSM drop +- Use 'syslog' for audit log warnings, rather than echoing to a file in + audit_warn. +- Compile using BSD make infrastructure. +- Integrate bsm/ include files from Darwin74 XNU drop into OpenBSM. +- Narrow set of symbols and defines that are exposed in user space: don't + compile in code relying on kernel-only types such as 'struct socket'. +- Add README, including basic build documentation. +- Compilation of Apple-specific notify and Machroutines now #ifdef __APPLE__. +- Staticize libbsm global variables to avoid leakage into application. +- Add free_au_user_ent() so that au_user_ent's don't have to be leaked. +- Clean up bogus nul-termination checks in libbsm. +- Add libbsm API man pages: au_class.3 au_control.3 au_event.3 + au_free_token.3 au_io.3 au_mask.3 au_token.3 au_user.3 libbsm.3. +- Add man pages for BSM system calls: audit.2 auditctl.2 auditon.2 getaudit.2 + getauid.2 setaudit.2 setauid.2 +- Modify various libbsm interfaces to more consistently return 'errno' values + on failure. +- Break out au_close() into constituent parts, allowing records to be written + to memory as well as files. +- Prefix various defines with 'BSM_' to reduce name space pollution. +- Added audit_internal.h, which can be used by a kernel audit implementation + wanting to rely on libbsm components. +- Build with warnings, and eliminate warnings. +- Make libbsm endian-independent, storing and reading BSM are big endian + (network byte order) rather than native byte order. More consistently + print IP addresses using the IP address print routine. These changes + make use of sys/endian.h from *BSD; since this isn't present on Darwin, + add it to OpenBSM as compat/endian.h, which is used only on Darwin. +- Import of Darwin80 BSM drop, including 64-bit file IDs, better + documentation of private APIs, and bug fixes. +- White space cleanup. +- Add audit.log.5, a first cut at a man page documenting the BSM file format. +- Teach au_read_rec() to recognize stand-alone file tokens, which are present + at the beginning and end of Solaris audit trails. Technically, these + appear to violate the high level BSM spec, which suggests that all tokens + are present in records, but need to be supported. +- Implement HEADER64, ATTR64, SUBJECT64 token types, which make it possible + to run praudit(1) on basic Solaris BSM streams. +- Switched to Solaris spelling of token names; Darwin spellings are now + deprecated and will be removed in a future version of OpenBSM. +- Adopt Solaris model for representing IPv4 and IPv6 addresses. +- Prefer C99 types. +- Attempt to universally adopt the BSD style(9) coding style for + consistency. +- auditreduce(1) now has a usage message. +- Update support for auditctl(2) system call to support FreeBSD. +- Add support for /dev/audit as the trigger source on FreeBSD. +- Add additional event types for Darwin, FreeBSD, and Solaris. Annotate + conflicts (there are a few, unfortunately). Correct spellings, comment, + sort, etc. These include {get,set}res[ug]id(), sendfile(), lchflags(), + eaccess(), kqueue(), kevent(), poll(), lchmod(). +- Relicensed under a BSD license, many thanks to Apple, Inc! +- Many bug fixes, cleanups, thread safety in the class, control, event, + and user system audit databases. Annotate some persisting atomicity + bugs associated with the API and implementation. +- Add audump test tool. +- Adopt OpenSolaris BSM API memory semantics: caller allocates memory, + or static memory is returned for non-_r() versions of API calls. + _free() calls dropped as a result, and source code compatibility with + OpenSolaris improved significantly. +- Annotate BSM events with origin OS and compatibility information. +- auditd(8), audit(8) added to the OpenBSM distribution. auditd extended + to support reloading of kernel event table. +- Allow comments in /etc/security configuration files. + +$P4: //depot/projects/trustedbsd/openbsm/CHANGELOG#12 $ Copied: vendor/openbsm/dist/HISTORY (from r184898, vendor/openbsm/dist/contrib/openbsm/HISTORY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/HISTORY Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/HISTORY) @@ -0,0 +1,305 @@ +OpenBSM 1.0 + +- Fix bug in auditreduce(8) which resulted in a memory fault/crash when + the user specified an event name with -m. +- Remove AU_.* hard-coded audit class constants, as udit classes are now + entirely dynamically configured using /etc/security/audit_class. + +OpenBSM 1.0 alpha 15 + +- Fix bug when processing in_addr_ex tokens. +- Restore the behavior of printing the string/text specified while + auditing arg32 tokens. +- Synchronized audit event list to Solaris, picking up the *at(2) system call + definitions, now required for FreeBSD and Linux. Added additional events + for *at(2) system calls not present in Solaris. +- Bugs in auditreduce(8) fixed allowing partial date strings to be used in + filtering events. + +OpenBSM 1.0 alpha 14 + +- Fix endian issues when processing IPv6 addresses for extended subject + and process tokens. +- gcc41 warnings clean. +- Teach audit_submit(3) about getaudit_addr(2). +- Add support for zonename tokens. + +OpenBSM 1.0 alpha 13 + +- compat/clock_gettime.h now provides a compatibility implementation of + clock_gettime(), which fixes building on Mac OS X. +- Countless man page improvements, markup fixes, content fixs, etc. +- XML printing support via "praudit -x". +- audit.log.5 expanded to include additional BSM token types. +- Added encoding and decoding routines for process64_ex, process32_ex, + subject32_ex, header64, and attr64 tokens. +- Additional audit event identifiers for listen, mlockall/munlockall, + getpath, POSIX message queues, and mandatory access control. + +OpenBSM 1.0 alpha 12 + +- Correct bug in auditreduce which prevented the -c option from working + correctly when the user specifies to process successful or failed events. + The problem stemmed from not having access to the return token at the time + the initial preselection occurred, but now a second preselection process + occurs while processing the return token. +- getacfilesz(3) API added to read new audit_control(5) filesz setting, + which auditd(8) now sets the kernel audit trail rotation size to. +- auditreduce(1) now uses stdin if no file names are specified on the command + line; this was the documented behavior previously, but it was not + implemented. Be more specific in auditreduce(1)'s examples section about + what might be done with the output of auditreduce. +- Add audit_warn(5) closefile event so that administrators can hook + termination of an audit trail file. For example, this might be used to + compress the trail file after it is closed. +- auditreduce(1) now uses regular expressions for pathname matching. Users can + now supply one or more (comma delimited) regular expressions for searching + the pathnames. If one of the regular expressions is prefixed with a tilde + (~), and a path matches, it will be excluded from the search results. + +OpenBSM 1.0 alpha 11 + +- Reclassify certain read/write operations as having no class rather than the + fr/fw class; our default classes audit intent (open) not operations (read, + write). +- Introduce AUE_SYSCTL_WRITE event so that BSD/Darwin systems can audit reads + and writes of sysctls as separate events. Add additional kernel + environment and jail events for FreeBSD. +- Break AUDIT_TRIGGER_OPEN_NEW into two events, AUDIT_TRIGGER_ROTATE_USER + (issued by the user audit(8) tool) and AUDIT_TRIGGER_ROTATE_KERNEL (issued + by the kernel audit implementation) so that they can be distinguished. +- Disable rate limiting of rotate requests; as the kernel doesn't retransmit + a dropped request, the log file will otherwise grow indefinitely if the + trigger is dropped. +- Improve auditd debugging output. +- Fix a number of threading related bugs in audit_control file reading + routines. +- Add APIs au_poltostr() and au_strtopol() to convert between text + representations of audit_control policy flags and the flags passed to + auditon(A_SETPOLICY) and retrieved from auditon(A_GETPOLICY). +- Add API getacpol() to return the 'policy:' entry from audit_control, an + extension to the Solaris file format to allow specification of policy + persistent flags. +- Update audump to print the audit_control policy field. +- Update auditd to read the audit_control policy field and set the kernel + policy to match it when configuring/reconfiguring. Remove the -s and -h + arguments as these policies are now set via the configuration file. If a + policy line is not found in the configuration file, continue with the + current default of setting AUDIT_CNT. +- Fix bugs in the parsing of large execve(2) arguments and environmental + variable tokens; increase maximum parsed argument and variable count. +- configure now detects strlcat(), used by policy-related functions. +- Reference token and record sample files added to test tree. + +OpenBSM 1.0 alpha 10 + +- auditd now generates complete audit records for its events, as required for + application-submitted audit records in the the FreeBSD kernel audit + implementation. + +OpenBSM 1.0 alpha 9 + +- Rename many OpenBSM-specific constants and API elements containing the + strings "BSM" and "bsm" to "AUDIT" and "audit", observing that this is true + for almost all existing constants and APIs. +- Instead of passing a per-instance cookie directly into all audit filter + APIs, pass in the audit filter daemon state pointer, which is then used by + the module using an audit_filter_{get,set}cookie() API. This will allow + future service APIs provided by the filter daemon to maintain their own + state -- for example, per-module preselection state. + +OpenBSM 1.0 alpha 8 + +- Correct typo in definition of AUR_INT. +- Adopt OpenSolaris constant values for AUDIT_* configuration flags. +- Arguments to au_to_exec_args() and au_to_exec_env() no longer const. +- Add kernel versions of au_to_exec_args() and au_to_exec_env(). +- Fix exec argument type that is printed for env strings from 'arg' to 'env'. +- New OpenBSM token version number assigned, constants added for other + commonly seen version numbers. +- OpenBSM-specific events assigned numbers in the 43xxx range to avoid future + collisions with Solaris. Darwin events renamed to AUE_DARWIN_foo, as they + are now deprecated numberings. +- autoconf now detects clock_gettime(), which is not available on Darwin. +- praudit output fixes relating to arg32 and arg64 tokens. +- Maximum record size updated to 64k-1 to match Solaris record size limit. +- Various style and comment cleanups in include files. + +OpenBSM 1.0 alpha 7 + +- Adopted Solaris-compatible format for subject32_ex and subject64_ex + tokens, which previously did not correctly implement variable length + address storage. +- Prefer inttypes.h to stdint.h; enhance queue.h detection to test for + TAILQ_FOREACH_SAFE(), which is present in recent BSD queue.h's, but not + older ones. OpenBSM now builds on some FreeBSD 4.x version. +- New event types for extended attributes, ACLs, and scheduling. + +OpenBSM 1.0 alpha 6 + +- Use AU_TO_WRITE and AU_NO_TO_WRITE for the 'keep' argument to au_close(); + previously we used hard-coded 0 and 1 values. +- Add man page for au_open(), au_write(), au_close(), and + au_close_buffer(). +- Support a more complete range of data types for the arbitrary data token: + add AUR_CHAR (alias to AUR_BYTE), remove AUR_LONG, add AUR_INT32 (alias + to AUR_INT), add AUR_INT64. +- Add au_close_token(), which allows writing a single token_t to a memory + buffer. Not likely to be used much by applications, but useful for + writing test tools. +- Modify au_to_file() so that it accepts a timeval in user space, not just + kernel -- this is not a Solaris BSM API so can be modified without + causing compatibility issues. +- Define a new API, au_to_header32_tm(), which adds a struct timeval + argument to the ordinary au_to_header32(), which is now implemented by + wrapping au_to_header32_tm() and calling gettimeofday(). #ifndef KERNEL + the APIs that invoke gettimeofday(), rather than having a variable + definition. Don't try to retrieve time zone information using + gettimeofday(), as it's not needed, and introduces possible failure + modes. +- Don't perform byte order transformations on the addr/machine fields of + the terminal ID that appears in the process32/subject32 tokens. These + are assumed to be IP addresses, and as such, to be in network byte + order. +- Universally, APIs now assume that IP addresses and ports are provided + in network byte order. APIs now generally provide these types in + network byte order when decoding. +- Beginnings of an OpenBSM test framework can now be found in openbsm/test. + This code is not built or installed by default. +- auditd now assigns more appropriate syslog levels to its debugging and + error information. +- Support for audit filters introduced: audit filters are dynamically + loaded shared objects that run in the context of a new daemon, + auditfilterd. The daemon reads from an audit pipe and feeds both BSM and + parsed versions of records to shared objects using a module API. This + will provide a framework for the writing of intrusion detection services. +- New utility API, audit_submit(), added to capture common elements of audit + record submission for many applications. + +OpenBSM 1.0 alpha 5 + +- Update install notes to indicate /etc files are to be installed manually. +- On systems without LOG_SECURITY, use LOG_AUTH. +- Convert to autoconf/automake in order to move to a more portable (not + BSD-specific) build infrastructure, and more easy conditional building of + components. Currently, the primary feature loss is that automake does + not have native support for manual symlinks. This will be addressed in a + future OpenBSM release. +- Add compat/queue.h, to be used on systems dated BSD queue macro libraries + (as found on Linux). +- Rename CHANGELOG to HISTORY, as our change log doesn't follow some of the + existing conventions for a CHANGELOG. +- Some private data structures moved from audit.h to audit_internal.h to + prevent inappropriate use by applications and name space pollution. +- Improved detection and use of endian macros using autoconf. +- Avoid non-portable use of struct in6_addr, which is largely opaque. +- Avoid leaking BSD kernel socket related token code to user space in + bsm_token.c. +- Teach System V IPC calls to look for Linux naming variations for certain + struct ipc_perm fields. +- Test for audit system calls, and if not present, don't build + bsm_wrappers.c, bsm_notify.c, audit(8), and auditd(8), which rely on + those system calls. +- au_close() is not implemented on systems that don't have audit system + calls, but au_close_buffer() is. +- Work around missing BSDisms in bsm_wrapper.c. +- Fix nested includes so including libbsm.h in an application on Linux + picks up the necessary definitions. + +OpenBSM 1.0 alpha 4 + +- Remove "audit" user example from audit_user, as it's not present on most + systems. +- Add cannot_audit() function non-Darwin systems that wraps auditon(); + required by OpenSSH BSM support. Convert Darwin cannot_audit() into a + function rather than a macro. +- Library build fixed on Darwin following include file tweaks. The native + Darwin sys/audit.h conflicts with bsm/audit.h due to duplicate types, so + for now we force bsm_wrappers.c to not perform a nested include of + sys/audit.h. + +OpenBSM 1.0 alpha 3 + +- Man page formatting, cross reference, mlinks, and accuracy improvements. +- auditd and tools now compile and run on FreeBSD/arm. +- auditd will now fchown() the trail file to the audit review group, if + defined at compile-time. +- Added AUE_SYSARCH for FreeBSD. +- Definition of AUE_SETFSGID fixed for Linux. + +OpenBSM 1.0 alpha 2 + +- Man page formatting improvements. +- A number of new audit event identifiers for FreeBSD, Linux, and POSIX.1b + events. +- Remove 'tfm' class, unused in OpenBSM. + +OpenBSM 1.0 alpha 1 + +- Import of Darwin74 BSM drop +- Use 'syslog' for audit log warnings, rather than echoing to a file in + audit_warn. +- Compile using BSD make infrastructure. +- Integrate bsm/ include files from Darwin74 XNU drop into OpenBSM. +- Narrow set of symbols and defines that are exposed in user space: don't + compile in code relying on kernel-only types such as 'struct socket'. +- Add README, including basic build documentation. +- Compilation of Apple-specific notify and Machroutines now #ifdef __APPLE__. +- Staticize libbsm global variables to avoid leakage into application. +- Add free_au_user_ent() so that au_user_ent's don't have to be leaked. +- Clean up bogus nul-termination checks in libbsm. +- Add libbsm API man pages: au_class.3 au_control.3 au_event.3 + au_free_token.3 au_io.3 au_mask.3 au_token.3 au_user.3 libbsm.3. +- Add man pages for BSM system calls: audit.2 auditctl.2 auditon.2 getaudit.2 + getauid.2 setaudit.2 setauid.2 +- Modify various libbsm interfaces to more consistently return 'errno' values + on failure. +- Break out au_close() into constituent parts, allowing records to be written + to memory as well as files. +- Prefix various defines with 'BSM_' to reduce name space pollution. +- Added audit_internal.h, which can be used by a kernel audit implementation + wanting to rely on libbsm components. +- Build with warnings, and eliminate warnings. +- Make libbsm endian-independent, storing and reading BSM are big endian + (network byte order) rather than native byte order. More consistently + print IP addresses using the IP address print routine. These changes + make use of sys/endian.h from *BSD; since this isn't present on Darwin, + add it to OpenBSM as compat/endian.h, which is used only on Darwin. +- Import of Darwin80 BSM drop, including 64-bit file IDs, better + documentation of private APIs, and bug fixes. +- White space cleanup. +- Add audit.log.5, a first cut at a man page documenting the BSM file format. +- Teach au_read_rec() to recognize stand-alone file tokens, which are present + at the beginning and end of Solaris audit trails. Technically, these + appear to violate the high level BSM spec, which suggests that all tokens + are present in records, but need to be supported. +- Implement HEADER64, ATTR64, SUBJECT64 token types, which make it possible + to run praudit(1) on basic Solaris BSM streams. +- Switched to Solaris spelling of token names; Darwin spellings are now + deprecated and will be removed in a future version of OpenBSM. +- Adopt Solaris model for representing IPv4 and IPv6 addresses. +- Prefer C99 types. +- Attempt to universally adopt the BSD style(9) coding style for + consistency. +- auditreduce(1) now has a usage message. +- Update support for auditctl(2) system call to support FreeBSD. +- Add support for /dev/audit as the trigger source on FreeBSD. +- Add additional event types for Darwin, FreeBSD, and Solaris. Annotate + conflicts (there are a few, unfortunately). Correct spellings, comment, + sort, etc. These include {get,set}res[ug]id(), sendfile(), lchflags(), + eaccess(), kqueue(), kevent(), poll(), lchmod(). +- Relicensed under a BSD license, many thanks to Apple, Inc! +- Many bug fixes, cleanups, thread safety in the class, control, event, + and user system audit databases. Annotate some persisting atomicity + bugs associated with the API and implementation. +- Add audump test tool. +- Adopt OpenSolaris BSM API memory semantics: caller allocates memory, + or static memory is returned for non-_r() versions of API calls. + _free() calls dropped as a result, and source code compatibility with + OpenSolaris improved significantly. +- Annotate BSM events with origin OS and compatibility information. +- auditd(8), audit(8) added to the OpenBSM distribution. auditd extended + to support reloading of kernel event table. +- Allow comments in /etc/security configuration files. + +$P4: //depot/projects/trustedbsd/openbsm/HISTORY#57 $ Copied: vendor/openbsm/dist/LICENSE (from r184898, vendor/openbsm/dist/contrib/openbsm/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/LICENSE Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/LICENSE) @@ -0,0 +1,33 @@ +OpenBSM is covered by a number of copyrights, with licenses being either two +or three clause BSD licenses. Individual file headers should be consulted +for specific copyrights on specific components. The TrustedBSD Project would +appreciate the contribution of fixes and enhancements under identical or +substantially similar licenses: + + * Copyright (c) + * All rights reserved. + * + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + +$P4: //depot/projects/trustedbsd/openbsm/LICENSE#4 $ Copied: vendor/openbsm/dist/Makefile (from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/Makefile Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/Makefile) @@ -0,0 +1,9 @@ +# +# $P4: //depot/projects/trustedbsd/openbsm/Makefile#2 $ +# + +SUBDIR= bsm \ + libbsm \ + bin + +.include Copied: vendor/openbsm/dist/Makefile.am (from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.am) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/Makefile.am Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.am) @@ -0,0 +1,17 @@ +# +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#2 $ +# + +SUBDIRS = \ + bsm \ + libbsm \ + bin \ + man \ + modules + +EXTRA_DIST = \ + CHANGELOG \ + LICENSE \ + README \ + TODO \ + VERSION Copied: vendor/openbsm/dist/Makefile.in (from r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/Makefile.in Wed Nov 12 23:48:20 2008 (r184899, copy of r184898, vendor/openbsm/dist/contrib/openbsm/Makefile.in) @@ -0,0 +1,643 @@ +# Makefile.in generated by automake 1.10 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#5 $ +# +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \ + $(top_srcdir)/configure TODO config/config.guess \ + config/config.sub config/depcomp config/install-sh \ + config/ltmain.sh config/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = \ + bsm \ + libbsm \ + bin \ + man \ + modules + +EXTRA_DIST = \ + CHANGELOG \ + LICENSE \ + README \ + TODO \ + VERSION + +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config/config.h: config/stamp-h1 + @if test ! -f $@; then \ + rm -f config/stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; \ + else :; fi + +config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status + @rm -f config/stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config/config.h +$(top_srcdir)/config/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f config/stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config/config.h config/stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 23:49:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EFC71065672; Wed, 12 Nov 2008 23:49:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278448FC0C; Wed, 12 Nov 2008 23:49:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACNnt8c043494; Wed, 12 Nov 2008 23:49:56 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACNntvY043493; Wed, 12 Nov 2008 23:49:55 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811122349.mACNntvY043493@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Nov 2008 23:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184900 - in vendor/openbsm/dist: . bin bin/audit bin/auditd bin/auditfilterd bin/auditreduce bin/praudit bsm compat config etc libbsm man modules modules/auditfilter_noop test test/bsm... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 23:49:56 -0000 Author: rwatson Date: Wed Nov 12 23:49:55 2008 New Revision: 184900 URL: http://svn.freebsd.org/changeset/base/184900 Log: Disable keyword exansion in OpenBSM vendor branch. Modified: vendor/openbsm/dist/CHANGELOG (props changed) vendor/openbsm/dist/HISTORY (props changed) vendor/openbsm/dist/LICENSE (props changed) vendor/openbsm/dist/Makefile (props changed) vendor/openbsm/dist/Makefile.am (props changed) vendor/openbsm/dist/Makefile.in (props changed) vendor/openbsm/dist/README (props changed) vendor/openbsm/dist/TODO (props changed) vendor/openbsm/dist/VERSION (props changed) vendor/openbsm/dist/aclocal.m4 (props changed) vendor/openbsm/dist/autogen.sh (props changed) vendor/openbsm/dist/bin/Makefile (props changed) vendor/openbsm/dist/bin/Makefile.am (props changed) vendor/openbsm/dist/bin/Makefile.in (props changed) vendor/openbsm/dist/bin/audit/Makefile (props changed) vendor/openbsm/dist/bin/audit/Makefile.am (props changed) vendor/openbsm/dist/bin/audit/Makefile.in (props changed) vendor/openbsm/dist/bin/audit/audit.8 (props changed) vendor/openbsm/dist/bin/audit/audit.c (props changed) vendor/openbsm/dist/bin/auditd/Makefile (props changed) vendor/openbsm/dist/bin/auditd/Makefile.am (props changed) vendor/openbsm/dist/bin/auditd/Makefile.in (props changed) vendor/openbsm/dist/bin/auditd/audit_warn.c (props changed) vendor/openbsm/dist/bin/auditd/auditd.8 (props changed) vendor/openbsm/dist/bin/auditd/auditd.c (props changed) vendor/openbsm/dist/bin/auditd/auditd.h (props changed) vendor/openbsm/dist/bin/auditfilterd/Makefile.am (props changed) vendor/openbsm/dist/bin/auditfilterd/Makefile.in (props changed) vendor/openbsm/dist/bin/auditfilterd/auditfilterd.8 (props changed) vendor/openbsm/dist/bin/auditfilterd/auditfilterd.c (props changed) vendor/openbsm/dist/bin/auditfilterd/auditfilterd.h (props changed) vendor/openbsm/dist/bin/auditfilterd/auditfilterd_conf.c (props changed) vendor/openbsm/dist/bin/auditreduce/Makefile (props changed) vendor/openbsm/dist/bin/auditreduce/Makefile.am (props changed) vendor/openbsm/dist/bin/auditreduce/Makefile.in (props changed) vendor/openbsm/dist/bin/auditreduce/auditreduce.1 (props changed) vendor/openbsm/dist/bin/auditreduce/auditreduce.c (props changed) vendor/openbsm/dist/bin/auditreduce/auditreduce.h (props changed) vendor/openbsm/dist/bin/praudit/Makefile (props changed) vendor/openbsm/dist/bin/praudit/Makefile.am (props changed) vendor/openbsm/dist/bin/praudit/Makefile.in (props changed) vendor/openbsm/dist/bin/praudit/praudit.1 (props changed) vendor/openbsm/dist/bin/praudit/praudit.c (props changed) vendor/openbsm/dist/bsm/Makefile (props changed) vendor/openbsm/dist/bsm/Makefile.am (props changed) vendor/openbsm/dist/bsm/Makefile.in (props changed) vendor/openbsm/dist/bsm/audit.h (props changed) vendor/openbsm/dist/bsm/audit_filter.h (props changed) vendor/openbsm/dist/bsm/audit_internal.h (props changed) vendor/openbsm/dist/bsm/audit_kevents.h (props changed) vendor/openbsm/dist/bsm/audit_record.h (props changed) vendor/openbsm/dist/bsm/audit_uevents.h (props changed) vendor/openbsm/dist/bsm/libbsm.h (props changed) vendor/openbsm/dist/compat/clock_gettime.h (props changed) vendor/openbsm/dist/compat/endian.h (props changed) vendor/openbsm/dist/compat/queue.h (props changed) vendor/openbsm/dist/compat/strlcat.h (props changed) vendor/openbsm/dist/config/config.guess (props changed) vendor/openbsm/dist/config/config.h.in (props changed) vendor/openbsm/dist/config/config.sub (props changed) vendor/openbsm/dist/config/depcomp (props changed) vendor/openbsm/dist/config/install-sh (props changed) vendor/openbsm/dist/config/ltmain.sh (props changed) vendor/openbsm/dist/config/missing (props changed) vendor/openbsm/dist/configure (props changed) vendor/openbsm/dist/configure.ac (props changed) vendor/openbsm/dist/etc/audit_class (props changed) vendor/openbsm/dist/etc/audit_control (props changed) vendor/openbsm/dist/etc/audit_event (props changed) vendor/openbsm/dist/etc/audit_filter (props changed) vendor/openbsm/dist/etc/audit_user (props changed) vendor/openbsm/dist/etc/audit_warn (props changed) vendor/openbsm/dist/libbsm/Makefile (props changed) vendor/openbsm/dist/libbsm/Makefile.am (props changed) vendor/openbsm/dist/libbsm/Makefile.in (props changed) vendor/openbsm/dist/libbsm/au_class.3 (props changed) vendor/openbsm/dist/libbsm/au_control.3 (props changed) vendor/openbsm/dist/libbsm/au_event.3 (props changed) vendor/openbsm/dist/libbsm/au_free_token.3 (props changed) vendor/openbsm/dist/libbsm/au_io.3 (props changed) vendor/openbsm/dist/libbsm/au_mask.3 (props changed) vendor/openbsm/dist/libbsm/au_open.3 (props changed) vendor/openbsm/dist/libbsm/au_token.3 (props changed) vendor/openbsm/dist/libbsm/au_user.3 (props changed) vendor/openbsm/dist/libbsm/audit_submit.3 (props changed) vendor/openbsm/dist/libbsm/bsm_audit.c (props changed) vendor/openbsm/dist/libbsm/bsm_class.c (props changed) vendor/openbsm/dist/libbsm/bsm_control.c (props changed) vendor/openbsm/dist/libbsm/bsm_event.c (props changed) vendor/openbsm/dist/libbsm/bsm_flags.c (props changed) vendor/openbsm/dist/libbsm/bsm_io.c (props changed) vendor/openbsm/dist/libbsm/bsm_mask.c (props changed) vendor/openbsm/dist/libbsm/bsm_notify.c (props changed) vendor/openbsm/dist/libbsm/bsm_token.c (props changed) vendor/openbsm/dist/libbsm/bsm_user.c (props changed) vendor/openbsm/dist/libbsm/bsm_wrappers.c (props changed) vendor/openbsm/dist/libbsm/libbsm.3 (props changed) vendor/openbsm/dist/man/Makefile (props changed) vendor/openbsm/dist/man/Makefile.am (props changed) vendor/openbsm/dist/man/Makefile.in (props changed) vendor/openbsm/dist/man/audit.2 (props changed) vendor/openbsm/dist/man/audit.log.5 (props changed) vendor/openbsm/dist/man/audit_class.5 (props changed) vendor/openbsm/dist/man/audit_control.5 (props changed) vendor/openbsm/dist/man/audit_event.5 (props changed) vendor/openbsm/dist/man/audit_user.5 (props changed) vendor/openbsm/dist/man/audit_warn.5 (props changed) vendor/openbsm/dist/man/auditctl.2 (props changed) vendor/openbsm/dist/man/auditon.2 (props changed) vendor/openbsm/dist/man/getaudit.2 (props changed) vendor/openbsm/dist/man/getauid.2 (props changed) vendor/openbsm/dist/man/setaudit.2 (props changed) vendor/openbsm/dist/man/setauid.2 (props changed) vendor/openbsm/dist/modules/Makefile.am (props changed) vendor/openbsm/dist/modules/Makefile.in (props changed) vendor/openbsm/dist/modules/auditfilter_noop/Makefile.am (props changed) vendor/openbsm/dist/modules/auditfilter_noop/Makefile.in (props changed) vendor/openbsm/dist/modules/auditfilter_noop/auditfilter_noop.c (props changed) vendor/openbsm/dist/test/Makefile.am (props changed) vendor/openbsm/dist/test/Makefile.in (props changed) vendor/openbsm/dist/test/bsm/Makefile.am (props changed) vendor/openbsm/dist/test/bsm/Makefile.in (props changed) vendor/openbsm/dist/test/bsm/generate.c (props changed) vendor/openbsm/dist/tools/Makefile (props changed) vendor/openbsm/dist/tools/Makefile.am (props changed) vendor/openbsm/dist/tools/Makefile.in (props changed) vendor/openbsm/dist/tools/audump.c (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Nov 12 23:53:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E0231065670; Wed, 12 Nov 2008 23:53:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4F248FC0C; Wed, 12 Nov 2008 23:53:56 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mACNrurC043625; Wed, 12 Nov 2008 23:53:56 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mACNrubn043624; Wed, 12 Nov 2008 23:53:56 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811122353.mACNrubn043624@svn.freebsd.org> From: Robert Watson Date: Wed, 12 Nov 2008 23:53:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184901 - head/contrib/openbsm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 23:53:57 -0000 Author: rwatson Date: Wed Nov 12 23:53:56 2008 New Revision: 184901 URL: http://svn.freebsd.org/changeset/base/184901 Log: Bootstrap merge history for OpenBSM. Modified: head/contrib/openbsm/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 00:04:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 291E2106568E; Thu, 13 Nov 2008 00:04:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 101388FC1B; Thu, 13 Nov 2008 00:04:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD04FCb043960; Thu, 13 Nov 2008 00:04:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD04FkR043943; Thu, 13 Nov 2008 00:04:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811130004.mAD04FkR043943@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Nov 2008 00:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184902 - in vendor/openbsm/dist: . bin bin/audit bin/auditd bin/auditfilterd bin/auditreduce bin/praudit bsm compat config etc libbsm man modules modules/auditfilter_noop sys sys/bsm t... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 00:04:16 -0000 Author: rwatson Date: Thu Nov 13 00:04:15 2008 New Revision: 184902 URL: http://svn.freebsd.org/changeset/base/184902 Log: Vendor import of OpenBSM 1.1 alpha2, which incorporates the following changes since the last imported OpenBSM release: OpenBSM 1.1 alpha 2 - Include files in OpenBSM are now broken out into two parts: library builds required solely for user space, and system includes, which may also be required for use in the kernels of systems integrating OpenBSM. Submitted by Stacey Son. - Configure option --with-native-includes allows forcing the use of native include for system includes, rather than the versions bundled with OpenBSM. This is intended specifically for platforms that ship OpenBSM, have adapted versions of the system includes in a kernel source tree, and will use the OpenBSM build infrastructure with an unmodified OpenBSM distribution, allowing the customized system includes to be used with the OpenBSM build. Submitted by Stacey Son. - Various strcpy()'s/strcat()'s have been changed to strlcpy()'s/strlcat()'s or asprintf(). Added compat/strlcpy.h for Linux. - Remove compatibility defines for old Darwin token constant names; now only BSM token names are provided and used. - Add support for extended header tokens, which contain space for information on the host generating the record. - Add support for setting extended host information in the kernel, which is used for setting host information in extended header tokens. The audit_control file now supports a "host" parameter which can be used by auditd to set the information; if not present, the kernel parameters won't be set and auditd uses unextended headers for records that it generates. OpenBSM 1.1 alpha 1 - Add option to auditreduce(1) which allows users to invert sense of matching, such that BSM records that do not match, are selected. - Fix bug in audit_write() where we commit an incomplete record in the event there is an error writing the subject token. This was submitted by Diego Giagio. - Build support for Mac OS X 10.5.1 submitted by Eric Hall. - Fix a bug which resulted in host XML attributes not beingguments so that const strings can be passed as arguments to tokens. This patch was submitted by Xin LI. - Modify the -m option so users can select more then one audit event. - For Mac OS X, added Mach IPC support for audit trigger messages. - Fixed a bug in getacna() which resulted in a locking problem on Mac OS X. - Added LOG_PERROR flag to openlog when -d option is used with auditd. - AUE events added for Mac OS X Leopard system calls. Obtained from: TrustedBSD Project Sponsored by: Apple Inc. Added: vendor/openbsm/dist/CREDITS vendor/openbsm/dist/INSTALL vendor/openbsm/dist/NEWS vendor/openbsm/dist/bin/auditd/audit_triggers.defs vendor/openbsm/dist/bin/auditd/auditd_control.defs vendor/openbsm/dist/compat/strlcpy.h (contents, props changed) vendor/openbsm/dist/sys/ vendor/openbsm/dist/sys/Makefile.am (contents, props changed) vendor/openbsm/dist/sys/Makefile.in (contents, props changed) vendor/openbsm/dist/sys/bsm/ vendor/openbsm/dist/sys/bsm/Makefile.am (contents, props changed) vendor/openbsm/dist/sys/bsm/Makefile.in (contents, props changed) vendor/openbsm/dist/sys/bsm/audit.h (contents, props changed) vendor/openbsm/dist/sys/bsm/audit_internal.h (contents, props changed) vendor/openbsm/dist/sys/bsm/audit_kevents.h (contents, props changed) vendor/openbsm/dist/sys/bsm/audit_record.h (contents, props changed) Deleted: vendor/openbsm/dist/CHANGELOG vendor/openbsm/dist/HISTORY vendor/openbsm/dist/Makefile vendor/openbsm/dist/bin/Makefile vendor/openbsm/dist/bin/audit/Makefile vendor/openbsm/dist/bin/auditd/Makefile vendor/openbsm/dist/bin/auditreduce/Makefile vendor/openbsm/dist/bin/praudit/Makefile vendor/openbsm/dist/bsm/Makefile vendor/openbsm/dist/bsm/audit.h vendor/openbsm/dist/bsm/audit_internal.h vendor/openbsm/dist/bsm/audit_kevents.h vendor/openbsm/dist/bsm/audit_record.h vendor/openbsm/dist/libbsm/Makefile vendor/openbsm/dist/man/Makefile vendor/openbsm/dist/test/reference/process32ex_record vendor/openbsm/dist/test/reference/process32ex_token vendor/openbsm/dist/tools/Makefile Modified: vendor/openbsm/dist/LICENSE vendor/openbsm/dist/Makefile.am vendor/openbsm/dist/Makefile.in vendor/openbsm/dist/README vendor/openbsm/dist/TODO vendor/openbsm/dist/VERSION vendor/openbsm/dist/bin/Makefile.in vendor/openbsm/dist/bin/audit/Makefile.am vendor/openbsm/dist/bin/audit/Makefile.in vendor/openbsm/dist/bin/audit/audit.8 vendor/openbsm/dist/bin/audit/audit.c vendor/openbsm/dist/bin/auditd/Makefile.am vendor/openbsm/dist/bin/auditd/Makefile.in vendor/openbsm/dist/bin/auditd/audit_warn.c vendor/openbsm/dist/bin/auditd/auditd.8 vendor/openbsm/dist/bin/auditd/auditd.c vendor/openbsm/dist/bin/auditd/auditd.h vendor/openbsm/dist/bin/auditfilterd/Makefile.am vendor/openbsm/dist/bin/auditfilterd/Makefile.in vendor/openbsm/dist/bin/auditfilterd/auditfilterd.c vendor/openbsm/dist/bin/auditreduce/Makefile.am vendor/openbsm/dist/bin/auditreduce/Makefile.in vendor/openbsm/dist/bin/auditreduce/auditreduce.1 vendor/openbsm/dist/bin/auditreduce/auditreduce.c vendor/openbsm/dist/bin/auditreduce/auditreduce.h vendor/openbsm/dist/bin/praudit/Makefile.am vendor/openbsm/dist/bin/praudit/Makefile.in vendor/openbsm/dist/bin/praudit/praudit.1 vendor/openbsm/dist/bin/praudit/praudit.c vendor/openbsm/dist/bsm/Makefile.am vendor/openbsm/dist/bsm/Makefile.in vendor/openbsm/dist/bsm/audit_uevents.h vendor/openbsm/dist/bsm/libbsm.h vendor/openbsm/dist/compat/clock_gettime.h vendor/openbsm/dist/compat/strlcat.h vendor/openbsm/dist/config/config.h.in vendor/openbsm/dist/configure vendor/openbsm/dist/configure.ac vendor/openbsm/dist/etc/audit_event vendor/openbsm/dist/libbsm/Makefile.am vendor/openbsm/dist/libbsm/Makefile.in vendor/openbsm/dist/libbsm/au_class.3 vendor/openbsm/dist/libbsm/au_free_token.3 vendor/openbsm/dist/libbsm/au_token.3 vendor/openbsm/dist/libbsm/audit_submit.3 vendor/openbsm/dist/libbsm/bsm_audit.c vendor/openbsm/dist/libbsm/bsm_class.c vendor/openbsm/dist/libbsm/bsm_control.c vendor/openbsm/dist/libbsm/bsm_event.c vendor/openbsm/dist/libbsm/bsm_flags.c vendor/openbsm/dist/libbsm/bsm_io.c vendor/openbsm/dist/libbsm/bsm_mask.c vendor/openbsm/dist/libbsm/bsm_notify.c vendor/openbsm/dist/libbsm/bsm_token.c vendor/openbsm/dist/libbsm/bsm_user.c vendor/openbsm/dist/libbsm/bsm_wrappers.c vendor/openbsm/dist/man/Makefile.in vendor/openbsm/dist/man/audit.2 vendor/openbsm/dist/man/audit.log.5 vendor/openbsm/dist/man/audit_class.5 vendor/openbsm/dist/man/audit_control.5 vendor/openbsm/dist/man/audit_event.5 vendor/openbsm/dist/man/audit_user.5 vendor/openbsm/dist/man/audit_warn.5 vendor/openbsm/dist/man/auditctl.2 vendor/openbsm/dist/man/auditon.2 vendor/openbsm/dist/man/getaudit.2 vendor/openbsm/dist/man/getauid.2 vendor/openbsm/dist/man/setaudit.2 vendor/openbsm/dist/man/setauid.2 vendor/openbsm/dist/modules/Makefile.in vendor/openbsm/dist/modules/auditfilter_noop/Makefile.am vendor/openbsm/dist/modules/auditfilter_noop/Makefile.in vendor/openbsm/dist/modules/auditfilter_noop/auditfilter_noop.c vendor/openbsm/dist/test/Makefile.am vendor/openbsm/dist/test/Makefile.in vendor/openbsm/dist/test/bsm/Makefile.am vendor/openbsm/dist/test/bsm/Makefile.in vendor/openbsm/dist/tools/Makefile.am vendor/openbsm/dist/tools/Makefile.in Added: vendor/openbsm/dist/CREDITS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/CREDITS Thu Nov 13 00:04:15 2008 (r184902) @@ -0,0 +1,33 @@ +OpenBSM Credits + +The following organizations and individuals have contributed substantially to +the development of OpenBSM: + + Apple Inc. + McAfee Research, McAfee, Inc. + SPARTA, Inc. + Robert Watson + Wayne Salamon + Suresh Krishnaswamy + Kevin Van Vechten + Tom Rhodes + Wojciech Koszek + Chunyang Yuan + Poul-Henning Kamp + Christian Brueffer + Olivier Houchard + Christian Peron + Martin Fong + Pawel Worach + Martin Englund + Ruslan Ermilov + Martin Voros + Diego Giagio + Alex Samorukov + Eric Hall + Xin LI + Stacey Son + +In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel +Software's FlexeLint tool were used to identify a number of bugs in the +OpenBSM implementation. Added: vendor/openbsm/dist/INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/INSTALL Thu Nov 13 00:04:15 2008 (r184902) @@ -0,0 +1,29 @@ +OpenBSM Build and Installation Instructions + +OpenBSM is currently built using autoconf and automake, which should allow +for building on a range of operating systems, including FreeBSD, Mac OS X, +and Linux. Depending on the availability of audit facilities in the +underlying operating system, some components that depend on kernel audit +support are built conditionally. Typically, build will be performed using: + + ./configure + make + +To install, use: + + make install + +You may wish to specify that the OpenBSM components not be installed in the +base system, rather in a specific directory. This may be done using the +--prefix argument to configure. If installing to a specific directory, +remember to update your library path so that running tools from that +directory the correct libbsm is used: + + ./configure --prefix=/home/rwatson/openbsm + make + make install + LD_LIBRARY_PATH=/home/rwatson/openbsm/libbsm ; export LD_LIBRARY_PATH + +You will need to manually propagate openbsm/etc/* into /etc/security on your +system; this is not done automatically so as to avoid disrupting the current +configuration. Currently, the locations of these files is not configurable. Modified: vendor/openbsm/dist/LICENSE ============================================================================== --- vendor/openbsm/dist/LICENSE Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/LICENSE Thu Nov 13 00:04:15 2008 (r184902) @@ -1,3 +1,5 @@ +OpenBSM Copyrights and Licensing + OpenBSM is covered by a number of copyrights, with licenses being either two or three clause BSD licenses. Individual file headers should be consulted for specific copyrights on specific components. The TrustedBSD Project would @@ -30,4 +32,4 @@ substantially similar licenses: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. -$P4: //depot/projects/trustedbsd/openbsm/LICENSE#4 $ +$P4: //depot/projects/trustedbsd/openbsm/LICENSE#5 $ Modified: vendor/openbsm/dist/Makefile.am ============================================================================== --- vendor/openbsm/dist/Makefile.am Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/Makefile.am Thu Nov 13 00:04:15 2008 (r184902) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#2 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#3 $ # SUBDIRS = \ @@ -7,7 +7,8 @@ SUBDIRS = \ libbsm \ bin \ man \ - modules + modules \ + sys EXTRA_DIST = \ CHANGELOG \ Modified: vendor/openbsm/dist/Makefile.in ============================================================================== --- vendor/openbsm/dist/Makefile.in Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/Makefile.in Thu Nov 13 00:04:15 2008 (r184902) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#5 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#8 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -38,7 +38,7 @@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \ - $(top_srcdir)/configure TODO config/config.guess \ + $(top_srcdir)/configure INSTALL NEWS TODO config/config.guess \ config/config.sub config/depcomp config/install-sh \ config/ltmain.sh config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -116,6 +116,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MIG = @MIG@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -187,7 +188,8 @@ SUBDIRS = \ libbsm \ bin \ man \ - modules + modules \ + sys EXTRA_DIST = \ CHANGELOG \ Added: vendor/openbsm/dist/NEWS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openbsm/dist/NEWS Thu Nov 13 00:04:15 2008 (r184902) @@ -0,0 +1,351 @@ +OpenBSM Version History + +OpenBSM 1.1 alpha 2 + +- Include files in OpenBSM are now broken out into two parts: library builds + required solely for user space, and system includes, which may also be + required for use in the kernels of systems integrating OpenBSM. Submitted + by Stacey Son. +- Configure option --with-native-includes allows forcing the use of native + include for system includes, rather than the versions bundled with OpenBSM. + This is intended specifically for platforms that ship OpenBSM, have adapted + versions of the system includes in a kernel source tree, and will use the + OpenBSM build infrastructure with an unmodified OpenBSM distribution, + allowing the customized system includes to be used with the OpenBSM build. + Submitted by Stacey Son. +- Various strcpy()'s/strcat()'s have been changed to strlcpy()'s/strlcat()'s + or asprintf(). Added compat/strlcpy.h for Linux. +- Remove compatibility defines for old Darwin token constant names; now only + BSM token names are provided and used. +- Add support for extended header tokens, which contain space for information + on the host generating the record. +- Add support for setting extended host information in the kernel, which is + used for setting host information in extended header tokens. The + audit_control file now supports a "host" parameter which can be used by + auditd to set the information; if not present, the kernel parameters won't + be set and auditd uses unextended headers for records that it generates. + +OpenBSM 1.1 alpha 1 + +- Add option to auditreduce(1) which allows users to invert sense of + matching, such that BSM records that do not match, are selected. +- Fix bug in audit_write() where we commit an incomplete record in the + event there is an error writing the subject token. This was submitted + by Diego Giagio. +- Build support for Mac OS X 10.5.1 submitted by Eric Hall. +- Fix a bug which resulted in host XML attributes not being printed + while processing extended header tokens. This patch was submitted by + Martin Voros. +- Constification of function arguments so that const strings can be passed + as arguments to tokens. This patch was submitted by Xin LI. +- Modify the -m option so users can select more then one audit event. +- For Mac OS X, added Mach IPC support for audit trigger messages. +- Fixed a bug in getacna() which resulted in a locking problem on Mac OS X. +- Added LOG_PERROR flag to openlog when -d option is used with auditd. +- AUE events added for Mac OS X Leopard system calls. + +OpenBSM 1.0 + +- Fix bug in auditreduce(1) which resulted in a memory fault/crash when + the user specified an event name with -m. +- Remove AU_.* hard-coded audit class constants, as audit classes are now + entirely dynamically configured using /etc/security/audit_class. + +OpenBSM 1.0 alpha 15 + +- Fix bug when processing in_addr_ex tokens. +- Restore the behavior of printing the string/text specified while + auditing arg32 tokens. +- Synchronized audit event list to Solaris, picking up the *at(2) system call + definitions, now required for FreeBSD and Linux. Added additional events + for *at(2) system calls not present in Solaris. +- Bugs in auditreduce(1) fixed allowing partial date strings to be used in + filtering events. + +OpenBSM 1.0 alpha 14 + +- Fix endian issues when processing IPv6 addresses for extended subject + and process tokens. +- gcc41 warnings clean. +- Teach audit_submit(3) about getaudit_addr(2). +- Add support for zonename tokens. + +OpenBSM 1.0 alpha 13 + +- compat/clock_gettime.h now provides a compatibility implementation of + clock_gettime(), which fixes building on Mac OS X. +- Countless man page improvements, markup fixes, content fixs, etc. +- XML printing support via "praudit -x". +- audit.log.5 expanded to include additional BSM token types. +- Added encoding and decoding routines for process64_ex, process32_ex, + subject32_ex, header64, and attr64 tokens. +- Additional audit event identifiers for listen, mlockall/munlockall, + getpath, POSIX message queues, and mandatory access control. + +OpenBSM 1.0 alpha 12 + +- Correct bug in auditreduce which prevented the -c option from working + correctly when the user specifies to process successful or failed events. + The problem stemmed from not having access to the return token at the time + the initial preselection occurred, but now a second preselection process + occurs while processing the return token. +- getacfilesz(3) API added to read new audit_control(5) filesz setting, + which auditd(8) now sets the kernel audit trail rotation size to. +- auditreduce(1) now uses stdin if no file names are specified on the command + line; this was the documented behavior previously, but it was not + implemented. Be more specific in auditreduce(1)'s examples section about + what might be done with the output of auditreduce. +- Add audit_warn(5) closefile event so that administrators can hook + termination of an audit trail file. For example, this might be used to + compress the trail file after it is closed. +- auditreduce(1) now uses regular expressions for pathname matching. Users can + now supply one or more (comma delimited) regular expressions for searching + the pathnames. If one of the regular expressions is prefixed with a tilde + (~), and a path matches, it will be excluded from the search results. + +OpenBSM 1.0 alpha 11 + +- Reclassify certain read/write operations as having no class rather than the + fr/fw class; our default classes audit intent (open) not operations (read, + write). +- Introduce AUE_SYSCTL_WRITE event so that BSD/Darwin systems can audit reads + and writes of sysctls as separate events. Add additional kernel + environment and jail events for FreeBSD. +- Break AUDIT_TRIGGER_OPEN_NEW into two events, AUDIT_TRIGGER_ROTATE_USER + (issued by the user audit(8) tool) and AUDIT_TRIGGER_ROTATE_KERNEL (issued + by the kernel audit implementation) so that they can be distinguished. +- Disable rate limiting of rotate requests; as the kernel doesn't retransmit + a dropped request, the log file will otherwise grow indefinitely if the + trigger is dropped. +- Improve auditd debugging output. +- Fix a number of threading related bugs in audit_control file reading + routines. +- Add APIs au_poltostr() and au_strtopol() to convert between text + representations of audit_control policy flags and the flags passed to + auditon(A_SETPOLICY) and retrieved from auditon(A_GETPOLICY). +- Add API getacpol() to return the 'policy:' entry from audit_control, an + extension to the Solaris file format to allow specification of policy + persistent flags. +- Update audump to print the audit_control policy field. +- Update auditd to read the audit_control policy field and set the kernel + policy to match it when configuring/reconfiguring. Remove the -s and -h + arguments as these policies are now set via the configuration file. If a + policy line is not found in the configuration file, continue with the + current default of setting AUDIT_CNT. +- Fix bugs in the parsing of large execve(2) arguments and environmental + variable tokens; increase maximum parsed argument and variable count. +- configure now detects strlcat(), used by policy-related functions. +- Reference token and record sample files added to test tree. + +OpenBSM 1.0 alpha 10 + +- auditd now generates complete audit records for its events, as required for + application-submitted audit records in the FreeBSD kernel audit + implementation. + +OpenBSM 1.0 alpha 9 + +- Rename many OpenBSM-specific constants and API elements containing the + strings "BSM" and "bsm" to "AUDIT" and "audit", observing that this is true + for almost all existing constants and APIs. +- Instead of passing a per-instance cookie directly into all audit filter + APIs, pass in the audit filter daemon state pointer, which is then used by + the module using an audit_filter_{get,set}cookie() API. This will allow + future service APIs provided by the filter daemon to maintain their own + state -- for example, per-module preselection state. + +OpenBSM 1.0 alpha 8 + +- Correct typo in definition of AUR_INT. +- Adopt OpenSolaris constant values for AUDIT_* configuration flags. +- Arguments to au_to_exec_args() and au_to_exec_env() no longer const. +- Add kernel versions of au_to_exec_args() and au_to_exec_env(). +- Fix exec argument type that is printed for env strings from 'arg' to 'env'. +- New OpenBSM token version number assigned, constants added for other + commonly seen version numbers. +- OpenBSM-specific events assigned numbers in the 43xxx range to avoid future + collisions with Solaris. Darwin events renamed to AUE_DARWIN_foo, as they + are now deprecated numberings. +- autoconf now detects clock_gettime(), which is not available on Darwin. +- praudit output fixes relating to arg32 and arg64 tokens. +- Maximum record size updated to 64k-1 to match Solaris record size limit. +- Various style and comment cleanups in include files. + +OpenBSM 1.0 alpha 7 + +- Adopted Solaris-compatible format for subject32_ex and subject64_ex + tokens, which previously did not correctly implement variable length + address storage. +- Prefer inttypes.h to stdint.h; enhance queue.h detection to test for + TAILQ_FOREACH_SAFE(), which is present in recent BSD queue.h's, but not + older ones. OpenBSM now builds on some FreeBSD 4.x versions. +- New event types for extended attributes, ACLs, and scheduling. + +OpenBSM 1.0 alpha 6 + +- Use AU_TO_WRITE and AU_NO_TO_WRITE for the 'keep' argument to au_close(); + previously we used hard-coded 0 and 1 values. +- Add man page for au_open(), au_write(), au_close(), and + au_close_buffer(). +- Support a more complete range of data types for the arbitrary data token: + add AUR_CHAR (alias to AUR_BYTE), remove AUR_LONG, add AUR_INT32 (alias + to AUR_INT), add AUR_INT64. +- Add au_close_token(), which allows writing a single token_t to a memory + buffer. Not likely to be used much by applications, but useful for + writing test tools. +- Modify au_to_file() so that it accepts a timeval in user space, not just + kernel -- this is not a Solaris BSM API so can be modified without + causing compatibility issues. +- Define a new API, au_to_header32_tm(), which adds a struct timeval + argument to the ordinary au_to_header32(), which is now implemented by + wrapping au_to_header32_tm() and calling gettimeofday(). #ifndef KERNEL + the APIs that invoke gettimeofday(), rather than having a variable + definition. Don't try to retrieve time zone information using + gettimeofday(), as it's not needed, and introduces possible failure + modes. +- Don't perform byte order transformations on the addr/machine fields of + the terminal ID that appears in the process32/subject32 tokens. These + are assumed to be IP addresses, and as such, to be in network byte + order. +- Universally, APIs now assume that IP addresses and ports are provided + in network byte order. APIs now generally provide these types in + network byte order when decoding. +- Beginnings of an OpenBSM test framework can now be found in openbsm/test. + This code is not built or installed by default. +- auditd now assigns more appropriate syslog levels to its debugging and + error information. +- Support for audit filters introduced: audit filters are dynamically + loaded shared objects that run in the context of a new daemon, + auditfilterd. The daemon reads from an audit pipe and feeds both BSM and + parsed versions of records to shared objects using a module API. This + will provide a framework for the writing of intrusion detection services. +- New utility API, audit_submit(), added to capture common elements of audit + record submission for many applications. + +OpenBSM 1.0 alpha 5 + +- Update install notes to indicate /etc files are to be installed manually. +- On systems without LOG_SECURITY, use LOG_AUTH. +- Convert to autoconf/automake in order to move to a more portable (not + BSD-specific) build infrastructure, and more easy conditional building of + components. Currently, the primary feature loss is that automake does + not have native support for manual symlinks. This will be addressed in a + future OpenBSM release. +- Add compat/queue.h, to be used on systems dated BSD queue macro libraries + (as found on Linux). +- Rename CHANGELOG to HISTORY, as our change log doesn't follow some of the + existing conventions for a CHANGELOG. +- Some private data structures moved from audit.h to audit_internal.h to + prevent inappropriate use by applications and name space pollution. +- Improved detection and use of endian macros using autoconf. +- Avoid non-portable use of struct in6_addr, which is largely opaque. +- Avoid leaking BSD kernel socket related token code to user space in + bsm_token.c. +- Teach System V IPC calls to look for Linux naming variations for certain + struct ipc_perm fields. +- Test for audit system calls, and if not present, don't build + bsm_wrappers.c, bsm_notify.c, audit(8), and auditd(8), which rely on + those system calls. +- au_close() is not implemented on systems that don't have audit system + calls, but au_close_buffer() is. +- Work around missing BSDisms in bsm_wrapper.c. +- Fix nested includes so including libbsm.h in an application on Linux + picks up the necessary definitions. + +OpenBSM 1.0 alpha 4 + +- Remove "audit" user example from audit_user, as it's not present on most + systems. +- Add cannot_audit() function non-Darwin systems that wraps auditon(); + required by OpenSSH BSM support. Convert Darwin cannot_audit() into a + function rather than a macro. +- Library build fixed on Darwin following include file tweaks. The native + Darwin sys/audit.h conflicts with bsm/audit.h due to duplicate types, so + for now we force bsm_wrappers.c to not perform a nested include of + sys/audit.h. + +OpenBSM 1.0 alpha 3 + +- Man page formatting, cross reference, mlinks, and accuracy improvements. +- auditd and tools now compile and run on FreeBSD/arm. +- auditd will now fchown() the trail file to the audit review group, if + defined at compile-time. +- Added AUE_SYSARCH for FreeBSD. +- Definition of AUE_SETFSGID fixed for Linux. + +OpenBSM 1.0 alpha 2 + +- Man page formatting improvements. +- A number of new audit event identifiers for FreeBSD, Linux, and POSIX.1b + events. +- Remove 'tfm' class, unused in OpenBSM. + +OpenBSM 1.0 alpha 1 + +- Import of Darwin74 BSM drop +- Use 'syslog' for audit log warnings, rather than echoing to a file in + audit_warn. +- Compile using BSD make infrastructure. +- Integrate bsm/ include files from Darwin74 XNU drop into OpenBSM. +- Narrow set of symbols and defines that are exposed in user space: don't + compile in code relying on kernel-only types such as 'struct socket'. +- Add README, including basic build documentation. +- Compilation of Apple-specific notify and Machroutines now #ifdef __APPLE__. +- Staticize libbsm global variables to avoid leakage into applications. +- Add free_au_user_ent() so that au_user_ent's don't have to be leaked. +- Clean up bogus nul-termination checks in libbsm. +- Add libbsm API man pages: au_class.3 au_control.3 au_event.3 + au_free_token.3 au_io.3 au_mask.3 au_token.3 au_user.3 libbsm.3. +- Add man pages for BSM system calls: audit.2 auditctl.2 auditon.2 getaudit.2 + getauid.2 setaudit.2 setauid.2 +- Modify various libbsm interfaces to more consistently return 'errno' values + on failure. +- Break out au_close() into constituent parts, allowing records to be written + to memory as well as files. +- Prefix various defines with 'BSM_' to reduce name space pollution. +- Added audit_internal.h, which can be used by a kernel audit implementation + wanting to rely on libbsm components. +- Build with warnings, and eliminate warnings. +- Make libbsm endian-independent, storing and reading BSM are big endian + (network byte order) rather than native byte order. More consistently + print IP addresses using the IP address print routine. These changes + make use of sys/endian.h from *BSD; since this isn't present on Darwin, + add it to OpenBSM as compat/endian.h, which is used only on Darwin. +- Import of Darwin80 BSM drop, including 64-bit file IDs, better + documentation of private APIs, and bug fixes. +- White space cleanup. +- Add audit.log.5, a first cut at a man page documenting the BSM file format. +- Teach au_read_rec() to recognize stand-alone file tokens, which are present + at the beginning and end of Solaris audit trails. Technically, these + appear to violate the high level BSM spec, which suggests that all tokens + are present in records, but need to be supported. +- Implement HEADER64, ATTR64, SUBJECT64 token types, which make it possible + to run praudit(1) on basic Solaris BSM streams. +- Switched to Solaris spelling of token names; Darwin spellings are now + deprecated and will be removed in a future version of OpenBSM. +- Adopt Solaris model for representing IPv4 and IPv6 addresses. +- Prefer C99 types. +- Attempt to universally adopt the BSD style(9) coding style for + consistency. +- auditreduce(1) now has a usage message. +- Update support for auditctl(2) system call to support FreeBSD. +- Add support for /dev/audit as the trigger source on FreeBSD. +- Add additional event types for Darwin, FreeBSD, and Solaris. Annotate + conflicts (there are a few, unfortunately). Correct spellings, comment, + sort, etc. These include {get,set}res[ug]id(), sendfile(), lchflags(), + eaccess(), kqueue(), kevent(), poll(), lchmod(). +- Relicensed under a BSD license, many thanks to Apple, Inc! +- Many bug fixes, cleanups, thread safety in the class, control, event, + and user system audit databases. Annotate some persisting atomicity + bugs associated with the API and implementation. +- Add audump test tool. +- Adopt OpenSolaris BSM API memory semantics: caller allocates memory, + or static memory is returned for non-_r() versions of API calls. + _free() calls dropped as a result, and source code compatibility with + OpenSolaris improved significantly. +- Annotate BSM events with origin OS and compatibility information. +- auditd(8), audit(8) added to the OpenBSM distribution. auditd extended + to support reloading of kernel event table. +- Allow comments in /etc/security configuration files. + +$P4: //depot/projects/trustedbsd/openbsm/NEWS#9 $ Modified: vendor/openbsm/dist/README ============================================================================== --- vendor/openbsm/dist/README Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/README Thu Nov 13 00:04:15 2008 (r184902) @@ -1,4 +1,4 @@ -OpenBSM 1.0 +OpenBSM 1.1 alpha 1 Introduction @@ -16,12 +16,13 @@ may be found in the FreeBSD and Mac OS X OpenBSM consists of several directories: bin/ Audit-related command line tools - bsm/ System include files for BSM + bsm/ Library include files for BSM compat/ Compatibility code to build on various OS's etc/ Sample /etc/security configuration files libbsm/ Implementation of BSM library interfaces and man pages man/ System call and configuration file man pages modules/ Directory for auditfilterd module source + sys/ System include files for BSM test/ Test token sets and geneneration program tools/ Tool directory, including audump to dump databases @@ -34,66 +35,9 @@ The following programs are included with audump Debugging tool to parse and print audit databases praudit Tool to print audit trails - Building + Build and Installation -OpenBSM is currently built using autoconf and automake, which should allow -for building on a range of operating systems, including FreeBSD, Mac OS X, -and Linux. Depending on the availability of audit facilities in the -underlying operating system, some components that depend on kernel audit -support are built conditionally. Typically, build will be performed using: - - ./configure - make - -To install, use: - - make install - -You may wish to specify that the OpenBSM components not be installed in the -base system, rather in a specific directory. This may be done using the ---prefix argument to configure. If installing to a specific directory, -remember to update your library path so that running tools from that -directory the correct libbsm is used: - - ./configure --prefix=/home/rwatson/openbsm - make - make install - LD_LIBRARY_PATH=/home/rwatson/openbsm/libbsm ; export LD_LIBRARY_PATH - -You will need to manually propagate openbsm/etc/* into /etc on your system; -this is not done automatically so as to avoid disrupting the current -configuration. Currently, the locations of these files is not configurable. - - Credits - -The following organizations and individuals have contributed substantially to -the development of OpenBSM: - - Apple Computer, Inc. - McAfee Research, McAfee, Inc. - SPARTA, Inc. - Robert Watson - Wayne Salamon - Suresh Krishnaswamy - Kevin Van Vechten - Tom Rhodes - Wojciech Koszek - Chunyang Yuan - Poul-Henning Kamp - Christian Brueffer - Olivier Houchard - Christian Peron - Martin Fong - Pawel Worach - Martin Englund - Ruslan Ermilov - Martin Voros - Diego Giagio - Alex Samorukov - -In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel -Software's FlexeLint tool were used to identify a number of bugs in the -OpenBSM implementation. +Please see the file INSTALL for build and installation instructions. Contributions @@ -111,4 +55,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#24 $ +$P4: //depot/projects/trustedbsd/openbsm/README#32 $ Modified: vendor/openbsm/dist/TODO ============================================================================== --- vendor/openbsm/dist/TODO Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/TODO Thu Nov 13 00:04:15 2008 (r184902) @@ -1,5 +1,5 @@ -- Teach libbsm about any additional 64-bit token types that are present - in more recent Solaris versions. +OpenBSM TODO + - Build a regression test suite for libbsm that generates each token type and then compares the results with known good data. Make sure to test that things work properly with respect to endianness of the local @@ -18,5 +18,7 @@ trailer context. - Put hostname in trail file name. - Document audit_warn event arguments. +- Allow the path /etc/security to be configured at configure-time so that + alternative locations can be used. -$P4: //depot/projects/trustedbsd/openbsm/TODO#9 $ +$P4: //depot/projects/trustedbsd/openbsm/TODO#11 $ Modified: vendor/openbsm/dist/VERSION ============================================================================== --- vendor/openbsm/dist/VERSION Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/VERSION Thu Nov 13 00:04:15 2008 (r184902) @@ -1 +1 @@ -OPENBSM_1_0 +OPENBSM_1_1_ALPHA_2 Modified: vendor/openbsm/dist/bin/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/Makefile.in Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/Makefile.in Thu Nov 13 00:04:15 2008 (r184902) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#5 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#8 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -104,6 +104,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MIG = @MIG@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ Modified: vendor/openbsm/dist/bin/audit/Makefile.am ============================================================================== --- vendor/openbsm/dist/bin/audit/Makefile.am Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/audit/Makefile.am Thu Nov 13 00:04:15 2008 (r184902) @@ -1,10 +1,23 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#1 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#4 $ # -INCLUDES = -I$(top_srcdir) +if USE_NATIVE_INCLUDES +INCLUDES = -I$(top_builddir) -I$(top_srcdir) +else +INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys +endif sbin_PROGRAMS = audit -audit_SOURCES = audit.c audit_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = audit.8 + +if USE_MACH_IPC +audit_SOURCES = auditd_control_user.c audit.c +CLEANFILES = auditd_control_user.c auditd_control_user.h + +auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs + $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs +else +audit_SOURCES = audit.c +endif Modified: vendor/openbsm/dist/bin/audit/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/audit/Makefile.in Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/audit/Makefile.in Thu Nov 13 00:04:15 2008 (r184902) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#9 $ # VPATH = @srcdir@ @@ -49,7 +49,10 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am_audit_OBJECTS = audit.$(OBJEXT) +am__audit_SOURCES_DIST = audit.c auditd_control_user.c +@USE_MACH_IPC_FALSE@am_audit_OBJECTS = audit.$(OBJEXT) +@USE_MACH_IPC_TRUE@am_audit_OBJECTS = auditd_control_user.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit.$(OBJEXT) audit_OBJECTS = $(am_audit_OBJECTS) audit_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@ @@ -65,7 +68,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLF --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(audit_SOURCES) -DIST_SOURCES = $(audit_SOURCES) +DIST_SOURCES = $(am__audit_SOURCES_DIST) man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man8_MANS) @@ -113,6 +116,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MIG = @MIG@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -179,10 +183,13 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_srcdir) -audit_SOURCES = audit.c +@USE_NATIVE_INCLUDES_FALSE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys +@USE_NATIVE_INCLUDES_TRUE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) audit_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = audit.8 +@USE_MACH_IPC_FALSE@audit_SOURCES = audit.c +@USE_MACH_IPC_TRUE@audit_SOURCES = auditd_control_user.c audit.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_user.c auditd_control_user.h all: all-am .SUFFIXES: @@ -255,6 +262,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_user.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -426,6 +434,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -511,6 +520,9 @@ uninstall-man: uninstall-man8 tags uninstall uninstall-am uninstall-man uninstall-man8 \ uninstall-sbinPROGRAMS + +@USE_MACH_IPC_TRUE@auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: vendor/openbsm/dist/bin/audit/audit.8 ============================================================================== --- vendor/openbsm/dist/bin/audit/audit.8 Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/audit/audit.8 Thu Nov 13 00:04:15 2008 (r184902) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2004 Apple Computer, Inc. +.\" Copyright (c) 2004 Apple Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -10,7 +10,7 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of +.\" 3. Neither the name of Apple Inc. ("Apple") nor the names of .\" its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#10 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#11 $ .\" .Dd October 2, 2006 .Dt AUDIT 8 Modified: vendor/openbsm/dist/bin/audit/audit.c ============================================================================== --- vendor/openbsm/dist/bin/audit/audit.c Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/audit/audit.c Thu Nov 13 00:04:15 2008 (r184902) @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2005 Apple Computer, Inc. +/*- + * Copyright (c) 2005-2008 Apple Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +11,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#8 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#11 $ */ /* * Program to trigger the audit daemon with a message that is either: @@ -37,7 +37,12 @@ */ #include +#include +#ifdef HAVE_FULL_QUEUE_H #include +#else /* !HAVE_FULL_QUEUE_H */ +#include +#endif /* !HAVE_FULL_QUEUE_H */ #include #include @@ -47,6 +52,58 @@ #include #include + +static int send_trigger(unsigned int); + +#ifdef USE_MACH_IPC +#include +#include +#include +#include +#include +#include +#include + +#include "auditd_control_user.h" + +static int +send_trigger(unsigned int trigger) +{ + mach_port_t serverPort; + kern_return_t error; + + error = host_get_audit_control_port(mach_host_self(), &serverPort); + if (error != KERN_SUCCESS) { + mach_error("Cannot get auditd_control Mach port: ", error); + return (-1); + } + + error = auditd_control(serverPort, trigger); + if (error != KERN_SUCCESS) { + mach_error("Error sending trigger: ", error); + return (-1); + } + + return (0); +} + +#else /* ! USE_MACH_IPC */ + +static int +send_trigger(unsigned int trigger) +{ + int error; + + error = auditon(A_SENDTRIGGER, &trigger, sizeof(trigger)); + if (error != 0) { + perror("Error sending trigger"); + return (-1); + } + + return (0); +} +#endif /* ! USE_MACH_IPC */ + static void usage(void) { @@ -88,11 +145,9 @@ main(int argc, char **argv) break; } } - if (auditon(A_SENDTRIGGER, &trigger, sizeof(trigger)) < 0) { - perror("Error sending trigger"); + if (send_trigger(trigger) < 0) exit(-1); - } else { - printf("Trigger sent.\n"); - exit (0); - } + + printf("Trigger sent.\n"); + exit (0); } Modified: vendor/openbsm/dist/bin/auditd/Makefile.am ============================================================================== --- vendor/openbsm/dist/bin/auditd/Makefile.am Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/auditd/Makefile.am Thu Nov 13 00:04:15 2008 (r184902) @@ -1,10 +1,26 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#1 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#4 $ # -INCLUDES = -I$(top_srcdir) +if USE_NATIVE_INCLUDES +INCLUDES = -I$(top_builddir) -I$(top_srcdir) +else +INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys +endif sbin_PROGRAMS = auditd -auditd_SOURCES = audit_warn.c auditd.c auditd_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = auditd.8 + +if USE_MACH_IPC +auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c +CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h + +auditd_control_server.c: auditd_control.defs + $(MIG) -user /dev/null -header /dev/null -server auditd_control_server.c -sheader auditd_control_server.h $(top_srcdir)/bin/auditd/auditd_control.defs + +audit_triggers_server.c: audit_triggers.defs + $(MIG) -user /dev/null -header /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h $(top_srcdir)/bin/auditd/audit_triggers.defs +else +auditd_SOURCES = audit_warn.c auditd.c +endif Modified: vendor/openbsm/dist/bin/auditd/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/auditd/Makefile.in Wed Nov 12 23:53:56 2008 (r184901) +++ vendor/openbsm/dist/bin/auditd/Makefile.in Thu Nov 13 00:04:15 2008 (r184902) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#9 $ # VPATH = @srcdir@ @@ -49,7 +49,14 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am_auditd_OBJECTS = audit_warn.$(OBJEXT) auditd.$(OBJEXT) +am__auditd_SOURCES_DIST = audit_warn.c auditd.c \ + auditd_control_server.c audit_triggers_server.c +@USE_MACH_IPC_FALSE@am_auditd_OBJECTS = audit_warn.$(OBJEXT) \ +@USE_MACH_IPC_FALSE@ auditd.$(OBJEXT) +@USE_MACH_IPC_TRUE@am_auditd_OBJECTS = \ +@USE_MACH_IPC_TRUE@ auditd_control_server.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_triggers_server.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_warn.$(OBJEXT) auditd.$(OBJEXT) auditd_OBJECTS = $(am_auditd_OBJECTS) auditd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@ @@ -65,7 +72,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLF --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(auditd_SOURCES) -DIST_SOURCES = $(auditd_SOURCES) +DIST_SOURCES = $(am__auditd_SOURCES_DIST) man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man8_MANS) @@ -113,6 +120,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MIG = @MIG@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -179,10 +187,13 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -INCLUDES = -I$(top_srcdir) -auditd_SOURCES = audit_warn.c auditd.c +@USE_NATIVE_INCLUDES_FALSE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys +@USE_NATIVE_INCLUDES_TRUE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) auditd_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = auditd.8 +@USE_MACH_IPC_FALSE@auditd_SOURCES = audit_warn.c auditd.c +@USE_MACH_IPC_TRUE@auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h all: all-am .SUFFIXES: @@ -254,8 +265,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_triggers_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_warn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_server.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -427,6 +440,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -512,6 +526,12 @@ uninstall-man: uninstall-man8 tags uninstall uninstall-am uninstall-man uninstall-man8 \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 00:05:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25D4C1065695; Thu, 13 Nov 2008 00:05:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECB618FC17; Thu, 13 Nov 2008 00:05:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD05bQ6044024; Thu, 13 Nov 2008 00:05:37 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD05bQd044023; Thu, 13 Nov 2008 00:05:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811130005.mAD05bQd044023@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Nov 2008 00:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184903 - vendor/openbsm/1.1-ALPHA-2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 00:05:38 -0000 Author: rwatson Date: Thu Nov 13 00:05:37 2008 New Revision: 184903 URL: http://svn.freebsd.org/changeset/base/184903 Log: Tag OpenBSM 1.1-alpha2 vendor import. Added: vendor/openbsm/1.1-ALPHA-2/ - copied from r184902, vendor/openbsm/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 00:21:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CB7106567B; Thu, 13 Nov 2008 00:21:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D4AA8FC12; Thu, 13 Nov 2008 00:21:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD0L2dp044322; Thu, 13 Nov 2008 00:21:02 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD0L2ud044320; Thu, 13 Nov 2008 00:21:02 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811130021.mAD0L2ud044320@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Nov 2008 00:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184904 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 00:21:02 -0000 Author: rwatson Date: Thu Nov 13 00:21:01 2008 New Revision: 184904 URL: http://svn.freebsd.org/changeset/base/184904 Log: The audit queue limit variables are size_t, so use size_t for the audit queue length variables as well, avoiding storing the limit in a larger type than the length. Submitted by: sson Sponsored by: Apple Inc. MFC after: 1 week Modified: head/sys/security/audit/audit.c head/sys/security/audit/audit_private.h Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Thu Nov 13 00:05:37 2008 (r184903) +++ head/sys/security/audit/audit.c Thu Nov 13 00:21:01 2008 (r184904) @@ -129,8 +129,8 @@ struct mtx audit_mtx; * outstanding in the system. */ struct kaudit_queue audit_q; -int audit_q_len; -int audit_pre_q_len; +size_t audit_q_len; +size_t audit_pre_q_len; /* * Audit queue control settings (minimum free, low/high water marks, etc.) Modified: head/sys/security/audit/audit_private.h ============================================================================== --- head/sys/security/audit/audit_private.h Thu Nov 13 00:05:37 2008 (r184903) +++ head/sys/security/audit/audit_private.h Thu Nov 13 00:21:01 2008 (r184904) @@ -275,8 +275,8 @@ extern struct mtx audit_mtx; extern struct cv audit_watermark_cv; extern struct cv audit_worker_cv; extern struct kaudit_queue audit_q; -extern int audit_q_len; -extern int audit_pre_q_len; +extern size_t audit_q_len; +extern size_t audit_pre_q_len; extern int audit_in_failure; /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 01:47:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D3D91065673; Thu, 13 Nov 2008 01:47:09 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38A238FC0C; Thu, 13 Nov 2008 01:47:09 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD1l9Jw045891; Thu, 13 Nov 2008 01:47:09 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD1l9DY045890; Thu, 13 Nov 2008 01:47:09 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200811130147.mAD1l9DY045890@svn.freebsd.org> From: Ken Smith Date: Thu, 13 Nov 2008 01:47:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184905 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 01:47:09 -0000 Author: kensmith Date: Thu Nov 13 01:47:08 2008 New Revision: 184905 URL: http://svn.freebsd.org/changeset/base/184905 Log: This is being committed from a sparc64 (US-III, thanks Marius!) that was installed from a DVD so apparently it works... :-) Enable building DVDs for sparc64. Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Nov 13 00:21:01 2008 (r184904) +++ head/release/Makefile Thu Nov 13 01:47:08 2008 (r184905) @@ -211,6 +211,7 @@ MFSINODE= 8000 MFSLABEL= minimum3 .elif ${TARGET_ARCH} == "sparc64" DISKLABEL= sunlabel +MAKE_DVD= MFSSIZE= 4096 MFSINODE= 8192 MFSLABEL= auto From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 02:35:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBC501065673; Thu, 13 Nov 2008 02:35:29 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C598B8FC08; Thu, 13 Nov 2008 02:35:29 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD2ZTF4046904; Thu, 13 Nov 2008 02:35:29 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD2ZTUi046903; Thu, 13 Nov 2008 02:35:29 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811130235.mAD2ZTUi046903@svn.freebsd.org> From: Peter Wemm Date: Thu, 13 Nov 2008 02:35:29 +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: r184907 - in stable/7/sys: . compat/freebsd32 modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 02:35:30 -0000 Author: peter Date: Thu Nov 13 02:35:29 2008 New Revision: 184907 URL: http://svn.freebsd.org/changeset/base/184907 Log: MFC 184828,184829: Fix si_addr in 32 bit signals. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/freebsd32_misc.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 13 02:22:29 2008 (r184906) +++ stable/7/sys/compat/freebsd32/freebsd32_misc.c Thu Nov 13 02:35:29 2008 (r184907) @@ -2389,7 +2389,7 @@ siginfo_to_siginfo32(siginfo_t *src, str dst->si_pid = src->si_pid; dst->si_uid = src->si_uid; dst->si_status = src->si_status; - dst->si_addr = dst->si_addr; + dst->si_addr = (uintptr_t)src->si_addr; dst->si_value.sigval_int = src->si_value.sival_int; dst->si_timerid = src->si_timerid; dst->si_overrun = src->si_overrun; From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 04:11:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3B5106567E; Thu, 13 Nov 2008 04:11:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2460F8FC0A; Thu, 13 Nov 2008 04:11:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD4B11d048780; Thu, 13 Nov 2008 04:11:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD4B1xM048779; Thu, 13 Nov 2008 04:11:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811130411.mAD4B1xM048779@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 13 Nov 2008 04:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184908 - head/sys/dev/vge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 04:11:02 -0000 Author: yongari Date: Thu Nov 13 04:11:01 2008 New Revision: 184908 URL: http://svn.freebsd.org/changeset/base/184908 Log: Fix Rx/Tx checksum offload ioctl handling. Now checksum offload can be controlled by ifconfig(8). Note, VLAN hardware tagging controls still lacks required handler but it requires more driver cleanups so I didn't touch that part. PR: kern/128766 Modified: head/sys/dev/vge/if_vge.c Modified: head/sys/dev/vge/if_vge.c ============================================================================== --- head/sys/dev/vge/if_vge.c Thu Nov 13 02:35:29 2008 (r184907) +++ head/sys/dev/vge/if_vge.c Thu Nov 13 04:11:01 2008 (r184908) @@ -2226,15 +2226,17 @@ vge_ioctl(ifp, command, data) } } #endif /* DEVICE_POLLING */ - if (mask & IFCAP_HWCSUM) { - ifp->if_capenable |= ifr->ifr_reqcap & (IFCAP_HWCSUM); - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist = VGE_CSUM_FEATURES; + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= VGE_CSUM_FEATURES; else - ifp->if_hwassist = 0; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - vge_init(sc); + ifp->if_hwassist &= ~VGE_CSUM_FEATURES; } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) + ifp->if_capenable ^= IFCAP_RXCSUM; } break; default: From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 07:26:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F2501065673; Thu, 13 Nov 2008 07:26:30 +0000 (UTC) (envelope-from versus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58DD68FC1B; Thu, 13 Nov 2008 07:26:30 +0000 (UTC) (envelope-from versus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD7QUKO052319; Thu, 13 Nov 2008 07:26:30 GMT (envelope-from versus@svn.freebsd.org) Received: (from versus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD7QU0F052318; Thu, 13 Nov 2008 07:26:30 GMT (envelope-from versus@svn.freebsd.org) Message-Id: <200811130726.mAD7QU0F052318@svn.freebsd.org> From: Konrad Jankowski Date: Thu, 13 Nov 2008 07:26:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184913 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 07:26:30 -0000 Author: versus Date: Thu Nov 13 07:26:30 2008 New Revision: 184913 URL: http://svn.freebsd.org/changeset/base/184913 Log: Add myself to the src committers list, with Diomidis as the mentor. Approved by: dds (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Nov 13 06:06:18 2008 (r184912) +++ head/share/misc/committers-src.dot Thu Nov 13 07:26:30 2008 (r184913) @@ -174,6 +174,7 @@ trasz [label="Edward Tomasz Napierala\nt trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] ume [label="Hajimu UMEMOTO\nume@FreeBSD.org\n2000/02/26"] vanhu [label="Yvan Vanhullebus\nvanhu@FreeBSD.org\n2008/07/21"] +versus [label="Konrad Jankowski\nversus@FreeBSD.org\n2008/10/27"] weongyo [label="Weongyo Jeong\nweongyo@FreeBSD.org\n2007/12/21"] wes [label="Wes Peters\nwes@FreeBSD.org\n1998/11/25"] wilko [label="Wilko Bulte\nwilko@FreeBSD.org\n2000/01/13"] @@ -233,6 +234,8 @@ des -> mike des -> olli des -> ru +dds -> versus + dwmalone -> fanf dwmalone -> peadar From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 09:53:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3165106567E; Thu, 13 Nov 2008 09:53:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0B588FC08; Thu, 13 Nov 2008 09:53:53 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAD9rruL054924; Thu, 13 Nov 2008 09:53:53 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAD9rrIt054923; Thu, 13 Nov 2008 09:53:53 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811130953.mAD9rrIt054923@svn.freebsd.org> From: Joseph Koshy Date: Thu, 13 Nov 2008 09:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184914 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 09:53:54 -0000 Author: jkoshy Date: Thu Nov 13 09:53:53 2008 New Revision: 184914 URL: http://svn.freebsd.org/changeset/base/184914 Log: Remove duplicates, fix errors and document UMASK values. Modified: head/lib/libpmc/pmc.atom.3 Modified: head/lib/libpmc/pmc.atom.3 ============================================================================== --- head/lib/libpmc/pmc.atom.3 Thu Nov 13 07:26:30 2008 (r184913) +++ head/lib/libpmc/pmc.atom.3 Thu Nov 13 09:53:53 2008 (r184914) @@ -231,45 +231,45 @@ Core2 programmable PMCs support the foll .Pq Event E6H , Umask 01H The number of times the front end is resteered. .It Li BOGUS_BR -.Pq Event E4H +.Pq Event E4H , Umask 00H The number of byte sequences mistakenly detected as taken branch instructions. .It Li BR_BAC_MISSP_EXEC -.Pq Event 8AH +.Pq Event 8AH , Umask 00H The number of branch instructions that were mispredicted when decoded. .It Li BR_CALL_MISSP_EXEC -.Pq Event 93H +.Pq Event 93H , Umask 00H The number of mispredicted .Li CALL instructions that were executed. .It Li BR_CALL_EXEC -.Pq Event 92H +.Pq Event 92H , Umask 00H The number of .Li CALL instructions executed. .It Li BR_CND_EXEC -.Pq Event 8BH +.Pq Event 8BH , Umask 00H The number of conditional branches executed, but not necessarily retired. .It Li BR_CND_MISSP_EXEC -.Pq Event 8CH +.Pq Event 8CH , Umask 00H The number of mispredicted conditional branches executed. .It Li BR_IND_CALL_EXEC -.Pq Event 94H +.Pq Event 94H , Umask 00H The number of indirect .Li CALL instructions executed. .It Li BR_IND_EXEC -.Pq Event 8DH +.Pq Event 8DH , Umask 00H The number of indirect branch instructions executed. .It Li BR_IND_MISSP_EXEC -.Pq Event 8EH +.Pq Event 8EH , Umask 00H The number of mispredicted indirect branch instructions executed. .It Li BR_INST_DECODED .Pq Event E0H , Umask 01H The number of branch instructions decoded. .It Li BR_INST_EXEC -.Pq Event 88H +.Pq Event 88H , Umask 00H The number of branches executed, but not necessarily retired. .It Li BR_INST_RETIRED.ANY .Pq Event C4H , Umask 00H @@ -280,7 +280,7 @@ This is an architectural performance eve .Pq Event C4H , Umask 0FH The number of branch instructions retired that were mispredicted. .It Li BR_INST_RETIRED.MISPRED -.Pq Event C5, Umask 00H +.Pq Event C5H , Umask 00H .Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. This is an architectural performance event. @@ -303,28 +303,28 @@ predicted. .Pq Event C4H , Umask 0CH The number of taken branch instructions retired. .It Li BR_MISSP_EXEC -.Pq Event 89H +.Pq Event 89H , Umask 00H The number of mispredicted branch instructions that were executed. .It Li BR_RET_MISSP_EXEC -.Pq Event 90H +.Pq Event 90H , Umask 00H The number of mispredicted .Li RET instructions executed. .It Li BR_RET_BAC_MISSP_EXEC -.Pq Event 91H +.Pq Event 91H , Umask 00H The number of .Li RET instructions executed that were mispredicted at decode time. .It Li BR_RET_EXEC -.Pq Event 8FH +.Pq Event 8FH , Umask 00H The number of .Li RET instructions executed. .It Li BR_TKN_BUBBLE_1 -.Pq Event 97H +.Pq Event 97H , Umask 00H The number of branch predicted taken with bubble 1. .It Li BR_TKN_BUBBLE_2 -.Pq Event 98H +.Pq Event 98H , Umask 00H The number of branch predicted taken with bubble 2. .It Li BUSQ_EMPTY Op ,core= Ns Ar core .Pq Event 7DH @@ -485,7 +485,7 @@ The number of cycles during which interr The number of cycles during which there were pending interrupts while interrupts were disabled. .It Li CYCLES_L1I_MEM_STALLED -.Pq Event 86H +.Pq Event 86H , Umask 00H The number of cycles for which an instruction fetch stalls. .It Li DATA_TLB_MISSES.DTLB_MISS .Pq Event 08H , Umask 07H @@ -534,7 +534,7 @@ The number of Data TLB misses due to loa .Pq Event 08H , Umask 08H The number of Data TLB misses due to store operations. .It Li EIST_TRANS -.Pq Event 3AH +.Pq Event 3AH , Umask 00H The number of Enhanced Intel SpeedStep Technology transitions. .It Li ESP.ADDITIONS .Pq Event ABH , Umask 02H @@ -561,13 +561,9 @@ The number of snoop responses to bus tra .Pq Event 11H , Umask 01H The number of floating point operations executed that needed a microcode assist. -.It Li FP_ASSIST -.Pq Event 11H , Umask 01H -The number of floating point operations executed that needed -a microcode assist. .It Li FP_ASSIST.AR -.Pq Event 11H , Umask 01H -.\" XXX to be confirmed +.Pq Event 11H , Umask 81H +.\" XXX to be confirmed that this is an at-retirement event The number of floating point operations retired that needed a microcode assist. .It Li FP_COMP_OPS_EXE @@ -583,7 +579,7 @@ instructions. The number of transitions from floating point instructions to MMX instructions. .It Li HW_INT_RCV -.Pq Event C8H +.Pq Event C8H , Umask 00H The number of hardware interrupts recieved. .It Li ICACHE.ACCESSES .Pq Event 80H , Umask 03H @@ -592,16 +588,16 @@ The number of instruction fetches. .Pq Event 80H , Umask 02H The number of instruction fetches that miss the instruction cache. .It Li IDLE_DURING_DIV -.Pq Event 18H +.Pq Event 18H , Umask 00H The number of cycles the divider is busy and no other execution unit or load operation was in progress. This event is available only on PMC0. .It Li ILD_STALL -.Pq Event 87H +.Pq Event 87H , Umask 00H The number of cycles the instruction length decoder stalled due to a length changing prefix. .It Li INST_QUEUE.FULL -.Pq Event 83H +.Pq Event 83H , Umask 02H The number of cycles during which the instruction queue is full. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H @@ -612,11 +608,11 @@ This is an architectural performance eve .Pq Event C0H , Umask 01H The number of instructions retired that contained a load operation. .It Li INST_RETIRED.OTHER -.Pq Event C0H +.Pq Event C0H , Umask 04H The number of instructions retired that did not contain a load or a store operation. .It Li INST_RETIRED.STORES -.Pq Event C0H +.Pq Event C0H , Umask 02H The number of instructions retired that contained a store operation. .It Li ITLB.FLUSH .Pq Event 82H , Umask 04H @@ -633,7 +629,7 @@ miss the ITLB. .Pq Event 82H , Umask 02H The number of instruction fetches from small pages that miss the ITLB. .It Li ITLB_MISS_RETIRED -.Pq Event C9H +.Pq Event C9H , Umask 00H The number of retired instructions that missed the ITLB when they were fetched. .It Li L1D_ALL_REF @@ -647,7 +643,7 @@ The number of data reads and writes to c .Pq Event 42H The number of locked reads from cacheable memory. .It Li L1D_CACHE_LOCK_DURATION -.Pq Event 42H +.Pq Event 42H , Umask 10H The number of cycles during which any cache line is locked by any locking instruction. .It Li L1D_CACHE.LD @@ -657,20 +653,20 @@ The number of data reads from cacheable .Pq Event 41H , Umask 22H The number of data writes to cacheable memory. .It Li L1D_M_EVICT -.Pq Event 47H +.Pq Event 47H , Umask 00H The number of modified cache lines evicted from L1 data cache. .It Li L1D_M_REPL -.Pq Event 46H +.Pq Event 46H , Umask 00H The number of modified lines allocated in L1 data cache. .It Li L1D_PEND_MISS -.Pq Event 48H +.Pq Event 48H , Umask 00H The total number of outstanding L1 data cache misses at any clock. -.It Li L1D_PREFETCH. -.Pq Event 4EH +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 10H The number of times L1 data cache requested to prefetch a data cache line. .It Li L1D_REPL -.Pq Event 45H +.Pq Event 45H , Umask 0FH The number of lines brought into L1 data cache. .It Li L1D_SPLIT.LOADS .Pq Event 49H , Umask 01H @@ -679,10 +675,10 @@ The number of load operations that span .Pq Event 49H , Umask 02H The number of store operations that span two cache lines. .It Li L1I_MISSES -.Pq Event 81H +.Pq Event 81H , Umask 00H The number of instruction fetch unit misses. .It Li L1I_READS -.Pq Event 80H +.Pq Event 80H , Umask 00H The number of instruction fetches. .It Li L2_ADS Op ,core= Ns core .Pq Event 21H @@ -788,7 +784,7 @@ whose data value is not known. .Pq Event 03H , Umask 10H The numer of load operations that were blocked until retirement. .It Li LOAD_HIT_PRE -.Pq Event 4CH +.Pq Event 4CH , Umask 00H The number of load operations that conflicted with an prefetch to the same cache line. .It Li MACHINE_CLEARS.SMC @@ -812,8 +808,8 @@ occurs. .Pq Event 09H , Umask 02H The number of load operations that were successfully disambiguated. .It Li MEM_LOAD_RETIRED.DTLB_MISS -.Pq Event CBH , Umask 10H -The number of retired loads that missed the DTLB. +.Pq Event CBH , Umask 04H +The number of retired load operations that missed the DTLB. .It Li MEM_LOAD_RETIRED.L2_MISS .Pq Event CBH , Umask 02H The number of retired load operations that miss L2 cache. @@ -824,9 +820,6 @@ The number of retired load operations th .Pq Event CBH , Umask 08H The number of load operations that missed L2 cache and that caused a bus request. -.It Li MEM_LOAD_RETIRED.DTLB_MISS -.Pq Event CBH , Umask 04H -The number of load operations that missed the DTLB. .It Li MUL .Pq Event 12H , Umask 00H The number of multiply operations executed. @@ -846,11 +839,11 @@ The number of page walks executed due to The number of cycles spent in a page walk caused by an ITLB or DTLB miss. .It Li PREF_RQSTS_DN -.Pq Event F8H +.Pq Event F8H , Umask 00H The number of downward prefetches issued from the Data Prefetch Logic unit to L2 cache. .It Li PREF_RQSTS_UP -.Pq Event F0H +.Pq Event F0H , Umask 00H The number of upward prefetches issued from the Data Prefetch Logic unit to L2 cache. .It Li PREFETCH.PREFETCHNTA @@ -944,7 +937,7 @@ The number of cycles micro-ops were disp .Pq Event 04H , Umask 01H The number of cycles while the store buffer is draining. .It Li SEGMENT_REG_LOADS.ANY -.Pq Event 06H +.Pq Event 06H , Umask 00H The number of segment register loads. .It Li SEG_REG_RENAMES.ANY .Pq Event D5H , Umask 0FH @@ -994,7 +987,7 @@ The number of stalls due to lack of rena .Li %gs register. .It Li SIMD_ASSIST -.Pq Event CDH +.Pq Event CDH , Umask 00H The number SIMD assists invoked. .It Li SIMD_COMP_INST_RETIRED.PACKED_DOUBLE .Pq Event CAH , Umask 04H @@ -1013,7 +1006,7 @@ retired. Then number of computational SSE2 scalar single precision instructions retired. .It Li SIMD_INSTR_RETIRED -.Pq Event CEH +.Pq Event CEH , Umask 00H The number of retired SIMD instructions that use MMX registers. .It Li SIMD_INST_RETIRED.ANY .Pq Event C7H , Umask 1FH @@ -1034,7 +1027,7 @@ The number of SSE scalar single precisio .Pq Event C7H , Umask 10H The number of SSE2 vector instructions retired. .It Li SIMD_SAT_INSTR_RETIRED -.Pq Event CFH +.Pq Event CFH , Umask 00H The number of saturated arithmetic SIMD instructions retired. .It Li SIMD_SAT_UOP_EXEC.AR .Pq Event B1H , Umask 80H @@ -1126,7 +1119,7 @@ an internal or external snoop. .Pq Event 02, Umask 81H The number of times stored data was forwarded directly to a load. .It Li THERMAL_TRIP -.Pq Event 3BH +.Pq Event 3BH , Umask C0H The number of thermal trips. .It Li UOPS_RETIRED.LD_IND_BR .Pq Event C2H , Umask 01H From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 10:21:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8878E106567C; Thu, 13 Nov 2008 10:21:56 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76C6A8FC14; Thu, 13 Nov 2008 10:21:56 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADALut1055614; Thu, 13 Nov 2008 10:21:56 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADALusT055613; Thu, 13 Nov 2008 10:21:56 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811131021.mADALusT055613@svn.freebsd.org> From: Joseph Koshy Date: Thu, 13 Nov 2008 10:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184916 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 10:21:56 -0000 Author: jkoshy Date: Thu Nov 13 10:21:56 2008 New Revision: 184916 URL: http://svn.freebsd.org/changeset/base/184916 Log: Fix typos, document UMASK values. Modified: head/lib/libpmc/pmc.core2.3 Modified: head/lib/libpmc/pmc.core2.3 ============================================================================== --- head/lib/libpmc/pmc.core2.3 Thu Nov 13 10:14:30 2008 (r184915) +++ head/lib/libpmc/pmc.core2.3 Thu Nov 13 10:21:56 2008 (r184916) @@ -226,48 +226,48 @@ The default is to measure both snoops. Core2 programmable PMCs support the following events: .Bl -tag -width indent .It Li BACLEARS -.Pq Event E6H +.Pq Event E6H , Umask 00H The number of times the front end is resteered. .It Li BOGUS_BR -.Pq Event E4H +.Pq Event E4H , Umask 00H The number of byte sequences mistakenly detected as taken branch instructions. .It Li BR_BAC_MISSP_EXEC -.Pq Event 8AH +.Pq Event 8AH , Umask 00H The number of branch instructions that were mispredicted when decoded. .It Li BR_CALL_MISSP_EXEC -.Pq Event 93H +.Pq Event 93H , Umask 00H The number of mispredicted .Li CALL instructions that were executed. .It Li BR_CALL_EXEC -.Pq Event 92H +.Pq Event 92H , Umask 00H The number of .Li CALL instructions executed. .It Li BR_CND_EXEC -.Pq Event 8BH +.Pq Event 8BH , Umask 00H The number of conditional branches executed, but not necessarily retired. .It Li BR_CND_MISSP_EXEC -.Pq Event 8CH +.Pq Event 8CH , Umask 00H The number of mispredicted conditional branches executed. .It Li BR_IND_CALL_EXEC -.Pq Event 94H +.Pq Event 94H , Umask 00H The number of indirect .Li CALL instructions executed. .It Li BR_IND_EXEC -.Pq Event 8DH +.Pq Event 8DH , Umask 00H The number of indirect branch instructions executed. .It Li BR_IND_MISSP_EXEC -.Pq Event 8EH +.Pq Event 8EH , Umask 00H The number of mispredicted indirect branch instructions executed. .It Li BR_INST_DECODED -.Pq Event E0H +.Pq Event E0H , Umask 00H The number of branch instructions decoded. .It Li BR_INST_EXEC -.Pq Event 88H +.Pq Event 88H , Umask 00H The number of branches executed, but not necessarily retired. .It Li BR_INST_RETIRED.ANY .Pq Event C4H , Umask 00H @@ -298,28 +298,28 @@ predicted. .Pq Event C4H , Umask 0CH The number of taken branch instructions retired. .It Li BR_MISSP_EXEC -.Pq Event 89H +.Pq Event 89H , Umask 00H The number of mispredicted branch instructions that were executed. .It Li BR_RET_MISSP_EXEC -.Pq Event 90H +.Pq Event 90H , Umask 00H The number of mispredicted .Li RET instructions executed. .It Li BR_RET_BAC_MISSP_EXEC -.Pq Event 91H +.Pq Event 91H , Umask 00H The number of .Li RET instructions executed that were mispredicted at decode time. .It Li BR_RET_EXEC -.Pq Event 8FH +.Pq Event 8FH , Umask 00H The number of .Li RET instructions executed. .It Li BR_TKN_BUBBLE_1 -.Pq Event 97H +.Pq Event 97H , Umask 00H The number of branch predicted taken with bubble 1. .It Li BR_TKN_BUBBLE_2 -.Pq Event 98H +.Pq Event 98H , Umask 00H The number of branch predicted taken with bubble 2. .It Li BUSQ_EMPTY Op ,core= Ns Ar core .Pq Event 7DH @@ -463,7 +463,7 @@ This is an architectural performance eve The number of bus cycles during which the core remains unhalted and the other core is halted. .It Li CYCLES_DIV_BUSY -.Pq Event 14H +.Pq Event 14H , Umask 00H The number of cycles the divider is busy. This event is only available on PMC0. .It Li CYCLES_INT_MASKED @@ -474,7 +474,7 @@ The number of cycles during which interr The number of cycles during which there were pending interrupts while interrupts were disabled. .It Li CYCLES_L1I_MEM_STALLED -.Pq Event 86H +.Pq Event 86H , Umask 00H The number of cycles for which an instruction fetch stalls. .It Li DELAYED_BYPASS.FP .Pq Event 19H , Umask 00H @@ -488,7 +488,7 @@ The number of delayed bypass penalty cyc The number of times SIMD operations use data immediately after data, was generated by a non-SIMD execution unit. .It Li DIV -.Pq Event 13H +.Pq Event 13H , Umask 00H The number of divide operations executed. This event is only available on PMC1. .It Li DTLB_MISSES.ANY @@ -505,7 +505,7 @@ The number of Data TLB misses due to loa .Pq Event 08H , Umask 08H The number of Data TLB misses due to store operations. .It Li EIST_TRANS -.Pq Event 3AH +.Pq Event 3AH , Umask 00H The number of Enhanced Intel SpeedStep Technology transitions. .It Li ESP.ADDITIONS .Pq Event ABH , Umask 02H @@ -529,11 +529,11 @@ instruction. .Pq Event 77H The number of snoop responses to bus transactions. .It Li FP_ASSIST -.Pq Event 11H +.Pq Event 11H , Umask 00H The number of floating point operations executed that needed a microcode assist. .It Li FP_COMP_OPS_EXE -.Pq Event 10H +.Pq Event 10H , Umask 00H The number of floating point computational micro-ops executed. The event is available only on PMC0. .It Li FP_MMX_TRANS_TO_FP @@ -545,19 +545,19 @@ instructions. The number of transitions from floating point instructions to MMX instructions. .It Li HW_INT_RCV -.Pq Event C8H +.Pq Event C8H , Umask 00H The number of hardware interrupts recieved. .It Li IDLE_DURING_DIV -.Pq Event 18H +.Pq Event 18H , Umask 00H The number of cycles the divider is busy and no other execution unit or load operation was in progress. This event is available only on PMC0. .It Li ILD_STALL -.Pq Event 87H +.Pq Event 87H , Umask 00H The number of cycles the instruction length decoder stalled due to a length changing prefix. .It Li INST_QUEUE.FULL -.Pq Event 83H +.Pq Event 83H , Umask 02H The number of cycles during which the instruction queue is full. .It Li INST_RETIRED.ANY_P .Pq Event C0H , Umask 00H @@ -568,14 +568,15 @@ This is an architectural performance eve .Pq Event C0H , Umask 01H The number of instructions retired that contained a load operation. .It Li INST_RETIRED.OTHER -.Pq Event C0H +.Pq Event C0H , Umask 04H The number of instructions retired that did not contain a load or a store operation. .It Li INST_RETIRED.STORES -.Pq Event C0H +.Pq Event C0H , Umask 02H The number of instructions retired that contained a store operation. .It Li INST_RETIRED.VM_H -.Pq Event C0H , Tn Core2Extreme +.Pq Event C0H , Umask 08H +.Pq Tn Core2Extreme The number of instructions retired while in VMX root operation. .It Li ITLB.FLUSH .Pq Event 82H , Umask 40H @@ -592,7 +593,7 @@ miss the ITLB. .Pq Event 82H , Umask 02H The number of instruction fetches from small pages that miss the ITLB. .It Li ITLB_MISS_RETIRED -.Pq Event C9H +.Pq Event C9H , Umask 00H The number of retired instructions that missed the ITLB when they were fetched. .It Li L1D_ALL_REF @@ -606,7 +607,7 @@ The number of data reads and writes to c .Pq Event 42H The number of locked reads from cacheable memory. .It Li L1D_CACHE_LOCK_DURATION -.Pq Event 42H +.Pq Event 42H , Umask 10H The number of cycles during which any cache line is locked by any locking instruction. .It Li L1D_CACHE_LD Op ,cachestate= Ns Ar state @@ -618,20 +619,20 @@ reads. The number of data writes to cacheable memory excluding locked writes. .It Li L1D_M_EVICT -.Pq Event 47H +.Pq Event 47H , Umask 00H The number of modified cache lines evicted from L1 data cache. .It Li L1D_M_REPL -.Pq Event 46H +.Pq Event 46H , Umask 00H The number of modified lines allocated in L1 data cache. .It Li L1D_PEND_MISS -.Pq Event 48H +.Pq Event 48H , Umask 00H The total number of outstanding L1 data cache misses at any clock. -.It Li L1D_PREFETCH. -.Pq Event 4EH +.It Li L1D_PREFETCH.REQUESTS +.Pq Event 4EH , Umask 10H The number of times L1 data cache requested to prefetch a data cache line. .It Li L1D_REPL -.Pq Event 45H +.Pq Event 45H , Umask 0FH The number of lines brought into L1 data cache. .It Li L1D_SPLIT.LOADS .Pq Event 49H , Umask 01H @@ -640,10 +641,10 @@ The number of load operations that span .Pq Event 49H , Umask 02H The number of store operations that span two cache lines. .It Li L1I_MISSES -.Pq Event 81H +.Pq Event 81H , Umask 00H The number of instruction fetch unit misses. .It Li L1I_READS -.Pq Event 80H +.Pq Event 80H , Umask 00H The number of instruction fetches. .It Li L2_ADS Op ,core= Ns core .Pq Event 21H @@ -750,7 +751,7 @@ whose data value is not known. .Pq Event 03H , Umask 10H The numer of load operations that were blocked until retirement. .It Li LOAD_HIT_PRE -.Pq Event 4CH +.Pq Event 4CH , Umask 00H The number of load operations that conflicted with an prefetch to the same cache line. .It Li MACHINE_NUKES.SMC @@ -793,7 +794,7 @@ bus request. .Pq Event CBH , Umask 04H The number of load operations that missed L2 cache. .It Li MUL -.Pq Event 12H +.Pq Event 12H , Umask 00H The number of multiply operations executed. This event is only available on PMC1. .It Li PAGE_WALKS.COUNT @@ -804,11 +805,11 @@ The number of page walks executed due to The number of cycles spent in a page walk caused by an ITLB or DTLB miss. .It Li PREF_RQSTS_DN -.Pq Event F8H +.Pq Event F8H , Umask 00H The number of downward prefetches issued from the Data Prefetch Logic unit to L2 cache. .It Li PREF_RQSTS_UP -.Pq Event F0H +.Pq Event F0H , Umask 00H The number of upward prefetches issued from the Data Prefetch Logic unit to L2 cache. .It Li RAT_STALLS.ANY @@ -882,14 +883,14 @@ The number of cycles micro-ops were disp The number of cycles micro-ops were dispatched for execution on port 4. .It Li RS_UOPS_DISPATCHED.PORT5 -.Pq Event A1H , Umask 20 +.Pq Event A1H , Umask 20H The number of cycles micro-ops were dispatched for execution on port 5. .It Li SB_DRAIN_CYCLES .Pq Event 04H , Umask 01H The number of cycles while the store buffer is draining. .It Li SEGMENT_REG_LOADS -.Pq Event 06H +.Pq Event 06H , Umask 00H The number of segment register loads. .It Li SEG_REG_RENAMES.ANY .Pq Event D5H , Umask 0FH @@ -939,7 +940,7 @@ The number of stalls due to lack of rena .Li %gs register. .It Li SIMD_ASSIST -.Pq Event CDH +.Pq Event CDH , Umask 00H The number SIMD assists invoked. .It Li SIMD_COMP_INST_RETIRED.PACKED_DOUBLE .Pq Event CAH , Umask 04H @@ -958,7 +959,7 @@ retired. Then number of computational SSE2 scalar single precision instructions retired. .It Li SIMD_INSTR_RETIRED -.Pq Event CEH +.Pq Event CEH , Umask 00H The number of retired SIMD instructions that use MMX registers. .It Li SIMD_INST_RETIRED.ANY .Pq Event C7H , Umask 1FH @@ -979,13 +980,13 @@ The number of SSE scalar single precisio .Pq Event C7H , Umask 10H The number of SSE2 vector instructions retired. .It Li SIMD_SAT_INSTR_RETIRED -.Pq Event CFH +.Pq Event CFH , Umask 00H The number of saturated arithmetic SIMD instructions retired. .It Li SIMD_SAT_UOP_EXEC -.Pq Event B1H +.Pq Event B1H , Umask 00H The number of SIMD saturated arithmetic micro-ops executed. .It Li SIMD_UOPS_EXEC -.Pq Event B0H +.Pq Event B0H , Umask 00H The number of SIMD micro-ops executed. .It Li SIMD_UOP_TYPE_EXEC.ARITHMETIC .Pq Event B3H , Umask 20H @@ -1053,7 +1054,7 @@ globally observed. The number of cycles while a store was blocked due to a conflict with an internal or external snoop. .It Li THERMAL_TRIP -.Pq Event 3BH +.Pq Event 3BH , Umask C0H The number of thermal trips. .It Li UOPS_RETIRED.LD_IND_BR .Pq Event C2H , Umask 01H From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 10:40:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0441106567D; Thu, 13 Nov 2008 10:40:13 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3268FC0C; Thu, 13 Nov 2008 10:40:13 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADAeDq7055979; Thu, 13 Nov 2008 10:40:13 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADAeDv6055978; Thu, 13 Nov 2008 10:40:13 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811131040.mADAeDv6055978@svn.freebsd.org> From: Joseph Koshy Date: Thu, 13 Nov 2008 10:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184917 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 10:40:14 -0000 Author: jkoshy Date: Thu Nov 13 10:40:13 2008 New Revision: 184917 URL: http://svn.freebsd.org/changeset/base/184917 Log: Document UMASK values, fix errors. Modified: head/lib/libpmc/pmc.core.3 Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Thu Nov 13 10:21:56 2008 (r184916) +++ head/lib/libpmc/pmc.core.3 Thu Nov 13 10:40:13 2008 (r184917) @@ -187,51 +187,51 @@ ignored. Core PMCs support the following events: .Bl -tag -width indent .It Li BAClears -.Pq Event E6H +.Pq Event E6H , Umask 00H The number of BAClear conditions asserted. .It Li BTB_Misses -.Pq Event E2H +.Pq Event E2H , Umask 00H The number of branches for which the branch table buffer did not produce a prediction. .It Li Br_BAC_Missp_Exec -.Pq Event 8AH +.Pq Event 8AH , Umask 00H The number of branch instructions executed that were mispredicted at the front end. .It Li Br_Bogus -.Pq Event E4H +.Pq Event E4H , Umask 00H The number of bogus branches. .It Li Br_Call_Exec -.Pq Event 92H +.Pq Event 92H , Umask 00H The number of .Li CALL instructions executed. .It Li Br_Call_Missp_Exec -.Pq Event 93H +.Pq Event 93H , Umask 00H The number of .Li CALL instructions executed that were mispredicted. .It Li Br_Cnd_Exec -.Pq Event 8BH +.Pq Event 8BH , Umask 00H The number of conditional branch instructions executed. .It Li Br_Cnd_Missp_Exec -.Pq Event 8CH +.Pq Event 8CH , Umask 00H The number of conditional branch instructions executed that were mispredicted. .It Li Br_Ind_Call_Exec -.Pq Event 94H +.Pq Event 94H , Umask 00H The number of indirect .Li CALL instructions executed. .It Li Br_Ind_Exec -.Pq Event 8DH +.Pq Event 8DH , Umask 00H The number of indirect branches executed. .It Li Br_Ind_Missp_Exec -.Pq Event 8EH +.Pq Event 8EH , Umask 00H The number of indirect branch instructions executed that were mispredicted. .It Li Br_Inst_Exec -.Pq Event 88H +.Pq Event 88H , Umask 00H The number of branch instructions executed including speculative branches. .It Li Br_Instr_Decoded -.Pq Event E0H +.Pq Event E0H , Umask 00H The number of branch instructions decoded. .It Li Br_Instr_Ret .Pq Event C4H, Umask 00H @@ -244,33 +244,33 @@ This is an architectural performance eve The number of mispredicted branch instructions retired. This is an architectural performance event. .It Li Br_MisPred_Taken_Ret -.Pq Event CAH +.Pq Event CAH , Umask 00H The number of taken and mispredicted branches retired. .It Li Br_Missp_Exec -.Pq Event 89H +.Pq Event 89H , Umask 00H The number of branch instructions executed and mispredicted at execution including branches that were not predicted. .It Li Br_Ret_BAC_Missp_Exec -.Pq Event 91H +.Pq Event 91H , Umask 00H The number of return branch instructions that were mispredicted at the front end. .It Li Br_Ret_Exec -.Pq Event 8FH +.Pq Event 8FH , Umask 00H The number of return branch instructions executed. .It Li Br_Ret_Missp_Exec -.Pq Event 90H +.Pq Event 90H , Umask 00H The number of return branch instructions executed that were mispredicted. .It Li Br_Taken_Ret -.Pq Event C9H +.Pq Event C9H , Umask 00H The number of taken branches retired. .It Li Bus_BNR_Clocks -.Pq Event 61H +.Pq Event 61H , Umask 00H The number of external bus cycles while BNR (bus not ready) was asserted. .It Li Bus_DRDY_Clocks Op ,agent= Ns Ar agent -.Pq Event 62H +.Pq Event 62H , Umask 00H The number of external bus cycles while DRDY was asserted. .It Li Bus_Data_Rcv -.Pq Event 64H +.Pq Event 64H , Umask 40H .\" XXX Using the description in Core2 PMC documentation. The number of cycles during which the processor is busy receiving data. .It Li Bus_Locks_Clocks Op ,core= Ns Ar core @@ -287,7 +287,7 @@ The number of cycles when there is no tr The weighted cycles of cacheable bus data read requests from the data cache unit or hardware prefetcher. .It Li Bus_Snoop_Stall -.Pq Event 7EH +.Pq Event 7EH , Umask 00H The number bus cycles while a bus snoop is stalled. .It Li Bus_Snoops Xo .Op ,agent= Ns Ar agent @@ -354,14 +354,14 @@ The number of completed read-for-ownersh The number of completed writeback transactions from the data cache unit, excluding L2 writebacks. .It Li Cycles_Div_Busy -.Pq Event 14H +.Pq Event 14H , Umask 00H The number of cycles the divider is busy. The event is only only available for on PMC0. .It Li Cycles_Int_Masked -.Pq Event C6H +.Pq Event C6H , Umask 00H The number of cycles while interrupts were disabled. .It Li Cycles_Int_Pending_Masked -.Pq Event C7H +.Pq Event C7H , Umask 00H The number of cycles while interrupts were disabled and interrupts were pending. .It Li DCU_Snoop_To_Share Op ,core= Ns core @@ -379,22 +379,22 @@ The number of cacheable L1 data read ope .Pq Event 41H The number cacheable L1 data write operations. .It Li DCache_M_Evict -.Pq Event 47H +.Pq Event 47H , Umask 00H The number of M state data cache lines that were evicted. .It Li DCache_M_Repl -.Pq Event 46H +.Pq Event 46H , Umask 00H The number of M state data cache lines that were allocated. .It Li DCache_Pend_Miss -.Pq Event 48H +.Pq Event 48H , Umask 00H The weighted cycles an L1 miss was outstanding. .It Li DCache_Repl -.Pq Event 45H +.Pq Event 45H , Umask 0FH The number of data cache line replacements. .It Li Data_Mem_Cache_Ref -.Pq Event 44H +.Pq Event 44H , Umask 02H The number of cacheable read and write operations to L1 data cache. .It Li Data_Mem_Ref -.Pq Event 43H +.Pq Event 43H , Umask 01H The number of L1 data reads and writes, both cacheable and uncacheable. .It Li Dbus_Busy Op ,core= Ns Ar core @@ -405,15 +405,15 @@ The number of core cycles during which t The nunber of cycles during which the data bus was busy transferring data to a core. .It Li Div -.Pq Event 13H +.Pq Event 13H , Umask 00H The number of divide operations including speculative operations for integer and floating point divides. This event can only be counted on PMC1. .It Li Dtlb_Miss -.Pq Event 49H +.Pq Event 49H , Umask 00H The number of data references that missed the TLB. .It Li ESP_Uops -.Pq Event D7H +.Pq Event D7H , Umask 00H The number of ESP folding instructions decoded. .It Li EST_Trans Op ,trans= Ns Ar transition .Pq Event 3AH @@ -430,16 +430,16 @@ can be one of the following values: The default is .Dq Li any . .It Li FP_Assist -.Pq Event 11H +.Pq Event 11H , Umask 00H The number of floating point operations that required microcode assists. The event is only available on PMC1. .It Li FP_Comp_Instr_Ret -.Pq Event C1H +.Pq Event C1H , Umask 00H The number of X87 floating point compute instructions retired. The event is only available on PMC0. .It Li FP_Comps_Op_Exe -.Pq Event 10H +.Pq Event 10H , Umask 00H The number of floating point computational instructions executed. .It Li FP_MMX_Trans .Pq Event CCH , Umask 01H @@ -454,36 +454,36 @@ The number of fused store uops retired. .Pq Event DAH , Umask 00H The number of fused uops retired. .It Li HW_Int_Rx -.Pq Event C8H +.Pq Event C8H , Umask 00H The number of hardware interrupts received. .It Li ICache_Misses -.Pq Event 81H +.Pq Event 81H , Umask 00H The number of instruction fetch misses in the instruction cache and streaming buffers. .It Li ICache_Reads -.Pq Event 80H +.Pq Event 80H , Umask 00H The number of instruction fetches from the the instruction cache and streaming buffers counting both cacheable and uncacheable fetches. .It Li IFU_Mem_Stall -.Pq Event 86H +.Pq Event 86H , Umask 00H The number of cycles the instruction fetch unit was stalled while waiting for data from memory. .It Li ILD_Stall -.Pq Event 87H +.Pq Event 87H , Umask 00H The number of instruction length decoder stalls. .It Li ITLB_Misses -.Pq Event 85H +.Pq Event 85H , Umask 00H The number of instruction TLB misses. .It Li Instr_Decoded -.Pq Event D0H +.Pq Event D0H , Umask 00H The number of instructions decoded. .It Li Instr_Ret -.Pq Event C0H +.Pq Event C0H , Umask 00H .Pq Alias Qq "Instruction Retired" The number of instructions retired. This is an architectural performance event. .It Li L1_Pref_Req -.Pq Event 4FH +.Pq Event 4FH , Umask 00H The number of L1 prefetch request due to data cache misses. .It Li L2_ADS Op ,core= Ns core .Pq Event 21H @@ -550,7 +550,7 @@ The number of L2 cache requests. .Pq Event 2AH The number of L2 cache writes including speculative writes. .It Li LD_Blocks -.Pq Event 03H +.Pq Event 03H , Umask 00H The number of load operations delayed due to store buffer blocks. .It Li LLC_Misses .Pq Event 2EH, Umask 41H @@ -564,27 +564,27 @@ This is an architectural performance eve .Pq Event 2EH, Umask 4FH This is an architectural performance event. .It Li MMX_Assist -.Pq Event CDH +.Pq Event CDH , Umask 00H The number of EMMX instructions executed. .It Li MMX_FP_Trans .Pq Event CCH , Umask 00H The number of transitions from MMX to X87. .It Li MMX_Instr_Exec -.Pq Event B0H +.Pq Event B0H , Umask 00H The number of MMX instructions executed excluding .Li MOVQ and .Li MOVD stores. .It Li MMX_Instr_Ret -.Pq Event CEH +.Pq Event CEH , Umask 00H The number of MMX instructions retired. .It Li Misalign_Mem_Ref -.Pq Event 05H +.Pq Event 05H , Umask 00H The number of misaligned data memory references, counting loads and stores. .It Li Mul -.Pq Event 12H +.Pq Event 12H , Umask 00H The number of multiply operations include speculative floating point and integer multiplies. This event is available on PMC1 only. @@ -594,16 +594,16 @@ This event is available on PMC1 only. The number of non-halted bus cycles. This is an architectural performance event. .It Li Pref_Rqsts_Dn -.Pq Event F8H +.Pq Event F8H , Umask 00H The number of hardware prefetch requests issued in backward streams. .It Li Pref_Rqsts_Up -.Pq Event F0H +.Pq Event F0H , Umask 00H The number of hardware prefetch requests issued in forward streams. .It Li Resource_Stall -.Pq Event A2H +.Pq Event A2H , Umask 00H The number of cycles where there is a resource related stall. .It Li SD_Drains -.Pq Event 04H +.Pq Event 04H , Umask 00H The number of cycles while draining store buffers. .It Li SIMD_FP_DP_P_Ret .Pq Event D8H , Umask 02H @@ -652,7 +652,7 @@ The number of SIMD integer packed multip .Pq Event B3H , Umask 02H The number of SIMD integer packed shift instructions executed. .It Li SIMD_Int_Sat_Exec -.Pq Event B1H +.Pq Event B1H , Umask 00H The number of SIMD integer saturating instructions executed. .It Li SIMD_Int_Upck_Exec .Pq Event B3H , Umask 08H @@ -697,7 +697,7 @@ The number of .Li PREFETCHT2 instructions retired. .It Li Seg_Reg_Loads -.Pq Event 06H +.Pq Event 06H , Umask 00H The number of segment register loads. .It Li Serial_Execution_Cycles .Pq Event 3CH , Umask 02H @@ -707,15 +707,15 @@ was halted. .Pq Event 3BH , Umask C0H The duration in a thermal trip based on the current core clock. .It Li Unfusion -.Pq Event DBH +.Pq Event DBH , Umask 00H The number of unfusion events. -.It Li "Unhalted_Core_Cycles" +.It Li Unhalted_Core_Cycles .Pq Event 3CH , Umask 00H The number of core clock cycles when the clock signal on a specific core is not halted. This is an architectural performance event. .It Li Uops_Ret -.Pq Event C2H +.Pq Event C2H , Umask 00H The number of micro-ops retired. .El .Ss Event Name Aliases From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 11:00:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D32E106567E; Thu, 13 Nov 2008 11:00:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CBE58FC14; Thu, 13 Nov 2008 11:00:15 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADB0F45057298; Thu, 13 Nov 2008 11:00:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADB0FHg057297; Thu, 13 Nov 2008 11:00:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200811131100.mADB0FHg057297@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 13 Nov 2008 11:00:15 +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: r184918 - in stable/7/sys: . dev/mii modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 11:00:15 -0000 Author: yongari Date: Thu Nov 13 11:00:15 2008 New Revision: 184918 URL: http://svn.freebsd.org/changeset/base/184918 Log: MFC r184253: Use auto-negotiation for manual media type selection. This fixes establishment of 10/100Mbps link on Atheros AR8121(L1E). Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/dev/mii/atphy.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/dev/mii/atphy.c ============================================================================== --- stable/7/sys/dev/mii/atphy.c Thu Nov 13 10:40:13 2008 (r184917) +++ stable/7/sys/dev/mii/atphy.c Thu Nov 13 11:00:15 2008 (r184918) @@ -217,7 +217,8 @@ atphy_service(struct mii_softc *sc, stru /* * Reset the PHY so all changes take effect. */ - PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET); + PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET | BMCR_AUTOEN | + BMCR_STARTNEG); done: break; From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 11:35:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E95A1065674; Thu, 13 Nov 2008 11:35:18 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F55D8FC1D; Thu, 13 Nov 2008 11:35:18 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADBZIQ9058023; Thu, 13 Nov 2008 11:35:18 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADBZIbU058019; Thu, 13 Nov 2008 11:35:18 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811131135.mADBZIbU058019@svn.freebsd.org> From: Doug Rabson Date: Thu, 13 Nov 2008 11:35:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184920 - in head/sys: conf nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 11:35:18 -0000 Author: dfr Date: Thu Nov 13 11:35:18 2008 New Revision: 184920 URL: http://svn.freebsd.org/changeset/base/184920 Log: Temporarily switch NFS back to the old RPC code while I try to diagnose and fix the problems a few people have noticed with the new code. People who want to continue testing the new code or who need RPCSEC_GSS support should use the new option NFS_NEWRPC to select it. Modified: head/sys/conf/files head/sys/conf/options head/sys/nfsclient/nfs.h head/sys/nfsserver/nfs.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Nov 13 11:07:17 2008 (r184919) +++ head/sys/conf/files Thu Nov 13 11:35:18 2008 (r184920) @@ -2296,7 +2296,7 @@ nfsclient/krpc_subr.c optional bootp nf nfsclient/nfs_bio.c optional nfsclient nfsclient/nfs_diskless.c optional nfsclient nfs_root nfsclient/nfs_node.c optional nfsclient -nfsclient/nfs_socket.c optional nfsclient nfs_legacyrpc +nfsclient/nfs_socket.c optional nfsclient nfsclient/nfs_krpc.c optional nfsclient nfsclient/nfs_subs.c optional nfsclient nfsclient/nfs_nfsiod.c optional nfsclient @@ -2306,10 +2306,10 @@ nfsclient/nfs_lock.c optional nfsclient nfsserver/nfs_fha.c optional nfsserver nfsserver/nfs_serv.c optional nfsserver nfsserver/nfs_srvkrpc.c optional nfsserver -nfsserver/nfs_srvsock.c optional nfsserver nfs_legacyrpc -nfsserver/nfs_srvcache.c optional nfsserver nfs_legacyrpc +nfsserver/nfs_srvsock.c optional nfsserver +nfsserver/nfs_srvcache.c optional nfsserver nfsserver/nfs_srvsubs.c optional nfsserver -nfsserver/nfs_syscalls.c optional nfsserver nfs_legacyrpc +nfsserver/nfs_syscalls.c optional nfsserver nlm/nlm_advlock.c optional nfslockd nfsclient nlm/nlm_prot_clnt.c optional nfslockd nlm/nlm_prot_impl.c optional nfslockd Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Nov 13 11:07:17 2008 (r184919) +++ head/sys/conf/options Thu Nov 13 11:35:18 2008 (r184920) @@ -230,6 +230,7 @@ NFS4CLIENT opt_nfs.h # legacy RPC implementation instead of the newer KRPC system (which # supports modern features such as RPCSEC_GSS NFS_LEGACYRPC opt_nfs.h +NFS_NEWRPC opt_nfs.h # filesystems and libiconv bridge CD9660_ICONV opt_dontuse.h Modified: head/sys/nfsclient/nfs.h ============================================================================== --- head/sys/nfsclient/nfs.h Thu Nov 13 11:07:17 2008 (r184919) +++ head/sys/nfsclient/nfs.h Thu Nov 13 11:35:18 2008 (r184920) @@ -40,6 +40,10 @@ #include "opt_nfs.h" #endif +#if !defined(NFS_NEWRPC) && !defined(NFS_LEGACYRPC) +#define NFS_LEGACYRPC +#endif + #include /* Modified: head/sys/nfsserver/nfs.h ============================================================================== --- head/sys/nfsserver/nfs.h Thu Nov 13 11:07:17 2008 (r184919) +++ head/sys/nfsserver/nfs.h Thu Nov 13 11:35:18 2008 (r184920) @@ -40,6 +40,10 @@ #include "opt_nfs.h" #endif +#if !defined(NFS_NEWRPC) && !defined(NFS_LEGACYRPC) +#define NFS_LEGACYRPC +#endif + /* * Tunable constants for nfs */ From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 14:36:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950A2106567E; Thu, 13 Nov 2008 14:36:52 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85FEE8FC0C; Thu, 13 Nov 2008 14:36:52 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADEaqa5061129; Thu, 13 Nov 2008 14:36:52 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADEaqTR061127; Thu, 13 Nov 2008 14:36:52 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811131436.mADEaqTR061127@svn.freebsd.org> From: Doug Rabson Date: Thu, 13 Nov 2008 14:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184921 - in head/sys: nfsserver xdr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 14:36:52 -0000 Author: dfr Date: Thu Nov 13 14:36:52 2008 New Revision: 184921 URL: http://svn.freebsd.org/changeset/base/184921 Log: Use the remote address for access control, not the local address. This fixes the nfsd problems that some people have with the new code. Add support for the vfs.nfsrv.nfs_privport sysctl which denies access unless the client is using a port number less than 1024. Not really sure if this is particularly useful since it doesn't add any real security. Modified: head/sys/nfsserver/nfs_srvkrpc.c head/sys/xdr/xdr_mbuf.c Modified: head/sys/nfsserver/nfs_srvkrpc.c ============================================================================== --- head/sys/nfsserver/nfs_srvkrpc.c Thu Nov 13 11:35:18 2008 (r184920) +++ head/sys/nfsserver/nfs_srvkrpc.c Thu Nov 13 14:36:52 2008 (r184921) @@ -348,19 +348,61 @@ nfssvc_program(struct svc_req *rqst, SVC nfs_realign(&mreq); /* - * Note: we want rq_addr, not svc_getrpccaller - + * Note: we want rq_addr, not svc_getrpccaller for nd_nam2 - * NFS_SRVMAXDATA uses a NULL value for nd_nam2 to detect TCP * mounts. */ memset(&nd, 0, sizeof(nd)); nd.nd_md = nd.nd_mrep = mreq; nd.nd_dpos = mtod(mreq, caddr_t); - nd.nd_nam = (struct sockaddr *) &xprt->xp_ltaddr; + nd.nd_nam = svc_getrpccaller(rqst); nd.nd_nam2 = rqst->rq_addr; nd.nd_procnum = procnum; nd.nd_cr = NULL; nd.nd_flag = flag; + if (nfs_privport) { + /* Check if source port is privileged */ + u_short port; + struct sockaddr *nam = nd.nd_nam; + struct sockaddr_in *sin; + + sin = (struct sockaddr_in *)nam; + /* + * INET/INET6 - same code: + * sin_port and sin6_port are at same offset + */ + port = ntohs(sin->sin_port); + if (port >= IPPORT_RESERVED && + nd.nd_procnum != NFSPROC_NULL) { +#ifdef INET6 + char b6[INET6_ADDRSTRLEN]; +#if defined(KLD_MODULE) + /* Do not use ip6_sprintf: the nfs module should work without INET6. */ +#define ip6_sprintf(buf, a) \ + (sprintf((buf), "%x:%x:%x:%x:%x:%x:%x:%x", \ + (a)->s6_addr16[0], (a)->s6_addr16[1], \ + (a)->s6_addr16[2], (a)->s6_addr16[3], \ + (a)->s6_addr16[4], (a)->s6_addr16[5], \ + (a)->s6_addr16[6], (a)->s6_addr16[7]), \ + (buf)) +#endif +#endif + printf("NFS request from unprivileged port (%s:%d)\n", +#ifdef INET6 + sin->sin_family == AF_INET6 ? + ip6_sprintf(b6, &satosin6(sin)->sin6_addr) : +#if defined(KLD_MODULE) +#undef ip6_sprintf +#endif +#endif + inet_ntoa(sin->sin_addr), port); + svcerr_weakauth(rqst); + svc_freereq(rqst); + return; + } + } + if (proc != nfsrv_null) { if (!svc_getcred(rqst, &nd.nd_cr, &nd.nd_credflavor)) { svcerr_weakauth(rqst); Modified: head/sys/xdr/xdr_mbuf.c ============================================================================== --- head/sys/xdr/xdr_mbuf.c Thu Nov 13 11:35:18 2008 (r184920) +++ head/sys/xdr/xdr_mbuf.c Thu Nov 13 14:36:52 2008 (r184921) @@ -65,6 +65,7 @@ void xdrmbuf_create(XDR *xdrs, struct mbuf *m, enum xdr_op op) { + KASSERT(m != NULL, ("xdrmbuf_create with NULL mbuf chain")); xdrs->x_op = op; xdrs->x_ops = &xdrmbuf_ops; xdrs->x_base = (char *) m; From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 15:00:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 896E71065752; Thu, 13 Nov 2008 15:00:40 +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 6B0538FC0A; Thu, 13 Nov 2008 15:00:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADF0eSH061784; Thu, 13 Nov 2008 15:00:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADF0esO061783; Thu, 13 Nov 2008 15:00:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200811131500.mADF0esO061783@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 13 Nov 2008 15:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184924 - in stable/7/sys: . compat/linux modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 15:00:41 -0000 Author: kib Date: Thu Nov 13 15:00:40 2008 New Revision: 184924 URL: http://svn.freebsd.org/changeset/base/184924 Log: MFC r184501: The code in linux_proc_exit() contains a race when multiple linux based processes exits at the same time. The linux_emuldata structure is freed but p->p_emuldata is left as a dangling pointer to the just freed memory. The check for W_EXIT in the loop scanning the child processes isn't safe since the state of the child process can change right afterwards. Lock the process and check the W_EXIT before delivering signal. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_emul.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/compat/linux/linux_emul.c ============================================================================== --- stable/7/sys/compat/linux/linux_emul.c Thu Nov 13 15:00:34 2008 (r184923) +++ stable/7/sys/compat/linux/linux_emul.c Thu Nov 13 15:00:40 2008 (r184924) @@ -232,11 +232,11 @@ linux_proc_exit(void *arg __unused, stru continue; em = em_find(q, EMUL_DOLOCK); KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid)); - if (em->pdeath_signal != 0) { - PROC_LOCK(q); + PROC_LOCK(q); + if ((q->p_flag & P_WEXIT) == 0 && em->pdeath_signal != 0) { psignal(q, em->pdeath_signal); - PROC_UNLOCK(q); } + PROC_UNLOCK(q); EMUL_UNLOCK(&emul_lock); } sx_xunlock(&proctree_lock); From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 15:06:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63049106564A; Thu, 13 Nov 2008 15:06:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 557988FC1B; Thu, 13 Nov 2008 15:06:35 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADF6ZmT061921; Thu, 13 Nov 2008 15:06:35 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADF6Z3j061920; Thu, 13 Nov 2008 15:06:35 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200811131506.mADF6Z3j061920@svn.freebsd.org> From: Ed Maste Date: Thu, 13 Nov 2008 15:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184925 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 15:06:35 -0000 Author: emaste Date: Thu Nov 13 15:06:34 2008 New Revision: 184925 URL: http://svn.freebsd.org/changeset/base/184925 Log: Fix whitespace. Modified: head/bin/ps/print.c Modified: head/bin/ps/print.c ============================================================================== --- head/bin/ps/print.c Thu Nov 13 15:00:40 2008 (r184924) +++ head/bin/ps/print.c Thu Nov 13 15:06:34 2008 (r184925) @@ -196,9 +196,8 @@ tdnam(KINFO *k, VARENT *ve) v = ve->var; if (showthreads && k->ki_p->ki_numthreads > 1) (void)printf("%-*s", v->width, k->ki_p->ki_ocomm); - else - (void)printf("%-*s", v->width, " " ); - + else + (void)printf("%-*s", v->width, " "); } void From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 15:27:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEC510656FB; Thu, 13 Nov 2008 15:27:48 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA348FC12; Thu, 13 Nov 2008 15:27:48 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADFRmv7062407; Thu, 13 Nov 2008 15:27:48 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADFRmMs062402; Thu, 13 Nov 2008 15:27:48 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811131527.mADFRmMs062402@svn.freebsd.org> From: Rui Paulo Date: Thu, 13 Nov 2008 15:27:48 +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: r184928 - in stable/7: contrib/traceroute usr.sbin/traceroute X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 15:27:48 -0000 Author: rpaulo Date: Thu Nov 13 15:27:48 2008 New Revision: 184928 URL: http://svn.freebsd.org/changeset/base/184928 Log: MFC r176428: Add AS lookup functionality. On each hop we query a whois server to find the corresponding AS for that IP (-a switch). We can also choose a different whois server with the -A switch. The default is whois.radb.net. Obtained from: NetBSD Approved by: re Added: stable/7/contrib/traceroute/as.c (contents, props changed) stable/7/contrib/traceroute/as.h (contents, props changed) Modified: stable/7/contrib/traceroute/traceroute.8 stable/7/contrib/traceroute/traceroute.c stable/7/usr.sbin/traceroute/Makefile Added: stable/7/contrib/traceroute/as.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/contrib/traceroute/as.c Thu Nov 13 15:27:48 2008 (r184928) @@ -0,0 +1,242 @@ +/* $FreeBSD$ */ +/* $NetBSD: as.c,v 1.1 2001/11/04 23:14:36 atatat Exp $ */ + +/* + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Andrew Brown. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "as.h" + +#define DEFAULT_AS_SERVER "whois.radb.net" +#undef AS_DEBUG_FILE + +struct aslookup { + FILE *as_f; +#ifdef AS_DEBUG_FILE + FILE *as_debug; +#endif /* AS_DEBUG_FILE */ +}; + +void * +as_setup(server) + char *server; +{ + struct aslookup *asn; + struct hostent *he = NULL; + struct servent *se; + struct sockaddr_in in; + FILE *f; + int s; + + if (server == NULL) + server = DEFAULT_AS_SERVER; + + (void)memset(&in, 0, sizeof(in)); + in.sin_family = AF_INET; + in.sin_len = sizeof(in); + if ((se = getservbyname("whois", "tcp")) == NULL) { + warnx("warning: whois/tcp service not found"); + in.sin_port = ntohs(43); + } else + in.sin_port = se->s_port; + + if (inet_aton(server, &in.sin_addr) == 0 && + ((he = gethostbyname(server)) == NULL || + he->h_addr == NULL)) { + warnx("%s: %s", server, hstrerror(h_errno)); + return (NULL); + } + + if ((s = socket(PF_INET, SOCK_STREAM, 0)) == -1) { + warn("socket"); + return (NULL); + } + + do { + if (he != NULL) { + memcpy(&in.sin_addr, he->h_addr, he->h_length); + he->h_addr_list++; + } + if (connect(s, (struct sockaddr *)&in, sizeof(in)) == 0) + break; + if (he == NULL || he->h_addr == NULL) { + close(s); + s = -1; + break; + } + } while (1); + + if (s == -1) { + warn("connect"); + return (NULL); + } + + f = fdopen(s, "r+"); + (void)fprintf(f, "!!\n"); + (void)fflush(f); + + asn = malloc(sizeof(struct aslookup)); + if (asn == NULL) + (void)fclose(f); + else + asn->as_f = f; + +#ifdef AS_DEBUG_FILE + asn->as_debug = fopen(AS_DEBUG_FILE, "w"); + if (asn->as_debug) { + (void)fprintf(asn->as_debug, ">> !!\n"); + (void)fflush(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + + return (asn); +} + +int +as_lookup(_asn, addr) + void *_asn; + struct in_addr *addr; +{ + struct aslookup *asn = _asn; + char buf[1024]; + int as, rc, dlen; + + as = rc = dlen = 0; + (void)fprintf(asn->as_f, "!r%s/32,l\n", inet_ntoa(*addr)); + (void)fflush(asn->as_f); + +#ifdef AS_DEBUG_FILE + if (asn->as_debug) { + (void)fprintf(asn->as_debug, ">> !r%s/32,l\n", + inet_ntoa(*addr)); + (void)fflush(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + + while (fgets(buf, sizeof(buf), asn->as_f) != NULL) { + buf[sizeof(buf) - 1] = '\0'; + +#ifdef AS_DEBUG_FILE + if (asn->as_debug) { + (void)fprintf(asn->as_debug, "<< %s", buf); + (void)fflush(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + + if (rc == 0) { + rc = buf[0]; + switch (rc) { + case 'A': + /* A - followed by # bytes of answer */ + sscanf(buf, "A%d\n", &dlen); +#ifdef AS_DEBUG_FILE + if (asn->as_debug) { + (void)fprintf(asn->as_debug, + "dlen: %d\n", dlen); + (void)fflush(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + break; + case 'C': + case 'D': + case 'E': + case 'F': + /* C - no data returned */ + /* D - key not found */ + /* E - multiple copies of key */ + /* F - some other error */ + break; + } + if (rc == 'A') + /* skip to next input line */ + continue; + } + + if (dlen == 0) + /* out of data, next char read is end code */ + rc = buf[0]; + if (rc != 'A') + /* either an error off the bat, or a done code */ + break; + + /* data received, thank you */ + dlen -= strlen(buf); + + /* origin line is the interesting bit */ + if (as == 0 && strncasecmp(buf, "origin:", 7) == 0) { + sscanf(buf + 7, " AS%d", &as); +#ifdef AS_DEBUG_FILE + if (asn->as_debug) { + (void)fprintf(asn->as_debug, "as: %d\n", as); + (void)fflush(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + } + } + + return (as); +} + +void +as_shutdown(_asn) + void *_asn; +{ + struct aslookup *asn = _asn; + + (void)fprintf(asn->as_f, "!q\n"); + (void)fclose(asn->as_f); + +#ifdef AS_DEBUG_FILE + if (asn->as_debug) { + (void)fprintf(asn->as_debug, ">> !q\n"); + (void)fclose(asn->as_debug); + } +#endif /* AS_DEBUG_FILE */ + + free(asn); +} Added: stable/7/contrib/traceroute/as.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/contrib/traceroute/as.h Thu Nov 13 15:27:48 2008 (r184928) @@ -0,0 +1,42 @@ +/* $FreeBSD$ */ +/* $NetBSD: as.h,v 1.1 2001/11/04 23:14:36 atatat Exp $ */ + +/* + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Andrew Brown. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +void *as_setup __P((char *)); +int as_lookup __P((void *, struct in_addr *)); +void as_shutdown __P((void *)); Modified: stable/7/contrib/traceroute/traceroute.8 ============================================================================== --- stable/7/contrib/traceroute/traceroute.8 Thu Nov 13 15:15:19 2008 (r184927) +++ stable/7/contrib/traceroute/traceroute.8 Thu Nov 13 15:27:48 2008 (r184928) @@ -16,7 +16,7 @@ .\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $ .\" $FreeBSD$ .\" -.TH TRACEROUTE 8 "21 September 2000" +.TH TRACEROUTE 8 "19 February 2008" .UC 6 .SH NAME traceroute \- print the route packets take to network host @@ -24,7 +24,7 @@ traceroute \- print the route packets ta .na .B traceroute [ -.B \-dDeFISnrvx +.B \-adDeFISnrvx ] [ .B \-f .I first_ttl @@ -71,6 +71,9 @@ traceroute \- print the route packets ta .B \-w .I waittime ] [ +.B \-A +.I as_server +] [ .B \-z .I pausemsecs ] @@ -98,6 +101,13 @@ name. .PP Other options are: .TP +.B \-a +Turn on AS# lookups for each hop encountered. +.TP +.B -A +Turn on AS# lookups and use the given server instead of the +default. +.TP .B \-e Firewall evasion mode. Use fixed destination ports for UDP and TCP probes. @@ -443,3 +453,7 @@ should listen for a RST from the destina router that's filtering packets), but this is not implemented yet. .PP Please send bug reports to traceroute@ee.lbl.gov. +.PP +The AS number capability reports information that may sometimes be +inaccurate due to discrepancies between the contents of the +routing database server and the current state of the Internet. Modified: stable/7/contrib/traceroute/traceroute.c ============================================================================== --- stable/7/contrib/traceroute/traceroute.c Thu Nov 13 15:15:19 2008 (r184927) +++ stable/7/contrib/traceroute/traceroute.c Thu Nov 13 15:27:48 2008 (r184928) @@ -263,6 +263,7 @@ static const char rcsid[] = #include "findsaddr.h" #include "ifaddrlist.h" +#include "as.h" #include "traceroute.h" /* Maximum number of gateways (include room for one noop) */ @@ -350,6 +351,9 @@ int options; /* socket options */ int verbose; int waittime = 5; /* time to wait for response (in seconds) */ int nflag; /* print addresses numerically */ +int as_path; /* print as numbers for each hop */ +char *as_server = NULL; +void *asn; #ifdef CANT_HACK_IPCKSUM int doipcksum = 0; /* don't calculate ip checksums by default */ #else @@ -535,9 +539,17 @@ main(int argc, char **argv) prog = argv[0]; opterr = 0; - while ((op = getopt(argc, argv, "edDFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) + while ((op = getopt(argc, argv, "aA:edDFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) switch (op) { - + case 'a': + as_path = 1; + break; + + case 'A': + as_path = 1; + as_server = optarg; + break; + case 'd': options |= SO_DEBUG; break; @@ -913,6 +925,16 @@ main(int argc, char **argv) exit (1); } + if (as_path) { + asn = as_setup(as_server); + if (asn == NULL) { + Fprintf(stderr, "%s: as_setup failed, AS# lookups" + " disabled\n", prog); + (void)fflush(stderr); + as_path = 0; + } + } + #if defined(IPSEC) && defined(IPSEC_POLICY_IPSEC) if (setpolicy(sndsock, "in bypass") < 0) errx(1, "%s", ipsec_strerror()); @@ -1118,6 +1140,8 @@ main(int argc, char **argv) (unreachable > 0 && unreachable >= nprobes - 1)) break; } + if (as_path) + as_shutdown(asn); exit(0); } @@ -1458,6 +1482,9 @@ print(register u_char *buf, register int hlen = ip->ip_hl << 2; cc -= hlen; + if (as_path) + Printf(" [AS%d]", as_lookup(asn, &from->sin_addr)); + if (nflag) Printf(" %s", inet_ntoa(from->sin_addr)); else @@ -1764,8 +1791,8 @@ usage(void) Fprintf(stderr, "Version %s\n", version); Fprintf(stderr, - "Usage: %s [-dDeFInrSvx] [-f first_ttl] [-g gateway] [-i iface]\n" + "Usage: %s [-adDeFInrSvx] [-f first_ttl] [-g gateway] [-i iface]\n" "\t[-m max_ttl] [-p port] [-P proto] [-q nqueries] [-s src_addr]\n" - "\t[-t tos] [-w waittime] [-z pausemsecs] host [packetlen]\n", prog); + "\t[-t tos] [-w waittime] [-A as_server] [-z pausemsecs] host [packetlen]\n", prog); exit(1); } Modified: stable/7/usr.sbin/traceroute/Makefile ============================================================================== --- stable/7/usr.sbin/traceroute/Makefile Thu Nov 13 15:15:19 2008 (r184927) +++ stable/7/usr.sbin/traceroute/Makefile Thu Nov 13 15:27:48 2008 (r184928) @@ -5,7 +5,7 @@ TRACEROUTE_DISTDIR?= ${.CURDIR}/../../co PROG= traceroute MAN= traceroute.8 -SRCS= version.c traceroute.c ifaddrlist.c findsaddr-socket.c +SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-socket.c BINOWN= root BINMODE=4555 CLEANFILES= version.c From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 16:02:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43F3106568F; Thu, 13 Nov 2008 16:02:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2AC8FC1B; Thu, 13 Nov 2008 16:02:12 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADG2CcB063105; Thu, 13 Nov 2008 16:02:12 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADG2CuA063104; Thu, 13 Nov 2008 16:02:12 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811131602.mADG2CuA063104@svn.freebsd.org> From: Rui Paulo Date: Thu, 13 Nov 2008 16:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184929 - stable/7/contrib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 16:02:12 -0000 Author: rpaulo Date: Thu Nov 13 16:02:12 2008 New Revision: 184929 URL: http://svn.freebsd.org/changeset/base/184929 Log: Record MFC r176428. Approved by: re (implicit) Modified: stable/7/contrib/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 16:03:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0385D1065690; Thu, 13 Nov 2008 16:03:44 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2E868FC1A; Thu, 13 Nov 2008 16:03:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADG3hOP063174; Thu, 13 Nov 2008 16:03:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADG3h8e063173; Thu, 13 Nov 2008 16:03:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811131603.mADG3h8e063173@svn.freebsd.org> From: Rui Paulo Date: Thu, 13 Nov 2008 16:03:43 +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: r184930 - stable/7/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 16:03:44 -0000 Author: rpaulo Date: Thu Nov 13 16:03:43 2008 New Revision: 184930 URL: http://svn.freebsd.org/changeset/base/184930 Log: Record MFC r176428. Approved by: re (implicit) Modified: stable/7/usr.sbin/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 16:17:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 429421065679; Thu, 13 Nov 2008 16:17:51 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC108FC1C; Thu, 13 Nov 2008 16:17:51 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADGHp95063545; Thu, 13 Nov 2008 16:17:51 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADGHpi1063544; Thu, 13 Nov 2008 16:17:51 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811131617.mADGHpi1063544@svn.freebsd.org> From: Rui Paulo Date: Thu, 13 Nov 2008 16:17:51 +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: r184931 - in stable/7/usr.sbin: . traceroute X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 16:17:51 -0000 Author: rpaulo Date: Thu Nov 13 16:17:50 2008 New Revision: 184931 URL: http://svn.freebsd.org/changeset/base/184931 Log: Reverse botched mergeinfo for r176428. Approved by: re (implicit) Modified: stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/traceroute/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 16:32:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E75B106567B; Thu, 13 Nov 2008 16:32:21 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13FA78FC08; Thu, 13 Nov 2008 16:32:21 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADGWL3s063833; Thu, 13 Nov 2008 16:32:21 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADGWKOB063830; Thu, 13 Nov 2008 16:32:20 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811131632.mADGWKOB063830@svn.freebsd.org> From: Joseph Koshy Date: Thu, 13 Nov 2008 16:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184932 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 16:32:21 -0000 Author: jkoshy Date: Thu Nov 13 16:32:20 2008 New Revision: 184932 URL: http://svn.freebsd.org/changeset/base/184932 Log: Tweak -mdoc usage. Modified: head/lib/libpmc/pmc.atom.3 head/lib/libpmc/pmc.core.3 head/lib/libpmc/pmc.core2.3 Modified: head/lib/libpmc/pmc.atom.3 ============================================================================== --- head/lib/libpmc/pmc.atom.3 Thu Nov 13 16:17:50 2008 (r184931) +++ head/lib/libpmc/pmc.atom.3 Thu Nov 13 16:32:20 2008 (r184932) @@ -930,7 +930,7 @@ The number of cycles micro-ops were disp The number of cycles micro-ops were dispatched for execution on port 4. .It Li RS_UOPS_DISPATCHED.PORT5 -.Pq Event A1H , Umask 20 +.Pq Event A1H , Umask 20H The number of cycles micro-ops were dispatched for execution on port 5. .It Li SB_DRAIN_CYCLES @@ -1116,7 +1116,7 @@ globally observed. The number of cycles while a store was blocked due to a conflict with an internal or external snoop. .It Li STORE_FORWARDS.GOOD -.Pq Event 02, Umask 81H +.Pq Event 02H , Umask 81H The number of times stored data was forwarded directly to a load. .It Li THERMAL_TRIP .Pq Event 3BH , Umask C0H Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Thu Nov 13 16:17:50 2008 (r184931) +++ head/lib/libpmc/pmc.core.3 Thu Nov 13 16:32:20 2008 (r184932) @@ -234,12 +234,12 @@ The number of branch instructions execut .Pq Event E0H , Umask 00H The number of branch instructions decoded. .It Li Br_Instr_Ret -.Pq Event C4H, Umask 00H +.Pq Event C4H , Umask 00H .Pq Alias Qq "Branch Instruction Retired" The number of branch instructions retired. This is an architectural performance event. .It Li Br_MisPred_Ret -.Pq Event C5H, Umask 00H +.Pq Event C5H , Umask 00H .Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. This is an architectural performance event. @@ -553,7 +553,7 @@ The number of L2 cache writes including .Pq Event 03H , Umask 00H The number of load operations delayed due to store buffer blocks. .It Li LLC_Misses -.Pq Event 2EH, Umask 41H +.Pq Event 2EH , Umask 41H The number of cache misses for references to the last level cache, excluding misses due to hardware prefetches. This is an architectural performance event. @@ -561,7 +561,7 @@ This is an architectural performance eve The number of references to the last level cache, excluding those due to hardware prefetches. This is an architectural performance event. -.Pq Event 2EH, Umask 4FH +.Pq Event 2EH , Umask 4FH This is an architectural performance event. .It Li MMX_Assist .Pq Event CDH , Umask 00H Modified: head/lib/libpmc/pmc.core2.3 ============================================================================== --- head/lib/libpmc/pmc.core2.3 Thu Nov 13 16:17:50 2008 (r184931) +++ head/lib/libpmc/pmc.core2.3 Thu Nov 13 16:32:20 2008 (r184932) @@ -275,7 +275,7 @@ The number of branches executed, but not The number of branch instructions retired. This is an architectural performance event. .It Li BR_INST_RETIRED.MISPRED -.Pq Event C5H, Umask 00H +.Pq Event C5H , Umask 00H .Pq Alias Qq "Branch Misses Retired" The number of mispredicted branch instructions retired. This is an architectural performance event. From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 17:13:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7780810656B1; Thu, 13 Nov 2008 17:13:16 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E48E8FC1D; Thu, 13 Nov 2008 17:13:16 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADHDGUF064544; Thu, 13 Nov 2008 17:13:16 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADHDGIG064543; Thu, 13 Nov 2008 17:13:16 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200811131713.mADHDGIG064543@svn.freebsd.org> From: Doug Ambrisko Date: Thu, 13 Nov 2008 17:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184933 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 17:13:16 -0000 Author: ambrisko Date: Thu Nov 13 17:13:16 2008 New Revision: 184933 URL: http://svn.freebsd.org/changeset/base/184933 Log: One more piece to add to make sense data work for a user app. from LSI. Submitted by: LSI MFC after: 3 days Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Thu Nov 13 16:32:20 2008 (r184932) +++ head/sys/dev/mfi/mfi.c Thu Nov 13 17:13:16 2008 (r184933) @@ -2069,6 +2069,11 @@ mfi_ioctl(struct cdev *dev, u_long cmd, if (cm->cm_frame->header.cmd == MFI_CMD_DCMD) locked = mfi_config_lock(sc, cm->cm_frame->dcmd.opcode); + if (cm->cm_frame->header.cmd == MFI_CMD_PD_SCSI_IO) { + cm->cm_frame->pass.sense_addr_lo = cm->cm_sense_busaddr; + cm->cm_frame->pass.sense_addr_hi = 0; + } + mtx_lock(&sc->mfi_io_lock); error = mfi_check_command_pre(sc, cm); if (error) { @@ -2305,6 +2310,11 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ if (cm->cm_frame->header.cmd == MFI_CMD_DCMD) locked = mfi_config_lock(sc, cm->cm_frame->dcmd.opcode); + if (cm->cm_frame->header.cmd == MFI_CMD_PD_SCSI_IO) { + cm->cm_frame->pass.sense_addr_lo = cm->cm_sense_busaddr; + cm->cm_frame->pass.sense_addr_hi = 0; + } + mtx_lock(&sc->mfi_io_lock); error = mfi_check_command_pre(sc, cm); if (error) { From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 17:40:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13E9E1065676; Thu, 13 Nov 2008 17:40:22 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C0BF8FC0A; Thu, 13 Nov 2008 17:40:22 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADHeMcK065040; Thu, 13 Nov 2008 17:40:22 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADHeMDr065039; Thu, 13 Nov 2008 17:40:22 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200811131740.mADHeMDr065039@svn.freebsd.org> From: Doug Ambrisko Date: Thu, 13 Nov 2008 17:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184934 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 17:40:22 -0000 Author: ambrisko Date: Thu Nov 13 17:40:21 2008 New Revision: 184934 URL: http://svn.freebsd.org/changeset/base/184934 Log: For now on every 10 cyclinder groups flush the buffer cache to free up space. If the buffer cache fills up then the disk systems can grind to a halt. Better tuning can be figured out later. Tested by: Tim, others and work Reviewed by: Kostik Belousov PR: 128832 Modified: head/sys/ufs/ffs/ffs_snapshot.c Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:13:16 2008 (r184933) +++ head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:40:21 2008 (r184934) @@ -351,6 +351,8 @@ restart: if (error) goto out; bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); } /* * Copy all the cylinder group maps. Although the @@ -372,6 +374,8 @@ restart: goto out; error = cgaccount(cg, vp, nbp, 1); bawrite(nbp); + if (cg % 10 == 0) + ffs_syncvnode(vp, MNT_WAIT); if (error) goto out; } From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 17:47:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6BA01065678; Thu, 13 Nov 2008 17:47:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE858FC0A; Thu, 13 Nov 2008 17:47:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L0gIB-000Jsa-Td; Thu, 13 Nov 2008 19:47:44 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mADHlepU017887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Nov 2008 19:47:41 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mADHlemq050534; Thu, 13 Nov 2008 19:47:40 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mADHleah050533; Thu, 13 Nov 2008 19:47:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Nov 2008 19:47:40 +0200 From: Kostik Belousov To: Doug Ambrisko Message-ID: <20081113174740.GV47073@deviant.kiev.zoral.com.ua> References: <200811131740.mADHeMDr065039@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gn1ylXQ+YRNuZICZ" Content-Disposition: inline In-Reply-To: <200811131740.mADHeMDr065039@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L0gIB-000Jsa-Td d702931950b8422a59510640c5f8fea5 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184934 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 17:47:46 -0000 --gn1ylXQ+YRNuZICZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 13, 2008 at 05:40:21PM +0000, Doug Ambrisko wrote: > Author: ambrisko > Date: Thu Nov 13 17:40:21 2008 > New Revision: 184934 > URL: http://svn.freebsd.org/changeset/base/184934 >=20 > Log: > For now on every 10 cyclinder groups flush the buffer cache to free > up space. If the buffer cache fills up then the disk systems can > grind to a halt. Better tuning can be figured out later. > =20 > Tested by: Tim, others and work > Reviewed by: Kostik Belousov > PR: 128832 >=20 > Modified: > head/sys/ufs/ffs/ffs_snapshot.c >=20 > Modified: head/sys/ufs/ffs/ffs_snapshot.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:13:16 2008 (r184933) > +++ head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:40:21 2008 (r184934) > @@ -351,6 +351,8 @@ restart: > if (error) > goto out; > bawrite(nbp); > + if (cg % 10 =3D=3D 0) > + ffs_syncvnode(vp, MNT_WAIT); > } > /* > * Copy all the cylinder group maps. Although the > @@ -372,6 +374,8 @@ restart: > goto out; > error =3D cgaccount(cg, vp, nbp, 1); > bawrite(nbp); > + if (cg % 10 =3D=3D 0) > + ffs_syncvnode(vp, MNT_WAIT); > if (error) > goto out; > } Thank you ! Please, MFC it for 7.1. --gn1ylXQ+YRNuZICZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEUEARECAAYFAkkcaDwACgkQC3+MBN1Mb4jRogCdHwD5VwFVd3hUd/sBp7izsbLU A6wAmLBdCZZgZQMDyXajf0CewBKxbqM= =2KHl -----END PGP SIGNATURE----- --gn1ylXQ+YRNuZICZ-- From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 18:39:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4E0106564A; Thu, 13 Nov 2008 18:39:41 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id BEE7B8FC14; Thu, 13 Nov 2008 18:39:41 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 13 Nov 2008 10:11:30 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id mADIBJlD099326; Thu, 13 Nov 2008 10:11:19 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.1/8.14.1/Submit) id mADIBJOj099325; Thu, 13 Nov 2008 10:11:19 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200811131811.mADIBJOj099325@ambrisko.com> In-Reply-To: <20081113174740.GV47073@deviant.kiev.zoral.com.ua> To: Kostik Belousov Date: Thu, 13 Nov 2008 10:11:19 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: svn-src-head@FreeBSD.org, Doug Ambrisko , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184934 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 18:39:42 -0000 Kostik Belousov writes: | On Thu, Nov 13, 2008 at 05:40:21PM +0000, Doug Ambrisko wrote: | > Author: ambrisko | > Date: Thu Nov 13 17:40:21 2008 | > New Revision: 184934 | > URL: http://svn.freebsd.org/changeset/base/184934 | > | > Log: | > For now on every 10 cyclinder groups flush the buffer cache to free | > up space. If the buffer cache fills up then the disk systems can | > grind to a halt. Better tuning can be figured out later. | > | > Tested by: Tim, others and work | > Reviewed by: Kostik Belousov | > PR: 128832 | > | > Modified: | > head/sys/ufs/ffs/ffs_snapshot.c | > | > Modified: head/sys/ufs/ffs/ffs_snapshot.c | > ============================================================================== | > --- head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:13:16 2008 (r184933) | > +++ head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:40:21 2008 (r184934) | > @@ -351,6 +351,8 @@ restart: | > if (error) | > goto out; | > bawrite(nbp); | > + if (cg % 10 == 0) | > + ffs_syncvnode(vp, MNT_WAIT); | > } | > /* | > * Copy all the cylinder group maps. Although the | > @@ -372,6 +374,8 @@ restart: | > goto out; | > error = cgaccount(cg, vp, nbp, 1); | > bawrite(nbp); | > + if (cg % 10 == 0) | > + ffs_syncvnode(vp, MNT_WAIT); | > if (error) | > goto out; | > } | Thank you ! | | Please, MFC it for 7.1. I'll wait for some of the dust to settle first. Also I want to test a 7.1 machine here without any of my patches, then start adding some back it. I should be able to get that mostly done today unless I get hit with other work stuff. From my perspective I have a couple of low risk patches that should go in but look more radical. Doug A. From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 19:05:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EC33106567D; Thu, 13 Nov 2008 19:05:28 +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 2AE458FC18; Thu, 13 Nov 2008 19:05:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADJ5SIw066544; Thu, 13 Nov 2008 19:05:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADJ5SJJ066541; Thu, 13 Nov 2008 19:05:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811131905.mADJ5SJJ066541@svn.freebsd.org> From: Ed Schouten Date: Thu, 13 Nov 2008 19:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184935 - in head: contrib/telnet/telnetd libexec/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 19:05:28 -0000 Author: ed Date: Thu Nov 13 19:05:27 2008 New Revision: 184935 URL: http://svn.freebsd.org/changeset/base/184935 Log: Convert telnetd(8) to use posix_openpt(2). Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even though it turned out to be a different problem within the TTY code, I spotted a small issue with telnetd(8). Instead of allocating PTY's using openpty(3) or posix_openpt(2), it used its own PTY allocation routine. This means that telnetd(8) still uses /dev/ptyXX-style devices. I've also increased the size of line[]. Even though 16 should be enough, we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives us a little more freedom. Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 -> 0, instead of pts/0). Reviewed by: rink Modified: head/contrib/telnet/telnetd/ext.h head/contrib/telnet/telnetd/sys_term.c head/libexec/telnetd/Makefile Modified: head/contrib/telnet/telnetd/ext.h ============================================================================== --- head/contrib/telnet/telnetd/ext.h Thu Nov 13 17:40:21 2008 (r184934) +++ head/contrib/telnet/telnetd/ext.h Thu Nov 13 19:05:27 2008 (r184935) @@ -77,7 +77,7 @@ extern char *neturg; /* one past last b extern int pcc, ncc; extern int pty, net; -extern char line[16]; +extern char line[32]; extern int SYNCHing; /* we are in TELNET SYNCH mode */ extern void Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Thu Nov 13 17:40:21 2008 (r184934) +++ head/contrib/telnet/telnetd/sys_term.c Thu Nov 13 19:05:27 2008 (r184935) @@ -392,46 +392,31 @@ spcset(int func, cc_t *valp, cc_t **valp * * Returns the file descriptor of the opened pty. */ -char alpha[] = "0123456789abcdefghijklmnopqrstuv"; -char line[16]; +char line[32]; int getpty(int *ptynum __unused) { int p; - const char *cp; - char *p1, *p2; - int i; - - (void) strcpy(line, _PATH_DEV); - (void) strcat(line, "ptyXX"); - p1 = &line[8]; - p2 = &line[9]; + const char *pn; - for (cp = "pqrsPQRS"; *cp; cp++) { - struct stat stb; + p = posix_openpt(O_RDWR|O_NOCTTY); + if (p < 0) + return (-1); + + if (grantpt(p) == -1) + return (-1); + + if (unlockpt(p) == -1) + return (-1); + + pn = ptsname(p); + if (pn == NULL) + return (-1); + + strcpy(line, pn); - *p1 = *cp; - *p2 = '0'; - /* - * This stat() check is just to keep us from - * looping through all 256 combinations if there - * aren't that many ptys available. - */ - if (stat(line, &stb) < 0) - break; - for (i = 0; i < 32; i++) { - *p2 = alpha[i]; - p = open(line, 2); - if (p > 0) { - line[5] = 't'; - chown(line, 0, 0); - chmod(line, 0600); - return(p); - } - } - } - return(-1); + return (p); } #ifdef LINEMODE Modified: head/libexec/telnetd/Makefile ============================================================================== --- head/libexec/telnetd/Makefile Thu Nov 13 17:40:21 2008 (r184934) +++ head/libexec/telnetd/Makefile Thu Nov 13 19:05:27 2008 (r184935) @@ -17,7 +17,8 @@ SRCS= global.c slc.c state.c sys_term.c WARNS?= 2 WFORMAT?= 0 -CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK +CFLAGS+= -DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \ + -DENV_HACK -DSTREAMSPTY .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 19:49:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2316F1065674; Thu, 13 Nov 2008 19:49:17 +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 170358FC0A; Thu, 13 Nov 2008 19:49:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADJnH9H067328; Thu, 13 Nov 2008 19:49:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADJnH9B067327; Thu, 13 Nov 2008 19:49:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200811131949.mADJnH9B067327@svn.freebsd.org> From: Alexander Motin Date: Thu, 13 Nov 2008 19:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184936 - head/usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 19:49:17 -0000 Author: mav Date: Thu Nov 13 19:49:16 2008 New Revision: 184936 URL: http://svn.freebsd.org/changeset/base/184936 Log: Add ADMA, SATA and SAS mass storage subclasses. Modified: head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Thu Nov 13 19:05:27 2008 (r184935) +++ head/usr.sbin/pciconf/pciconf.c Thu Nov 13 19:49:16 2008 (r184936) @@ -272,6 +272,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 19:57:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A05CE1065678; Thu, 13 Nov 2008 19:57:33 +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 9375B8FC21; Thu, 13 Nov 2008 19:57:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADJvXPg067510; Thu, 13 Nov 2008 19:57:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADJvXDT067509; Thu, 13 Nov 2008 19:57:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200811131957.mADJvXDT067509@svn.freebsd.org> From: Alexander Motin Date: Thu, 13 Nov 2008 19:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184937 - head/sys/dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 19:57:33 -0000 Author: mav Date: Thu Nov 13 19:57:33 2008 New Revision: 184937 URL: http://svn.freebsd.org/changeset/base/184937 Log: Add ADMA, SATA and SAS mass storage subclasses reporting. Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c ============================================================================== --- head/sys/dev/pci/pci.c Thu Nov 13 19:49:16 2008 (r184936) +++ head/sys/dev/pci/pci.c Thu Nov 13 19:57:33 2008 (r184937) @@ -2949,6 +2949,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 20:11:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 082FC106568B for ; Thu, 13 Nov 2008 20:11:48 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3DF8FC12 for ; Thu, 13 Nov 2008 20:11:47 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-052-032.pools.arcor-ip.net [88.66.52.32]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis) id 0MKwh2-1L0iXa0wTM-0004iX; Thu, 13 Nov 2008 21:11:46 +0100 Received: (qmail 6073 invoked from network); 13 Nov 2008 20:11:45 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 13 Nov 2008 20:11:45 -0000 From: Max Laier Organization: FreeBSD To: Ed Schouten Date: Thu, 13 Nov 2008 21:11:44 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200811131905.mADJ5SJJ066541@svn.freebsd.org> In-Reply-To: <200811131905.mADJ5SJJ066541@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811132111.45492.max@love2party.net> X-Provags-ID: V01U2FsdGVkX18QhgKWgbX+0y0KVIUIe3ru2gV2jVgFviY5TGv nIoDApthepmNLa3kBOD4jpPJQsuAGwWswateLP2ZykwIDqNtT9 1b7mQH7whlopkwWLZuX/w== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184935 - in head: contrib/telnet/telnetd libexec/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 20:11:48 -0000 On Thursday 13 November 2008 20:05:28 Ed Schouten wrote: > I've also increased the size of line[]. Even though 16 should be enough, > we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives > us a little more freedom. > + strcpy(line, pn); Why not use str{l,n}cpy then ... even if it's big enough now. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 20:40:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DBE31065670; Thu, 13 Nov 2008 20:40:38 +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 4C37E8FC17; Thu, 13 Nov 2008 20:40:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADKecKb068336; Thu, 13 Nov 2008 20:40:38 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADKecHe068335; Thu, 13 Nov 2008 20:40:38 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811132040.mADKecHe068335@svn.freebsd.org> From: Ed Schouten Date: Thu, 13 Nov 2008 20:40:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184938 - head/contrib/telnet/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 20:40:38 -0000 Author: ed Date: Thu Nov 13 20:40:38 2008 New Revision: 184938 URL: http://svn.freebsd.org/changeset/base/184938 Log: Use strlcpy() instead of strcpy(). Requested by: mlaier Modified: head/contrib/telnet/telnetd/sys_term.c Modified: head/contrib/telnet/telnetd/sys_term.c ============================================================================== --- head/contrib/telnet/telnetd/sys_term.c Thu Nov 13 19:57:33 2008 (r184937) +++ head/contrib/telnet/telnetd/sys_term.c Thu Nov 13 20:40:38 2008 (r184938) @@ -414,7 +414,8 @@ getpty(int *ptynum __unused) if (pn == NULL) return (-1); - strcpy(line, pn); + if (strlcpy(line, pn, sizeof line) >= sizeof line) + return (-1); return (p); } From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 20:41:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 230AA1065674; Thu, 13 Nov 2008 20:41:20 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B49E38FC0A; Thu, 13 Nov 2008 20:41:19 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id EB30E1D2A4; Thu, 13 Nov 2008 21:41:18 +0100 (CET) Date: Thu, 13 Nov 2008 21:41:18 +0100 From: Ed Schouten To: Max Laier Message-ID: <20081113204118.GM81783@hoeg.nl> References: <200811131905.mADJ5SJJ066541@svn.freebsd.org> <200811132111.45492.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DH4/xewco2zMcht6" Content-Disposition: inline In-Reply-To: <200811132111.45492.max@love2party.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184935 - in head: contrib/telnet/telnetd libexec/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 20:41:20 -0000 --DH4/xewco2zMcht6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Max Laier wrote: > On Thursday 13 November 2008 20:05:28 Ed Schouten wrote: > > I've also increased the size of line[]. Even though 16 should be enou= gh, > > we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gi= ves > > us a little more freedom. >=20 > > + strcpy(line, pn); >=20 > Why not use str{l,n}cpy then ... even if it's big enough now. Good idea. I've just replaced this strcpy() call with strlcpy(). If strlcpy() fails (returning `sizeof line' or greater), we just bail out. --=20 Ed Schouten WWW: http://80386.nl/ --DH4/xewco2zMcht6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkckO4ACgkQ52SDGA2eCwWmnQCdE2wtRd7KhD084OOEIMsxnmG3 8V4An2MmnqWOk3P+IxDu5xOKQcq14pge =FUXj -----END PGP SIGNATURE----- --DH4/xewco2zMcht6-- From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 20:46:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14BD5106568E; Thu, 13 Nov 2008 20:46:10 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2E0C8FC17; Thu, 13 Nov 2008 20:46:09 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADKkAkc068589; Thu, 13 Nov 2008 20:46:10 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADKk7nd068519; Thu, 13 Nov 2008 20:46:07 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811132046.mADKk7nd068519@svn.freebsd.org> From: Peter Wemm Date: Thu, 13 Nov 2008 20:46: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: r184939 - in stable/7/lib/libc: . amd64 amd64/gen amd64/stdlib amd64/string amd64/sys i386 i386/gen i386/stdlib i386/string i386/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 20:46:10 -0000 Author: peter Date: Thu Nov 13 20:46:07 2008 New Revision: 184939 URL: http://svn.freebsd.org/changeset/base/184939 Log: MFC: 184547,184548: add END() macros for Assembler code in libc. This causes the symbol table to include the size of the function. Approved by: re (kib) Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/amd64/SYS.h stable/7/lib/libc/amd64/gen/_setjmp.S stable/7/lib/libc/amd64/gen/fabs.S stable/7/lib/libc/amd64/gen/modf.S stable/7/lib/libc/amd64/gen/rfork_thread.S stable/7/lib/libc/amd64/gen/setjmp.S stable/7/lib/libc/amd64/gen/sigsetjmp.S stable/7/lib/libc/amd64/stdlib/div.S stable/7/lib/libc/amd64/stdlib/ldiv.S stable/7/lib/libc/amd64/stdlib/lldiv.S stable/7/lib/libc/amd64/string/bcmp.S stable/7/lib/libc/amd64/string/bcopy.S stable/7/lib/libc/amd64/string/bzero.S stable/7/lib/libc/amd64/string/memcmp.S stable/7/lib/libc/amd64/string/memset.S stable/7/lib/libc/amd64/string/strcat.S stable/7/lib/libc/amd64/string/strcmp.S stable/7/lib/libc/amd64/string/strcpy.S stable/7/lib/libc/amd64/sys/brk.S stable/7/lib/libc/amd64/sys/exect.S stable/7/lib/libc/amd64/sys/getcontext.S stable/7/lib/libc/amd64/sys/pipe.S stable/7/lib/libc/amd64/sys/ptrace.S stable/7/lib/libc/amd64/sys/reboot.S stable/7/lib/libc/amd64/sys/sbrk.S stable/7/lib/libc/amd64/sys/setlogin.S stable/7/lib/libc/amd64/sys/vfork.S stable/7/lib/libc/i386/SYS.h stable/7/lib/libc/i386/gen/_ctx_start.S stable/7/lib/libc/i386/gen/_setjmp.S stable/7/lib/libc/i386/gen/fabs.S stable/7/lib/libc/i386/gen/modf.S stable/7/lib/libc/i386/gen/rfork_thread.S stable/7/lib/libc/i386/gen/setjmp.S stable/7/lib/libc/i386/gen/sigsetjmp.S stable/7/lib/libc/i386/stdlib/abs.S stable/7/lib/libc/i386/stdlib/div.S stable/7/lib/libc/i386/stdlib/labs.S stable/7/lib/libc/i386/stdlib/ldiv.S stable/7/lib/libc/i386/string/bcmp.S stable/7/lib/libc/i386/string/bcopy.S stable/7/lib/libc/i386/string/bzero.S stable/7/lib/libc/i386/string/ffs.S stable/7/lib/libc/i386/string/index.S stable/7/lib/libc/i386/string/memchr.S stable/7/lib/libc/i386/string/memcmp.S stable/7/lib/libc/i386/string/memset.S stable/7/lib/libc/i386/string/rindex.S stable/7/lib/libc/i386/string/strcat.S stable/7/lib/libc/i386/string/strchr.S stable/7/lib/libc/i386/string/strcmp.S stable/7/lib/libc/i386/string/strcpy.S stable/7/lib/libc/i386/string/strlen.S stable/7/lib/libc/i386/string/strncmp.S stable/7/lib/libc/i386/string/strrchr.S stable/7/lib/libc/i386/string/swab.S stable/7/lib/libc/i386/string/wcschr.S stable/7/lib/libc/i386/string/wcscmp.S stable/7/lib/libc/i386/string/wcslen.S stable/7/lib/libc/i386/string/wmemchr.S stable/7/lib/libc/i386/sys/Ovfork.S stable/7/lib/libc/i386/sys/brk.S stable/7/lib/libc/i386/sys/exect.S stable/7/lib/libc/i386/sys/getcontext.S stable/7/lib/libc/i386/sys/pipe.S stable/7/lib/libc/i386/sys/ptrace.S stable/7/lib/libc/i386/sys/reboot.S stable/7/lib/libc/i386/sys/sbrk.S stable/7/lib/libc/i386/sys/setlogin.S stable/7/lib/libc/i386/sys/syscall.S Modified: stable/7/lib/libc/amd64/SYS.h ============================================================================== --- stable/7/lib/libc/amd64/SYS.h Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/SYS.h Thu Nov 13 20:46:07 2008 (r184939) @@ -43,13 +43,15 @@ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx + 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + END(__CONCAT(__sys_,x)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret ; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx + 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + END(__CONCAT(__sys_,x)) #else #define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(x); \ @@ -57,13 +59,15 @@ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror) + 2: jmp HIDENAME(cerror); \ + END(__CONCAT(__sys_,x)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror) + 2: jmp HIDENAME(cerror); \ + END(__CONCAT(__sys_,x)) #endif #define KERNCALL movq %rcx, %r10; syscall Modified: stable/7/lib/libc/amd64/gen/_setjmp.S ============================================================================== --- stable/7/lib/libc/amd64/gen/_setjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/_setjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -60,6 +60,7 @@ ENTRY(_setjmp) fnstcw 64(%rax) /* 8; fpu cw */ xorq %rax,%rax ret +END(_setjmp) .weak CNAME(_longjmp) .set CNAME(_longjmp),CNAME(___longjmp) @@ -81,3 +82,4 @@ ENTRY(___longjmp) incq %rax 1: movq %rcx,0(%rsp) ret +END(___longjmp) Modified: stable/7/lib/libc/amd64/gen/fabs.S ============================================================================== --- stable/7/lib/libc/amd64/gen/fabs.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/fabs.S Thu Nov 13 20:46:07 2008 (r184939) @@ -37,6 +37,7 @@ ENTRY(fabs) movsd signbit(%rip), %xmm0 andnpd %xmm1, %xmm0 ret +END(fabs) .data signbit: Modified: stable/7/lib/libc/amd64/gen/modf.S ============================================================================== --- stable/7/lib/libc/amd64/gen/modf.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/modf.S Thu Nov 13 20:46:07 2008 (r184939) @@ -86,3 +86,4 @@ ENTRY(modf) movsd -8(%rsp),%xmm0 ret +END(modf) Modified: stable/7/lib/libc/amd64/gen/rfork_thread.S ============================================================================== --- stable/7/lib/libc/amd64/gen/rfork_thread.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/rfork_thread.S Thu Nov 13 20:46:07 2008 (r184939) @@ -99,3 +99,4 @@ ENTRY(rfork_thread) #else jmp HIDENAME(cerror) #endif +END(rfork_thread) Modified: stable/7/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/7/lib/libc/amd64/gen/setjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/setjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -69,6 +69,7 @@ ENTRY(setjmp) fnstcw 64(%rcx) /* 8; fpu cw */ xorq %rax,%rax ret +END(setjmp) .weak CNAME(longjmp) .set CNAME(longjmp),CNAME(__longjmp) @@ -99,3 +100,4 @@ ENTRY(__longjmp) incq %rax 1: movq %rcx,0(%rsp) ret +END(__longjmp) Modified: stable/7/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/7/lib/libc/amd64/gen/sigsetjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/gen/sigsetjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -77,6 +77,7 @@ ENTRY(sigsetjmp) fnstcw 64(%rcx) /* 8; fpu cw */ xorq %rax,%rax ret +END(sigsetjmp) .weak CNAME(siglongjmp) .set CNAME(siglongjmp),CNAME(__siglongjmp) @@ -109,3 +110,4 @@ ENTRY(__siglongjmp) incq %rax 1: movq %rcx,0(%rsp) ret +END(__siglongjmp) Modified: stable/7/lib/libc/amd64/stdlib/div.S ============================================================================== --- stable/7/lib/libc/amd64/stdlib/div.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/stdlib/div.S Thu Nov 13 20:46:07 2008 (r184939) @@ -15,3 +15,4 @@ ENTRY(div) salq $32,%rdx orq %rdx,%rax ret +END(div) Modified: stable/7/lib/libc/amd64/stdlib/ldiv.S ============================================================================== --- stable/7/lib/libc/amd64/stdlib/ldiv.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/stdlib/ldiv.S Thu Nov 13 20:46:07 2008 (r184939) @@ -13,3 +13,4 @@ ENTRY(ldiv) cqto idivq %rsi ret +END(ldiv) Modified: stable/7/lib/libc/amd64/stdlib/lldiv.S ============================================================================== --- stable/7/lib/libc/amd64/stdlib/lldiv.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/stdlib/lldiv.S Thu Nov 13 20:46:07 2008 (r184939) @@ -13,3 +13,4 @@ ENTRY(lldiv) cqto idivq %rsi ret +END(lldiv) Modified: stable/7/lib/libc/amd64/string/bcmp.S ============================================================================== --- stable/7/lib/libc/amd64/string/bcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/bcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -22,3 +22,4 @@ L1: setne %al movsbl %al,%eax ret +END(bcmp) Modified: stable/7/lib/libc/amd64/string/bcopy.S ============================================================================== --- stable/7/lib/libc/amd64/string/bcopy.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/bcopy.S Thu Nov 13 20:46:07 2008 (r184939) @@ -86,3 +86,12 @@ ENTRY(bcopy) movsq cld ret +#ifdef MEMCOPY +END(memcpy) +#else +#ifdef MEMMOVE +END(memmove) +#else +END(bcopy) +#endif +#endif Modified: stable/7/lib/libc/amd64/string/bzero.S ============================================================================== --- stable/7/lib/libc/amd64/string/bzero.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/bzero.S Thu Nov 13 20:46:07 2008 (r184939) @@ -41,3 +41,4 @@ L1: movq %rsi,%rcx /* zero remainder by stosb ret +END(bzero) Modified: stable/7/lib/libc/amd64/string/memcmp.S ============================================================================== --- stable/7/lib/libc/amd64/string/memcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/memcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -39,3 +39,4 @@ L6: xorl %eax,%eax /* Perform unsigned movb -1(%rsi),%dl subl %edx,%eax ret +END(memcmp) Modified: stable/7/lib/libc/amd64/string/memset.S ============================================================================== --- stable/7/lib/libc/amd64/string/memset.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/memset.S Thu Nov 13 20:46:07 2008 (r184939) @@ -58,3 +58,4 @@ L1: rep movq %r11,%rax ret +END(memset) Modified: stable/7/lib/libc/amd64/string/strcat.S ============================================================================== --- stable/7/lib/libc/amd64/string/strcat.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/strcat.S Thu Nov 13 20:46:07 2008 (r184939) @@ -163,3 +163,4 @@ ENTRY(strcat) .Ldone: ret +END(strcat) Modified: stable/7/lib/libc/amd64/string/strcmp.S ============================================================================== --- stable/7/lib/libc/amd64/string/strcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/strcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -71,3 +71,4 @@ ENTRY(strcmp) movzbq %dl,%rdx subq %rdx,%rax ret +END(strcmp) Modified: stable/7/lib/libc/amd64/string/strcpy.S ============================================================================== --- stable/7/lib/libc/amd64/string/strcpy.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/string/strcpy.S Thu Nov 13 20:46:07 2008 (r184939) @@ -109,3 +109,4 @@ ENTRY(strcpy) .Ldone: ret +END(strcpy) Modified: stable/7/lib/libc/amd64/sys/brk.S ============================================================================== --- stable/7/lib/libc/amd64/sys/brk.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/brk.S Thu Nov 13 20:46:07 2008 (r184939) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); ENTRY(_brk) pushq %rdi jmp ok +END(_brk) ENTRY(brk) pushq %rdi @@ -81,3 +82,4 @@ err: #else jmp HIDENAME(cerror) #endif +END(brk) Modified: stable/7/lib/libc/amd64/sys/exect.S ============================================================================== --- stable/7/lib/libc/amd64/sys/exect.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/exect.S Thu Nov 13 20:46:07 2008 (r184939) @@ -53,3 +53,4 @@ ENTRY(exect) #else jmp HIDENAME(cerror) #endif +END(exect) Modified: stable/7/lib/libc/amd64/sys/getcontext.S ============================================================================== --- stable/7/lib/libc/amd64/sys/getcontext.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/getcontext.S Thu Nov 13 20:46:07 2008 (r184939) @@ -52,3 +52,4 @@ ENTRY(__sys_getcontext) #else jmp HIDENAME(cerror) #endif +END(__sys_getcontext) Modified: stable/7/lib/libc/amd64/sys/pipe.S ============================================================================== --- stable/7/lib/libc/amd64/sys/pipe.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/pipe.S Thu Nov 13 20:46:07 2008 (r184939) @@ -57,3 +57,4 @@ ENTRY(__sys_pipe) #else jmp HIDENAME(cerror) #endif +END(__sys_pipe) Modified: stable/7/lib/libc/amd64/sys/ptrace.S ============================================================================== --- stable/7/lib/libc/amd64/sys/ptrace.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/ptrace.S Thu Nov 13 20:46:07 2008 (r184939) @@ -57,3 +57,4 @@ err: #else jmp HIDENAME(cerror) #endif +END(ptrace) Modified: stable/7/lib/libc/amd64/sys/reboot.S ============================================================================== --- stable/7/lib/libc/amd64/sys/reboot.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/reboot.S Thu Nov 13 20:46:07 2008 (r184939) @@ -54,3 +54,4 @@ ENTRY(__sys_reboot) #else jmp HIDENAME(cerror) #endif +END(__sys_reboot) Modified: stable/7/lib/libc/amd64/sys/sbrk.S ============================================================================== --- stable/7/lib/libc/amd64/sys/sbrk.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/sbrk.S Thu Nov 13 20:46:07 2008 (r184939) @@ -85,3 +85,4 @@ err: #else jmp HIDENAME(cerror) #endif +END(sbrk) Modified: stable/7/lib/libc/amd64/sys/setlogin.S ============================================================================== --- stable/7/lib/libc/amd64/sys/setlogin.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/setlogin.S Thu Nov 13 20:46:07 2008 (r184939) @@ -62,3 +62,4 @@ ENTRY(__sys_setlogin) #else jmp HIDENAME(cerror) #endif +END(__sys_setlogin) Modified: stable/7/lib/libc/amd64/sys/vfork.S ============================================================================== --- stable/7/lib/libc/amd64/sys/vfork.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/amd64/sys/vfork.S Thu Nov 13 20:46:07 2008 (r184939) @@ -56,3 +56,4 @@ ENTRY(__sys_vfork) #else jmp HIDENAME(cerror) #endif +END(__sys_vfork) Modified: stable/7/lib/libc/i386/SYS.h ============================================================================== --- stable/7/lib/libc/i386/SYS.h Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/SYS.h Thu Nov 13 20:46:07 2008 (r184939) @@ -44,13 +44,14 @@ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b -#define RSYSCALL(x) SYSCALL(x); ret +#define RSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x)) #define PSEUDO(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret + mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret; \ + END(__CONCAT(__sys_,x)) /* gas messes up offset -- although we don't currently need it, do for BCS */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x Modified: stable/7/lib/libc/i386/gen/_ctx_start.S ============================================================================== --- stable/7/lib/libc/i386/gen/_ctx_start.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/_ctx_start.S Thu Nov 13 20:46:07 2008 (r184939) @@ -49,3 +49,4 @@ ENTRY(_ctx_start) call PIC_PLT(_ctx_done) /* should never return */ call PIC_PLT(abort) /* fubar */ ret +END(_ctx_start) Modified: stable/7/lib/libc/i386/gen/_setjmp.S ============================================================================== --- stable/7/lib/libc/i386/gen/_setjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/_setjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -58,6 +58,7 @@ ENTRY(_setjmp) fnstcw 24(%eax) xorl %eax,%eax ret +END(_setjmp) .weak CNAME(_longjmp) .set CNAME(_longjmp),CNAME(___longjmp) @@ -77,3 +78,4 @@ ENTRY(___longjmp) incl %eax 1: movl %ecx,0(%esp) ret +END(___longjmp) Modified: stable/7/lib/libc/i386/gen/fabs.S ============================================================================== --- stable/7/lib/libc/i386/gen/fabs.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/fabs.S Thu Nov 13 20:46:07 2008 (r184939) @@ -40,3 +40,4 @@ ENTRY(fabs) fldl 4(%esp) fabs ret +END(fabs) Modified: stable/7/lib/libc/i386/gen/modf.S ============================================================================== --- stable/7/lib/libc/i386/gen/modf.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/modf.S Thu Nov 13 20:46:07 2008 (r184939) @@ -82,3 +82,4 @@ ENTRY(modf) fdivp /* return +/- 0 for +/- Inf, NaN for NaN */ leave ret +END(modf) Modified: stable/7/lib/libc/i386/gen/rfork_thread.S ============================================================================== --- stable/7/lib/libc/i386/gen/rfork_thread.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/rfork_thread.S Thu Nov 13 20:46:07 2008 (r184939) @@ -115,3 +115,4 @@ ENTRY(rfork_thread) popl %ebp PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(rfork_thread) Modified: stable/7/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/7/lib/libc/i386/gen/setjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/setjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -69,6 +69,7 @@ ENTRY(setjmp) fnstcw 24(%ecx) xorl %eax,%eax ret +END(setjmp) .weak CNAME(longjmp) .set CNAME(longjmp),CNAME(__longjmp) @@ -97,3 +98,4 @@ ENTRY(__longjmp) incl %eax 1: movl %ecx,0(%esp) ret +END(__longjmp) Modified: stable/7/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/7/lib/libc/i386/gen/sigsetjmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/gen/sigsetjmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -78,10 +78,11 @@ ENTRY(sigsetjmp) fnstcw 24(%ecx) xorl %eax,%eax ret +END(sigsetjmp) .weak CNAME(siglongjmp); - .set CNAME(siglongjmp),CNAME(__siglongjmp); -ENTRY(__siglongjmp); + .set CNAME(siglongjmp),CNAME(__siglongjmp) +ENTRY(__siglongjmp) movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f @@ -108,3 +109,4 @@ ENTRY(__siglongjmp); incl %eax 1: movl %ecx,0(%esp) ret +END(__siglongjmp) Modified: stable/7/lib/libc/i386/stdlib/abs.S ============================================================================== --- stable/7/lib/libc/i386/stdlib/abs.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/stdlib/abs.S Thu Nov 13 20:46:07 2008 (r184939) @@ -44,3 +44,4 @@ ENTRY(abs) jns 1f negl %eax 1: ret +END(abs) Modified: stable/7/lib/libc/i386/stdlib/div.S ============================================================================== --- stable/7/lib/libc/i386/stdlib/div.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/stdlib/div.S Thu Nov 13 20:46:07 2008 (r184939) @@ -36,3 +36,4 @@ ENTRY(div) movl %eax,4(%esp) movl %edx,8(%esp) ret +END(div) Modified: stable/7/lib/libc/i386/stdlib/labs.S ============================================================================== --- stable/7/lib/libc/i386/stdlib/labs.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/stdlib/labs.S Thu Nov 13 20:46:07 2008 (r184939) @@ -44,3 +44,4 @@ ENTRY(labs) jns 1f negl %eax 1: ret +END(labs) Modified: stable/7/lib/libc/i386/stdlib/ldiv.S ============================================================================== --- stable/7/lib/libc/i386/stdlib/ldiv.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/stdlib/ldiv.S Thu Nov 13 20:46:07 2008 (r184939) @@ -39,3 +39,4 @@ ENTRY(ldiv) movl %eax,4(%esp) movl %edx,8(%esp) ret +END(ldiv) Modified: stable/7/lib/libc/i386/string/bcmp.S ============================================================================== --- stable/7/lib/libc/i386/string/bcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/bcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -61,3 +61,4 @@ L1: popl %esi popl %edi ret +END(bcmp) Modified: stable/7/lib/libc/i386/string/bcopy.S ============================================================================== --- stable/7/lib/libc/i386/string/bcopy.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/bcopy.S Thu Nov 13 20:46:07 2008 (r184939) @@ -97,3 +97,12 @@ ENTRY(bcopy) popl %esi cld ret +#ifdef MEMCOPY +END(memcpy) +#else +#ifdef MEMMOVE +END(memmove) +#else +END(bcopy) +#endif +#endif Modified: stable/7/lib/libc/i386/string/bzero.S ============================================================================== --- stable/7/lib/libc/i386/string/bzero.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/bzero.S Thu Nov 13 20:46:07 2008 (r184939) @@ -79,3 +79,4 @@ L1: rep popl %ebx popl %edi ret +END(bzero) Modified: stable/7/lib/libc/i386/string/ffs.S ============================================================================== --- stable/7/lib/libc/i386/string/ffs.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/ffs.S Thu Nov 13 20:46:07 2008 (r184939) @@ -51,3 +51,4 @@ ENTRY(ffs) .align 2 L1: xorl %eax,%eax /* clear result */ ret +END(ffs) Modified: stable/7/lib/libc/i386/string/index.S ============================================================================== --- stable/7/lib/libc/i386/string/index.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/index.S Thu Nov 13 20:46:07 2008 (r184939) @@ -61,3 +61,4 @@ L1: L2: popl %ebx ret +END(index) Modified: stable/7/lib/libc/i386/string/memchr.S ============================================================================== --- stable/7/lib/libc/i386/string/memchr.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/memchr.S Thu Nov 13 20:46:07 2008 (r184939) @@ -56,3 +56,4 @@ ENTRY(memchr) L1: xorl %eax,%eax popl %edi ret +END(memchr) Modified: stable/7/lib/libc/i386/string/memcmp.S ============================================================================== --- stable/7/lib/libc/i386/string/memcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/memcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -73,3 +73,4 @@ L6: movzbl -1(%edi),%eax /* Perform un popl %esi popl %edi ret +END(memcmp) Modified: stable/7/lib/libc/i386/string/memset.S ============================================================================== --- stable/7/lib/libc/i386/string/memset.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/memset.S Thu Nov 13 20:46:07 2008 (r184939) @@ -87,3 +87,4 @@ L1: rep popl %ebx popl %edi ret +END(memset) Modified: stable/7/lib/libc/i386/string/rindex.S ============================================================================== --- stable/7/lib/libc/i386/string/rindex.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/rindex.S Thu Nov 13 20:46:07 2008 (r184939) @@ -62,3 +62,4 @@ L2: jne L1 popl %ebx ret +END(rindex) Modified: stable/7/lib/libc/i386/string/strcat.S ============================================================================== --- stable/7/lib/libc/i386/string/strcat.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strcat.S Thu Nov 13 20:46:07 2008 (r184939) @@ -98,3 +98,4 @@ L1: movb (%edx),%al /* unroll loop, but L2: popl %eax /* pop destination address */ popl %edi /* restore edi */ ret +END(strcat) Modified: stable/7/lib/libc/i386/string/strchr.S ============================================================================== --- stable/7/lib/libc/i386/string/strchr.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strchr.S Thu Nov 13 20:46:07 2008 (r184939) @@ -61,3 +61,4 @@ L1: L2: popl %ebx ret +END(strchr) Modified: stable/7/lib/libc/i386/string/strcmp.S ============================================================================== --- stable/7/lib/libc/i386/string/strcmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strcmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -117,3 +117,4 @@ L3: movzbl (%eax),%eax movzbl (%edx),%edx subl %edx,%eax ret +END(strcmp) Modified: stable/7/lib/libc/i386/string/strcpy.S ============================================================================== --- stable/7/lib/libc/i386/string/strcpy.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strcpy.S Thu Nov 13 20:46:07 2008 (r184939) @@ -87,3 +87,4 @@ L1: movb (%edx),%al /* unroll loop, but jne L1 L2: popl %eax /* pop dst address */ ret +END(strcpy) Modified: stable/7/lib/libc/i386/string/strlen.S ============================================================================== --- stable/7/lib/libc/i386/string/strlen.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strlen.S Thu Nov 13 20:46:07 2008 (r184939) @@ -51,3 +51,4 @@ ENTRY(strlen) leal -1(%ecx),%eax /* and subtracting one */ popl %edi ret +END(strlen) Modified: stable/7/lib/libc/i386/string/strncmp.S ============================================================================== --- stable/7/lib/libc/i386/string/strncmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strncmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -164,3 +164,4 @@ L3: movzbl (%eax),%eax /* unsigned comp L4: xorl %eax,%eax popl %ebx ret +END(strncmp) Modified: stable/7/lib/libc/i386/string/strrchr.S ============================================================================== --- stable/7/lib/libc/i386/string/strrchr.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/strrchr.S Thu Nov 13 20:46:07 2008 (r184939) @@ -62,3 +62,4 @@ L2: jne L1 popl %ebx ret +END(strrchr) Modified: stable/7/lib/libc/i386/string/swab.S ============================================================================== --- stable/7/lib/libc/i386/string/swab.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/swab.S Thu Nov 13 20:46:07 2008 (r184939) @@ -97,3 +97,4 @@ L3: lodsw L4: popl %edi popl %esi ret +END(swab) Modified: stable/7/lib/libc/i386/string/wcschr.S ============================================================================== --- stable/7/lib/libc/i386/string/wcschr.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/wcschr.S Thu Nov 13 20:46:07 2008 (r184939) @@ -74,3 +74,4 @@ found0: popl %ebx no: popl %ebx xorl %eax,%eax ret +END(wcschr) Modified: stable/7/lib/libc/i386/string/wcscmp.S ============================================================================== --- stable/7/lib/libc/i386/string/wcscmp.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/wcscmp.S Thu Nov 13 20:46:07 2008 (r184939) @@ -77,3 +77,4 @@ no0: subl (%esi),%eax popl %esi popl %edi ret +END(wcscmp) Modified: stable/7/lib/libc/i386/string/wcslen.S ============================================================================== --- stable/7/lib/libc/i386/string/wcslen.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/wcslen.S Thu Nov 13 20:46:07 2008 (r184939) @@ -66,3 +66,4 @@ found2: incl %eax found1: incl %eax found0: popl %ebx ret +END(wcslen) Modified: stable/7/lib/libc/i386/string/wmemchr.S ============================================================================== --- stable/7/lib/libc/i386/string/wmemchr.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/string/wmemchr.S Thu Nov 13 20:46:07 2008 (r184939) @@ -103,3 +103,4 @@ no: xorl %eax,%eax popl %ebx popl %edi ret +END(wmemchr) Modified: stable/7/lib/libc/i386/sys/Ovfork.S ============================================================================== --- stable/7/lib/libc/i386/sys/Ovfork.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/Ovfork.S Thu Nov 13 20:46:07 2008 (r184939) @@ -52,3 +52,4 @@ ENTRY(__sys_vfork) pushl %ecx PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(__sys_vfork) Modified: stable/7/lib/libc/i386/sys/brk.S ============================================================================== --- stable/7/lib/libc/i386/sys/brk.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/brk.S Thu Nov 13 20:46:07 2008 (r184939) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); .globl HIDENAME(minbrk) ENTRY(_brk) jmp ok +END(_brk) ENTRY(brk) #ifdef PIC @@ -84,3 +85,4 @@ ok: err: jmp HIDENAME(cerror) #endif +END(brk) Modified: stable/7/lib/libc/i386/sys/exect.S ============================================================================== --- stable/7/lib/libc/i386/sys/exect.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/exect.S Thu Nov 13 20:46:07 2008 (r184939) @@ -49,3 +49,4 @@ ENTRY(exect) KERNCALL PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */ +END(exect) Modified: stable/7/lib/libc/i386/sys/getcontext.S ============================================================================== --- stable/7/lib/libc/i386/sys/getcontext.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/getcontext.S Thu Nov 13 20:46:07 2008 (r184939) @@ -48,3 +48,4 @@ ENTRY(__sys_getcontext) 1: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(__sys_getcontext) Modified: stable/7/lib/libc/i386/sys/pipe.S ============================================================================== --- stable/7/lib/libc/i386/sys/pipe.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/pipe.S Thu Nov 13 20:46:07 2008 (r184939) @@ -44,3 +44,4 @@ SYSCALL(pipe) movl %edx,4(%ecx) movl $0,%eax ret +END(pipe) Modified: stable/7/lib/libc/i386/sys/ptrace.S ============================================================================== --- stable/7/lib/libc/i386/sys/ptrace.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/ptrace.S Thu Nov 13 20:46:07 2008 (r184939) @@ -55,3 +55,4 @@ ENTRY(ptrace) err: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(ptrace) Modified: stable/7/lib/libc/i386/sys/reboot.S ============================================================================== --- stable/7/lib/libc/i386/sys/reboot.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/reboot.S Thu Nov 13 20:46:07 2008 (r184939) @@ -40,3 +40,4 @@ __FBSDID("$FreeBSD$"); SYSCALL(reboot) iret +END(reboot) Modified: stable/7/lib/libc/i386/sys/sbrk.S ============================================================================== --- stable/7/lib/libc/i386/sys/sbrk.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/sbrk.S Thu Nov 13 20:46:07 2008 (r184939) @@ -88,3 +88,4 @@ back: err: jmp HIDENAME(cerror) #endif /* PIC */ +END(sbrk) Modified: stable/7/lib/libc/i386/sys/setlogin.S ============================================================================== --- stable/7/lib/libc/i386/sys/setlogin.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/setlogin.S Thu Nov 13 20:46:07 2008 (r184939) @@ -52,3 +52,4 @@ SYSCALL(setlogin) movl $0,CNAME(_logname_valid) #endif ret /* setlogin(name) */ +END(setlogin) Modified: stable/7/lib/libc/i386/sys/syscall.S ============================================================================== --- stable/7/lib/libc/i386/sys/syscall.S Thu Nov 13 20:40:38 2008 (r184938) +++ stable/7/lib/libc/i386/sys/syscall.S Thu Nov 13 20:46:07 2008 (r184939) @@ -50,3 +50,4 @@ ENTRY(syscall) 1: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(syscall) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 21:11:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E318B106564A; Thu, 13 Nov 2008 21:11:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4A748FC18; Thu, 13 Nov 2008 21:11:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADLBY2Y069095; Thu, 13 Nov 2008 21:11:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADLBYqu069094; Thu, 13 Nov 2008 21:11:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200811132111.mADLBYqu069094@svn.freebsd.org> From: Rui Paulo Date: Thu, 13 Nov 2008 21:11:34 +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: r184940 - in stable/7/contrib: . traceroute X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 21:11:35 -0000 Author: rpaulo Date: Thu Nov 13 21:11:34 2008 New Revision: 184940 URL: http://svn.freebsd.org/changeset/base/184940 Log: Reverse botched mergeinfo for r176428. Approved by: re (implicit) Modified: stable/7/contrib/ (props changed) stable/7/contrib/traceroute/ (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 21:34:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64419106567E; Thu, 13 Nov 2008 21:34:35 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE8A8FC13; Thu, 13 Nov 2008 21:34:35 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADLYZWR069526; Thu, 13 Nov 2008 21:34:35 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADLYZls069521; Thu, 13 Nov 2008 21:34:35 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200811132134.mADLYZls069521@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Nov 2008 21:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184941 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 21:34:35 -0000 Author: n_hibma Date: Thu Nov 13 21:34:34 2008 New Revision: 184941 URL: http://svn.freebsd.org/changeset/base/184941 Log: Add a reset device command to ugen.c. This is needed to make some devices work that require a firmware upload and a USB reset afterwards. Modified: head/sys/dev/usb/ugen.c head/sys/dev/usb/usb.h head/sys/dev/usb/usb_subr.c head/sys/dev/usb/usbdi.c head/sys/dev/usb/usbdi.h Modified: head/sys/dev/usb/ugen.c ============================================================================== --- head/sys/dev/usb/ugen.c Thu Nov 13 21:11:34 2008 (r184940) +++ head/sys/dev/usb/ugen.c Thu Nov 13 21:34:34 2008 (r184941) @@ -1059,8 +1059,8 @@ ugen_isoc_rintr(usbd_xfer_handle xfer, u sce->cur += count; if(sce->cur >= sce->limit) sce->cur = sce->ibuf + (sce->limit - sce->cur); - DPRINTFN(5, ("ugen_isoc_rintr: throwing away %d bytes\n", - count)); + DPRINTF(("ugen_isoc_rintr: throwing away %d bytes\n", + count)); } isize = UGETW(sce->edesc->wMaxPacketSize); @@ -1427,7 +1427,6 @@ ugen_do_ioctl(struct ugen_softc *sc, int struct iovec iov; struct uio uio; void *ptr = 0; - usbd_status err; int error = 0; if (!(flag & FWRITE)) @@ -1485,6 +1484,11 @@ ugen_do_ioctl(struct ugen_softc *sc, int usbd_fill_deviceinfo(sc->sc_udev, (struct usb_device_info *)addr, 1); break; + case USB_RESET_DEVICE: + err = usbd_reset_device(sc->sc_udev); + if (err) + return EIO; + break; default: return (EINVAL); } Modified: head/sys/dev/usb/usb.h ============================================================================== --- head/sys/dev/usb/usb.h Thu Nov 13 21:11:34 2008 (r184940) +++ head/sys/dev/usb/usb.h Thu Nov 13 21:34:34 2008 (r184941) @@ -699,6 +699,7 @@ struct usb_event { #define USB_GET_DEVICEINFO _IOR ('U', 112, struct usb_device_info) #define USB_SET_SHORT_XFER _IOW ('U', 113, int) #define USB_SET_TIMEOUT _IOW ('U', 114, int) +#define USB_RESET_DEVICE _IO ('U', 115) /* Modem device */ #define USB_GET_CM_OVER_DATA _IOR ('U', 130, int) Modified: head/sys/dev/usb/usb_subr.c ============================================================================== --- head/sys/dev/usb/usb_subr.c Thu Nov 13 21:11:34 2008 (r184940) +++ head/sys/dev/usb/usb_subr.c Thu Nov 13 21:34:34 2008 (r184941) @@ -322,16 +322,10 @@ usbd_delay_ms(usbd_device_handle dev, u_ usbd_status usbd_reset_port(usbd_device_handle dev, int port, usb_port_status_t *ps) { - usb_device_request_t req; usbd_status err; int n; - req.bmRequestType = UT_WRITE_CLASS_OTHER; - req.bRequest = UR_SET_FEATURE; - USETW(req.wValue, UHF_PORT_RESET); - USETW(req.wIndex, port); - USETW(req.wLength, 0); - err = usbd_do_request(dev, &req, 0); + err = usbd_set_port_feature(dev, port, UHF_PORT_RESET); DPRINTFN(1,("usbd_reset_port: port %d reset done, error=%s\n", port, usbd_errstr(err))); if (err) Modified: head/sys/dev/usb/usbdi.c ============================================================================== --- head/sys/dev/usb/usbdi.c Thu Nov 13 21:11:34 2008 (r184940) +++ head/sys/dev/usb/usbdi.c Thu Nov 13 21:34:34 2008 (r184941) @@ -1235,6 +1235,15 @@ usbd_set_polling(usbd_device_handle dev, dev->bus->methods->soft_intr(dev->bus); } +usbd_status +usbd_reset_device(usbd_device_handle dev) +{ + usbd_device_handle parent = dev->myhub; + struct usbd_port *up = dev->powersrc; + + return usbd_reset_port(parent, up->portno, &up->status); +} + usb_endpoint_descriptor_t * usbd_get_endpoint_descriptor(usbd_interface_handle iface, u_int8_t address) Modified: head/sys/dev/usb/usbdi.h ============================================================================== --- head/sys/dev/usb/usbdi.h Thu Nov 13 21:11:34 2008 (r184940) +++ head/sys/dev/usb/usbdi.h Thu Nov 13 21:34:34 2008 (r184941) @@ -160,6 +160,7 @@ usb_endpoint_descriptor_t *usbd_find_ede void usbd_dopoll(usbd_interface_handle); void usbd_set_polling(usbd_device_handle, int); +usbd_status usbd_reset_device(usbd_device_handle); const char *usbd_errstr(usbd_status); From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 21:46:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC81F1065670; Thu, 13 Nov 2008 21:46:19 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C501B8FC08; Thu, 13 Nov 2008 21:46:19 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADLkJgH069931; Thu, 13 Nov 2008 21:46:19 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADLkJUF069928; Thu, 13 Nov 2008 21:46:19 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200811132146.mADLkJUF069928@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Nov 2008 21:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184942 - in head/sys: dev/usb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 21:46:20 -0000 Author: n_hibma Date: Thu Nov 13 21:46:19 2008 New Revision: 184942 URL: http://svn.freebsd.org/changeset/base/184942 Log: Silence detach messages if the device has marked itself quiet (u3g). MFC after: 3 weeks Modified: head/sys/dev/usb/usb_subr.c head/sys/kern/subr_bus.c Modified: head/sys/dev/usb/usb_subr.c ============================================================================== --- head/sys/dev/usb/usb_subr.c Thu Nov 13 21:34:34 2008 (r184941) +++ head/sys/dev/usb/usb_subr.c Thu Nov 13 21:46:19 2008 (r184942) @@ -679,11 +679,11 @@ usbd_set_config_index(usbd_device_handle DPRINTF(("power exceeded %d %d\n", power,dev->powersrc->power)); /* XXX print nicer message. */ if (msg) - printf("%s: device addr %d (config %d) exceeds power " - "budget, %d mA > %d mA\n", - device_get_nameunit(dev->bus->bdev), dev->address, - cdp->bConfigurationValue, - power, dev->powersrc->power); + device_printf(dev->bus->bdev, + "device addr %d (config %d) exceeds " + "power budget, %d mA > %d mA\n", + dev->address, cdp->bConfigurationValue, + power, dev->powersrc->power); err = USBD_NO_POWER; goto bad; } @@ -1017,8 +1017,7 @@ usbd_new_device(device_t parent, usbd_bu bus, port, depth, speed)); addr = usbd_getnewaddr(bus); if (addr < 0) { - printf("%s: No free USB addresses, new device ignored.\n", - device_get_nameunit(bus->bdev)); + device_printf(bus->bdev, "No free USB addresses\n"); return (USBD_NO_ADDR); } @@ -1364,11 +1363,14 @@ usb_disconnect_port(struct usbd_port *up if (dev->subdevs != NULL) { DPRINTFN(3,("usb_disconnect_port: disconnect subdevs\n")); for (i = 0; dev->subdevs[i]; i++) { - printf("%s: at %s", device_get_nameunit(dev->subdevs[i]), - hubname); - if (up->portno != 0) - printf(" port %d", up->portno); - printf(" (addr %d) disconnected\n", dev->address); + if (!device_is_quiet(dev->subdevs[i])) { + device_printf(dev->subdevs[i], + "at %s", hubname); + if (up->portno != 0) + printf(" port %d", up->portno); + printf(" (addr %d) disconnected\n", dev->address); + } + struct usb_attach_arg *uaap = device_get_ivars(dev->subdevs[i]); device_detach(dev->subdevs[i]); Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Thu Nov 13 21:34:34 2008 (r184941) +++ head/sys/kern/subr_bus.c Thu Nov 13 21:46:19 2008 (r184942) @@ -2476,7 +2476,8 @@ device_detach(device_t dev) if ((error = DEVICE_DETACH(dev)) != 0) return (error); devremoved(dev); - device_printf(dev, "detached\n"); + if (!device_is_quiet(dev)) + device_printf(dev, "detached\n"); if (dev->parent) BUS_CHILD_DETACHED(dev->parent, dev); From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 21:49:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9EE9106564A; Thu, 13 Nov 2008 21:49:07 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2A998FC1B; Thu, 13 Nov 2008 21:49:07 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADLn7Mw070195; Thu, 13 Nov 2008 21:49:07 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADLn7ox070194; Thu, 13 Nov 2008 21:49:07 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200811132149.mADLn7ox070194@svn.freebsd.org> From: Nick Hibma Date: Thu, 13 Nov 2008 21:49:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184943 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 21:49:08 -0000 Author: n_hibma Date: Thu Nov 13 21:49:07 2008 New Revision: 184943 URL: http://svn.freebsd.org/changeset/base/184943 Log: Hide the attach message. This needs to be done in the probe as well, as the softc is reset a few times during probing. Print 'changing to modem mode' messages if booting verbose to show the reason for the time delay. Note: Some devices (Huawei for one) take 20 seconds to appear on the USB bus). Modified: head/sys/dev/usb/u3g.c Modified: head/sys/dev/usb/u3g.c ============================================================================== --- head/sys/dev/usb/u3g.c Thu Nov 13 21:46:19 2008 (r184942) +++ head/sys/dev/usb/u3g.c Thu Nov 13 21:49:07 2008 (r184943) @@ -566,8 +566,15 @@ u3gstub_match(device_t self) * storage device the device has not yet changed appearance. */ id = usbd_get_interface_descriptor(uaa->iface); - if (id && id->bInterfaceNumber == 0 && id->bInterfaceClass == UICLASS_MASS) + if (id && id->bInterfaceNumber == 0 + && id->bInterfaceClass == UICLASS_MASS) { +#ifndef U3G_DEBUG + if (!bootverbose) + device_quiet(self); +#endif + return UMATCH_VENDOR_PRODUCT; + } } return UMATCH_NONE; @@ -580,8 +587,9 @@ u3gstub_attach(device_t self) struct usb_attach_arg *uaa = device_get_ivars(self); const struct u3g_dev_type_s *u3g_dev_type; int i; + #ifndef U3G_DEBUG - if (!bootverbose) // hide the stub attachment + if (!bootverbose) device_quiet(self); #endif @@ -593,18 +601,27 @@ u3gstub_attach(device_t self) u3g_dev_type = u3g_lookup(uaa->vendor, uaa->product); if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT) { - DPRINTF("changing Huawei modem to modem mode\n"); + if (bootverbose) + device_printf(sc->sc_dev, + "changing Huawei modem to modem mode\n"); if (!u3gstub_huawei_init(sc, uaa)) return ENXIO; } else if (u3g_dev_type->flags&U3GFL_SCSI_EJECT) { - DPRINTF("sending CD eject command to change to modem mode\n"); + if (bootverbose) + device_printf(sc->sc_dev, "sending CD eject command to " + "change to modem mode\n"); if (!u3gstub_scsi_eject(sc, uaa)) return ENXIO; } else if (u3g_dev_type->flags&U3GFL_SIERRA_INIT) { - DPRINTF("changing Sierra modem to modem mode\n"); + if (bootverbose) + device_printf(sc->sc_dev, + "changing Sierra modem to modem mode\n"); if (!u3gstub_sierra_init(sc, uaa)) return ENXIO; } else if (u3g_dev_type->flags&U3GFL_STUB_WAIT) { + if (bootverbose) + device_printf(sc->sc_dev, "waiting for modem to change " + "to modem mode\n"); /* nop */ } @@ -637,7 +654,7 @@ static device_method_t u3gstub_methods[] }; static driver_t u3gstub_driver = { - "u3gstub", + "u3g", u3gstub_methods, sizeof (struct u3gstub_softc) }; From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 21:57:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A71CF1065672 for ; Thu, 13 Nov 2008 21:57:49 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpo-eml04.kpnxchange.com (cpsmtpo-eml04.KPNXCHANGE.COM [213.75.38.153]) by mx1.freebsd.org (Postfix) with ESMTP id 353A98FC13 for ; Thu, 13 Nov 2008 21:57:48 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtp-eml103.kpnxchange.com ([213.75.84.103]) by cpsmtpo-eml04.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Nov 2008 22:57:47 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml103.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Nov 2008 22:57:47 +0100 Received: (qmail 33617 invoked by uid 98); 13 Nov 2008 21:57:59 -0000 Received: from 10.66.0.135 (nick@10.66.0.135) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.135):. Processed in 0.346146 secs); 13 Nov 2008 21:57:59 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.135) by uitsmijter.van-laarhoven.org with SMTP; 13 Nov 2008 21:57:58 -0000 Received: (nullmailer pid 58620 invoked by uid 1001); Thu, 13 Nov 2008 21:57:22 -0000 From: Nick Hibma To: svn-src-all@freebsd.org Date: Thu, 13 Nov 2008 22:57:15 +0100 User-Agent: KMail/1.9.7 References: <200811132134.mADLYZls069521@svn.freebsd.org> In-Reply-To: <200811132134.mADLYZls069521@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811132257.21164.nick@van-laarhoven.org> X-OriginalArrivalTime: 13 Nov 2008 21:57:47.0579 (UTC) FILETIME=[DD5C98B0:01C945DA] Subject: Re: svn commit: r184941 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 21:57:49 -0000 > Log: > Add a reset device command to ugen.c. > This is needed to make some devices work that require a firmware upload > and a USB reset afterwards. > > Modified: > head/sys/dev/usb/ugen.c > head/sys/dev/usb/usb.h > head/sys/dev/usb/usb_subr.c > head/sys/dev/usb/usbdi.c > head/sys/dev/usb/usbdi.h Forgot: MFC: 3 weeks From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 22:34:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B42D1065672; Thu, 13 Nov 2008 22:34:33 +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 50F618FC17; Thu, 13 Nov 2008 22:34:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADMYXSm071581; Thu, 13 Nov 2008 22:34:33 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADMYXL9071580; Thu, 13 Nov 2008 22:34:33 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200811132234.mADMYXL9071580@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Nov 2008 22:34:33 +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: r184944 - in stable/7/sys: . kern modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 22:34:33 -0000 Author: jhb Date: Thu Nov 13 22:34:33 2008 New Revision: 184944 URL: http://svn.freebsd.org/changeset/base/184944 Log: MFC: Adjust the license statement to more closely match a standard 3-clause BSD license. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/subr_smp.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/kern/subr_smp.c ============================================================================== --- stable/7/sys/kern/subr_smp.c Thu Nov 13 21:49:07 2008 (r184943) +++ stable/7/sys/kern/subr_smp.c Thu Nov 13 22:34:33 2008 (r184944) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2001 - * John Baldwin . All rights reserved. + * Copyright (c) 2001, John Baldwin . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,21 +10,21 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the author nor the names of any co-contributors + * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY JOHN BALDWIN AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 22:50:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF82B1065673; Thu, 13 Nov 2008 22:50:21 +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 94EA98FC13; Thu, 13 Nov 2008 22:50:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADMoLwe071900; Thu, 13 Nov 2008 22:50:21 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADMoLDQ071899; Thu, 13 Nov 2008 22:50:21 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200811132250.mADMoLDQ071899@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Nov 2008 22:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184945 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 22:50:22 -0000 Author: jhb Date: Thu Nov 13 22:50:21 2008 New Revision: 184945 URL: http://svn.freebsd.org/changeset/base/184945 Log: MFC: Adjust the license statement to more closely match a standard 3-clause BSD license. Approved by: re (kib) Modified: stable/6/sys/ (props changed) stable/6/sys/kern/subr_smp.c Modified: stable/6/sys/kern/subr_smp.c ============================================================================== --- stable/6/sys/kern/subr_smp.c Thu Nov 13 22:34:33 2008 (r184944) +++ stable/6/sys/kern/subr_smp.c Thu Nov 13 22:50:21 2008 (r184945) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2001 - * John Baldwin . All rights reserved. + * Copyright (c) 2001, John Baldwin . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,21 +10,21 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the author nor the names of any co-contributors + * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY JOHN BALDWIN AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 22:53:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A8D106564A; Thu, 13 Nov 2008 22:53:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 402398FC0A; Thu, 13 Nov 2008 22:53:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id AB5EF1D258; Thu, 13 Nov 2008 23:53:39 +0100 (CET) Date: Thu, 13 Nov 2008 23:53:39 +0100 From: Ed Schouten To: John Baldwin Message-ID: <20081113225339.GP81783@hoeg.nl> References: <200811132250.mADMoLDQ071899@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Evp0T6PXIQ26qRMT" Content-Disposition: inline In-Reply-To: <200811132250.mADMoLDQ071899@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r184945 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 22:53:40 -0000 --Evp0T6PXIQ26qRMT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > - * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS = HEAD > - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSIN= ESS > - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN > - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS= E) > - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > - * THE POSSIBILITY OF SUCH DAMAGE. So you got rid of the voices in your head? ;-) --=20 Ed Schouten WWW: http://80386.nl/ --Evp0T6PXIQ26qRMT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkcr/MACgkQ52SDGA2eCwWxAACeOfpCPzgP+od6gtK73+ZBXu3g 3SgAnjyoR/1jNOke2f3RKxn46gJt0MBD =5GhU -----END PGP SIGNATURE----- --Evp0T6PXIQ26qRMT-- From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 22:55:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D19321065719; Thu, 13 Nov 2008 22:55:20 +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 78DD38FC08; Thu, 13 Nov 2008 22:55:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mADMtKHx072045; Thu, 13 Nov 2008 22:55:20 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mADMtKk1072044; Thu, 13 Nov 2008 22:55:20 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200811132255.mADMtKk1072044@svn.freebsd.org> From: John Baldwin Date: Thu, 13 Nov 2008 22:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184946 - in releng/6.4/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 22:55:20 -0000 Author: jhb Date: Thu Nov 13 22:55:20 2008 New Revision: 184946 URL: http://svn.freebsd.org/changeset/base/184946 Log: MFC: Adjust the license statement to more closely match a standard 3-clause BSD license. Approved by: re (kib) Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/kern/subr_smp.c Modified: releng/6.4/sys/kern/subr_smp.c ============================================================================== --- releng/6.4/sys/kern/subr_smp.c Thu Nov 13 22:50:21 2008 (r184945) +++ releng/6.4/sys/kern/subr_smp.c Thu Nov 13 22:55:20 2008 (r184946) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2001 - * John Baldwin . All rights reserved. + * Copyright (c) 2001, John Baldwin . + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,21 +10,21 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the author nor the names of any co-contributors + * 3. Neither the name of the author nor the names of any co-contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY JOHN BALDWIN AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - * THE POSSIBILITY OF SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ /* From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 23:52:11 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD71A1065687; Thu, 13 Nov 2008 23:52:11 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 8631D8FC14; Thu, 13 Nov 2008 23:52:11 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (net-ix.gw.ai.net [205.134.160.6]) (authenticated bits=0) by pittgoth.com (8.14.2/8.14.2) with ESMTP id mADNpjHv016125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 13 Nov 2008 18:51:45 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Thu, 13 Nov 2008 18:51:40 -0500 From: Tom Rhodes To: Ed Schouten Message-Id: <20081113185140.4452328f.trhodes@FreeBSD.org> In-Reply-To: <20081113225339.GP81783@hoeg.nl> References: <200811132250.mADMoLDQ071899@svn.freebsd.org> <20081113225339.GP81783@hoeg.nl> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org, jhb@FreeBSD.org Subject: Re: svn commit: r184945 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 23:52:11 -0000 On Thu, 13 Nov 2008 23:53:39 +0100 Ed Schouten wrote: > * John Baldwin wrote: > > - * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD > > - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > > - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > > - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > > - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > > - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > > - * THE POSSIBILITY OF SUCH DAMAGE. > > So you got rid of the voices in your head? ;-) Na ... they told him to alter the license. :) -- Tom Rhodes From owner-svn-src-all@FreeBSD.ORG Thu Nov 13 23:55:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97FDE1065769 for ; Thu, 13 Nov 2008 23:55:15 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 879698FC12 for ; Thu, 13 Nov 2008 23:55:12 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.178] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mADNsttv086117; Thu, 13 Nov 2008 15:54:55 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <491CBE4A.4050202@freebsd.org> Date: Thu, 13 Nov 2008 15:54:50 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Rhodes References: <200811132250.mADMoLDQ071899@svn.freebsd.org> <20081113225339.GP81783@hoeg.nl> <20081113185140.4452328f.trhodes@FreeBSD.org> In-Reply-To: <20081113185140.4452328f.trhodes@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Schouten , src-committers@freebsd.org, jhb@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r184945 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 23:55:15 -0000 Tom Rhodes wrote: > Ed Schouten wrote: >> John Baldwin wrote: >> >>>- * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD >>>- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >>>- * CONSEQUENTIAL DAMAGES... >> >>So you got rid of the voices in your head? ;-) > > Na ... they told him to alter the license. :) Now those voices are liable for damages, apparently. Tim From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 00:02:57 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17746106567B; Fri, 14 Nov 2008 00:02:57 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id C10F58FC12; Fri, 14 Nov 2008 00:02:56 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (net-ix.gw.ai.net [205.134.160.6]) (authenticated bits=0) by pittgoth.com (8.14.2/8.14.2) with ESMTP id mAE02uKZ016190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 13 Nov 2008 19:02:56 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Thu, 13 Nov 2008 19:02:53 -0500 From: Tom Rhodes To: Tim Kientzle Message-Id: <20081113190253.13562cd8.trhodes@FreeBSD.org> In-Reply-To: <491CBE4A.4050202@freebsd.org> References: <200811132250.mADMoLDQ071899@svn.freebsd.org> <20081113225339.GP81783@hoeg.nl> <20081113185140.4452328f.trhodes@FreeBSD.org> <491CBE4A.4050202@freebsd.org> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org Subject: Re: svn commit: r184945 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 00:02:57 -0000 On Thu, 13 Nov 2008 15:54:50 -0800 Tim Kientzle wrote: > Tom Rhodes wrote: > > Ed Schouten wrote: > >> John Baldwin wrote: > >> > >>>- * ARE DISCLAIMED. IN NO EVENT SHALL JOHN BALDWIN OR THE VOICES IN HIS HEAD > >>>- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > >>>- * CONSEQUENTIAL DAMAGES... > >> > >>So you got rid of the voices in your head? ;-) > > > > Na ... they told him to alter the license. :) > > Now those voices are liable for damages, apparently. Heh ... good luck trying to hold those voices liable for anything; trust me, it won't work. ;) -- Tom Rhodes From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 01:24:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FAB41065670; Fri, 14 Nov 2008 01:24:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24D6C8FC08; Fri, 14 Nov 2008 01:24:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE1Oqrt074762; Fri, 14 Nov 2008 01:24:52 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE1OqJD074759; Fri, 14 Nov 2008 01:24:52 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811140124.mAE1OqJD074759@svn.freebsd.org> From: Robert Watson Date: Fri, 14 Nov 2008 01:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184948 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 01:24:53 -0000 Author: rwatson Date: Fri Nov 14 01:24:52 2008 New Revision: 184948 URL: http://svn.freebsd.org/changeset/base/184948 Log: When repeatedly accessing a thread credential, cache the credential pointer in a local thread. While this is unlikely to significantly improve performance given modern compiler behavior, it makes the code more readable and reduces diffs to the Mac OS X version of the same code (which stores things in creds in the same way, but where the cred for a thread is reached quite differently). Discussed with: sson MFC after: 1 month Sponsored by: Apple Inc. Obtained from: TrustedBSD Project Modified: head/sys/security/audit/audit.c head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_syscalls.c Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Fri Nov 14 00:20:24 2008 (r184947) +++ head/sys/security/audit/audit.c Fri Nov 14 01:24:52 2008 (r184948) @@ -207,6 +207,7 @@ audit_record_ctor(void *mem, int size, v { struct kaudit_record *ar; struct thread *td; + struct ucred *cred; KASSERT(sizeof(*ar) == size, ("audit_record_ctor: wrong size")); @@ -219,15 +220,16 @@ audit_record_ctor(void *mem, int size, v /* * Export the subject credential. */ - cru2x(td->td_ucred, &ar->k_ar.ar_subj_cred); - ar->k_ar.ar_subj_ruid = td->td_ucred->cr_ruid; - ar->k_ar.ar_subj_rgid = td->td_ucred->cr_rgid; - ar->k_ar.ar_subj_egid = td->td_ucred->cr_groups[0]; - ar->k_ar.ar_subj_auid = td->td_ucred->cr_audit.ai_auid; - ar->k_ar.ar_subj_asid = td->td_ucred->cr_audit.ai_asid; + cred = td->td_ucred; + cru2x(cred, &ar->k_ar.ar_subj_cred); + ar->k_ar.ar_subj_ruid = cred->cr_ruid; + ar->k_ar.ar_subj_rgid = cred->cr_rgid; + ar->k_ar.ar_subj_egid = cred->cr_groups[0]; + ar->k_ar.ar_subj_auid = cred->cr_audit.ai_auid; + ar->k_ar.ar_subj_asid = cred->cr_audit.ai_asid; ar->k_ar.ar_subj_pid = td->td_proc->p_pid; - ar->k_ar.ar_subj_amask = td->td_ucred->cr_audit.ai_mask; - ar->k_ar.ar_subj_term_addr = td->td_ucred->cr_audit.ai_termid; + ar->k_ar.ar_subj_amask = cred->cr_audit.ai_mask; + ar->k_ar.ar_subj_term_addr = cred->cr_audit.ai_termid; return (0); } @@ -631,6 +633,7 @@ audit_proc_coredump(struct thread *td, c { struct kaudit_record *ar; struct au_mask *aumask; + struct ucred *cred; au_class_t class; int ret, sorf; char **pathp; @@ -641,11 +644,12 @@ audit_proc_coredump(struct thread *td, c /* * Make sure we are using the correct preselection mask. */ - auid = td->td_ucred->cr_audit.ai_auid; + cred = td->td_ucred; + auid = cred->cr_audit.ai_auid; if (auid == AU_DEFAUDITID) aumask = &audit_nae_mask; else - aumask = &td->td_ucred->cr_audit.ai_mask; + aumask = &cred->cr_audit.ai_mask; /* * It's possible for coredump(9) generation to fail. Make sure that * we handle this case correctly for preselection. @@ -658,6 +662,7 @@ audit_proc_coredump(struct thread *td, c if (au_preselect(AUE_CORE, class, aumask, sorf) == 0 && audit_pipe_preselect(auid, AUE_CORE, class, sorf, 0) == 0) return; + /* * If we are interested in seeing this audit record, allocate it. * Where possible coredump records should contain a pathname and arg32 Modified: head/sys/security/audit/audit_arg.c ============================================================================== --- head/sys/security/audit/audit_arg.c Fri Nov 14 00:20:24 2008 (r184947) +++ head/sys/security/audit/audit_arg.c Fri Nov 14 01:24:52 2008 (r184948) @@ -356,6 +356,7 @@ void audit_arg_process(struct proc *p) { struct kaudit_record *ar; + struct ucred *cred; KASSERT(p != NULL, ("audit_arg_process: p == NULL")); @@ -365,13 +366,14 @@ audit_arg_process(struct proc *p) if (ar == NULL) return; - ar->k_ar.ar_arg_auid = p->p_ucred->cr_audit.ai_auid; - ar->k_ar.ar_arg_euid = p->p_ucred->cr_uid; - ar->k_ar.ar_arg_egid = p->p_ucred->cr_groups[0]; - ar->k_ar.ar_arg_ruid = p->p_ucred->cr_ruid; - ar->k_ar.ar_arg_rgid = p->p_ucred->cr_rgid; - ar->k_ar.ar_arg_asid = p->p_ucred->cr_audit.ai_asid; - ar->k_ar.ar_arg_termid_addr = p->p_ucred->cr_audit.ai_termid; + cred = p->p_ucred; + ar->k_ar.ar_arg_auid = cred->cr_audit.ai_auid; + ar->k_ar.ar_arg_euid = cred->cr_uid; + ar->k_ar.ar_arg_egid = cred->cr_groups[0]; + ar->k_ar.ar_arg_ruid = cred->cr_ruid; + ar->k_ar.ar_arg_rgid = cred->cr_rgid; + ar->k_ar.ar_arg_asid = cred->cr_audit.ai_asid; + ar->k_ar.ar_arg_termid_addr = cred->cr_audit.ai_termid; ar->k_ar.ar_arg_pid = p->p_pid; ARG_SET_VALID(ar, ARG_AUID | ARG_EUID | ARG_EGID | ARG_RUID | ARG_RGID | ARG_ASID | ARG_TERMID_ADDR | ARG_PID | ARG_PROCESS); Modified: head/sys/security/audit/audit_syscalls.c ============================================================================== --- head/sys/security/audit/audit_syscalls.c Fri Nov 14 00:20:24 2008 (r184947) +++ head/sys/security/audit/audit_syscalls.c Fri Nov 14 01:24:52 2008 (r184948) @@ -157,7 +157,7 @@ free_out: int auditon(struct thread *td, struct auditon_args *uap) { - struct ucred *newcred, *oldcred; + struct ucred *cred, *newcred, *oldcred; int error; union auditon_udata udata; struct proc *tp; @@ -321,22 +321,21 @@ auditon(struct thread *td, struct audito PROC_UNLOCK(tp); return (error); } - if (tp->p_ucred->cr_audit.ai_termid.at_type == AU_IPv6) { + cred = tp->p_ucred; + if (cred->cr_audit.ai_termid.at_type == AU_IPv6) { PROC_UNLOCK(tp); return (EINVAL); } - udata.au_aupinfo.ap_auid = - tp->p_ucred->cr_audit.ai_auid; + udata.au_aupinfo.ap_auid = cred->cr_audit.ai_auid; udata.au_aupinfo.ap_mask.am_success = - tp->p_ucred->cr_audit.ai_mask.am_success; + cred->cr_audit.ai_mask.am_success; udata.au_aupinfo.ap_mask.am_failure = - tp->p_ucred->cr_audit.ai_mask.am_failure; + cred->cr_audit.ai_mask.am_failure; udata.au_aupinfo.ap_termid.machine = - tp->p_ucred->cr_audit.ai_termid.at_addr[0]; + cred->cr_audit.ai_termid.at_addr[0]; udata.au_aupinfo.ap_termid.port = - (dev_t)tp->p_ucred->cr_audit.ai_termid.at_port; - udata.au_aupinfo.ap_asid = - tp->p_ucred->cr_audit.ai_asid; + (dev_t)cred->cr_audit.ai_termid.at_port; + udata.au_aupinfo.ap_asid = cred->cr_audit.ai_asid; PROC_UNLOCK(tp); break; @@ -381,16 +380,14 @@ auditon(struct thread *td, struct audito return (ESRCH); if ((tp = pfind(udata.au_aupinfo_addr.ap_pid)) == NULL) return (ESRCH); - udata.au_aupinfo_addr.ap_auid = - tp->p_ucred->cr_audit.ai_auid; + cred = tp->p_ucred; + udata.au_aupinfo_addr.ap_auid = cred->cr_audit.ai_auid; udata.au_aupinfo_addr.ap_mask.am_success = - tp->p_ucred->cr_audit.ai_mask.am_success; + cred->cr_audit.ai_mask.am_success; udata.au_aupinfo_addr.ap_mask.am_failure = - tp->p_ucred->cr_audit.ai_mask.am_failure; - udata.au_aupinfo_addr.ap_termid = - tp->p_ucred->cr_audit.ai_termid; - udata.au_aupinfo_addr.ap_asid = - tp->p_ucred->cr_audit.ai_asid; + cred->cr_audit.ai_mask.am_failure; + udata.au_aupinfo_addr.ap_termid = cred->cr_audit.ai_termid; + udata.au_aupinfo_addr.ap_asid = cred->cr_audit.ai_asid; PROC_UNLOCK(tp); break; @@ -503,21 +500,23 @@ int getaudit(struct thread *td, struct getaudit_args *uap) { struct auditinfo ai; + struct ucred *cred; int error; - if (jailed(td->td_ucred)) + cred = td->td_ucred; + if (jailed(cred)) return (ENOSYS); error = priv_check(td, PRIV_AUDIT_GETAUDIT); if (error) return (error); - if (td->td_ucred->cr_audit.ai_termid.at_type == AU_IPv6) + if (cred->cr_audit.ai_termid.at_type == AU_IPv6) return (ERANGE); bzero(&ai, sizeof(ai)); - ai.ai_auid = td->td_ucred->cr_audit.ai_auid; - ai.ai_mask = td->td_ucred->cr_audit.ai_mask; - ai.ai_asid = td->td_ucred->cr_audit.ai_asid; - ai.ai_termid.machine = td->td_ucred->cr_audit.ai_termid.at_addr[0]; - ai.ai_termid.port = td->td_ucred->cr_audit.ai_termid.at_port; + ai.ai_auid = cred->cr_audit.ai_auid; + ai.ai_mask = cred->cr_audit.ai_mask; + ai.ai_asid = cred->cr_audit.ai_asid; + ai.ai_termid.machine = cred->cr_audit.ai_termid.at_addr[0]; + ai.ai_termid.port = cred->cr_audit.ai_termid.at_port; return (copyout(&ai, uap->auditinfo, sizeof(ai))); } From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 01:53:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 353701065677; Fri, 14 Nov 2008 01:53:11 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF048FC0C; Fri, 14 Nov 2008 01:53:11 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE1rA7v075293; Fri, 14 Nov 2008 01:53:10 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE1rAT8075292; Fri, 14 Nov 2008 01:53:10 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200811140153.mAE1rAT8075292@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 14 Nov 2008 01:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184949 - head/sys/dev/ipmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 01:53:11 -0000 Author: obrien Date: Fri Nov 14 01:53:10 2008 New Revision: 184949 URL: http://svn.freebsd.org/changeset/base/184949 Log: Fix typo where the code was missing the "IPMICTL_RECEIVE_MSG_32" condition test. Modified: head/sys/dev/ipmi/ipmi.c Modified: head/sys/dev/ipmi/ipmi.c ============================================================================== --- head/sys/dev/ipmi/ipmi.c Fri Nov 14 01:24:52 2008 (r184948) +++ head/sys/dev/ipmi/ipmi.c Fri Nov 14 01:53:10 2008 (r184949) @@ -402,7 +402,7 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd if (recv->msg.data_len < len && (cmd == IPMICTL_RECEIVE_MSG #ifdef IPMICTL_RECEIVE_MSG_32 - || cmd == IPMICTL_RECEIVE_MSG + || cmd == IPMICTL_RECEIVE_MSG_32 #endif )) { IPMI_UNLOCK(sc); From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 01:56:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2728106564A; Fri, 14 Nov 2008 01:56:11 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A93598FC0C; Fri, 14 Nov 2008 01:56:11 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE1uBWD075394; Fri, 14 Nov 2008 01:56:11 GMT (envelope-from ps@svn.freebsd.org) Received: (from ps@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE1uB0S075392; Fri, 14 Nov 2008 01:56:11 GMT (envelope-from ps@svn.freebsd.org) Message-Id: <200811140156.mAE1uB0S075392@svn.freebsd.org> From: Paul Saab Date: Fri, 14 Nov 2008 01:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184950 - in head/sys/modules/cxgb: iw_cxgb toecore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 01:56:11 -0000 Author: ps Date: Fri Nov 14 01:56:11 2008 New Revision: 184950 URL: http://svn.freebsd.org/changeset/base/184950 Log: Fix world Approved by: kmacy Modified: head/sys/modules/cxgb/iw_cxgb/Makefile head/sys/modules/cxgb/toecore/Makefile Modified: head/sys/modules/cxgb/iw_cxgb/Makefile ============================================================================== --- head/sys/modules/cxgb/iw_cxgb/Makefile Fri Nov 14 01:53:10 2008 (r184949) +++ head/sys/modules/cxgb/iw_cxgb/Makefile Fri Nov 14 01:56:11 2008 (r184950) @@ -7,7 +7,7 @@ KMOD= iw_cxgb SRCS= iw_cxgb.c iw_cxgb_cm.c iw_cxgb_hal.c SRCS+= iw_cxgb_provider.c iw_cxgb_qp.c iw_cxgb_resource.c SRCS+= iw_cxgb_ev.c iw_cxgb_mem.c iw_cxgb_dbg.c iw_cxgb_cq.c -SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h +SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h opt_inet.h CFLAGS+= -g -I${CXGB} #CFLAGS+= -DDEBUG Modified: head/sys/modules/cxgb/toecore/Makefile ============================================================================== --- head/sys/modules/cxgb/toecore/Makefile Fri Nov 14 01:53:10 2008 (r184949) +++ head/sys/modules/cxgb/toecore/Makefile Fri Nov 14 01:56:11 2008 (r184950) @@ -5,7 +5,7 @@ CXGB = ${.CURDIR}/../../../dev/cxgb KMOD= toecore SRCS= toedev.c -SRCS+= device_if.h bus_if.h pci_if.h opt_sched.h +SRCS+= device_if.h bus_if.h pci_if.h opt_sched.h opt_inet.h CFLAGS+= -g -I${CXGB} .include From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 07:05:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89FF71065678; Fri, 14 Nov 2008 07:05:52 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8D58FC19; Fri, 14 Nov 2008 07:05:52 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE75qgq081248; Fri, 14 Nov 2008 07:05:52 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE75qOu081247; Fri, 14 Nov 2008 07:05:52 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811140705.mAE75qOu081247@svn.freebsd.org> From: Kip Macy Date: Fri, 14 Nov 2008 07:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184957 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 07:05:52 -0000 Author: kmacy Date: Fri Nov 14 07:05:51 2008 New Revision: 184957 URL: http://svn.freebsd.org/changeset/base/184957 Log: repair config file from spamming Modified: head/sys/i386/conf/XEN Modified: head/sys/i386/conf/XEN ============================================================================== --- head/sys/i386/conf/XEN Fri Nov 14 06:40:43 2008 (r184956) +++ head/sys/i386/conf/XEN Fri Nov 14 07:05:51 2008 (r184957) @@ -65,6 +65,12 @@ options MCLSHIFT=12 options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC + +device atkbdc # AT keyboard controller +device atkbd # AT keyboard +device psm # PS/2 mouse +device pci + device kbdmux # keyboard multiplexer # Pseudo devices. From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 07:06:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502AB1065670; Fri, 14 Nov 2008 07:06:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 313738FC2B; Fri, 14 Nov 2008 07:06:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE76Sfv081295; Fri, 14 Nov 2008 07:06:28 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE76S4H081294; Fri, 14 Nov 2008 07:06:28 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200811140706.mAE76S4H081294@svn.freebsd.org> From: Kip Macy Date: Fri, 14 Nov 2008 07:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184958 - head/sys/xen/xenbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 07:06:28 -0000 Author: kmacy Date: Fri Nov 14 07:06:27 2008 New Revision: 184958 URL: http://svn.freebsd.org/changeset/base/184958 Log: merge fix for boot-time hang on centos' xen Modified: head/sys/xen/xenbus/xenbus_xs.c Modified: head/sys/xen/xenbus/xenbus_xs.c ============================================================================== --- head/sys/xen/xenbus/xenbus_xs.c Fri Nov 14 07:05:51 2008 (r184957) +++ head/sys/xen/xenbus/xenbus_xs.c Fri Nov 14 07:06:27 2008 (r184958) @@ -107,7 +107,7 @@ struct xs_handle { struct sx request_mutex; /* Protect transactions against save/restore. */ - struct rw_semaphore suspend_mutex; + struct sx suspend_mutex; }; static struct xs_handle xs_state; @@ -231,7 +231,7 @@ void *xenbus_dev_request_and_reply(struc int err; if (req_msg.type == XS_TRANSACTION_START) - down_read(&xs_state.suspend_mutex); + sx_slock(&xs_state.suspend_mutex); sx_xlock(&xs_state.request_mutex); @@ -248,11 +248,13 @@ void *xenbus_dev_request_and_reply(struc if ((msg->type == XS_TRANSACTION_END) || ((req_msg.type == XS_TRANSACTION_START) && (msg->type == XS_ERROR))) - up_read(&xs_state.suspend_mutex); + sx_sunlock(&xs_state.suspend_mutex); return ret; } +static int xenwatch_inline; + /* Send message to xs, get kmalloc'ed reply. ERR_PTR() on error. */ static void *xs_talkv(struct xenbus_transaction t, enum xsd_sockmsg_type type, @@ -305,17 +307,24 @@ static void *xs_talkv(struct xenbus_tran return ERR_PTR(-err); } - if (xenwatch_running == 0) { - while (!TAILQ_EMPTY(&watch_events)) { + if ((xenwatch_running == 0) && (xenwatch_inline == 0)) { + xenwatch_inline = 1; + while (!TAILQ_EMPTY(&watch_events) + && xenwatch_running == 0) { + struct xs_stored_msg *wmsg = TAILQ_FIRST(&watch_events); list_del(&watch_events, wmsg); - wmsg->u.watch.handle->callback( + printf("handling %p ...", wmsg->u.watch.handle->callback); + + wmsg->u.watch.handle->callback( wmsg->u.watch.handle, (const char **)wmsg->u.watch.vec, wmsg->u.watch.vec_size); - kfree(wmsg->u.watch.vec); + printf("... %p done\n", wmsg->u.watch.handle->callback); + kfree(wmsg->u.watch.vec); kfree(wmsg); } + xenwatch_inline = 0; } BUG_ON(msg.type != type); @@ -521,11 +530,10 @@ int xenbus_transaction_start(struct xenb { char *id_str; - down_read(&xs_state.suspend_mutex); - + sx_slock(&xs_state.suspend_mutex); id_str = xs_single(XBT_NIL, XS_TRANSACTION_START, "", NULL); if (IS_ERR(id_str)) { - up_read(&xs_state.suspend_mutex); + sx_sunlock(&xs_state.suspend_mutex); return PTR_ERR(id_str); } @@ -551,8 +559,8 @@ int xenbus_transaction_end(struct xenbus printf("xenbus_transaction_end "); err = xs_error(xs_single(t, XS_TRANSACTION_END, abortstr, NULL)); - - up_read(&xs_state.suspend_mutex); + + sx_sunlock(&xs_state.suspend_mutex); return err; } @@ -691,7 +699,7 @@ int register_xenbus_watch(struct xenbus_ sprintf(token, "%lX", (long)watch); - down_read(&xs_state.suspend_mutex); + sx_slock(&xs_state.suspend_mutex); mtx_lock(&watches_lock); BUG_ON(find_watch(token) != NULL); @@ -699,7 +707,7 @@ int register_xenbus_watch(struct xenbus_ mtx_unlock(&watches_lock); err = xs_watch(watch->node, token); - + /* Ignore errors due to multiple registration. */ if ((err != 0) && (err != -EEXIST)) { mtx_lock(&watches_lock); @@ -707,7 +715,7 @@ int register_xenbus_watch(struct xenbus_ mtx_unlock(&watches_lock); } - up_read(&xs_state.suspend_mutex); + sx_sunlock(&xs_state.suspend_mutex); return err; } @@ -720,8 +728,8 @@ void unregister_xenbus_watch(struct xenb int err; sprintf(token, "%lX", (long)watch); - - down_read(&xs_state.suspend_mutex); + + sx_slock(&xs_state.suspend_mutex); mtx_lock(&watches_lock); BUG_ON(!find_watch(token)); @@ -733,7 +741,7 @@ void unregister_xenbus_watch(struct xenb log(LOG_WARNING, "XENBUS Failed to release watch %s: %i\n", watch->node, err); - up_read(&xs_state.suspend_mutex); + sx_sunlock(&xs_state.suspend_mutex); /* Cancel pending watch events. */ mtx_lock(&watch_events_lock); @@ -755,8 +763,8 @@ void unregister_xenbus_watch(struct xenb EXPORT_SYMBOL(unregister_xenbus_watch); void xs_suspend(void) -{ - down_write(&xs_state.suspend_mutex); +{ + sx_xlock(&xs_state.suspend_mutex); sx_xlock(&xs_state.request_mutex); } @@ -773,15 +781,22 @@ void xs_resume(void) xs_watch(watch->node, token); } - up_write(&xs_state.suspend_mutex); + sx_xunlock(&xs_state.suspend_mutex); } static void xenwatch_thread(void *unused) { struct xs_stored_msg *msg; - DELAY(10000); xenwatch_running = 1; + + DELAY(100000); + while (xenwatch_inline) { + printf("xenwatch inline still running\n"); + DELAY(100000); + } + + for (;;) { while (list_empty(&watch_events)) @@ -797,7 +812,6 @@ static void xenwatch_thread(void *unused mtx_unlock(&watch_events_lock); if (msg != NULL) { - printf("handling watch\n"); msg->u.watch.handle->callback( msg->u.watch.handle, (const char **)msg->u.watch.vec, @@ -906,7 +920,7 @@ int xs_init(void) mtx_init(&xs_state.reply_lock, "state reply", NULL, MTX_DEF); sx_init(&xs_state.request_mutex, "xenstore request"); - sema_init(&xs_state.suspend_mutex, 1, "xenstore suspend"); + sx_init(&xs_state.suspend_mutex, "xenstore suspend"); #if 0 From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 08:35:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2AFD106567E; Fri, 14 Nov 2008 08:35:54 +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 863478FC0A; Fri, 14 Nov 2008 08:35:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE8ZsoV082960; Fri, 14 Nov 2008 08:35:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE8Zses082959; Fri, 14 Nov 2008 08:35:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811140835.mAE8Zses082959@svn.freebsd.org> From: Ed Schouten Date: Fri, 14 Nov 2008 08:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184962 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 08:35:55 -0000 Author: ed Date: Fri Nov 14 08:35:54 2008 New Revision: 184962 URL: http://svn.freebsd.org/changeset/base/184962 Log: Per request, keep privilege number 20 reserved. In my commit that moved uname(), setdomainname() and getdomainname() to COMPAT_FREEBSD4, I also removed PRIV_SETDOMAINNAME, because it was already protected by userland_sysctl(). We'd better keep the number 20 reserved, to prevent it from being used again. Requested by: rwatson Modified: head/sys/sys/priv.h Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Fri Nov 14 08:27:23 2008 (r184961) +++ head/sys/sys/priv.h Fri Nov 14 08:35:54 2008 (r184962) @@ -84,6 +84,7 @@ #define PRIV_CLOCK_SETTIME 17 /* Can call clock_settime. */ #define PRIV_SETTIMEOFDAY 18 /* Can call settimeofday. */ #define PRIV_SETHOSTID 19 /* Can call sethostid. */ +#define _PRIV_SETDOMAINNAME 20 /* Removed. */ /* * Audit subsystem privileges. From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 09:41:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E23F1065679; Fri, 14 Nov 2008 09:41:38 +0000 (UTC) (envelope-from byshenknet@byshenk.net) Received: from core.byshenk.net (core.byshenk.net [62.58.73.230]) by mx1.freebsd.org (Postfix) with ESMTP id A66338FC13; Fri, 14 Nov 2008 09:41:37 +0000 (UTC) (envelope-from byshenknet@byshenk.net) Received: from core.byshenk.net (localhost.aoes.com [127.0.0.1]) by core.byshenk.net (8.14.3/8.14.3) with ESMTP id mAE9LRoS015815; Fri, 14 Nov 2008 10:21:28 +0100 (CET) (envelope-from byshenknet@core.byshenk.net) Received: (from byshenknet@localhost) by core.byshenk.net (8.14.3/8.14.3/Submit) id mAE9LRQD015814; Fri, 14 Nov 2008 10:21:27 +0100 (CET) (envelope-from byshenknet) Date: Fri, 14 Nov 2008 10:21:27 +0100 From: Greg Byshenk To: Doug Ambrisko Message-ID: <20081114092127.GO907@core.byshenk.net> References: <20081113174740.GV47073@deviant.kiev.zoral.com.ua> <200811131811.mADIBJOj099325@ambrisko.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811131811.mADIBJOj099325@ambrisko.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on core.byshenk.net Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184934 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 09:41:38 -0000 On Thu, Nov 13, 2008 at 10:11:19AM -0800, Doug Ambrisko wrote: > Kostik Belousov writes: > | On Thu, Nov 13, 2008 at 05:40:21PM +0000, Doug Ambrisko wrote: > | > Author: ambrisko > | > Date: Thu Nov 13 17:40:21 2008 > | > New Revision: 184934 > | > URL: http://svn.freebsd.org/changeset/base/184934 > | > > | > Log: > | > For now on every 10 cyclinder groups flush the buffer cache to free > | > up space. If the buffer cache fills up then the disk systems can > | > grind to a halt. Better tuning can be figured out later. > | > > | > Tested by: Tim, others and work > | > Reviewed by: Kostik Belousov > | > PR: 128832 > | > > | > Modified: > | > head/sys/ufs/ffs/ffs_snapshot.c > | > > | > Modified: head/sys/ufs/ffs/ffs_snapshot.c > | > ============================================================================== > | > --- head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:13:16 2008 (r184933) > | > +++ head/sys/ufs/ffs/ffs_snapshot.c Thu Nov 13 17:40:21 2008 (r184934) > | > @@ -351,6 +351,8 @@ restart: > | > if (error) > | > goto out; > | > bawrite(nbp); > | > + if (cg % 10 == 0) > | > + ffs_syncvnode(vp, MNT_WAIT); > | > } > | > /* > | > * Copy all the cylinder group maps. Although the > | > @@ -372,6 +374,8 @@ restart: > | > goto out; > | > error = cgaccount(cg, vp, nbp, 1); > | > bawrite(nbp); > | > + if (cg % 10 == 0) > | > + ffs_syncvnode(vp, MNT_WAIT); > | > if (error) > | > goto out; > | > } > | Thank you ! > | > | Please, MFC it for 7.1. > I'll wait for some of the dust to settle first. > Also I want to test a 7.1 machine here without any of my patches, then > start adding some back it. I should be able to get that mostly done > today unless I get hit with other work stuff. From my perspective > I have a couple of low risk patches that should go in but look more > radical. FWIW, I've just tested the patch on my system described previously 7.1-PRERELEASE amd64, and my snapshots now work, where they did not without the patch (see below). Of course, a snapshot takes a very long time to complete, but I think that is to be expected with filesystems that large. Unless there is some problem I am unaware of, let me add my vote to the MFC column. -greg /dev/da1p1 96850470 7934486 81167948 9% /export/mail /dev/da1p2 1937058312 974663846 807429802 55% /export/home /dev/da1p3 1937058312 81633990 1700459658 5% /export/misc /dev/da1p4 2598991534 274277272 2116794940 11% /export/spare [...] /dev/md9 96850470 7877014 81225420 9% /export/snapshots/mail /dev/md8 1937058312 973516342 808577306 55% /export/snapshots/home /dev/md10 1937058312 80486486 1701607162 5% /export/snapshots/misc /dev/md11 2598991534 272737736 2118334476 11% /export/snapshots/spare # ls -l /export/*/.snapshots/* -r--r----- 1 root operator 2048000085176 Nov 14 09:44 /export/home/.snapshots/20081113 -r--r----- 1 root operator 102400004296 Nov 14 08:59 /export/mail/.snapshots/20081113 -r--r----- 1 root operator 2048000085176 Nov 14 09:30 /export/misc/.snapshots/20081113 -r--r----- 1 root operator 2747837267536 Nov 14 10:10 /export/spare/.snapshots/20081113 -- greg byshenk - gbyshenk@byshenk.net - Leiden, NL From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 09:58:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B89106564A; Fri, 14 Nov 2008 09:58:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7D8F8FC13; Fri, 14 Nov 2008 09:58:16 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAE9wGxn086902; Fri, 14 Nov 2008 09:58:16 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAE9wGcx086897; Fri, 14 Nov 2008 09:58:16 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200811140958.mAE9wGcx086897@svn.freebsd.org> From: Edward Tomasz Napierala Date: Fri, 14 Nov 2008 09:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184965 - in head/sys/gnu/fs/xfs: . FreeBSD X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 09:58:17 -0000 Author: trasz Date: Fri Nov 14 09:58:16 2008 New Revision: 184965 URL: http://svn.freebsd.org/changeset/base/184965 Log: Adapt to accmode_t changes. Approved by: rwatson (mentor), kan Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h head/sys/gnu/fs/xfs/xfs_dfrag.c head/sys/gnu/fs/xfs/xfs_inode.c head/sys/gnu/fs/xfs/xfs_inode.h head/sys/gnu/fs/xfs/xfs_vnodeops.c Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h ============================================================================== --- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h Fri Nov 14 08:43:01 2008 (r184964) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h Fri Nov 14 09:58:16 2008 (r184965) @@ -292,8 +292,8 @@ typedef struct xfs_vnodeops { rv = _VOP_(vop_getattr, vp)((vp)->v_fbhv, vap, f, cr) #define XVOP_SETATTR(vp, vap, f, cr, rv) \ rv = _VOP_(vop_setattr, vp)((vp)->v_fbhv, vap, f, cr) -#define XVOP_ACCESS(vp, mode, cr, rv) \ - rv = _VOP_(vop_access, vp)((vp)->v_fbhv, mode, cr) +#define XVOP_ACCESS(vp, accmode, cr, rv) \ + rv = _VOP_(vop_access, vp)((vp)->v_fbhv, accmode, cr) #define XVOP_LOOKUP(vp,d,vpp,f,rdir,cr,rv) \ rv = _VOP_(vop_lookup, vp)((vp)->v_fbhv,d,vpp,f,rdir,cr) #define XVOP_CREATE(dvp,d,vap,vpp,cr,rv) \ Modified: head/sys/gnu/fs/xfs/xfs_dfrag.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_dfrag.c Fri Nov 14 08:43:01 2008 (r184964) +++ head/sys/gnu/fs/xfs/xfs_dfrag.c Fri Nov 14 09:58:16 2008 (r184965) @@ -181,11 +181,11 @@ xfs_swap_extents( locked = 1; /* Check permissions */ - error = xfs_iaccess(ip, S_IWUSR, NULL); + error = xfs_iaccess(ip, VWRITE, NULL); if (error) goto error0; - error = xfs_iaccess(tip, S_IWUSR, NULL); + error = xfs_iaccess(tip, VWRITE, NULL); if (error) goto error0; Modified: head/sys/gnu/fs/xfs/xfs_inode.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_inode.c Fri Nov 14 08:43:01 2008 (r184964) +++ head/sys/gnu/fs/xfs/xfs_inode.c Fri Nov 14 09:58:16 2008 (r184965) @@ -3610,7 +3610,7 @@ xfs_iflush_all( int xfs_iaccess( xfs_inode_t *ip, - mode_t mode, + accmode_t accmode, cred_t *cr) { xfs_vnode_t *vp; @@ -3624,10 +3624,10 @@ xfs_iaccess( /* * Verify that the MAC policy allows the requested access. */ - if ((error = _MAC_XFS_IACCESS(ip, mode, cr))) + if ((error = _MAC_XFS_IACCESS(ip, accmode, cr))) return XFS_ERROR(error); - if (mode & S_IWUSR) { + if (accmode & VWRITE) { xfs_mount_t *mp = ip->i_mount; if ((XVFSTOMNT(XFS_MTOVFS(mp))->mnt_flag & MNT_RDONLY) && @@ -3644,13 +3644,13 @@ xfs_iaccess( * If there's an Access Control List it's used instead of * the mode bits. */ - if ((error = _ACL_XFS_IACCESS(ip, mode, cr)) != -1) + if ((error = _ACL_XFS_IACCESS(ip, accmode, cr)) != -1) return error ? XFS_ERROR(error) : 0; /* FreeBSD local change here */ error = vaccess(vp->v_vnode->v_type, imode, ip->i_d.di_uid, ip->i_d.di_gid, - mode, cr, NULL); + accmode, cr, NULL); return (error); } Modified: head/sys/gnu/fs/xfs/xfs_inode.h ============================================================================== --- head/sys/gnu/fs/xfs/xfs_inode.h Fri Nov 14 08:43:01 2008 (r184964) +++ head/sys/gnu/fs/xfs/xfs_inode.h Fri Nov 14 09:58:16 2008 (r184965) @@ -455,7 +455,7 @@ void xfs_iunpin(xfs_inode_t *); int xfs_iextents_copy(xfs_inode_t *, xfs_bmbt_rec_t *, int); int xfs_iflush(xfs_inode_t *, uint); void xfs_iflush_all(struct xfs_mount *); -int xfs_iaccess(xfs_inode_t *, mode_t, cred_t *); +int xfs_iaccess(xfs_inode_t *, accmode_t, cred_t *); uint xfs_iroundup(uint); void xfs_ichgtime(xfs_inode_t *, int); xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); Modified: head/sys/gnu/fs/xfs/xfs_vnodeops.c ============================================================================== --- head/sys/gnu/fs/xfs/xfs_vnodeops.c Fri Nov 14 08:43:01 2008 (r184964) +++ head/sys/gnu/fs/xfs/xfs_vnodeops.c Fri Nov 14 09:58:16 2008 (r184965) @@ -922,7 +922,7 @@ xfs_setattr( STATIC int xfs_access( bhv_desc_t *bdp, - int mode, + accmode_t accmode, cred_t *credp) { xfs_inode_t *ip; @@ -933,7 +933,7 @@ xfs_access( ip = XFS_BHVTOI(bdp); xfs_ilock(ip, XFS_ILOCK_SHARED); - error = xfs_iaccess(ip, mode, credp); + error = xfs_iaccess(ip, accmode, credp); xfs_iunlock(ip, XFS_ILOCK_SHARED); return error; } @@ -4538,7 +4538,7 @@ xfs_change_file_space( xfs_ilock(ip, XFS_ILOCK_SHARED); - if ((error = xfs_iaccess(ip, S_IWUSR, credp))) { + if ((error = xfs_iaccess(ip, VWRITE, credp))) { xfs_iunlock(ip, XFS_ILOCK_SHARED); return error; } From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 11:00:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E7F1065670; Fri, 14 Nov 2008 11:00:36 +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 59AA78FC12; Fri, 14 Nov 2008 11:00:36 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAEB0aWJ089926; Fri, 14 Nov 2008 11:00:36 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAEB0Zh8089899; Fri, 14 Nov 2008 11:00:35 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200811141100.mAEB0Zh8089899@svn.freebsd.org> From: Doug Barton Date: Fri, 14 Nov 2008 11:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184967 - in stable/7: contrib/bind9 contrib/bind9/bin/dig contrib/bind9/bin/named contrib/bind9/bin/rndc contrib/bind9/doc/arm contrib/bind9/lib/bind contrib/bind9/lib/bind9 contrib/bi... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 11:00:36 -0000 Author: dougb Date: Fri Nov 14 11:00:34 2008 New Revision: 184967 URL: http://svn.freebsd.org/changeset/base/184967 Log: MFC the BIND 9.4.2-P2 update Approved by: re (kib) Modified: stable/7/contrib/bind9/ (props changed) stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/COPYRIGHT stable/7/contrib/bind9/bin/dig/dighost.c stable/7/contrib/bind9/bin/named/client.c stable/7/contrib/bind9/bin/named/config.c stable/7/contrib/bind9/bin/named/controlconf.c stable/7/contrib/bind9/bin/named/interfacemgr.c stable/7/contrib/bind9/bin/named/lwresd.c stable/7/contrib/bind9/bin/named/named.conf.docbook stable/7/contrib/bind9/bin/named/server.c stable/7/contrib/bind9/bin/rndc/rndc.c stable/7/contrib/bind9/configure.in stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/7/contrib/bind9/lib/bind/configure.in stable/7/contrib/bind9/lib/bind9/check.c stable/7/contrib/bind9/lib/dns/api stable/7/contrib/bind9/lib/dns/dispatch.c stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h stable/7/contrib/bind9/lib/dns/request.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/xfrin.c stable/7/contrib/bind9/lib/isc/api stable/7/contrib/bind9/lib/isc/include/isc/resource.h stable/7/contrib/bind9/lib/isc/include/isc/socket.h stable/7/contrib/bind9/lib/isc/include/isc/timer.h stable/7/contrib/bind9/lib/isc/timer.c stable/7/contrib/bind9/lib/isc/unix/app.c stable/7/contrib/bind9/lib/isc/unix/resource.c stable/7/contrib/bind9/lib/isc/unix/socket.c stable/7/contrib/bind9/lib/isc/unix/socket_p.h stable/7/contrib/bind9/lib/isccfg/api stable/7/contrib/bind9/lib/isccfg/namedconf.c stable/7/contrib/bind9/version stable/7/lib/bind/ (props changed) stable/7/lib/bind/config.h Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/CHANGES Fri Nov 14 11:00:34 2008 (r184967) @@ -1,3 +1,47 @@ + --- 9.4.2-P2 released --- + +2406. [bug] Some operating systems have FD_SETSIZE set to a + low value by default, which can cause resource + exhaustion when many simultaneous connections are + open. Linux in particular makes it difficult to + increase this value. To use more sockets with + select(), set ISC_SOCKET_FDSETSIZE. Example: + STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure + (This should not be necessary in most cases, and + never for an authoritative-only server.) [RT #18328] + +2404. [port] hpux: files unlimited support. + +2403. [bug] TSIG context leak. [RT #18341] + +2402. [port] Support Solaris 2.11 and over. [RT #18362] + +2401. [bug] Expect to get E[MN]FILE errno internal_accept() + (from accept() or fcntl() system calls). [RT #18358] + +2399. [bug] Abort timeout queries to reduce the number of open + UDP sockets. [RT #18367] + +2398. [bug] Improve file descriptor management. New, + temporary, named.conf option reserved-sockets, + default 512. [RT #18344] + +2396. [bug] Don't set SO_REUSEADDR for randomized ports. + [RT #18336] + +2395. [port] Avoid warning and no effect from "files unlimited" + on Linux when running as root. [RT #18335] + +2394. [bug] Default configuration options set the limit for + open files to 'unlimited' as described in the + documentation. [RT #18331] + +2392. [bug] remove 'grep -q' from acl test script, some platforms + don't support it. [RT #18253] + +2322. [port] MacOS: work around the limitation of setrlimit() + for RLIMIT_NOFILE. [RT #17526] + --- 9.4.2-P1 released --- 2375. [security] Fully randomize UDP query ports to improve @@ -33,7 +77,7 @@ [RT #17113] 2249. [bug] Only set Authentic Data bit if client requested - DNSSEC, per RFC 3655 [RT #17175] + DNSSEC, per RFC 3655 [RT #17175] 2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] Modified: stable/7/contrib/bind9/COPYRIGHT ============================================================================== --- stable/7/contrib/bind9/COPYRIGHT Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/COPYRIGHT Fri Nov 14 11:00:34 2008 (r184967) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2008 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.9.18.4 2007/08/28 07:19:54 tbox Exp $ +$Id: COPYRIGHT,v 1.9.18.4.10.1 2008/07/23 07:28:54 tbox Exp $ Portions Copyright (C) 1996-2001 Nominum, Inc. Modified: stable/7/contrib/bind9/bin/dig/dighost.c ============================================================================== --- stable/7/contrib/bind9/bin/dig/dighost.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/dig/dighost.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: dighost.c,v 1.259.18.43 2007/08/28 07:19:55 tbox Exp $ */ +/* $Id: dighost.c,v 1.259.18.43.10.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file * \note @@ -2217,14 +2217,15 @@ send_tcp_connect(dig_query_t *query) { sockcount++; debug("sockcount=%d", sockcount); if (specified_source) - result = isc_socket_bind(query->sock, &bind_address); + result = isc_socket_bind(query->sock, &bind_address, + ISC_SOCKET_REUSEADDRESS); else { if ((isc_sockaddr_pf(&query->sockaddr) == AF_INET) && have_ipv4) isc_sockaddr_any(&bind_any); else isc_sockaddr_any6(&bind_any); - result = isc_socket_bind(query->sock, &bind_any); + result = isc_socket_bind(query->sock, &bind_any, 0); } check_result(result, "isc_socket_bind"); bringup_timer(query, TCP_TIMEOUT); @@ -2271,11 +2272,12 @@ send_udp(dig_query_t *query) { sockcount++; debug("sockcount=%d", sockcount); if (specified_source) { - result = isc_socket_bind(query->sock, &bind_address); + result = isc_socket_bind(query->sock, &bind_address, + ISC_SOCKET_REUSEADDRESS); } else { isc_sockaddr_anyofpf(&bind_any, isc_sockaddr_pf(&query->sockaddr)); - result = isc_socket_bind(query->sock, &bind_any); + result = isc_socket_bind(query->sock, &bind_any, 0); } check_result(result, "isc_socket_bind"); Modified: stable/7/contrib/bind9/bin/named/client.c ============================================================================== --- stable/7/contrib/bind9/bin/named/client.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/client.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: client.c,v 1.219.18.28.10.1 2008/05/22 21:28:04 each Exp $ */ +/* $Id: client.c,v 1.219.18.28.10.2 2008/07/23 07:28:54 tbox Exp $ */ #include Modified: stable/7/contrib/bind9/bin/named/config.c ============================================================================== --- stable/7/contrib/bind9/bin/named/config.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/config.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-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: config.c,v 1.47.18.32 2007/09/13 05:04:01 each Exp $ */ +/* $Id: config.c,v 1.47.18.32.10.3 2008/07/23 23:48:17 tbox Exp $ */ /*! \file */ @@ -52,7 +52,7 @@ options {\n\ #ifndef WIN32 " coresize default;\n\ datasize default;\n\ - files default;\n\ + files unlimited;\n\ stacksize default;\n" #endif " deallocate-on-exit true;\n\ @@ -99,6 +99,7 @@ options {\n\ use-ixfr true;\n\ edns-udp-size 4096;\n\ max-udp-size 4096;\n\ + reserved-sockets 512;\n\ \n\ /* view */\n\ allow-notify {none;};\n\ Modified: stable/7/contrib/bind9/bin/named/controlconf.c ============================================================================== --- stable/7/contrib/bind9/bin/named/controlconf.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/controlconf.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2001-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: controlconf.c,v 1.40.18.10 2006/12/07 04:53:02 marka Exp $ */ +/* $Id: controlconf.c,v 1.40.18.10.40.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file */ @@ -1151,8 +1151,8 @@ add_listener(ns_controls_t *cp, controll type, &listener->sock); if (result == ISC_R_SUCCESS) - result = isc_socket_bind(listener->sock, - &listener->address); + result = isc_socket_bind(listener->sock, &listener->address, + ISC_SOCKET_REUSEADDRESS); if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) { listener->perm = cfg_obj_asuint32(cfg_tuple_get(control, Modified: stable/7/contrib/bind9/bin/named/interfacemgr.c ============================================================================== --- stable/7/contrib/bind9/bin/named/interfacemgr.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/interfacemgr.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2002 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: interfacemgr.c,v 1.76.18.8 2006/07/20 01:10:30 marka Exp $ */ +/* $Id: interfacemgr.c,v 1.76.18.8.44.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file */ @@ -307,7 +307,8 @@ ns_interface_accepttcp(ns_interface_t *i #ifndef ISC_ALLOW_MAPPED isc_socket_ipv6only(ifp->tcpsocket, ISC_TRUE); #endif - result = isc_socket_bind(ifp->tcpsocket, &ifp->addr); + result = isc_socket_bind(ifp->tcpsocket, &ifp->addr, + ISC_SOCKET_REUSEADDRESS); if (result != ISC_R_SUCCESS) { isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR, "binding TCP socket: %s", Modified: stable/7/contrib/bind9/bin/named/lwresd.c ============================================================================== --- stable/7/contrib/bind9/bin/named/lwresd.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/lwresd.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwresd.c,v 1.46.18.7 2006/03/02 00:37:21 marka Exp $ */ +/* $Id: lwresd.c,v 1.46.18.7.52.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file * \brief @@ -576,7 +576,8 @@ listener_bind(ns_lwreslistener_t *listen return (result); } - result = isc_socket_bind(sock, &listener->address); + result = isc_socket_bind(sock, &listener->address, + ISC_SOCKET_REUSEADDRESS); if (result != ISC_R_SUCCESS) { char socktext[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_format(&listener->address, socktext, Modified: stable/7/contrib/bind9/bin/named/named.conf.docbook ============================================================================== --- stable/7/contrib/bind9/bin/named/named.conf.docbook Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/named.conf.docbook Fri Nov 14 11:00:34 2008 (r184967) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + Aug 13, 2004 @@ -40,6 +40,7 @@ 2005 2006 2007 + 2008 Internet Systems Consortium, Inc. ("ISC") @@ -201,6 +202,7 @@ options { port integer; querylog boolean; recursing-file quoted_string; + reserved-sockets integer; random-device quoted_string; recursive-clients integer; serial-query-rate integer; Modified: stable/7/contrib/bind9/bin/named/server.c ============================================================================== --- stable/7/contrib/bind9/bin/named/server.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/named/server.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: server.c,v 1.419.18.57.10.1 2008/05/22 21:28:04 each Exp $ */ +/* $Id: server.c,v 1.419.18.57.10.3 2008/07/23 12:04:32 marka Exp $ */ /*! \file */ @@ -2696,27 +2696,29 @@ static isc_result_t load_configuration(const char *filename, ns_server_t *server, isc_boolean_t first_time) { - isc_result_t result; - isc_interval_t interval; - cfg_parser_t *parser = NULL; + cfg_aclconfctx_t aclconfctx; cfg_obj_t *config; - const cfg_obj_t *options; - const cfg_obj_t *views; + cfg_parser_t *parser = NULL; + const cfg_listelt_t *element; + const cfg_obj_t *builtin_views; + const cfg_obj_t *maps[3]; const cfg_obj_t *obj; + const cfg_obj_t *options; const cfg_obj_t *v4ports, *v6ports; - const cfg_obj_t *maps[3]; - const cfg_obj_t *builtin_views; - const cfg_listelt_t *element; + const cfg_obj_t *views; dns_view_t *view = NULL; dns_view_t *view_next; - dns_viewlist_t viewlist; dns_viewlist_t tmpviewlist; - cfg_aclconfctx_t aclconfctx; - isc_uint32_t interface_interval; - isc_uint32_t heartbeat_interval; - isc_uint32_t udpsize; + dns_viewlist_t viewlist; in_port_t listen_port; int i; + isc_interval_t interval; + isc_resourcevalue_t files; + isc_result_t result; + isc_uint32_t heartbeat_interval; + isc_uint32_t interface_interval; + isc_uint32_t reserved; + isc_uint32_t udpsize; cfg_aclconfctx_init(&aclconfctx); ISC_LIST_INIT(viewlist); @@ -2797,6 +2799,43 @@ load_configuration(const char *filename, set_limits(maps); /* + * Sanity check on "files" limit. + */ + result = isc_resource_curlimit(isc_resource_openfiles, &files); + if (result == ISC_R_SUCCESS && files < FD_SETSIZE) { + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, + NS_LOGMODULE_SERVER, ISC_LOG_WARNING, + "the 'files' limit (%" ISC_PRINT_QUADFORMAT "u) " + "is less than FD_SETSIZE (%d), increase " + "'files' in named.conf or recompile with a " + "smaller FD_SETSIZE.", files, FD_SETSIZE); + if (files > FD_SETSIZE) + files = FD_SETSIZE; + } else + files = FD_SETSIZE; + + /* + * Set the number of socket reserved for TCP, stdio etc. + */ + obj = NULL; + result = ns_config_get(maps, "reserved-sockets", &obj); + INSIST(result == ISC_R_SUCCESS); + reserved = cfg_obj_asuint32(obj); + if (files < 128U) /* Prevent underflow. */ + reserved = 0; + else if (reserved > files - 128U) /* Mimimum UDP space. */ + reserved = files - 128; + if (reserved < 128U) /* Mimimum TCP/stdio space. */ + reserved = 128; + if (reserved + 128U > files) { + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, + NS_LOGMODULE_SERVER, ISC_LOG_WARNING, + "less than 128 UDP sockets available after " + "applying 'reserved-sockets' and 'files'"); + } + isc__socketmgr_setreserved(ns_g_socketmgr, reserved); + + /* * Configure various server options. */ configure_server_quota(maps, "transfers-out", &server->xfroutquota); Modified: stable/7/contrib/bind9/bin/rndc/rndc.c ============================================================================== --- stable/7/contrib/bind9/bin/rndc/rndc.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/bin/rndc/rndc.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.96.18.17 2006/08/04 03:03:41 marka Exp $ */ +/* $Id: rndc.c,v 1.96.18.17.42.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file */ @@ -400,10 +400,10 @@ rndc_startconnect(isc_sockaddr_t *addr, DO("create socket", isc_socket_create(socketmgr, pf, type, &sock)); switch (isc_sockaddr_pf(addr)) { case AF_INET: - DO("bind socket", isc_socket_bind(sock, &local4)); + DO("bind socket", isc_socket_bind(sock, &local4, 0)); break; case AF_INET6: - DO("bind socket", isc_socket_bind(sock, &local6)); + DO("bind socket", isc_socket_bind(sock, &local6, 0)); break; default: break; Modified: stable/7/contrib/bind9/configure.in ============================================================================== --- stable/7/contrib/bind9/configure.in Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/configure.in Fri Nov 14 11:00:34 2008 (r184967) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 1998-2003 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.355.18.71 $) +AC_REVISION($Revision: 1.355.18.71.8.2 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.59) @@ -1839,7 +1839,7 @@ case "$host" in [*-solaris2.[89]]) hack_shutup_pthreadonceinit=yes ;; - *-solaris2.10) + *-solaris2.1[0-9]) hack_shutup_pthreadonceinit=yes ;; esac Modified: stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml ============================================================================== --- stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml Fri Nov 14 11:00:34 2008 (r184967) @@ -2,7 +2,7 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []> - + BIND 9 Administrator Reference Manual @@ -28,6 +28,7 @@ 2005 2006 2007 + 2008 Internet Systems Consortium, Inc. ("ISC") @@ -4441,6 +4442,7 @@ category notify { null; }; max-transfer-idle-in number; max-transfer-idle-out number; tcp-clients number; + reserved-sockets number; recursive-clients number; serial-query-rate number; serial-queries number; @@ -6606,6 +6608,23 @@ query-source-v6 address * port *; + reserved-sockets + + + The number of file descriptors reserved for TCP, stdio, + etc. This needs to be big enough to cover the number of + interfaces named listens on, tcp-clients as well as + to provide room for outgoing TCP queries and incoming zone + transfers. The default is 512. + The minimum value is 128 and the + maximum value is 128 less than + 'files' or FD_SETSIZE (whichever is smaller). This + option may be removed in the future. + + + + + max-cache-size Modified: stable/7/contrib/bind9/lib/bind/configure.in ============================================================================== --- stable/7/contrib/bind9/lib/bind/configure.in Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/bind/configure.in Fri Nov 14 11:00:34 2008 (r184967) @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") +# Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2001, 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. -AC_REVISION($Revision: 1.90.18.34 $) +AC_REVISION($Revision: 1.90.18.34.10.2 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -2590,7 +2590,7 @@ case "$host" in *-solaris2.9) hack_shutup_in6addr_init_macros=yes ;; - *-solaris2.10) + *-solaris2.1[0-9]) hack_shutup_in6addr_init_macros=yes ;; esac Modified: stable/7/contrib/bind9/lib/bind9/check.c ============================================================================== --- stable/7/contrib/bind9/lib/bind9/check.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/bind9/check.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1015,10 +1015,10 @@ check_zoneconf(const cfg_obj_t *zconfig, isc_buffer_add(&b, strlen(zname)); tresult = dns_name_fromtext(dns_fixedname_name(&fixedname), &b, dns_rootname, ISC_TRUE, NULL); - if (tresult != ISC_R_SUCCESS) { + if (result != ISC_R_SUCCESS) { cfg_obj_log(zconfig, logctx, ISC_LOG_ERROR, "zone '%s': is not a valid name", zname); - result = ISC_R_FAILURE; + tresult = ISC_R_FAILURE; } else { char namebuf[DNS_NAME_FORMATSIZE]; Modified: stable/7/contrib/bind9/lib/dns/api ============================================================================== --- stable/7/contrib/bind9/lib/dns/api Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/api Fri Nov 14 11:00:34 2008 (r184967) @@ -1,3 +1,3 @@ LIBINTERFACE = 35 -LIBREVISION = 0 +LIBREVISION = 1 LIBAGE = 0 Modified: stable/7/contrib/bind9/lib/dns/dispatch.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/dispatch.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/dispatch.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: dispatch.c,v 1.116.18.19.12.1 2008/05/22 21:28:06 each Exp $ */ +/* $Id: dispatch.c,v 1.116.18.19.12.5 2008/07/23 23:16:43 marka Exp $ */ /*! \file */ @@ -276,7 +276,26 @@ request_log(dns_dispatch_t *disp, dns_di } /* - * ARC4 random number generator obtained from OpenBSD + * ARC4 random number generator derived from OpenBSD. + * Only dispatch_arc4random() and dispatch_arc4uniformrandom() are expected + * to be called from general dispatch routines; the rest of them are subroutines + * for these two. + * + * The original copyright follows: + * Copyright (c) 1996, David Mazieres + * Copyright (c) 2008, Damien Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ static void dispatch_arc4init(arc4ctx_t *actx) { @@ -1172,7 +1191,7 @@ destroy_mgr(dns_dispatchmgr_t **mgrp) { static isc_result_t create_socket(isc_socketmgr_t *mgr, isc_sockaddr_t *local, - isc_socket_t **sockp) + unsigned int options, isc_socket_t **sockp) { isc_socket_t *sock; isc_result_t result; @@ -1186,7 +1205,7 @@ create_socket(isc_socketmgr_t *mgr, isc_ #ifndef ISC_ALLOW_MAPPED isc_socket_ipv6only(sock, ISC_TRUE); #endif - result = isc_socket_bind(sock, local); + result = isc_socket_bind(sock, local, options); if (result != ISC_R_SUCCESS) { isc_socket_detach(&sock); return (result); @@ -1917,7 +1936,7 @@ dispatch_createudp(dns_dispatchmgr_t *mg attributes &= ~DNS_DISPATCHATTR_RANDOMPORT; goto getsocket; } - result = create_socket(sockmgr, &localaddr_bound, &sock); + result = create_socket(sockmgr, &localaddr_bound, 0, &sock); if (result == ISC_R_ADDRINUSE) { if (++k == 1024) attributes &= ~DNS_DISPATCHATTR_RANDOMPORT; @@ -1925,7 +1944,8 @@ dispatch_createudp(dns_dispatchmgr_t *mg } localport = prt; } else - result = create_socket(sockmgr, localaddr, &sock); + result = create_socket(sockmgr, localaddr, + ISC_SOCKET_REUSEADDRESS, &sock); if (result != ISC_R_SUCCESS) goto deallocate_dispatch; if ((attributes & DNS_DISPATCHATTR_RANDOMPORT) == 0 && Modified: stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h ============================================================================== --- stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 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: dispatch.h,v 1.48.18.5.12.1 2008/05/22 21:28:06 each Exp $ */ +/* $Id: dispatch.h,v 1.48.18.5.12.2 2008/07/23 07:28:56 tbox Exp $ */ #ifndef DNS_DISPATCH_H #define DNS_DISPATCH_H 1 Modified: stable/7/contrib/bind9/lib/dns/request.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/request.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/request.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000-2002 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: request.c,v 1.72.18.5 2006/08/21 00:40:53 marka Exp $ */ +/* $Id: request.c,v 1.72.18.5.42.2 2008/07/23 07:28:56 tbox Exp $ */ /*! \file */ @@ -518,11 +518,11 @@ create_tcp_dispatch(dns_requestmgr_t *re if (srcaddr == NULL) { isc_sockaddr_anyofpf(&bind_any, isc_sockaddr_pf(destaddr)); - result = isc_socket_bind(socket, &bind_any); + result = isc_socket_bind(socket, &bind_any, 0); } else { src = *srcaddr; isc_sockaddr_setport(&src, 0); - result = isc_socket_bind(socket, &src); + result = isc_socket_bind(socket, &src, 0); } if (result != ISC_R_SUCCESS) goto cleanup; Modified: stable/7/contrib/bind9/lib/dns/resolver.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/resolver.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/resolver.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: resolver.c,v 1.284.18.66.8.1 2008/05/22 21:28:06 each Exp $ */ +/* $Id: resolver.c,v 1.284.18.66.8.4 2008/07/24 05:00:48 jinmei Exp $ */ /*! \file */ @@ -1123,7 +1123,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddr goto cleanup_query; #ifndef BROKEN_TCP_BIND_BEFORE_CONNECT - result = isc_socket_bind(query->tcpsocket, &addr); + result = isc_socket_bind(query->tcpsocket, &addr, 0); if (result != ISC_R_SUCCESS) goto cleanup_socket; #endif @@ -2689,6 +2689,8 @@ fctx_destroy(fetchctx_t *fctx) { static void fctx_timeout(isc_task_t *task, isc_event_t *event) { fetchctx_t *fctx = event->ev_arg; + isc_timerevent_t *tevent = (isc_timerevent_t *)event; + resquery_t *query; REQUIRE(VALID_FCTX(fctx)); @@ -2704,8 +2706,18 @@ fctx_timeout(isc_task_t *task, isc_event fctx->timeouts++; /* * We could cancel the running queries here, or we could let - * them keep going. Right now we choose the latter... - */ + * them keep going. Since we normally use separate sockets for + * different queries, we adopt the former approach to reduce + * the number of open sockets: cancel the oldest query if it + * expired after the query had started (this is usually the + * case but is not always so, depending on the task schedule + * timing). + */ + query = ISC_LIST_HEAD(fctx->queries); + if (query != NULL && + isc_time_compare(&tevent->due, &query->start) >= 0) { + fctx_cancelquery(&query, NULL, NULL, ISC_TRUE); + } fctx->attributes &= ~FCTX_ATTR_ADDRWAIT; /* * Our timer has triggered. Reestablish the fctx lifetime Modified: stable/7/contrib/bind9/lib/dns/xfrin.c ============================================================================== --- stable/7/contrib/bind9/lib/dns/xfrin.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/dns/xfrin.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 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: xfrin.c,v 1.135.18.16 2007/10/31 01:59:47 marka Exp $ */ +/* $Id: xfrin.c,v 1.135.18.16.10.3 2008/07/23 23:16:43 marka Exp $ */ /*! \file */ @@ -862,7 +862,8 @@ xfrin_start(dns_xfrin_ctx_t *xfr) { isc_sockettype_tcp, &xfr->socket)); #ifndef BROKEN_TCP_BIND_BEFORE_CONNECT - CHECK(isc_socket_bind(xfr->socket, &xfr->sourceaddr)); + CHECK(isc_socket_bind(xfr->socket, &xfr->sourceaddr, + ISC_SOCKET_REUSEADDRESS)); #endif CHECK(isc_socket_connect(xfr->socket, &xfr->masteraddr, xfr->task, xfrin_connect_done, xfr)); Modified: stable/7/contrib/bind9/lib/isc/api ============================================================================== --- stable/7/contrib/bind9/lib/isc/api Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/isc/api Fri Nov 14 11:00:34 2008 (r184967) @@ -1,3 +1,3 @@ -LIBINTERFACE = 32 -LIBREVISION = 5 +LIBINTERFACE = 35 +LIBREVISION = 0 LIBAGE = 0 Modified: stable/7/contrib/bind9/lib/isc/include/isc/resource.h ============================================================================== --- stable/7/contrib/bind9/lib/isc/include/isc/resource.h Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/isc/include/isc/resource.h Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2000, 2001 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: resource.h,v 1.5.18.2 2005/04/29 00:17:02 marka Exp $ */ +/* $Id: resource.h,v 1.5.18.2.52.2 2008/07/23 23:48:17 tbox Exp $ */ #ifndef ISC_RESOURCE_H #define ISC_RESOURCE_H 1 @@ -81,6 +81,19 @@ isc_resource_getlimit(isc_resource_t res *\li #ISC_R_NOTIMPLEMENTED 'resource' is not a type known by the OS. */ +isc_result_t +isc_resource_curlimit(isc_resource_t resource, isc_resourcevalue_t *value); +/* + * Get the current limit on a resource. + * + * Requires: + * 'resource' is a valid member of the isc_resource_t enumeration. + * + * Returns: + * ISC_R_SUCCESS Success. + * ISC_R_NOTIMPLEMENTED 'resource' is not a type known by the OS. + */ + ISC_LANG_ENDDECLS #endif /* ISC_RESOURCE_H */ Modified: stable/7/contrib/bind9/lib/isc/include/isc/socket.h ============================================================================== --- stable/7/contrib/bind9/lib/isc/include/isc/socket.h Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/isc/include/isc/socket.h Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2006, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2002 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.h,v 1.57.18.6 2006/06/07 00:29:45 marka Exp $ */ +/* $Id: socket.h,v 1.57.18.6.46.4 2008/07/23 23:16:43 marka Exp $ */ #ifndef ISC_SOCKET_H #define ISC_SOCKET_H 1 @@ -77,6 +77,12 @@ ISC_LANG_BEGINDECLS */ #define ISC_SOCKET_MAXSCATTERGATHER 8 +/*% + * In isc_socket_bind() set socket option SO_REUSEADDR prior to calling + * bind() if a non zero port is specified (AF_INET and AF_INET6). + */ +#define ISC_SOCKET_REUSEADDRESS 0x01U + /*** *** Types ***/ @@ -312,7 +318,8 @@ isc_socket_detach(isc_socket_t **socketp */ isc_result_t -isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp); +isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *addressp, + unsigned int options); /*%< * Bind 'socket' to '*addressp'. * @@ -747,6 +754,12 @@ isc_socket_permunix(isc_sockaddr_t *sock * \li #ISC_R_FAILURE */ +void +isc__socketmgr_setreserved(isc_socketmgr_t *mgr, isc_uint32_t); +/*%< + * Temporary. For use by named only. + */ + ISC_LANG_ENDDECLS #endif /* ISC_SOCKET_H */ Modified: stable/7/contrib/bind9/lib/isc/include/isc/timer.h ============================================================================== --- stable/7/contrib/bind9/lib/isc/include/isc/timer.h Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/isc/include/isc/timer.h Fri Nov 14 11:00:34 2008 (r184967) @@ -1,8 +1,8 @@ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2002 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: timer.h,v 1.31.18.3 2005/10/26 06:50:50 marka Exp $ */ +/* $Id: timer.h,v 1.31.18.3.52.2 2008/07/24 23:48:09 tbox Exp $ */ #ifndef ISC_TIMER_H #define ISC_TIMER_H 1 @@ -76,6 +76,7 @@ #include #include #include +#include ISC_LANG_BEGINDECLS @@ -93,6 +94,7 @@ typedef enum { typedef struct isc_timerevent { struct isc_event common; + isc_time_t due; } isc_timerevent_t; #define ISC_TIMEREVENT_FIRSTEVENT (ISC_EVENTCLASS_TIMER + 0) Modified: stable/7/contrib/bind9/lib/isc/timer.c ============================================================================== --- stable/7/contrib/bind9/lib/isc/timer.c Fri Nov 14 10:59:36 2008 (r184966) +++ stable/7/contrib/bind9/lib/isc/timer.c Fri Nov 14 11:00:34 2008 (r184967) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-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: timer.c,v 1.73.18.7 2007/10/24 23:46:26 tbox Exp $ */ +/* $Id: timer.c,v 1.73.18.7.10.3 2008/07/29 18:35:53 jinmei Exp $ */ /*! \file */ @@ -577,7 +577,7 @@ isc_timer_detach(isc_timer_t **timerp) { static void dispatch(isc_timermgr_t *manager, isc_time_t *now) { isc_boolean_t done = ISC_FALSE, post_event, need_schedule; - isc_event_t *event; + isc_timerevent_t *event; isc_eventtype_t type = 0; isc_timer_t *timer; isc_result_t result; @@ -650,16 +650,18 @@ dispatch(isc_timermgr_t *manager, isc_ti /* * XXX We could preallocate this event. */ - event = isc_event_allocate(manager->mctx, + event = (isc_timerevent_t *)isc_event_allocate(manager->mctx, timer, type, timer->action, timer->arg, sizeof(*event)); - if (event != NULL) - isc_task_send(timer->task, &event); - else + if (event != NULL) { + event->due = timer->due; + isc_task_send(timer->task, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 11:27:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1112106567F; Fri, 14 Nov 2008 11:27:53 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D72118FC13; Fri, 14 Nov 2008 11:27:53 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAEBRrFV091181; Fri, 14 Nov 2008 11:27:53 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAEBRrpB091178; Fri, 14 Nov 2008 11:27:53 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200811141127.mAEBRrpB091178@svn.freebsd.org> From: Doug Rabson Date: Fri, 14 Nov 2008 11:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184969 - in head/sys: conf nfsclient nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 11:27:54 -0000 Author: dfr Date: Fri Nov 14 11:27:53 2008 New Revision: 184969 URL: http://svn.freebsd.org/changeset/base/184969 Log: Switch the default rpc implementation for NFS back to the new code. I believe I have fixed the reported problems - if you still have trouble with it, please contact me with as much detail as possible so that I can track down any other issues as quickly as possible. Modified: head/sys/conf/options head/sys/nfsclient/nfs.h head/sys/nfsserver/nfs.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Nov 14 11:23:02 2008 (r184968) +++ head/sys/conf/options Fri Nov 14 11:27:53 2008 (r184969) @@ -230,7 +230,6 @@ NFS4CLIENT opt_nfs.h # legacy RPC implementation instead of the newer KRPC system (which # supports modern features such as RPCSEC_GSS NFS_LEGACYRPC opt_nfs.h -NFS_NEWRPC opt_nfs.h # filesystems and libiconv bridge CD9660_ICONV opt_dontuse.h Modified: head/sys/nfsclient/nfs.h ============================================================================== --- head/sys/nfsclient/nfs.h Fri Nov 14 11:23:02 2008 (r184968) +++ head/sys/nfsclient/nfs.h Fri Nov 14 11:27:53 2008 (r184969) @@ -40,10 +40,6 @@ #include "opt_nfs.h" #endif -#if !defined(NFS_NEWRPC) && !defined(NFS_LEGACYRPC) -#define NFS_LEGACYRPC -#endif - #include /* Modified: head/sys/nfsserver/nfs.h ============================================================================== --- head/sys/nfsserver/nfs.h Fri Nov 14 11:23:02 2008 (r184968) +++ head/sys/nfsserver/nfs.h Fri Nov 14 11:27:53 2008 (r184969) @@ -40,10 +40,6 @@ #include "opt_nfs.h" #endif -#if !defined(NFS_NEWRPC) && !defined(NFS_LEGACYRPC) -#define NFS_LEGACYRPC -#endif - /* * Tunable constants for nfs */ From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 16:39:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 818961065688; Fri, 14 Nov 2008 16:39:53 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D090B8FC19; Fri, 14 Nov 2008 16:39:52 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl134-121.kln.forthnet.gr [77.49.253.121]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mAEGdguG029956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 14 Nov 2008 18:39:48 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mAEGdgeZ002413; Fri, 14 Nov 2008 18:39:42 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mAEGdf8G002412; Fri, 14 Nov 2008 18:39:41 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Joseph Koshy In-Reply-To: <200811091737.mA9HbssM047036@svn.freebsd.org> (Joseph Koshy's message of "Sun, 9 Nov 2008 17:37:54 +0000 (UTC)") Date: Fri, 14 Nov 2008 11:51:10 +0200 Message-ID: <87skpuab5d.fsf@kobe.laptop> References: <200811091737.mA9HbssM047036@svn.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mAEGdguG029956 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.056, required 5, ALL_TRUSTED -1.80, AWL -0.16, BAYES_00 -2.60, DATE_IN_PAST_06_12 0.50) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184802 - in head/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 16:39:53 -0000 On Sun, 9 Nov 2008 17:37:54 +0000 (UTC), Joseph Koshy wrote: > Author: jkoshy > Date: Sun Nov 9 17:37:54 2008 > New Revision: 184802 > URL: http://svn.freebsd.org/changeset/base/184802 > > Log: > - Separate PMC class dependent code from other kinds of machine > dependencies. A 'struct pmc_classdep' structure describes operations > on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep' > structures depending on the CPU in question. > > Inside PMC class dependent code, row indices are relative to the > PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates > global row indices before invoking class dependent operations. > > - Augment the OP_GETCPUINFO request with the number of PMCs present > in a PMC class. > > - Move code common to Intel CPUs to file "hwpmc_intel.c". > > - Move TSC handling to file "hwpmc_tsc.c". Hi Joseph, This seems to cause panics here. The laptop I am using now has an Intel Core2 Duo CPU: : CPU: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz (2094.76-MHz 686-class CPU) : Origin = "GenuineIntel" Id = 0x10676 Stepping = 6 : Features=0xbfebfbff : Features2=0x8e3bd : AMD Features=0x20100000 : AMD Features2=0x1 : Cores per package: 2 and after this change I get insta-panics when hwpmc is initialized (either as a module or as part of the main kernel), at one of the KASSERT() calls. Attached is the tail of a kgdb session. It seems that the `md' global is set to a NULL pointer when hwpmc_intel.c tries to dereference it: : Script started on Fri Nov 14 11:32:00 2008 : root@kobe:/var/crash# kgdb /boot/kernel/kernel vmcore.8 : GNU gdb 6.1.1 [FreeBSD] : Copyright 2004 Free Software Foundation, Inc. : GDB is free software, covered by the GNU General Public License, and you are : welcome to change it and/or distribute copies of it under certain conditions. : Type "show copying" to see the conditions. : There is absolutely no warranty for GDB. Type "show warranty" for details. : This GDB was configured as "i386-marcel-freebsd"... : : Unread portion of the kernel message buffer: : Copyright (c) 1992-2008 The FreeBSD Project. : Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 : The Regents of the University of California. All rights reserved. : FreeBSD is a registered trademark of The FreeBSD Foundation. : FreeBSD 8.0-CURRENT #0: Fri Nov 14 01:31:52 EET 2008 : build@kobe:/usr/obj/usr/src/sys/KOBE : WARNING: WITNESS option enabled, expect reduced performance. : Timecounter "i8254" frequency 1193182 Hz quality 0 : CPU: Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz (2094.76-MHz 686-class CPU) : Origin = "GenuineIntel" Id = 0x10676 Stepping = 6 : Features=0xbfebfbff : Features2=0x8e3bd : AMD Features=0x20100000 : AMD Features2=0x1 : Cores per package: 2 : real memory = 3211591680 (3062 MB) : avail memory = 3139604480 (2994 MB) : ACPI APIC Table: : FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs : cpu0 (BSP): APIC ID: 0 : cpu1 (AP): APIC ID: 1 : ioapic0: Changing APIC ID to 1 : ioapic0 irqs 0-23 on motherboard : kbd1 at kbdmux0 : ath_hal: 0.10.5.10 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417) : acpi0: on motherboard : acpi0: [ITHREAD] : acpi0: Power Button (fixed) : acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 : Timecounter "HPET" frequency 14318180 Hz quality 900 : Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 : acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 : acpi_ec0: port 0x62,0x66 on acpi0 : battery0: on acpi0 : acpi_button0: on acpi0 : acpi_button1: on acpi0 : acpi_acad0: on acpi0 : acpi_lid0: on acpi0 : pcib0: port 0xcf8-0xcff on acpi0 : pci0: on pcib0 : vgapci0: port 0x1800-0x1807 mem 0xf0c00000-0xf0cfffff,0xd0000000-0xdfffffff irq 16 at device 2.0 on pci0 : agp0: on vgapci0 : agp0: detected 7676k stolen memory : agp0: aperture size is 256M : vgapci1: mem 0xf0d00000-0xf0dfffff at device 2.1 on pci0 : uhci0: port 0x1820-0x183f irq 16 at device 26.0 on pci0 : uhci0: [GIANT-LOCKED] : uhci0: [ITHREAD] : usb0: on uhci0 : usb0: USB revision 1.0 : uhub0: on usb0 : uhub0: 2 ports with 2 removable, self powered : uhci1: port 0x1840-0x185f irq 21 at device 26.1 on pci0 : uhci1: [GIANT-LOCKED] : uhci1: [ITHREAD] : usb1: on uhci1 : usb1: USB revision 1.0 : uhub1: on usb1 : uhub1: 2 ports with 2 removable, self powered : ehci0: mem 0xf1204000-0xf12043ff irq 18 at device 26.7 on pci0 : ehci0: [GIANT-LOCKED] : ehci0: [ITHREAD] : usb2: EHCI version 1.0 : usb2: companion controllers, 2 ports each: usb0 usb1 : usb2: on ehci0 : usb2: USB revision 2.0 : uhub2: on usb2 : uhub2: 4 ports with 4 removable, self powered : hdac0: mem 0xf1200000-0xf1203fff irq 22 at device 27.0 on pci0 : hdac0: HDA Driver Revision: 20081030_0115 : hdac0: [ITHREAD] : pcib1: irq 17 at device 28.0 on pci0 : pci2: on pcib1 : iwn0: mem 0xf0e00000-0xf0e01fff irq 16 at device 0.0 on pci2 : iwn0: Reg Domain: MoW2, address 00:1f:3b:19:d5:41 : iwn0: [ITHREAD] : iwn0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps : iwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps : iwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps : iwn0: 11na MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps : iwn0: 11ng MCS: 15Mbps 30Mbps 45Mbps 60Mbps 90Mbps 120Mbps 135Mbps 150Mbps 30Mbps 60Mbps 90Mbps 120Mbps 180Mbps 240Mbps 270Mbps 300Mbps : pcib2: irq 16 at device 28.1 on pci0 : pci4: on pcib2 : pcib3: irq 18 at device 28.2 on pci0 : pci6: on pcib3 : pcib4: irq 19 at device 28.3 on pci0 : pci8: on pcib4 : re0: port 0x4000-0x40ff mem 0xf0a00000-0xf0a00fff irq 19 at device 0.0 on pci8 : re0: turning off MSI enable bit. : re0: Chip rev. 0x38000000 : re0: MAC rev. 0x00000000 : miibus0: on re0 : rgephy0: PHY 1 on miibus0 : rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto : re0: Ethernet address: 00:90:f5:6e:05:32 : re0: [FILTER] : pcib5: irq 17 at device 28.4 on pci0 : pci10: on pcib5 : pcib6: irq 16 at device 28.5 on pci0 : pci11: on pcib6 : uhci2: port 0x1860-0x187f irq 23 at device 29.0 on pci0 : uhci2: [GIANT-LOCKED] : uhci2: [ITHREAD] : usb3: on uhci2 : usb3: USB revision 1.0 : uhub3: on usb3 : uhub3: 2 ports with 2 removable, self powered : uhci3: port 0x1880-0x189f irq 19 at device 29.1 on pci0 : uhci3: [GIANT-LOCKED] : uhci3: [ITHREAD] : usb4: on uhci3 : usb4: USB revision 1.0 : uhub4: on usb4 : uhub4: 2 ports with 2 removable, self powered : uhci4: port 0x18a0-0x18bf irq 18 at device 29.2 on pci0 : uhci4: [GIANT-LOCKED] : uhci4: [ITHREAD] : usb5: on uhci4 : usb5: USB revision 1.0 : uhub5: on usb5 : uhub5: 2 ports with 2 removable, self powered : ehci1: mem 0xf1204400-0xf12047ff irq 23 at device 29.7 on pci0 : ehci1: [GIANT-LOCKED] : ehci1: [ITHREAD] : usb6: EHCI version 1.0 : usb6: companion controllers, 2 ports each: usb3 usb4 usb5 : usb6: on ehci1 : usb6: USB revision 2.0 : uhub6: on usb6 : uhub6: 6 ports with 6 removable, self powered : pcib7: at device 30.0 on pci0 : pci12: on pcib7 : pci12: at device 7.0 (no driver attached) : pci12: at device 7.1 (no driver attached) : pci12: at device 7.3 (no driver attached) : fwohci0: port 0x5000-0x507f mem 0xf0f00800-0xf0f00fff irq 19 at device 9.0 on pci12 : fwohci0: [FILTER] : fwohci0: OHCI version 1.10 (ROM=1) : fwohci0: No. of Isochronous channels is 4. : fwohci0: EUI64 00:00:00:00:00:00:43:35 : fwohci0: Phy 1394a available S400, 2 ports. : fwohci0: Link S400, max_rec 2048 bytes. : firewire0: on fwohci0 : dcons_crom0: on firewire0 : dcons_crom0: bus_addr 0x10a8000 : fwe0: on firewire0 : if_fwe0: Fake Ethernet address: 02:00:00:00:43:35 : fwe0: Ethernet address: 02:00:00:00:43:35 : fwip0: on firewire0 : fwip0: Firewire address: 00:00:00:00:00:00:43:35 @ 0xfffe00000000, S400, maxrec 2048 : sbp0: on firewire0 : fwohci0: Initiate bus reset : fwohci0: BUS reset : fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode : isab0: at device 31.0 on pci0 : isa0: on isab0 : atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x18e0-0x18ef,0x18d0-0x18df at device 31.2 on pci0 : ata0: on atapci0 : ata0: [ITHREAD] : ata1: on atapci0 : ata1: [ITHREAD] : pci0: at device 31.3 (no driver attached) : acpi_tz0: on acpi0 : atrtc0: port 0x70-0x77 irq 8 on acpi0 : atkbdc0: port 0x60,0x64 irq 1 on acpi0 : atkbd0: irq 1 on atkbdc0 : kbd0 at atkbd0 : atkbd0: [GIANT-LOCKED] : atkbd0: [ITHREAD] : psm0: irq 12 on atkbdc0 : psm0: [GIANT-LOCKED] : psm0: [ITHREAD] : psm0: model Generic PS/2 mouse, device ID 0 : cpu0: on acpi0 : coretemp0: on cpu0 : est0: on cpu0 : p4tcc0: on cpu0 : cpu1: on acpi0 : coretemp1: on cpu1 : est1: on cpu1 : p4tcc1: on cpu1 : pmtimer0 on isa0 : orm0: at iomem 0xcf000-0xcffff,0xe0000-0xe17ff pnpid ORM0000 on isa0 : sc0: at flags 0x100 on isa0 : sc0: VGA <16 virtual consoles, flags=0x300> : vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 : ums0: on uhub3 : ums0: 3 buttons and Z dir. : Timecounters tick every 1.000 msec : firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) : firewire0: bus manager 0 (me) : ad0: 238475MB at ata0-master SATA150 : acd0: DVDR at ata1-master UDMA33 : hdac0: HDA Codec #0: Realtek ALC883 : hdac0: HDA Codec #1: Unknown Codec : pcm0: at cad 0 nid 1 on hdac0 : pcm1: at cad 0 nid 1 on hdac0 : GEOM_LABEL: Label for provider ad0s1a is ufs/GKEROOT. : GEOM_LABEL: Label for provider ad0s1e is ufs/GKERHOME. : acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 : acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 : cd0 at ata1 bus 0 target 0 lun 0 : cd0: Removable CD-ROM SCSI-0 device : cd0: 33.000MB/s transfers : cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed : SMP: AP CPU #1 Launched! : WARNING: WITNESS option enabled, expect reduced performance. : Trying to mount root from ufs:/dev/ad0s1a : lock order reversal: : 1st 0xc6161044 user map (user map) @ /usr/src/sys/vm/vm_map.c:3115 : 2nd 0xc64f8ad0 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2047 : KDB: stack backtrace: : db_trace_self_wrapper(c093f2b3,c5faf91c,c06652f5,4,c093aaf9,...) at db_trace_self_wrapper+0x26 : kdb_backtrace(4,c093aaf9,c6109728,c610eb40,c5faf978,...) at kdb_backtrace+0x29 : _witness_debugger(c0941f78,c64f8ad0,c0935ee5,c610eb40,c0948d36,...) at _witness_debugger+0x25 : witness_checkorder(c64f8ad0,1,c0948d36,7ff,0,...) at witness_checkorder+0x82b : __lockmgr_args(c64f8ad0,200501,c64f8aec,0,0,...) at __lockmgr_args+0x228 : ffs_lock(c5fafa80,c0961c49,c09355f1,200501,c64f8a78,...) at ffs_lock+0x82 : VOP_LOCK1_APV(c09b62c0,c5fafa80,c09d0080,c64f8a78,200501,...) at VOP_LOCK1_APV+0xa5 : _vn_lock(c64f8a78,200501,c0948d36,7ff,4,...) at _vn_lock+0x5e : vget(c64f8a78,200501,c615dd20,4b4,0,...) at vget+0xcb : vnode_pager_lock(c1477d14,0,c095f20b,127,c5fafc18,...) at vnode_pager_lock+0x1d9 : vm_fault(c6161000,80db000,2,8,80db680,...) at vm_fault+0x1e9 : trap_pfault(5,0,c096c79d,2e7,c615bd0c,...) at trap_pfault+0x119 : trap(c5fafd38) at trap+0x28e : calltrap() at calltrap+0x6 : --- trap 0xc, eip = 0x80480e5, esp = 0xbfbfeef0, ebp = 0xbfbfef10 --- : <118>Enter full pathname of shell or RETURN for : <118>/bin/sh : <118>: : <118># : <118># : <118>swapon: adding /dev/ad0s1b as swap device : <118># : GEOM_LABEL: Label ufs/GKEROOT removed. : <118>/dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS : <118>/dev/ad0s1a: clean, 11717549 free (127621 frags, 1448741 blocks, 0.8% fragmentation) : GEOM_LABEL: Label for provider ad0s1a is ufs/GKEROOT. : GEOM_LABEL: Label ufs/GKERHOME removed. : <118>/dev/ad0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS : <118>/dev/ad0s1e: clean, 16632049 free (528465 frags, 2012948 blocks, 1.2% fragmentation) : GEOM_LABEL: Label for provider ad0s1e is ufs/GKERHOME. : <118># : <118>k : <118>l : <118>d : <118>l : <118>o : <118>a : <118>d : <118> : <118>h : <118>w : <118>p : <118>m : <118>c : <118> : : : Fatal trap 12: page fault while in kernel mode : cpuid = 1; apic id = 01 : fault virtual address = 0x4 : fault code = supervisor read, page not present : instruction pointer = 0x20:0xc67e7765 : stack pointer = 0x28:0xe8cbe994 : frame pointer = 0x28:0xe8cbe9ac : code segment = base 0x0, limit 0xfffff, type 0x1b : = DPL 0, pres 1, def32 1, gran 1 : processor eflags = interrupt enabled, resume, IOPL = 0 : current process = 63 (kldload) : Physical memory: 3050 MB : Dumping 86 MB: 71 55 39 23 7 : : Reading symbols from /boot/kernel/geom_journal.ko...Reading symbols from /boot/kernel/geom_journal.ko.symbols...done. : done. : Loaded symbols for /boot/kernel/geom_journal.ko : Reading symbols from /boot/kernel/snd_hda.ko...Reading symbols from /boot/kernel/snd_hda.ko.symbols...done. : done. : Loaded symbols for /boot/kernel/snd_hda.ko : Reading symbols from /boot/kernel/sound.ko...Reading symbols from /boot/kernel/sound.ko.symbols...done. : done. : Loaded symbols for /boot/kernel/sound.ko : Reading symbols from /boot/kernel/if_iwn.ko...Reading symbols from /boot/kernel/if_iwn.ko.symbols...done. : done. : Loaded symbols for /boot/kernel/if_iwn.ko : Reading symbols from /boot/kernel/hwpmc.ko...Reading symbols from /boot/kernel/hwpmc.ko.symbols...done. : done. : Loaded symbols for /boot/kernel/hwpmc.ko : #0 doadump () at pcpu.h:246 : 246 pcpu.h: No such file or directory. : in pcpu.h : (kgdb) bt : #0 doadump () at pcpu.h:246 : #1 0xc04c8ad9 in db_fncall (dummy1=1, dummy2=0, dummy3=0, dummy4=0xe8cbe728 "") at /usr/src/sys/ddb/db_command.c:548 : #2 0xc04c8ed1 in db_command (last_cmdp=0xc09d2ddc, cmd_table=0x0, dopager=1) at /usr/src/sys/ddb/db_command.c:445 : #3 0xc04c9035 in db_command_loop () at /usr/src/sys/ddb/db_command.c:498 : #4 0xc04caf3c in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_main.c:229 : #5 0xc0652a51 in kdb_trap (type=12, code=0, tf=0xe8cbe954) at /usr/src/sys/kern/subr_kdb.c:534 : #6 0xc08d117f in trap_fatal (frame=0xe8cbe954, eva=4) at /usr/src/sys/i386/i386/trap.c:920 : #7 0xc08d13cb in trap_pfault (frame=0xe8cbe954, usermode=0, eva=4) at /usr/src/sys/i386/i386/trap.c:842 : #8 0xc08d1e15 in trap (frame=0xe8cbe954) at /usr/src/sys/i386/i386/trap.c:522 : #9 0xc08b598b in calltrap () at /usr/src/sys/i386/i386/exception.s:165 : #10 0xc67e7765 in pmc_intel_initialize () at /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_intel.c:171 : #11 0xc67ead82 in pmc_md_initialize () at /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_x86.c:258 : #12 0xc67e228c in load (module=0xc6648800, cmd=0, arg=0x0) at /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_mod.c:4416 : #13 0xc062ce72 in syscall_module_handler (mod=0xc6648800, what=0, arg=0xc67ef280) at /usr/src/sys/kern/kern_syscalls.c:112 : #14 0xc0615347 in module_register_init (arg=0xc67ef230) at /usr/src/sys/kern/kern_module.c:124 : #15 0xc060cdb5 in linker_load_module (kldname=Variable "kldname" is not available. : ) at /usr/src/sys/kern/kern_linker.c:232 : #16 0xc060d26c in kern_kldload (td=0xc668d8c0, file=0xc666f800 "hwpmc", fileid=0xe8cbec70) at /usr/src/sys/kern/kern_linker.c:974 : #17 0xc060d3a4 in kldload (td=0xc668d8c0, uap=0xe8cbecf8) at /usr/src/sys/kern/kern_linker.c:1001 : #18 0xc08d16c3 in syscall (frame=0xe8cbed38) at /usr/src/sys/i386/i386/trap.c:1076 : #19 0xc08b59f0 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:261 : #20 0x00000033 in ?? () : Previous frame inner to this frame (corrupt stack?) : (kgdb) up 10 : #10 0xc67e7765 in pmc_intel_initialize () at /usr/src/sys/modules/hwpmc/../../dev/hwpmc/hwpmc_intel.c:171 : 171 KASSERT(md->pmd_npmc == TSC_NPMCS + P6_NPMCS, ("[intel,%d] " : (kgdb) list : 166 case PMC_CPU_INTEL_PII: : 167 case PMC_CPU_INTEL_PIII: : 168 case PMC_CPU_INTEL_PM: : 169 error = pmc_p6_initialize(pmc_mdep, ncpus); : 170 : 171 KASSERT(md->pmd_npmc == TSC_NPMCS + P6_NPMCS, ("[intel,%d] " : 172 "incorrect npmc count %d", __LINE__, md->pmd_npmc)); : 173 break; : 174 : 175 /* : Cannot access memory at address 0x0 : (kgdb) p md : $1 = (struct pmc_mdep *) 0x0 From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 18:09:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 388C7106567E; Fri, 14 Nov 2008 18:09:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E5058FC08; Fri, 14 Nov 2008 18:09:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAEI9KDH098553; Fri, 14 Nov 2008 18:09:20 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAEI9KJ8098552; Fri, 14 Nov 2008 18:09:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200811141809.mAEI9KJ8098552@svn.freebsd.org> From: Warner Losh Date: Fri, 14 Nov 2008 18:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184973 - in stable/7/sys: . dev/pccbb modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 18:09:20 -0000 Author: imp Date: Fri Nov 14 18:09:19 2008 New Revision: 184973 URL: http://svn.freebsd.org/changeset/base/184973 Log: Merge r183539 and r183558: Do match on class to avoid false positives, return BUS_GENERIC_PROBE for a generic match. Approved by: re@ Modified: stable/7/sys/ (props changed) stable/7/sys/dev/pccbb/pccbb_pci.c stable/7/sys/modules/cxgb/ (props changed) Modified: stable/7/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/7/sys/dev/pccbb/pccbb_pci.c Fri Nov 14 12:31:05 2008 (r184972) +++ stable/7/sys/dev/pccbb/pccbb_pci.c Fri Nov 14 18:09:19 2008 (r184973) @@ -229,6 +229,7 @@ cbb_pci_probe(device_t brdev) { const char *name; uint32_t progif; + uint32_t baseclass; uint32_t subclass; /* @@ -245,11 +246,13 @@ cbb_pci_probe(device_t brdev) * to date have progif 0 (the Yenta spec, and successors mandate * this). */ + baseclass = pci_get_class(brdev); subclass = pci_get_subclass(brdev); progif = pci_get_progif(brdev); - if (subclass == PCIS_BRIDGE_CARDBUS && progif == 0) { + if (baseclass == PCIC_BRIDGE && + subclass == PCIS_BRIDGE_CARDBUS && progif == 0) { device_set_desc(brdev, "PCI-CardBus Bridge"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_GENERIC); } return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 18:35:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A09D1065673; Fri, 14 Nov 2008 18:35:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id DF4398FC18; Fri, 14 Nov 2008 18:35:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 56C4941C707; Fri, 14 Nov 2008 19:35:08 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id cMy9vwq5dm5f; Fri, 14 Nov 2008 19:35:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id C8E9041C6DB; Fri, 14 Nov 2008 19:35:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1924A444888; Fri, 14 Nov 2008 18:31:10 +0000 (UTC) Date: Fri, 14 Nov 2008 18:31:10 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Paul Saab In-Reply-To: <200811140156.mAE1uB0S075392@svn.freebsd.org> Message-ID: <20081114182000.Y43380@maildrop.int.zabbadoz.net> References: <200811140156.mAE1uB0S075392@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kip Macy Subject: Re: svn commit: r184950 - in head/sys/modules/cxgb: iw_cxgb toecore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 18:35:10 -0000 On Fri, 14 Nov 2008, Paul Saab wrote: > Author: ps > Date: Fri Nov 14 01:56:11 2008 > New Revision: 184950 > URL: http://svn.freebsd.org/changeset/base/184950 > > Log: > Fix world This commit message isn't really helpful. I guess what was broken was building those two modules individually by hand? I can only guess here:( I guess it's all realted to my #ifdef INET or rather to the conditional include of opt_inet.h in cxgb_osdep.h. I just had a hard time to figure out why those two modules would actually need it and from what I can see it's possibly because they include cxgb_include.h which indirectly includes a good list of headers and cxgb_osdep.h is one of them. Now the define for LRO_SUPPORTED is not needed anythere there, so a better fix would be to handle that case different? By all means I cannot figure out how the including of headers in cxgb was meant to work but that's probably a result of staying close to vendor code and in some areas and doing only minimalistic changes for FreeBSD? On a side note I just realized that there is: ./ulp/tom/cxgb_tcp.h:#ifdef INET6 but obviously is dead code because we nowhere depend on/include opt_inet6.h which in turn does not matter as there is no cxgb_tcp6_usrreqs anywhere from what I can see. > Approved by: kmacy > > Modified: > head/sys/modules/cxgb/iw_cxgb/Makefile > head/sys/modules/cxgb/toecore/Makefile > > Modified: head/sys/modules/cxgb/iw_cxgb/Makefile > ============================================================================== > --- head/sys/modules/cxgb/iw_cxgb/Makefile Fri Nov 14 01:53:10 2008 (r184949) > +++ head/sys/modules/cxgb/iw_cxgb/Makefile Fri Nov 14 01:56:11 2008 (r184950) > @@ -7,7 +7,7 @@ KMOD= iw_cxgb > SRCS= iw_cxgb.c iw_cxgb_cm.c iw_cxgb_hal.c > SRCS+= iw_cxgb_provider.c iw_cxgb_qp.c iw_cxgb_resource.c > SRCS+= iw_cxgb_ev.c iw_cxgb_mem.c iw_cxgb_dbg.c iw_cxgb_cq.c > -SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h > +SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h opt_inet.h > CFLAGS+= -g -I${CXGB} > #CFLAGS+= -DDEBUG > > > Modified: head/sys/modules/cxgb/toecore/Makefile > ============================================================================== > --- head/sys/modules/cxgb/toecore/Makefile Fri Nov 14 01:53:10 2008 (r184949) > +++ head/sys/modules/cxgb/toecore/Makefile Fri Nov 14 01:56:11 2008 (r184950) > @@ -5,7 +5,7 @@ CXGB = ${.CURDIR}/../../../dev/cxgb > > KMOD= toecore > SRCS= toedev.c > -SRCS+= device_if.h bus_if.h pci_if.h opt_sched.h > +SRCS+= device_if.h bus_if.h pci_if.h opt_sched.h opt_inet.h > CFLAGS+= -g -I${CXGB} > > .include > -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 21:05:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F7671065686; Fri, 14 Nov 2008 21:05:46 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 213D68FC1B; Fri, 14 Nov 2008 21:05:46 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAEL5jv9001887; Fri, 14 Nov 2008 21:05:45 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAEL5jsL001886; Fri, 14 Nov 2008 21:05:45 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200811142105.mAEL5jsL001886@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 14 Nov 2008 21:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184974 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 21:05:46 -0000 Author: ambrisko Date: Fri Nov 14 21:05:45 2008 New Revision: 184974 URL: http://svn.freebsd.org/changeset/base/184974 Log: When running a 32bit app. on amd64, ensure the bits above 32bit are zero for the copyout. Confirmed by LSI. Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Fri Nov 14 18:09:19 2008 (r184973) +++ head/sys/dev/mfi/mfi.c Fri Nov 14 21:05:45 2008 (r184974) @@ -2130,6 +2130,14 @@ mfi_ioctl(struct cdev *dev, u_long cmd, ->mfi_frame.raw[ioc->mfi_sense_off], &sense_ptr.sense_ptr_data[0], sizeof(sense_ptr.sense_ptr_data)); +#ifdef __amd64__ + if (cmd != MFI_CMD) { + /* + * not 64bit native so zero out any address + * over 32bit */ + sense_ptr.high = 0; + } +#endif error = copyout(cm->cm_sense, sense_ptr.user_space, ioc->mfi_sense_len); if (error != 0) { @@ -2353,6 +2361,13 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ ->lioc_frame.raw[l_ioc.lioc_sense_off], &sense_ptr.sense_ptr_data[0], sizeof(sense_ptr.sense_ptr_data)); +#ifdef __amd64__ + /* + * only 32bit Linux support so zero out any + * address over 32bit + */ + sense_ptr.high = 0; +#endif error = copyout(cm->cm_sense, sense_ptr.user_space, l_ioc.lioc_sense_len); if (error != 0) { From owner-svn-src-all@FreeBSD.ORG Fri Nov 14 23:32:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CDC41065677; Fri, 14 Nov 2008 23:32:32 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50FDE8FC13; Fri, 14 Nov 2008 23:32:32 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAENWVMp004467; Fri, 14 Nov 2008 23:32:31 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAENWVB0004466; Fri, 14 Nov 2008 23:32:31 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200811142332.mAENWVB0004466@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 14 Nov 2008 23:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184975 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 23:32:32 -0000 Author: ambrisko Date: Fri Nov 14 23:32:31 2008 New Revision: 184975 URL: http://svn.freebsd.org/changeset/base/184975 Log: Fix compile. I was in the wrong tree when I tested it :-( Pointed out by: Andrzej Modified: head/sys/dev/mfi/mfi.c Modified: head/sys/dev/mfi/mfi.c ============================================================================== --- head/sys/dev/mfi/mfi.c Fri Nov 14 21:05:45 2008 (r184974) +++ head/sys/dev/mfi/mfi.c Fri Nov 14 23:32:31 2008 (r184975) @@ -2135,7 +2135,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, /* * not 64bit native so zero out any address * over 32bit */ - sense_ptr.high = 0; + sense_ptr.addr.high = 0; } #endif error = copyout(cm->cm_sense, sense_ptr.user_space, @@ -2366,7 +2366,7 @@ mfi_linux_ioctl_int(struct cdev *dev, u_ * only 32bit Linux support so zero out any * address over 32bit */ - sense_ptr.high = 0; + sense_ptr.addr.high = 0; #endif error = copyout(cm->cm_sense, sense_ptr.user_space, l_ioc.lioc_sense_len); From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 01:43:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F123106564A; Sat, 15 Nov 2008 01:43:34 +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 5D1CC8FC24; Sat, 15 Nov 2008 01:43:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF1hYr4006886; Sat, 15 Nov 2008 01:43:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF1hYPh006885; Sat, 15 Nov 2008 01:43:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200811150143.mAF1hYPh006885@svn.freebsd.org> From: Jung-uk Kim Date: Sat, 15 Nov 2008 01:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184976 - head/sys/dev/fdc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 01:43:34 -0000 Author: jkim Date: Sat Nov 15 01:43:34 2008 New Revision: 184976 URL: http://svn.freebsd.org/changeset/base/184976 Log: - Revive fdc(4) per-device flag 0x10, which was removed in r1.284[1]. - If the flag is set and auto-select fails, assume disk is not present. - Set disk empty flag only when the floppy controller reset is needed. It fixes regression introduced in r1.311, which prevented it from ignoring errors. Now fdformat(1) and dd(1) with conv=noerror option can continue when read/write errors occur as they should. - Do not retry disk probing as it is extremely slow and pointless. - Move the disk probing code into a separate function. - Do not reset disk empty flag if write-protect check fails somehow. PR: kern/116538[1] Modified: head/sys/dev/fdc/fdc.c Modified: head/sys/dev/fdc/fdc.c ============================================================================== --- head/sys/dev/fdc/fdc.c Fri Nov 14 23:32:31 2008 (r184975) +++ head/sys/dev/fdc/fdc.c Sat Nov 15 01:43:34 2008 (r184976) @@ -97,6 +97,8 @@ __FBSDID("$FreeBSD$"); * fd_drivetype; on i386 machines, if * given as 0, use RTC type for fd0 * and fd1 */ +#define FD_NO_CHLINE 0x10 /* drive does not support changeline + * aka. unit attention */ #define FD_NO_PROBE 0x20 /* don't probe drive (seek test), just * assume it is there */ @@ -263,6 +265,7 @@ struct fd_data { static driver_intr_t fdc_intr; static driver_filter_t fdc_intr_fast; static void fdc_reset(struct fdc_data *); +static int fd_probe_disk(struct fd_data *, int *); SYSCTL_NODE(_debug, OID_AUTO, fdc, CTLFLAG_RW, 0, "fdc driver"); @@ -768,9 +771,11 @@ fdc_worker(struct fdc_data *fdc) (fdc->retry >= retries || (fd->options & FDOPT_NORETRY))) { if ((debugflags & 4)) printf("Too many retries (EIO)\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); + if (fdc->flags & FDC_NEEDS_RESET) { + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + } return (fdc_biodone(fdc, EIO)); } @@ -836,65 +841,12 @@ fdc_worker(struct fdc_data *fdc) fdctl_wr(fdc, fd->ft->trans); if (bp->bio_cmd & BIO_PROBE) { - - if (!(fdin_rd(fdc) & FDI_DCHG) && !(fd->flags & FD_EMPTY)) + if ((!(device_get_flags(fd->dev) & FD_NO_CHLINE) && + !(fdin_rd(fdc) & FDI_DCHG) && + !(fd->flags & FD_EMPTY)) || + fd_probe_disk(fd, &need_recal) == 0) return (fdc_biodone(fdc, 0)); - - /* - * Try to find out if we have a disk in the drive - * - * First recal, then seek to cyl#1, this clears the - * old condition on the disk change line so we can - * examine it for current status - */ - if (debugflags & 0x40) - printf("New disk in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_NEWDISK; - mtx_unlock(&fdc->fdc_mtx); - retry_line = __LINE__; - if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) - return (1); - tsleep(fdc, PRIBIO, "fdrecal", hz); - retry_line = __LINE__; - if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) - return (1); /* XXX */ - retry_line = __LINE__; - if ((st0 & 0xc0) || cyl != 0) - return (1); - - /* Seek to track 1 */ - retry_line = __LINE__; - if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) - return (1); - tsleep(fdc, PRIBIO, "fdseek", hz); - retry_line = __LINE__; - if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) - return (1); /* XXX */ - need_recal |= (1 << fd->fdsu); - if (fdin_rd(fdc) & FDI_DCHG) { - if (debugflags & 0x40) - printf("Empty in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags |= FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); - } else { - if (debugflags & 0x40) - printf("Got disk in probe\n"); - mtx_lock(&fdc->fdc_mtx); - fd->flags &= ~FD_EMPTY; - mtx_unlock(&fdc->fdc_mtx); - retry_line = __LINE__; - if(fdc_sense_drive(fdc, &st3) != 0) - return (1); - mtx_lock(&fdc->fdc_mtx); - if(st3 & NE7_ST3_WP) - fd->flags |= FD_WP; - else - fd->flags &= ~FD_WP; - mtx_unlock(&fdc->fdc_mtx); - } - return (fdc_biodone(fdc, 0)); + return (1); } /* @@ -1238,6 +1190,71 @@ fd_enqueue(struct fd_data *fd, struct bi mtx_unlock(&fdc->fdc_mtx); } +/* + * Try to find out if we have a disk in the drive. + */ +static int +fd_probe_disk(struct fd_data *fd, int *recal) +{ + struct fdc_data *fdc; + int st0, st3, cyl; + int oopts, ret; + + fdc = fd->fdc; + oopts = fd->options; + fd->options |= FDOPT_NOERRLOG | FDOPT_NORETRY; + ret = 1; + + /* + * First recal, then seek to cyl#1, this clears the old condition on + * the disk change line so we can examine it for current status. + */ + if (debugflags & 0x40) + printf("New disk in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_NEWDISK; + mtx_unlock(&fdc->fdc_mtx); + if (fdc_cmd(fdc, 2, NE7CMD_RECAL, fd->fdsu, 0)) + goto done; + tsleep(fdc, PRIBIO, "fdrecal", hz); + if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) + goto done; /* XXX */ + if ((st0 & 0xc0) || cyl != 0) + goto done; + + /* Seek to track 1 */ + if (fdc_cmd(fdc, 3, NE7CMD_SEEK, fd->fdsu, 1, 0)) + goto done; + tsleep(fdc, PRIBIO, "fdseek", hz); + if (fdc_sense_int(fdc, &st0, &cyl) == FD_NOT_VALID) + goto done; /* XXX */ + *recal |= (1 << fd->fdsu); + if (fdin_rd(fdc) & FDI_DCHG) { + if (debugflags & 0x40) + printf("Empty in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + } else { + if (fdc_sense_drive(fdc, &st3) != 0) + goto done; + if (debugflags & 0x40) + printf("Got disk in probe\n"); + mtx_lock(&fdc->fdc_mtx); + fd->flags &= ~FD_EMPTY; + if (st3 & NE7_ST3_WP) + fd->flags |= FD_WP; + else + fd->flags &= ~FD_WP; + mtx_unlock(&fdc->fdc_mtx); + } + ret = 0; + +done: + fd->options = oopts; + return (ret); +} + static int fdmisccmd(struct fd_data *fd, u_int cmd, void *data) { @@ -1350,7 +1367,7 @@ fdautoselect(struct fd_data *fd) if (debugflags & 0x40) device_printf(fd->dev, "autoselection failed\n"); fdsettype(fd, fd_native_types[fd->type]); - return (0); + return (-1); } else { if (debugflags & 0x40) { device_printf(fd->dev, @@ -1411,7 +1428,13 @@ fd_access(struct g_provider *pp, int r, if (fd->flags & FD_EMPTY) return (ENXIO); if (fd->flags & FD_NEWDISK) { - fdautoselect(fd); + if (fdautoselect(fd) != 0 && + (device_get_flags(fd->dev) & FD_NO_CHLINE)) { + mtx_lock(&fdc->fdc_mtx); + fd->flags |= FD_EMPTY; + mtx_unlock(&fdc->fdc_mtx); + return (ENXIO); + } mtx_lock(&fdc->fdc_mtx); fd->flags &= ~FD_NEWDISK; mtx_unlock(&fdc->fdc_mtx); From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 04:38:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66EFB106564A; Sat, 15 Nov 2008 04:38:11 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5134A8FC0A; Sat, 15 Nov 2008 04:38:11 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF4cBHk010496; Sat, 15 Nov 2008 04:38:11 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF4cBKe010495; Sat, 15 Nov 2008 04:38:11 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <200811150438.mAF4cBKe010495@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sat, 15 Nov 2008 04:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184979 - vendor/sendmail/dist/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 04:38:11 -0000 Author: gshapiro Date: Sat Nov 15 04:38:10 2008 New Revision: 184979 URL: http://svn.freebsd.org/changeset/base/184979 Log: Bring in a change already in the sendmail repository that will allow sendmail to be built with the c99 compiler. Submitted by: rdivacky Modified: vendor/sendmail/dist/src/sendmail.h Modified: vendor/sendmail/dist/src/sendmail.h ============================================================================== --- vendor/sendmail/dist/src/sendmail.h Sat Nov 15 03:09:50 2008 (r184978) +++ vendor/sendmail/dist/src/sendmail.h Sat Nov 15 04:38:10 2008 (r184979) @@ -2642,7 +2642,7 @@ extern void unsetenv __P((char *)); /* update file system information: +/- some blocks */ #if SM_CONF_SHM -extern void upd_qs __P((ENVELOPE *, bool, bool, char *)); +extern void upd_qs __P((ENVELOPE *, int, int, char *)); # define updfs(e, count, space, where) upd_qs(e, count, space, where) #else /* SM_CONF_SHM */ # define updfs(e, count, space, where) From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 04:43:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 772081065670; Sat, 15 Nov 2008 04:43:54 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 619518FC18; Sat, 15 Nov 2008 04:43:54 +0000 (UTC) (envelope-from gshapiro@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF4hsJ4010649; Sat, 15 Nov 2008 04:43:54 GMT (envelope-from gshapiro@svn.freebsd.org) Received: (from gshapiro@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF4hsMG010648; Sat, 15 Nov 2008 04:43:54 GMT (envelope-from gshapiro@svn.freebsd.org) Message-Id: <200811150443.mAF4hsMG010648@svn.freebsd.org> From: Gregory Neil Shapiro Date: Sat, 15 Nov 2008 04:43:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184980 - in head/contrib/sendmail: . src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 04:43:54 -0000 Author: gshapiro Date: Sat Nov 15 04:43:54 2008 New Revision: 184980 URL: http://svn.freebsd.org/changeset/base/184980 Log: Merge from vendor dist: Bring in a change already in the sendmail repository that will allow sendmail to be built with the c99 compiler. Submitted by: rdivacky Modified: head/contrib/sendmail/ (props changed) head/contrib/sendmail/src/sendmail.h Modified: head/contrib/sendmail/src/sendmail.h ============================================================================== --- head/contrib/sendmail/src/sendmail.h Sat Nov 15 04:38:10 2008 (r184979) +++ head/contrib/sendmail/src/sendmail.h Sat Nov 15 04:43:54 2008 (r184980) @@ -2642,7 +2642,7 @@ extern void unsetenv __P((char *)); /* update file system information: +/- some blocks */ #if SM_CONF_SHM -extern void upd_qs __P((ENVELOPE *, bool, bool, char *)); +extern void upd_qs __P((ENVELOPE *, int, int, char *)); # define updfs(e, count, space, where) upd_qs(e, count, space, where) #else /* SM_CONF_SHM */ # define updfs(e, count, space, where) From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 05:22:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A65F41065670; Sat, 15 Nov 2008 05:22:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB808FC0A; Sat, 15 Nov 2008 05:22:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF5M66L011344; Sat, 15 Nov 2008 05:22:06 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF5M6CB011341; Sat, 15 Nov 2008 05:22:06 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200811150522.mAF5M6CB011341@svn.freebsd.org> From: Warner Losh Date: Sat, 15 Nov 2008 05:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184981 - head/sys/dev/cardbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 05:22:06 -0000 Author: imp Date: Sat Nov 15 05:22:06 2008 New Revision: 184981 URL: http://svn.freebsd.org/changeset/base/184981 Log: First step in cleaning up CIS parsing and /dev/cardbus*.cis: remove redundant malloc/free. Add comments about how this should really be done. Fix an overly verbose comment about under 1MB mapping: go ahead and set the bits, but we ignore them. Modified: head/sys/dev/cardbus/cardbus_cis.c head/sys/dev/cardbus/cardbus_device.c head/sys/dev/cardbus/cardbusvar.h Modified: head/sys/dev/cardbus/cardbus_cis.c ============================================================================== --- head/sys/dev/cardbus/cardbus_cis.c Sat Nov 15 04:43:54 2008 (r184980) +++ head/sys/dev/cardbus/cardbus_cis.c Sat Nov 15 05:22:06 2008 (r184981) @@ -318,29 +318,27 @@ decode_tuple_bar(device_t cbdev, device_ if (type == SYS_RES_MEMORY) { if (reg & TPL_BAR_REG_PREFETCHABLE) dinfo->mprefetchable |= (1 << PCI_RID2BAR(bar)); -#if 0 /* - * XXX: It appears from a careful reading of the spec - * that we're not supposed to honor this when the bridge - * is not on the main system bus. PCI spec doesn't appear - * to allow for memory ranges not listed in the bridge's - * decode range to be decoded. The PC Card spec seems to - * indicate that this should only be done on x86 based - * machines, which seems to imply that on non-x86 machines - * the adddresses can be anywhere. This further implies that - * since the hardware can do it on non-x86 machines, it should - * be able to do it on x86 machines. Therefore, we can and - * should ignore this hint. Furthermore, the PC Card spec - * recommends always allocating memory above 1MB, contradicting - * the other part of the PC Card spec. + * The PC Card spec says we're only supposed to honor this + * hint when the cardbus bridge is a child of pci0 (the main + * bus). The PC Card spec seems to indicate that this should + * only be done on x86 based machines, which suggests that on + * non-x86 machines the adddresses can be anywhere. Since the + * hardware can do it on non-x86 machines, it should be able + * to do it on x86 machines too. Therefore, we can and should + * ignore this hint. Furthermore, the PC Card spec recommends + * always allocating memory above 1MB, contradicting the other + * part of the PC Card spec, it seems. We make note of it, + * but otherwise don't use this information. * - * NetBSD ignores this bit, but it also ignores the - * prefetchable bit too, so that's not an indication of - * correctness. + * Some Realtek cards have this set in their CIS, but fail + * to actually work when mapped this way, and experience + * has shown ignoring this big to be a wise choice. + * + * XXX We should cite chapter and verse for standard refs. */ if (reg & TPL_BAR_REG_BELOW1MB) dinfo->mbelow1mb |= (1 << PCI_RID2BAR(bar)); -#endif } return (0); Modified: head/sys/dev/cardbus/cardbus_device.c ============================================================================== --- head/sys/dev/cardbus/cardbus_device.c Sat Nov 15 04:43:54 2008 (r184980) +++ head/sys/dev/cardbus/cardbus_device.c Sat Nov 15 05:22:06 2008 (r184981) @@ -96,13 +96,17 @@ cardbus_build_cis(device_t cbdev, device * CISTPL_END is a special case, it has no length field. */ if (id == CISTPL_END) { - if (cis->len + 1 > sizeof(cis->buffer)) + if (cis->len + 1 > sizeof(cis->buffer)) { + cis->len = 0; return (ENOSPC); + } cis->buffer[cis->len++] = id; return (0); } - if (cis->len + 2 + len > sizeof(cis->buffer)) + if (cis->len + 2 + len > sizeof(cis->buffer)) { + cis->len = 0; return (ENOSPC); + } cis->buffer[cis->len++] = id; cis->buffer[cis->len++] = len; for (i = 0; i < len; i++) @@ -110,6 +114,18 @@ cardbus_build_cis(device_t cbdev, device return (0); } +static int +cardbus_device_buffer_cis(device_t parent, device_t child) +{ + struct cardbus_softc *sc; + struct tuple_callbacks cb[] = { + {CISTPL_GENERIC, "GENERIC", cardbus_build_cis} + }; + + sc = device_get_softc(parent); + return (cardbus_parse_cis(parent, child, cb, &sc->sc_cis)); +} + static int cardbus_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { @@ -117,9 +133,6 @@ cardbus_open(struct cdev *dev, int oflag device_t *kids; int cnt, err; struct cardbus_softc *sc; - struct tuple_callbacks cb[] = { - {CISTPL_GENERIC, "GENERIC", cardbus_build_cis} - }; sc = dev->si_drv1; if (sc->sc_cis_open) @@ -128,21 +141,17 @@ cardbus_open(struct cdev *dev, int oflag err = device_get_children(parent, &kids, &cnt); if (err) return err; + sc->sc_cis.len = 0; if (cnt == 0) { free(kids, M_TEMP); sc->sc_cis_open++; - sc->sc_cis = NULL; return (0); } child = kids[0]; free(kids, M_TEMP); - sc->sc_cis = malloc(sizeof(*sc->sc_cis), M_TEMP, M_ZERO | M_WAITOK); - err = cardbus_parse_cis(parent, child, cb, sc->sc_cis); - if (err) { - free(sc->sc_cis, M_TEMP); - sc->sc_cis = NULL; + err = cardbus_device_buffer_cis(parent, child); + if (err) return (err); - } sc->sc_cis_open++; return (0); } @@ -153,8 +162,6 @@ cardbus_close(struct cdev *dev, int ffla struct cardbus_softc *sc; sc = dev->si_drv1; - free(sc->sc_cis, M_TEMP); - sc->sc_cis = NULL; sc->sc_cis_open = 0; return (0); } @@ -173,8 +180,8 @@ cardbus_read(struct cdev *dev, struct ui sc = dev->si_drv1; /* EOF */ - if (sc->sc_cis == NULL || uio->uio_offset > sc->sc_cis->len) + if (uio->uio_offset >= sc->sc_cis.len) return (0); - return (uiomove(sc->sc_cis->buffer + uio->uio_offset, - MIN(uio->uio_resid, sc->sc_cis->len - uio->uio_offset), uio)); + return (uiomove(sc->sc_cis.buffer + uio->uio_offset, + MIN(uio->uio_resid, sc->sc_cis.len - uio->uio_offset), uio)); } Modified: head/sys/dev/cardbus/cardbusvar.h ============================================================================== --- head/sys/dev/cardbus/cardbusvar.h Sat Nov 15 04:43:54 2008 (r184980) +++ head/sys/dev/cardbus/cardbusvar.h Sat Nov 15 05:22:06 2008 (r184981) @@ -34,7 +34,6 @@ struct cardbus_devinfo struct pci_devinfo pci; uint8_t mprefetchable; /* bit mask of prefetchable BARs */ uint8_t mbelow1mb; /* bit mask of BARs which require below 1Mb */ - uint8_t ibelow1mb; /* bit mask of BARs which require below 1Mb */ uint16_t mfrid; /* manufacturer id */ uint16_t prodid; /* product id */ u_int funcid; /* function id */ @@ -54,10 +53,10 @@ struct cis_buffer struct cardbus_softc { - /* XXX need mutex XXX */ device_t sc_dev; + /* The following fields should in be in struct cardbus_devinfo */ struct cdev *sc_cisdev; - struct cis_buffer *sc_cis; + struct cis_buffer sc_cis; int sc_cis_open; }; From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 06:36:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 087271065688; Sat, 15 Nov 2008 06:36:08 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E54218FC1A; Sat, 15 Nov 2008 06:36:07 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF6a7Z6012753; Sat, 15 Nov 2008 06:36:07 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF6a7sk012752; Sat, 15 Nov 2008 06:36:07 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200811150636.mAF6a7sk012752@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 15 Nov 2008 06:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184984 - head/usr.sbin/zic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 06:36:08 -0000 Author: keramida (doc committer) Date: Sat Nov 15 06:36:07 2008 New Revision: 184984 URL: http://svn.freebsd.org/changeset/base/184984 Log: Add missing quotes to .Dl arguments. This is harmless for the mandoc output, but it makes syntax highlighting of the .Dl argument string a bit prettier in Emacs. Modified: head/usr.sbin/zic/zic.8 Modified: head/usr.sbin/zic/zic.8 ============================================================================== --- head/usr.sbin/zic/zic.8 Sat Nov 15 06:02:42 2008 (r184983) +++ head/usr.sbin/zic/zic.8 Sat Nov 15 06:36:07 2008 (r184984) @@ -120,9 +120,9 @@ Non-blank lines are expected to be of on rule lines, zone lines, and link lines. .Pp A rule line has the form: -.Dl "Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +.Dl "Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S" For example: -.Dl "Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D +.Dl "Rule US 1967 1973 \- Apr lastSun 2:00 1:00 D" .Pp The fields that make up a rule line are: .Bl -tag -width "LETTER/S" -offset indent @@ -260,9 +260,9 @@ the variable part is null. .El .Pp A zone line has the form: -.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] +.Dl "Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]" For example: -.Dl "Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00 +.Dl "Zone Australia/Adelaide 9:30 Aus CST 1971 Oct 31 2:00" The fields that make up a zone line are: .Bl -tag -width indent .It NAME From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 06:41:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D7681065690; Sat, 15 Nov 2008 06:41:58 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4650A8FC14; Sat, 15 Nov 2008 06:41:58 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF6fwnL012889; Sat, 15 Nov 2008 06:41:58 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF6fwOF012888; Sat, 15 Nov 2008 06:41:58 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200811150641.mAF6fwOF012888@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 15 Nov 2008 06:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184985 - head/usr.sbin/zic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 06:41:58 -0000 Author: keramida (doc committer) Date: Sat Nov 15 06:41:57 2008 New Revision: 184985 URL: http://svn.freebsd.org/changeset/base/184985 Log: Finish a few more .Dl "quoted" arguments missed in revision 184984 Modified: head/usr.sbin/zic/zic.8 Modified: head/usr.sbin/zic/zic.8 ============================================================================== --- head/usr.sbin/zic/zic.8 Sat Nov 15 06:36:07 2008 (r184984) +++ head/usr.sbin/zic/zic.8 Sat Nov 15 06:41:57 2008 (r184985) @@ -319,9 +319,9 @@ continuation. .El .Pp A link line has the form -.Dl "Link LINK-FROM LINK-TO +.Dl "Link LINK-FROM LINK-TO" For example: -.Dl "Link Europe/Istanbul Asia/Istanbul +.Dl "Link Europe/Istanbul Asia/Istanbul" The .Em LINK-FROM field should appear as the @@ -335,9 +335,9 @@ Except for continuation lines, lines may appear in any order in the input. .Pp Lines in the file that describes leap seconds have the following form: -.Dl "Leap YEAR MONTH DAY HH:MM:SS CORR R/S +.Dl "Leap YEAR MONTH DAY HH:MM:SS CORR R/S" For example: -.Dl "Leap 1974 Dec 31 23:59:60 + S +.Dl "Leap 1974 Dec 31 23:59:60 + S" The .Em YEAR , .Em MONTH , From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 09:23:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A71FE1065691; Sat, 15 Nov 2008 09:23:49 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90C9B8FC13; Sat, 15 Nov 2008 09:23:49 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF9NnBY015853; Sat, 15 Nov 2008 09:23:49 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF9NnsG015847; Sat, 15 Nov 2008 09:23:49 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811150923.mAF9NnsG015847@svn.freebsd.org> From: Rong-En Fan Date: Sat, 15 Nov 2008 09:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184989 - in head: contrib/ncurses contrib/ncurses/doc/html contrib/ncurses/form contrib/ncurses/include contrib/ncurses/man contrib/ncurses/menu contrib/ncurses/misc contrib/ncurses/nc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 09:23:49 -0000 Author: rafan Date: Sat Nov 15 09:23:48 2008 New Revision: 184989 URL: http://svn.freebsd.org/changeset/base/184989 Log: - Update ncurses to 5.7-20081102 (5.7 release) and build glue - This also removes $FreeBSD$ from two now unmodifed source files ncurses/tinfo/lib_raw.c and ncurses/tinfo/lib_baudrate.c MFC after: 2 months (after 7.1 and 6.4 are released) Added: head/contrib/ncurses/man/curs_memleaks.3x - copied unchanged from r184988, vendor/ncurses/dist/man/curs_memleaks.3x head/contrib/ncurses/misc/ncurses.supp - copied unchanged from r184988, vendor/ncurses/dist/misc/ncurses.supp Modified: head/contrib/ncurses/ (props changed) head/contrib/ncurses/ANNOUNCE head/contrib/ncurses/FREEBSD-upgrade head/contrib/ncurses/INSTALL head/contrib/ncurses/MANIFEST head/contrib/ncurses/NEWS head/contrib/ncurses/TO-DO head/contrib/ncurses/aclocal.m4 head/contrib/ncurses/announce.html.in head/contrib/ncurses/config.guess head/contrib/ncurses/config.sub head/contrib/ncurses/configure head/contrib/ncurses/configure.in head/contrib/ncurses/dist.mk head/contrib/ncurses/doc/html/announce.html head/contrib/ncurses/form/form.priv.h head/contrib/ncurses/form/frm_def.c head/contrib/ncurses/form/frm_driver.c head/contrib/ncurses/form/frm_req_name.c head/contrib/ncurses/include/MKterm.h.awk.in head/contrib/ncurses/include/capdefaults.c head/contrib/ncurses/include/curses.h.in head/contrib/ncurses/include/curses.tail head/contrib/ncurses/include/nc_alloc.h head/contrib/ncurses/include/nc_panel.h head/contrib/ncurses/include/ncurses_defs head/contrib/ncurses/include/term_entry.h head/contrib/ncurses/man/curs_getcchar.3x head/contrib/ncurses/man/curs_terminfo.3x head/contrib/ncurses/man/curs_util.3x head/contrib/ncurses/man/form.3x head/contrib/ncurses/man/form_driver.3x head/contrib/ncurses/man/form_field_buffer.3x head/contrib/ncurses/man/man_db.renames head/contrib/ncurses/man/menu_attributes.3x head/contrib/ncurses/man/menu_driver.3x head/contrib/ncurses/man/menu_pattern.3x head/contrib/ncurses/man/ncurses.3x head/contrib/ncurses/menu/m_driver.c head/contrib/ncurses/menu/m_req_name.c head/contrib/ncurses/misc/ncu-indent head/contrib/ncurses/misc/terminfo.src head/contrib/ncurses/ncurses/Makefile.in head/contrib/ncurses/ncurses/base/MKkeyname.awk head/contrib/ncurses/ncurses/base/MKlib_gen.sh head/contrib/ncurses/ncurses/base/MKunctrl.awk head/contrib/ncurses/ncurses/base/lib_addch.c head/contrib/ncurses/ncurses/base/lib_delwin.c head/contrib/ncurses/ncurses/base/lib_freeall.c head/contrib/ncurses/ncurses/base/lib_getch.c head/contrib/ncurses/ncurses/base/lib_getstr.c head/contrib/ncurses/ncurses/base/lib_initscr.c head/contrib/ncurses/ncurses/base/lib_mouse.c head/contrib/ncurses/ncurses/base/lib_newterm.c head/contrib/ncurses/ncurses/base/lib_newwin.c head/contrib/ncurses/ncurses/base/lib_overlay.c head/contrib/ncurses/ncurses/base/lib_restart.c head/contrib/ncurses/ncurses/base/lib_screen.c head/contrib/ncurses/ncurses/base/lib_set_term.c head/contrib/ncurses/ncurses/base/lib_slk.c head/contrib/ncurses/ncurses/base/lib_slkrefr.c head/contrib/ncurses/ncurses/base/lib_ungetch.c head/contrib/ncurses/ncurses/base/lib_window.c head/contrib/ncurses/ncurses/base/resizeterm.c head/contrib/ncurses/ncurses/base/tries.c head/contrib/ncurses/ncurses/base/use_window.c head/contrib/ncurses/ncurses/base/wresize.c head/contrib/ncurses/ncurses/curses.priv.h head/contrib/ncurses/ncurses/fifo_defs.h head/contrib/ncurses/ncurses/llib-lncurses head/contrib/ncurses/ncurses/llib-lncursest head/contrib/ncurses/ncurses/llib-lncursesw head/contrib/ncurses/ncurses/tinfo/MKcodes.awk head/contrib/ncurses/ncurses/tinfo/MKnames.awk head/contrib/ncurses/ncurses/tinfo/alloc_entry.c head/contrib/ncurses/ncurses/tinfo/alloc_ttype.c head/contrib/ncurses/ncurses/tinfo/captoinfo.c head/contrib/ncurses/ncurses/tinfo/comp_expand.c head/contrib/ncurses/ncurses/tinfo/comp_hash.c head/contrib/ncurses/ncurses/tinfo/comp_parse.c head/contrib/ncurses/ncurses/tinfo/comp_scan.c head/contrib/ncurses/ncurses/tinfo/entries.c head/contrib/ncurses/ncurses/tinfo/home_terminfo.c head/contrib/ncurses/ncurses/tinfo/init_keytry.c head/contrib/ncurses/ncurses/tinfo/lib_acs.c head/contrib/ncurses/ncurses/tinfo/lib_baudrate.c head/contrib/ncurses/ncurses/tinfo/lib_cur_term.c head/contrib/ncurses/ncurses/tinfo/lib_data.c head/contrib/ncurses/ncurses/tinfo/lib_options.c head/contrib/ncurses/ncurses/tinfo/lib_raw.c head/contrib/ncurses/ncurses/tinfo/lib_setup.c head/contrib/ncurses/ncurses/tinfo/lib_termcap.c head/contrib/ncurses/ncurses/tinfo/lib_tgoto.c head/contrib/ncurses/ncurses/tinfo/lib_tparm.c head/contrib/ncurses/ncurses/tinfo/lib_tputs.c head/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c head/contrib/ncurses/ncurses/tinfo/make_keys.c head/contrib/ncurses/ncurses/tinfo/name_match.c head/contrib/ncurses/ncurses/tinfo/parse_entry.c head/contrib/ncurses/ncurses/tinfo/read_entry.c head/contrib/ncurses/ncurses/tinfo/use_screen.c head/contrib/ncurses/ncurses/tinfo/write_entry.c head/contrib/ncurses/ncurses/trace/lib_trace.c head/contrib/ncurses/ncurses/trace/lib_traceatr.c head/contrib/ncurses/ncurses/trace/lib_tracebits.c head/contrib/ncurses/ncurses/trace/lib_tracechr.c head/contrib/ncurses/ncurses/trace/lib_tracedmp.c head/contrib/ncurses/ncurses/trace/lib_tracemse.c head/contrib/ncurses/ncurses/trace/trace_buf.c head/contrib/ncurses/ncurses/trace/trace_tries.c head/contrib/ncurses/ncurses/trace/varargs.c head/contrib/ncurses/ncurses/trace/visbuf.c head/contrib/ncurses/ncurses/tty/hardscroll.c head/contrib/ncurses/ncurses/tty/lib_mvcur.c head/contrib/ncurses/ncurses/tty/lib_twait.c head/contrib/ncurses/ncurses/tty/tty_update.c head/contrib/ncurses/ncurses/widechar/charable.c head/contrib/ncurses/ncurses/widechar/lib_get_wch.c head/contrib/ncurses/ncurses/widechar/lib_get_wstr.c head/contrib/ncurses/ncurses/widechar/lib_key_name.c head/contrib/ncurses/ncurses/widechar/lib_unget_wch.c head/contrib/ncurses/panel/p_new.c head/contrib/ncurses/panel/panel.priv.h head/contrib/ncurses/progs/MKtermsort.sh head/contrib/ncurses/progs/Makefile.in head/contrib/ncurses/progs/dump_entry.c head/contrib/ncurses/progs/dump_entry.h head/contrib/ncurses/progs/infocmp.c head/contrib/ncurses/progs/progs.priv.h head/contrib/ncurses/progs/tic.c head/contrib/ncurses/progs/toe.c head/contrib/ncurses/progs/tput.c head/contrib/ncurses/progs/tset.c head/lib/ncurses/ncurses/Makefile head/lib/ncurses/ncurses/ncurses_cfg.h Modified: head/contrib/ncurses/ANNOUNCE ============================================================================== --- head/contrib/ncurses/ANNOUNCE Sat Nov 15 08:51:32 2008 (r184988) +++ head/contrib/ncurses/ANNOUNCE Sat Nov 15 09:23:48 2008 (r184989) @@ -1,4 +1,4 @@ - Announcing ncurses 5.6 + Announcing ncurses 5.7 The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, @@ -27,205 +27,217 @@ Release Notes This release is designed to be upward compatible from ncurses 5.0 - through 5.5; very few applications will require recompilation, + through 5.6; very few applications will require recompilation, depending on the platform. These are the highlights from the - change-log since ncurses 5.5 release. + change-log since ncurses 5.6 release. Interface changes: * generate linkable stubs for some macros: - getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx, - getpary, getpary, - and (for libncursesw) - wgetbkgrnd + getattrs New features and improvements: * library - + support hashed databases for the terminal descriptions. This - uses the Berkeley database, has been tested for several - versions on different platforms. - + add use_legacy_coding() function to support lynx's - font-switching feature. - + add extension nofilter(), to cancel a prior filter() call. - + add/install a package config script, e.g., ncurses5-config or - ncursesw5-config, according to configuration options. - + provide ifdef for NCURSES_NOMACROS which suppresses most - macro definitions from curses.h, i.e., where a macro is - defined to override a function to improve performance. - + make ifdef's consistent in curses.h for the extended colors - so the header file can be used for the normal curses library. - The header file installed for extended colors is a variation - of the wide-character configuration. - + improve tgetstr() by making the return value point into the - user's buffer, if provided. - + add ifdef's allowing ncurses to be built with tparm() using - either varargs (the existing status), or using a - fixed-parameter list (to match X/Open). - + widen the test for xterm kmous a little to allow for other - strings than "\E[M", e.g., for xterm-sco functionality in - xterm. - + modify wgetnstr() to return KEY_RESIZE if a sigwinch occurs. - + move prototypes for wide-character trace functions from - curses.tail to curses.wide to avoid accidental reference to - those if _XOPEN_SOURCE_EXTENDED is defined without ensuring - that is included. - + change the way shared libraries (other than libtool) are - installed. Rather than copying the build-tree's libraries, - link the shared objects into the install directory. This - makes the --with-rpath option work except with $(DESTDIR). - + several improvements for rendering in hpterm. These are only - available if the library is configured using - --enable-xmc-glitch. - + Add NCURSES_NO_HARD_TABS and NCURSES_NO_MAGIC_COOKIE - environment variables to allow runtime suppression of the - related hard-tabs and xmc-glitch features. + + new flavor of the ncurses library provides rudimentary + support for POSIX threads. Several functions are reentrant, + but most require either a window-level or screen-level mutex. + (This is API-compatible, but not ABI-compatible with the + normal library). + + add NCURSES_OPAQUE symbol to curses.h, will use to make + structs opaque in selected configurations. + + add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to + curses.h to make it simpler to tell if the extended functions + and/or colors are declared. + + add wresize() to C++ binding + + eliminate fixed-buffer vsprintf() calls in C++ binding. + + add several functions to C++ binding which wrap C functions + that pass a WINDOW* parameter. + + adapt mouse-handling code from menu library in form-library + + improve tracing for form library, showing created forms, + fields, etc. + + make $NCURSES_NO_PADDING feature work for termcap interface . + + add check to trace-file open, if the given name is a + directory, add ".log" to the name and try again. + + several new manpages: curs_legacy.3x, curs_memleaks.3x, + curs_opaque.3x and curs_threads.3x * programs: - + add new test programs: chgat.c, demo_altkeys.c, echochar.c, - foldkeys.c, movewindow.c, redraw.c, (noting that existing - test programs also were modified to test additional - features). - + modify tack to test extended capability function-key strings. - + modify toe to access termcap data, e.g., via cgetent() - functions, or as a text file if those are not available. - + improve infocmp/tic -f option formatting. - + add toe -a option, to show all databases. This uses new - private interfaces in the ncurses library for iterating - through the list of databases. - + modify MKfallback.sh to use tic -x when constructing fallback - tables to allow extended capabilities to be retrieved from a - fallback entry. + + modified three test-programs to demonstrate the threading + support in this version: ditto, rain, worm. + + several new test-programs: demo_panels, dots_mvcur, + inch_wide, inchs, key_name, key_names, savescreen, + savescreen.sh test_arrays, test_get_wstr, test_getstr, + test_instr, test_inwstr and test_opaque. + + add adacurses-config to the Ada95 install. + + modify tic -f option to format spaces as \s to prevent them + from being lost when that is read back in unformatted + strings. + + The tack program is now distributed separately from ncurses. * terminal database - + add terminfo entries for xfce terminal (xfce) and multi gnome - terminal (mgt) - + add nsterm-16color entry - + updated mlterm terminfo entry - + add kon, kon2 and jfbterm terminfo entry - + remove invis capability from klone+sgr, mainly used by linux - entry, since it does not really do this - + add ka2, kb1, kb3, kc2 to vt220-keypad as an extension - + add shifted up/down arrow codes to xterm-new as kind/kri - strings - + add hpterm-color terminfo entry - + add 256color variants of terminfo entries for programs which - are reported to implement this feature - + correct order of use-clauses in rxvt-basic entry which made - codes for f1-f4 vt100-style rather than vt220-style. + + added entries: + o Eterm-256color, Eterm-88color and rxvt-88color + o aterm + o konsole-256color + o mrxvt + o screen.mlterm + o screen.rxvt + o teraterm4.59 is now the primary primary teraterm entry, + renamed original to teraterm2.3 + o 9term terminal + o Newbury Data entries + + updated/improved entries: + o gnome to version 2.22.3 + o h19, z100 + o konsole to version 1.6.6 + o mlterm, mlterm+pcfkeys + o xterm, and building-blocks for function-keys to [3]xterm + patch #230. Major bug fixes: - * correct a typo in configure --with-bool option for the case where - --without-cxx is used. - * move assignment from environment variable ESCDELAY from initscr() - down to newterm() so the environment variable affects timeouts for - terminals opened with newterm() as well. - * modify werase to clear multicolumn characters that extend into a - derived window. - * modify wchgat() to mark updated cells as changed so a refresh will - repaint those cells. - * correct logic in wadd_wch() and wecho_wch(), which did not guard - against passing the multi-column attribute into a call on - waddch(), e.g., using data returned by win_wch() - * fix redrawing of windows other than stdscr using wredrawln() by - touching the corresponding rows in curscr. - * reduce memory leaks in repeated calls to tgetent() by remembering - the last TERMINAL* value allocated to hold the corresponding data - and freeing that if the tgetent() result buffer is the same as the - previous call. - * modify read_termtype() so the term_names data is always allocated - as part of the str_table, a better fix for a memory leak. - * fix wins_nwstr(), which did not handle single-column non-8bit - codes. - * modify wbkgrnd() to avoid clearing the A_CHARTEXT attribute bits - since those record the state of multicolumn characters. - * improve SIGWINCH handling by postponing its effect during - newterm(), etc., when allocating screens. - * remove 970913 feature for copying subwindows as they are moved in - mvwin(). - * add checks in waddchnstr() and wadd_wchnstr() to stop copying when - a null character is found. - * add some checks to ensure current position is within scrolling - region before scrolling on a new line. - * add a workaround to ACS mapping to allow applications such as - test/blue.c to use the "PC ROM" characters by masking them with - A_ALTCHARSET. This worked up til 5.5, but was lost in the revision - of legacy coding. + * add logic to tic for cancelling strings in user-defined + capabilities (this is needed for current konsole terminfo entry). + * modify mk-1st.awk so the generated makefile rules for linking or + installing shared libraries do not first remove the library, in + case it is in use, e.g., libncurses.so by /bin/sh. + * correct check for notimeout() in wgetch(). + * fix a sign-extension bug in infocmp's repair_acsc() function. + * change winnstr() to stop at the end of the line. + * make Ada95 demo_panels() example work. + * fix for adding a non-spacing character at the beginning of a line. + * fill in extended-color pair to make colors work for + wide-characters using extended-colors. + * improve refresh of window on top of multi-column characters, + taking into account split characters on left/right window + boundaries. + * modify win_wchnstr() to ensure that only a base cell is returned + for each multi-column character. + * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by + using unctrl() to display illegal bytes rather than trying to + append further bytes to make up a valid sequence. + * restore curs_set() state after endwin()/refresh() + * modify keyname() to use "^X" form only if meta() has been called, + or if keyname() is called without initializing curses, e.g., via + initscr() or newterm(). + * modify unctrl() to check codes in 128-255 range versus isprint(). + If they are not printable, and locale was set, use a "M-" or "~" + sequence. + * improve resizeterm() by moving ripped-off lines, and repainting + the soft-keys. + * modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris. + * use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., + to make those work properly with the --enable-ext-mouse + configuration + * correct some functions in Ada95 binding which were using return + value from C where none was returned. + * reviewed/fixed issues reported by Coverity and Klocwork tools. Portability: * configure script: + new options: - --with-hashed-db - Use Berkeley hashed database for storing terminfo - data rather than storing each compiled entry in a - separate binary file within a directory tree. + --disable-big-strings + control whether static string tables are generated + as single large strings (to improve startup + performance), or as array of individual strings. + + --disable-relink + control whether shared libraries are relinked + (during install) when rpath is enabled. + + --disable-tic-depends + make explicit whether tic library depends on + ncurses/ncursesw library. + + --enable-mixed-case + override the configure script's check if the + filesystem supports mixed-case filenames. This + allows one to control how the terminal database + maps to the filesystem. For filesystems that do not + support mixed-case, the library uses generate + 2-character (hexadecimal) codes for the lower-level + of the filesystem terminfo database + + --enable-reentrant + builds a different flavor of the ncurses library + (ncursest) which improves reentrant use of the + library by reducing global and static variables + (see the "--with-pthread" option for the threaded + support). + + --enable-weak-symbols + use weak-symbols for linking to the POSIX thread + library, and use the same soname for the ncurses + shared library as the normal library (caveat: the + ABI is for the threaded library, which makes global + data accessed via functions). + + --with-pthread + build with the POSIX thread library (tested with + AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64, + Solaris, Tru64). + + --with-ticlib + build/install the tic-support functions in a + separate library - --without-dlsym - Do not use dlsym() to load GPM dynamically. + + improved options: - --with-valgrind - Simplify building for testing with valgrind. + --enable-ext-colors + requires the wide-character configuration. - --enable-wgetch-events - Compile with experimental wgetch-events code. + --with-chtype + ignore option value "unsigned" is always added to + the type in curses.h; do the same for + --with-mmask-t. - --enable-signed-char - Store booleans in "signed char" rather than "char". + --with-dmalloc + build-fix for redefinition of strndup. - + improved options: + --with-hashed-db + accepts a parameter which is the install-prefix of + a given Berkeley Database. - --disable-largefile - make the option work both ways. + --with-hashed-db + the $LIBS environment variable overrides the search + for the db library. - --with-gpm - The option now accepts a parameter, i.e., the name - of the dynamic GPM library to load via dlopen() - - --disable-symlinks - The option now allows one to disable symlink() in - tic even when link() does not work. + --without-hashed-db + assumed when "--disable-database" is used. * other configure/build issues: - + remove special case for Darwin in CF_XOPEN_SOURCE configure - macro. - + add configure check to ensure that SIGWINCH is defined on - platforms such as OS X which exclude that when _XOPEN_SOURCE, - etc., are defined - + use ld's -search_paths_first option on Darwin to work around - odd search rules on that platform. - + improve ifdef's for _POSIX_VDISABLE in tset to work with Mac - OS X. - + modify configure script to ensure that if the C compiler is - used rather than the loader in making shared libraries, the - $(CFLAGS) variable is also used. - + use ${CC} rather than ${LD} in shared library rules for - IRIX64, Solaris to help ensure that initialization sections - are provided for extra linkage requirements, e.g., of C++ - applications. - + improve some shared-library configure scripting for Linux, - FreeBSD and NetBSD to make --with-shlib-version work. - + split up dependency of names.c and codes.c in - ncurses/Makefile to work with parallel make. - + modify MKlib_gen.sh to change preprocessor-expanded _Bool - back to bool. - + modify progs/Makefile.in to make tput init work properly with - cygwin, i.e., do not pass a .exe in the reference string used - in check_aliases. + + build-fixes for LynxOS + + modify shared-library rules to allow FreeBSD 3.x to use + rpath. + + build-fix for FreeBSD "contemporary" TTY interface. + + build-fixes for AIX with libtool. + + build-fixes for Darwin and libtool. + + modify BeOS-specific ifdef's to build on Haiku. + + corrected gcc options for building shared libraries on + Solaris and IRIX64. + + change shared-library configuration for OpenBSD, make rpath + work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + + add "-e" option in ncurses/Makefile.in when generating + source-files to force earlier exit if the build environment + fails unexpectedly. + + add support for shared libraries for QNX. + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to + digraphs. * library: - + ignore wide-acs line-drawing characters that wcwidth() claims - are not one-column. This is a workaround for Solaris' broken - locale support. - + reduce name-pollution in term.h by removing #define's for - HAVE_xxx symbols. - + fix #ifdef in c++/internal.h for QNX 6.1 + + rewrite wrapper for wcrtomb(), making it work on Solaris. + This is used in the form library to determine the length of + the buffer needed by field_buffer. + + add/use configure script macro CF_SIG_ATOMIC_T, use the + corresponding type for data manipulated by signal handlers. + + set locale in misc/ncurses-config.in since it uses a range + + disable GPM mouse support when $TERM does not happen to + contain "linux", since Gpm_Open() no longer limits its + assertion to terminals that it might handle, e.g., within + "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library. * test programs: - + modify test/configure script to allow building test programs - with PDCurses/X11. - + modified test programs to allow some to work with NetBSD - curses. Several do not because NetBSD curses implements a - subset of X/Open curses, and also lacks much of SVr4 - additions. But it is enough for comparison. - + improved test/configure to build test/ncurses on HPUX 11 - using the vendor curses. - + change configure script to produce test/Makefile from data - file. + + update test programs to build/work with various UNIX curses + for comparisons. Features of Ncurses @@ -271,6 +283,8 @@ the use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by defining more than one control sequence to map to a given key code. + * Support for 256-color terminals, such as modern xterm, when + configured using the --enable-ext-colors option. * Support for 16-color terminals, such as aixterm and modern xterm. * Better cursor-movement optimization. The package now features a cursor-local-movement computation more efficient than either BSD's @@ -342,49 +356,45 @@ cdk Curses Development Kit - [3]http://invisible-island.net/cdk/ - [4]http://www.vexus.ca/products/CDK/ + [4]http://invisible-island.net/cdk/ + [5]http://www.vexus.ca/products/CDK/ ded directory-editor - [5]http://invisible-island.net/ded/ + [6]http://invisible-island.net/ded/ dialog the underlying application used in Slackware's setup, and the basis for similar applications on GNU/Linux. - [6]http://invisible-island.net/dialog/ + [7]http://invisible-island.net/dialog/ lynx the character-screen WWW browser - [7]http://lynx.isc.org/release/ + [8]http://lynx.isc.org/release/ Midnight Commander file manager - [8]http://www.ibiblio.org/mc/ + [9]http://www.ibiblio.org/mc/ mutt mail utility - [9]http://www.mutt.org/ + [10]http://www.mutt.org/ ncftp file-transfer utility - [10]http://www.ncftp.com/ + [11]http://www.ncftp.com/ nvi New vi versions 1.50 are able to use ncurses versions 1.9.7 and later. - [11]http://www.bostic.com/vi/ + [12]http://www.bostic.com/vi/ pinfo Lynx-like info browser. - [12]http://dione.ids.pl/~pborys/software/pinfo/ + [13]https://alioth.debian.org/projects/pinfo/ tin - newsreader, supporting color, MIME [13]http://www.tin.org/ - - vh-1.6 - Volks-Hypertext browser for the Jargon File - [14]http://www.debian.org/Packages/unstable/text/vh.html + newsreader, supporting color, MIME [14]http://www.tin.org/ as well as some that use ncurses for the terminfo support alone: @@ -402,7 +412,7 @@ Who's Who and What's What Zeyd Ben-Halim started it from a previous package pcurses, written by - Pavel Curtis. Eric S. Raymond continued development. Juergen Pfeifer + Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer wrote most of the form and menu libraries. Ongoing work is being done by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the Free Software Foundation, which holds the copyright on ncurses. @@ -442,18 +452,18 @@ References 1. ftp://ftp.gnu.org/gnu/ncurses/ 2. ftp://invisible-island.net/ncurses/ - 3. http://invisible-island.net/cdk/ - 4. http://www.vexus.ca/products/CDK/ - 5. http://invisible-island.net/ded/ - 6. http://invisible-island.net/dialog/ - 7. http://lynx.isc.org/release/ - 8. http://www.ibiblio.org/mc/ - 9. http://www.mutt.org/ - 10. http://www.ncftp.com/ - 11. http://www.bostic.com/vi/ - 12. http://dione.ids.pl/~pborys/software/pinfo/ - 13. http://www.tin.org/ - 14. http://www.debian.org/Packages/unstable/text/vh.html + 3. http://invisible-island.net/xterm/xterm.log.html#xterm_230 + 4. http://invisible-island.net/cdk/ + 5. http://www.vexus.ca/products/CDK/ + 6. http://invisible-island.net/ded/ + 7. http://invisible-island.net/dialog/ + 8. http://lynx.isc.org/release/ + 9. http://www.ibiblio.org/mc/ + 10. http://www.mutt.org/ + 11. http://www.ncftp.com/ + 12. http://www.bostic.com/vi/ + 13. https://alioth.debian.org/projects/pinfo/ + 14. http://www.tin.org/ 15. http://alioth.debian.org/projects/minicom/ 16. http://invisible-island.net/vile/ 17. mailto:dickey@invisible-island.net Modified: head/contrib/ncurses/FREEBSD-upgrade ============================================================================== --- head/contrib/ncurses/FREEBSD-upgrade Sat Nov 15 08:51:32 2008 (r184988) +++ head/contrib/ncurses/FREEBSD-upgrade Sat Nov 15 09:23:48 2008 (r184989) @@ -6,9 +6,14 @@ ncurses The beta version can be found at ftp://invisible-island.net/ncurses/ or ftp://dickey.his.com/ncurses/ +The instructions for importing new release and merge to HEAD can be found +at FreeBSD wiki: + + http://wiki.freebsd.org/SubversionPrimer/VendorImports + For the import files and directories were pruned by: - tar -X FREEBSD-Xlist -zxf ncurses-5.6.tar.gz + tar -X FREEBSD-Xlist -zxf ncurses-5.7.tar.gz check if there are any new bits that we don't want. Modified: head/contrib/ncurses/INSTALL ============================================================================== --- head/contrib/ncurses/INSTALL Sat Nov 15 08:51:32 2008 (r184988) +++ head/contrib/ncurses/INSTALL Sat Nov 15 09:23:48 2008 (r184989) @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.124 2008/03/29 18:07:32 tom Exp $ +-- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -393,6 +393,18 @@ SUMMARY OF CONFIGURE OPTIONS: Compile without scroll-hints code. This option is ignored when hashmap scrolling is configured, which is the default. + --disable-tic-depends + When building shared libraries, normally the tic library is linked to + depend upon the ncurses library (and in turn, on the term-library if + the --with-termlib option was given). The tic- and term-libraries + ABI does not depend on the --enable-widec option. Some packagers have + used this to reduce the number of library files which are packaged + by using only one copy of those libraries. To make this work properly, + the tic library must be built without an explicit dependency on the + ncurses (or ncursesw) library. Use this configure option to do that. + For example + configure --with-ticlib --with-shared --disable-tic-depends + --disable-tparm-varargs Portable programs should call tparm() using the fixed-length parameter list documented in X/Open. ncurses provides varargs support for this @@ -572,6 +584,13 @@ SUMMARY OF CONFIGURE OPTIONS: --enable-warnings Turn on GCC compiler warnings. There should be only a few. + --enable-weak-symbols + If the --with-pthread option is set, check if the compiler supports + weak-symbols. If it does, then name the thread-capable library without + the "t" (libncurses rather than libncursest), and provide for + dynamically loading the pthreads entrypoints at runtime. This allows + one to reduce the number of library files for ncurses. + --enable-wgetch-events Compile with experimental wgetch-events code. See ncurses/README.IZ @@ -598,6 +617,9 @@ SUMMARY OF CONFIGURE OPTIONS: Normally this is the same as the release version; some ports have special requirements for compatibility. + This option does not affect linking with libtool, which uses the + release major/minor numbers. + --with-ada-compiler=CMD Specify the Ada95 compiler command (default "gnatmake") @@ -625,20 +647,32 @@ SUMMARY OF CONFIGURE OPTIONS: to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CFLAGS rather than + use this option. + --with-build-cppflags=XXX If cross-compiling, specify the host C preprocessor-flags. You might need to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CPPFLAGS rather than + use this option. + --with-build-ldflags=XXX If cross-compiling, specify the host linker-flags. You might need to do this if the target linker has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_LDFLAGS rather than + use this option. + --with-build-libs=XXX If cross-compiling, the host libraries. You might need to do this if the target environment requires unusual libraries. + You can also set the environment variable $BUILD_LIBS rather than + use this option. + --with-caps=XXX Specify an alternate terminfo capabilities file, which makes the configure script look for "include/Caps.XXX". A few systems, e.g., @@ -795,6 +829,14 @@ SUMMARY OF CONFIGURE OPTIONS: may be unsigned. Use this option if you need to preserve compatibility with 64-bit executables. + --with-normal + Generate normal (i.e., static) libraries (default). + + Note: on Linux, the configure script will attempt to use the GPM + library via the dlsym() function call. Use --without-dlsym to disable + this feature, or --without-gpm, depending on whether you wish to use + GPM. + --with-ospeed=TYPE Override type of ospeed variable, which is part of the termcap compatibility interface. In termcap, this is a 'short', which works @@ -808,14 +850,6 @@ SUMMARY OF CONFIGURE OPTIONS: those using termcap, do not use the higher speeds. Your application (or system, in general) may or may not. - --with-normal - Generate normal (i.e., static) libraries (default). - - Note: on Linux, the configure script will attempt to use the GPM - library via the dlsym() function call. Use --without-dlsym to disable - this feature, or --without-gpm, depending on whether you wish to use - GPM. - --with-profile Generate profile-libraries These are named by adding "_p" to the root, e.g., libncurses_p.a @@ -898,6 +932,12 @@ SUMMARY OF CONFIGURE OPTIONS: library. As in termlib, there is no ABI difference between the "wide" libticw.so and libtic.so + NOTE: Overriding the name of the tic library may be useful if you are + also using the --with-termlib option to rename libtinfo. If you are + not doing that, renaming the tic library can result in conflicting + library dependencies for tic and other programs built with the tic + library. + --with-trace Configure the trace() function as part of the all models of the ncurses library. Normally it is part of the debug (libncurses_g) library only. @@ -961,6 +1001,94 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCU you may encounter when building a system with different versions of ncurses: + 5.7 (November 2, 2008) + Interface changes: + + + generate linkable stubs for some macros: + getattrs + + + Add new library configuration for tic-library (the non-curses portion + of the ncurses library used for the tic program as well as some + others such as tack. There is no API change, but makefiles would be + changed to use the tic-library built separately. + + tack, distributed separately from ncurses, uses some of the internal + _nc_XXX functions, which are declared in the tic.h header file. + + The reason for providing this separate library is that none of the + functions in it are suitable for threaded applications. + + + Add new library configuration (ncursest, ncurseswt) which provides + rudimentary support for POSIX threads. This introduces opaque + access functions to the WINDOW structure and adds a parameter to + several internal functions. + + + move most internal variables (except tic-library) into data blocks + _nc_globals and _nc_prescreen to simplify analysis. Those were + globally accessible, but since they were not part of the documented + API, there is no ABI change. + + + changed static tables of strings to be indices into long strings, to + improve startup performance. This changes parameter lists for some + of the internal functions. + + Added extensions: + + + add NCURSES_OPAQUE definition in curses.h to control whether internal + details of the WINDOW structure are visible to an application. This + is always defined when the threaded library is built, and is optional + otherwise. New functions for this: is_cleared, is_idcok, is_idlok, + is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, + is_scrollok, is_syncok, wgetparent and wgetscrreg. + + + the threaded library (ncursest) also disallows direct updating of + global curses-level variables, providing functions (via macros) for + obtaining their value. A few of those variables can be modified by + the application, using new functions: set_escdelay, set_tabsize + + + added functions use_window() and use_screen() which wrap a mutex + (if threading is configured) around a call to a user-supplied + function. + + Added internal functions: + _nc_get_alias_table + _nc_get_screensize + _nc_keyname + _nc_screen_of + _nc_set_no_padding + _nc_tracechar + _nc_tracemouse + _nc_unctrl + _nc_ungetch + + These are used for leak-testing, and are stubs for + ABI compatibility when ncurses is not configured for that + using the --disable-leaks configure script option: + + _nc_free_and_exit + _nc_leaks_tinfo + + Removed internal functions: + none + + Modified internal functions: + _nc_fifo_dump + _nc_find_entry + _nc_handle_sigwinch + _nc_init_keytry + _nc_keypad + _nc_locale_breaks_acs + _nc_timed_wait + _nc_update_screensize + + Use new typedef TRIES to replace "struct tries": + + _nc_add_to_try + _nc_expand_try + _nc_remove_key + _nc_remove_string + _nc_trace_tries + 5.6 (December 17, 2006) Interface changes: Modified: head/contrib/ncurses/MANIFEST ============================================================================== --- head/contrib/ncurses/MANIFEST Sat Nov 15 08:51:32 2008 (r184988) +++ head/contrib/ncurses/MANIFEST Sat Nov 15 09:23:48 2008 (r184989) @@ -349,8 +349,10 @@ ./doc/html/man/curs_instr.3x.html ./doc/html/man/curs_inwstr.3x.html ./doc/html/man/curs_kernel.3x.html +./doc/html/man/curs_legacy.3x.html ./doc/html/man/curs_mouse.3x.html ./doc/html/man/curs_move.3x.html +./doc/html/man/curs_opaque.3x.html ./doc/html/man/curs_outopts.3x.html ./doc/html/man/curs_overlay.3x.html ./doc/html/man/curs_pad.3x.html @@ -364,6 +366,7 @@ ./doc/html/man/curs_termattrs.3x.html ./doc/html/man/curs_termcap.3x.html ./doc/html/man/curs_terminfo.3x.html +./doc/html/man/curs_threads.3x.html ./doc/html/man/curs_touch.3x.html ./doc/html/man/curs_trace.3x.html ./doc/html/man/curs_util.3x.html @@ -555,6 +558,7 @@ ./man/curs_inwstr.3x ./man/curs_kernel.3x ./man/curs_legacy.3x +./man/curs_memleaks.3x ./man/curs_mouse.3x ./man/curs_move.3x ./man/curs_opaque.3x @@ -700,6 +704,7 @@ ./misc/ncurses-config.in ./misc/ncurses.def ./misc/ncurses.ref +./misc/ncurses.supp ./misc/panel.def ./misc/panel.ref ./misc/run_tic.in Modified: head/contrib/ncurses/NEWS ============================================================================== --- head/contrib/ncurses/NEWS Sat Nov 15 08:51:32 2008 (r184988) +++ head/contrib/ncurses/NEWS Sat Nov 15 09:23:48 2008 (r184989) @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1233 2008/05/03 23:14:39 tom Exp $ +-- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,238 @@ See the AUTHORS file for the correspondi Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20081102 5.7 release for upload to ftp.gnu.org + +20081025 + + add a manpage to discuss memory leaks. + + add support for shared libraries for QNX (other than libtool, which + does not work well on that platform). + + build-fix for QNX C++ binding. + +20081018 + + build-fixes for OS/2 EMX. + + modify form library to accept control characters such as newline + in set_field_buffer(), which is compatible with Solaris (report by + Nit Khair). + + modify configure script to assume --without-hashed-db when + --disable-database is used. + + add "-e" option in ncurses/Makefile.in when generating source-files + to force earlier exit if the build environment fails unexpectedly + (prompted by patch by Adrian Bunk). + + change configure script to use CF_UTF8_LIB, improved variant of + CF_LIBUTF8. + +20081012 + + add teraterm4.59 terminfo entry, use that as primary teraterm entry, rename + original to teraterm2.3 -TD + + update "gnome" terminfo to 2.22.3 -TD + + update "konsole" terminfo to 1.6.6, needs today's fix for tic -TD + + add "aterm" terminfo -TD + + add "linux2.6.26" terminfo -TD + + add logic to tic for cancelling strings in user-defined capabilities, + overlooked til now. + +20081011 + + update html documentation. + + add -m and -s options to test/keynames.c and test/key_names.c to test + the meta() function with keyname() or key_name(), respectively. + + correct return value of key_name() on error; it is null. + + document some unresolved issues for rpath and pthreads in TO-DO. + + fix a missing prototype for ioctl() on OpenBSD in tset.c + + add configure option --disable-tic-depends to make explicit whether + tic library depends on ncurses/ncursesw library, amends change from + 20080823 (prompted by Debian #501421). + +20081004 + + some build-fixes for configure --disable-ext-funcs (incomplete, but + works for C/C++ parts). + + improve configure-check for awks unable to handle large strings, e.g. + AIX 5.1 whose awk silently gives up on large printf's. + +20080927 + + fix build for --with-dmalloc by workaround for redefinition of + strndup between string.h and dmalloc.h + + fix build for --disable-sigwinch + + add environment variable NCURSES_GPM_TERMS to allow override to use + GPM on terminals other than "linux", etc. + + disable GPM mouse support when $TERM does not happen to contain + "linux", since Gpm_Open() no longer limits its assertion to terminals + that it might handle, e.g., within "screen" in xterm. + + reset mouse file-descriptor when unloading GPM library (report by + Miroslav Lichvar). + + fix build for --disable-leaks --enable-widec --with-termlib + > patch by Juergen Pfeifer: + + use improved initialization for soft-label keys in Ada95 sample code. + + discard internal symbol _nc_slk_format (unused since 20080112). + + move call of slk_paint_info() from _nc_slk_initialize() to + slk_intern_refresh(), improving initialization. + +20080925 + + fix bug in mouse code for GPM from 20080920 changes (reported in + Debian #500103, also Miroslav Lichvar). + +20080920 + + fix shared-library rules for cygwin with tic- and tinfo-libraries. + + fix a memory leak when failure to connect to GPM. + + correct check for notimeout() in wgetch() (report on linux.redhat + newsgroup by FurtiveBertie). + + add an example warning-suppression file for valgrind, + misc/ncurses.supp (based on example from Reuben Thomas) + +20080913 + + change shared-library configuration for OpenBSD, make rpath work. + + build-fixes for using libutf8, e.g., on OpenBSD 3.7 + +20080907 + + corrected fix for --enable-weak-symbols (report by Frederic L W + Meunier). + +20080906 + + corrected gcc options for building shared libraries on IRIX64. + + add configure check for awk programs unable to handle big-strings, + use that to improve the default for --enable-big-strings option. + + makefile-fixes for --enable-weak-symbols (report by Frederic L W + Meunier). + + update test/configure script. + + adapt ifdef's from library to make test/view.c build when mbrtowc() + is unavailable, e.g., with HPUX 10.20. + + add configure check for wcsrtombs, mbsrtowcs, which are used in + test/ncurses.c, and use wcstombs, mbstowcs instead if available, + fixing build of ncursew for HPUX 11.00 + +20080830 + + fixes to make Ada95 demo_panels() example work. + + modify Ada95 'rain' test program to accept keyboard commands like the + C-version. + + modify BeOS-specific ifdef's to build on Haiku (patch by Scott + Mccreary). + + add configure-check to see if the std namespace is legal for cerr + and endl, to fix a build issue with Tru64. + + consistently use NCURSES_BOOL in lib_gen.c + + filter #line's from lib_gen.c + + change delimiter in MKlib_gen.sh from '%' to '@', to avoid + substitution by IBM xlc to '#' as part of its extensions to digraphs. + + update config.guess, config.sub from + http://savannah.gnu.org/projects/config + (caveat - its maintainer removed support for older Linux systems). + +20080823 + + modify configure check for pthread library to work with OSF/1 5.1, + which uses #define's to associate its header and library. + + use pthread_mutexattr_init() for initializing pthread_mutexattr_t, + makes threaded code work on HPUX 11.23 + + fix a bug in demo_menus in freeing menus (cf: 20080804). + + modify configure script for the case where tic library is used (and + possibly renamed) to remove its dependency upon ncurses/ncursew + library (patch by Dr Werner Fink). + + correct manpage for menu_fore() which gave wrong default for + the attribute used to display a selected entry (report by Mike Gran). + + add Eterm-256color, Eterm-88color and rxvt-88color (prompted by + Debian #495815) -TD + +20080816 + + add configure option --enable-weak-symbols to turn on new feature. + + add configure-check for availability of weak symbols. + + modify linkage with pthread library to use weak symbols so that + applications not linked to that library will not use the mutexes, + etc. This relies on gcc, and may be platform-specific (patch by Dr + Werner Fink). + + add note to INSTALL to document limitation of renaming of tic library + using the --with-ticlib configure option (report by Dr Werner Fink). + + document (in manpage) why tputs does not detect I/O errors (prompted + by comments by Samuel Thibault). + + fix remaining warnings from Klocwork report. + +20080804 + + modify _nc_panelhook() data to account for a permanent memory leak. + + fix memory leaks in test/demo_menus + + fix most warnings from Klocwork tool (report by Larry Zhou). + + modify configure script CF_XOPEN_SOURCE macro to add case for + "dragonfly" from xterm #236 changes. + + modify configure script --with-hashed-db to let $LIBS override the + search for the db library (prompted by report by Samson Pierre). + +20080726 + + build-fixes for gcc 4.3.1 (changes to gnat "warnings", and C inlining + thresholds). + +20080713 + + build-fix (reports by Christian Ebert, Funda Wang). + +20080712 + + compiler-warning fixes for Solaris. + +20080705 + + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to + make those work properly with the "--enable-ext-mouse" configuration + (cf: 20050205). + + improve documentation of build-cc options in INSTALL. + + work-around a bug in gcc 4.2.4 on AIX, which does not pass the + -static/-dynamic flags properly to linker, causing test/bs to + not link. + +20080628 + + correct some ifdef's needed for the broken-linker configuration. + + make debugging library's $BAUDRATE feature work for termcap + interface. + + make $NCURSES_NO_PADDING feature work for termcap interface (prompted + by comment on FreeBSD mailing list). + + add screen.mlterm terminfo entry -TD + + improve mlterm and mlterm+pcfkeys terminfo entries -TD + +20080621 + + regenerated html documentation. + + expand manpage description of parameters for form_driver() and + menu_driver() (prompted by discussion with Adam Spragg). + + add null-pointer checks for cur_term in baudrate() and + def_shell_mode(), def_prog_mode() + + fix some memory leaks in delscreen() and wide acs. + +20080614 + + modify test/ditto.c to illustrate multi-threaded use_screen(). + + change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 09:30:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 772161065674; Sat, 15 Nov 2008 09:30:10 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 650D18FC0C; Sat, 15 Nov 2008 09:30:10 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF9UAEw016005; Sat, 15 Nov 2008 09:30:10 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF9UA1q016004; Sat, 15 Nov 2008 09:30:10 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200811150930.mAF9UA1q016004@svn.freebsd.org> From: Rong-En Fan Date: Sat, 15 Nov 2008 09:30:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184990 - head/contrib/ncurses X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 09:30:10 -0000 Author: rafan Date: Sat Nov 15 09:30:09 2008 New Revision: 184990 URL: http://svn.freebsd.org/changeset/base/184990 Log: - Update instructions for Subversion import - Remove FREEBSD-vendor as edwin@ is working on a automatically contrib software status page generation Deleted: head/contrib/ncurses/FREEBSD-vendor Modified: head/contrib/ncurses/FREEBSD-upgrade Modified: head/contrib/ncurses/FREEBSD-upgrade ============================================================================== --- head/contrib/ncurses/FREEBSD-upgrade Sat Nov 15 09:23:48 2008 (r184989) +++ head/contrib/ncurses/FREEBSD-upgrade Sat Nov 15 09:30:09 2008 (r184990) @@ -6,33 +6,21 @@ ncurses The beta version can be found at ftp://invisible-island.net/ncurses/ or ftp://dickey.his.com/ncurses/ -The instructions for importing new release and merge to HEAD can be found -at FreeBSD wiki: - - http://wiki.freebsd.org/SubversionPrimer/VendorImports - For the import files and directories were pruned by: tar -X FREEBSD-Xlist -zxf ncurses-5.7.tar.gz check if there are any new bits that we don't want. -then imported by: - - cvs import -m 'Import ncurses 5.6-20061217 onto the vendor branch' \ - src/contrib/ncurses NCURSES v5_6_20061217 - -The date in the tag can be obtained from contrib/ncurses/dist.mk. -If the version is a snapshot, +The instructions for importing new release and merging to HEAD can be found +at FreeBSD wiki: - cvs import -m 'Import ncurses 5.6-20080503 snapshot onto the vendor branch' \ - src/contrib/ncurses NCURSES v5_6_20080503 + http://wiki.freebsd.org/SubversionPrimer/VendorImports -Remove files that are removed in this release in vendor branch (NCURSES) -instead of HEAD. +The version tag can be obtained from contrib/ncurses/dist.mk. -To make local changes to ncurses, simply patch and commit to the main -branch (aka HEAD). Never make local changes on the vendor (NCURSES) branch. +To make local changes to ncurses, simply patch and commit to the trunk +branch (aka HEAD). Never make local changes on the vendor branch. All local changes should be submitted to Thomas Dickey for inclusion in the next vendor release. The author is very willing to help us. @@ -44,19 +32,20 @@ ncurses, go to /usr/ports/devel/ncurses Update ncurses_cfg.h and necessary Makefile glues from ${WRKSRC}/build.nowidec. Directory for wide character support is ${WRKSRC}/build.widec -You may have to update ncurses-specific glue in termcap.c. +You may have to update ncurses-specific glue in termcap.c (check if +ncurses/tinfo/read_termcap.c has been changed since last import). Current local changes: ncurses/tinfo/comp_scan.c - rev 1.2: native termcap tweaking + r50620: native termcap tweaking (cvs r1.2) ncurses/tinfo/lib_termcap.c - rev 1.2: native termcap tweaking - rev 1.4: remove GCC_UNUSED for rev 1.2 + r50620: native termcap tweaking (cvs r1.2) + r50850: remove GCC_UNUSED for r50620 (cvs r1.4) ncurses/tinfo/read_termcap.c This is not used. We have our own src/lib/ncurses/termcap.c rafan@FreeBSD.org -9-Jan-2007 +15-Nov-2008 From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 09:39:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD7C1065689; Sat, 15 Nov 2008 09:39:01 +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 F209D8FC1C; Sat, 15 Nov 2008 09:39:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAF9d0vc016190; Sat, 15 Nov 2008 09:39:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAF9d0jF016189; Sat, 15 Nov 2008 09:39:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200811150939.mAF9d0jF016189@svn.freebsd.org> From: Alexander Motin Date: Sat, 15 Nov 2008 09:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184991 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 09:39:01 -0000 Author: mav Date: Sat Nov 15 09:39:00 2008 New Revision: 184991 URL: http://svn.freebsd.org/changeset/base/184991 Log: Correct association 0 handling. as=0 means unused pin, so disable it explicitly, this is mostly cosmetics. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sat Nov 15 09:30:09 2008 (r184990) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Nov 15 09:39:00 2008 (r184991) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081030_0115" +#define HDA_DRV_TEST_REV "20081115_0116" SND_DECLARE_FILE("$FreeBSD$"); @@ -4255,9 +4255,9 @@ hdac_audio_as_parse(struct hdac_devinfo struct hdac_widget *w; int i, j, cnt, max, type, dir, assoc, seq, first, hpredir; - /* XXX This is redundant */ + /* Count present associations */ max = 0; - for (j = 0; j < 16; j++) { + for (j = 1; j < 16; j++) { for (i = devinfo->startnode; i < devinfo->endnode; i++) { w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) @@ -5123,17 +5123,27 @@ hdac_audio_disable_useless(struct hdac_d w = hdac_widget_get(devinfo, i); if (w == NULL || w->enable == 0) continue; - if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX && - (w->wclass.pin.config & - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) { - w->enable = 0; - HDA_BOOTHVERBOSE( - device_printf(devinfo->codec->sc->dev, - " Disabling pin nid %d due" - " to None connectivity.\n", - w->nid); - ); + if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { + if ((w->wclass.pin.config & + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) == + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE) { + w->enable = 0; + HDA_BOOTHVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Disabling pin nid %d due" + " to None connectivity.\n", + w->nid); + ); + } else if ((w->wclass.pin.config & + HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) == 0) { + w->enable = 0; + HDA_BOOTHVERBOSE( + device_printf(devinfo->codec->sc->dev, + " Disabling unassociated" + " pin nid %d.\n", + w->nid); + ); + } } } do { From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 10:56:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14F981065679; Sat, 15 Nov 2008 10:56:37 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02CD78FC18; Sat, 15 Nov 2008 10:56:37 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAFAuavF017617; Sat, 15 Nov 2008 10:56:36 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAFAuas7017616; Sat, 15 Nov 2008 10:56:36 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811151056.mAFAuas7017616@svn.freebsd.org> From: Joseph Koshy Date: Sat, 15 Nov 2008 10:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184992 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 10:56:37 -0000 Author: jkoshy Date: Sat Nov 15 10:56:36 2008 New Revision: 184992 URL: http://svn.freebsd.org/changeset/base/184992 Log: Correct an indexing error (a change missed out in #184802). Modified: head/sys/dev/hwpmc/hwpmc_amd.c Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Sat Nov 15 09:39:00 2008 (r184991) +++ head/sys/dev/hwpmc/hwpmc_amd.c Sat Nov 15 10:56:36 2008 (r184992) @@ -958,7 +958,7 @@ pmc_amd_initialize(void) for (i = 0; i < AMD_NPMCS; i++) { (void) snprintf(amd_pmcdesc[i].pm_descr.pd_name, sizeof(amd_pmcdesc[i].pm_descr.pd_name), "%s-%d", - name, i-1); + name, i); amd_pmcdesc[i].pm_descr.pd_class = class; } From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 11:07:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBA791065673; Sat, 15 Nov 2008 11:07:54 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9B098FC18; Sat, 15 Nov 2008 11:07:54 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAFB7seg019170; Sat, 15 Nov 2008 11:07:54 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAFB7sJB019169; Sat, 15 Nov 2008 11:07:54 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811151107.mAFB7sJB019169@svn.freebsd.org> From: Joseph Koshy Date: Sat, 15 Nov 2008 11:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184993 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 11:07:55 -0000 Author: jkoshy Date: Sat Nov 15 11:07:54 2008 New Revision: 184993 URL: http://svn.freebsd.org/changeset/base/184993 Log: Fix assertions. Reported by: keramida Modified: head/sys/dev/hwpmc/hwpmc_intel.c Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Sat Nov 15 10:56:36 2008 (r184992) +++ head/sys/dev/hwpmc/hwpmc_intel.c Sat Nov 15 11:07:54 2008 (r184993) @@ -151,8 +151,9 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_PIV: error = pmc_p4_initialize(pmc_mdep, ncpus); - KASSERT(md->pmd_npmc == TSC_NPMCS + P4_NPMCS, ("[intel,%d] " - "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + P4_NPMCS, + ("[intel,%d] incorrect npmc count %d", __LINE__, + pmc_mdep->pmd_npmc)); break; #endif @@ -168,8 +169,9 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_PM: error = pmc_p6_initialize(pmc_mdep, ncpus); - KASSERT(md->pmd_npmc == TSC_NPMCS + P6_NPMCS, ("[intel,%d] " - "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + P6_NPMCS, + ("[intel,%d] incorrect npmc count %d", __LINE__, + pmc_mdep->pmd_npmc)); break; /* @@ -179,8 +181,9 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_P5: error = pmc_p5_initialize(pmc_mdep, ncpus); - KASSERT(md->pmd_npmc == TSC_NPMCS + PENTIUM_NPMCS, ("[intel,%d] " - "incorrect npmc count %d", __LINE__, md->pmd_npmc)); + KASSERT(pmc_mdep->pmd_npmc == TSC_NPMCS + PENTIUM_NPMCS, + ("[intel,%d] incorrect npmc count %d", __LINE__, + md->pmd_npmc)); break; #endif From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 11:11:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE68B106567A; Sat, 15 Nov 2008 11:11:32 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CEA78FC1A; Sat, 15 Nov 2008 11:11:32 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAFBBWTY019277; Sat, 15 Nov 2008 11:11:32 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAFBBWnf019276; Sat, 15 Nov 2008 11:11:32 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811151111.mAFBBWnf019276@svn.freebsd.org> From: Joseph Koshy Date: Sat, 15 Nov 2008 11:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184994 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 11:11:32 -0000 Author: jkoshy Date: Sat Nov 15 11:11:32 2008 New Revision: 184994 URL: http://svn.freebsd.org/changeset/base/184994 Log: Correct an oversight: call the MD finalize hook at module unload time. Modified: head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sat Nov 15 11:07:54 2008 (r184993) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sat Nov 15 11:11:32 2008 (r184994) @@ -4656,6 +4656,9 @@ pmc_cleanup(void) if (md->pmd_pcpu_fini) md->pmd_pcpu_fini(cpu); } + + pmc_md_finalize(md); + free(md, M_PMC); md = NULL; pmc_restore_cpu_binding(&pb); From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 11:34:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1EBD106564A; Sat, 15 Nov 2008 11:34:30 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C00818FC0C; Sat, 15 Nov 2008 11:34:30 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAFBYUws019712; Sat, 15 Nov 2008 11:34:30 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAFBYUvY019711; Sat, 15 Nov 2008 11:34:30 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200811151134.mAFBYUvY019711@svn.freebsd.org> From: Joseph Koshy Date: Sat, 15 Nov 2008 11:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184995 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 11:34:30 -0000 Author: jkoshy Date: Sat Nov 15 11:34:30 2008 New Revision: 184995 URL: http://svn.freebsd.org/changeset/base/184995 Log: - Document the class name prefix for these PMCs. - Document the "anythread" qualifier, available on Atom CPUs. - Add examples. Modified: head/lib/libpmc/pmc.iaf.3 Modified: head/lib/libpmc/pmc.iaf.3 ============================================================================== --- head/lib/libpmc/pmc.iaf.3 Sat Nov 15 11:11:32 2008 (r184994) +++ head/lib/libpmc/pmc.iaf.3 Sat Nov 15 11:34:30 2008 (r184995) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2008 +.Dd November 14, 2008 .Os .Dt PMC.IAF 3 .Sh NAME @@ -72,6 +72,9 @@ Fixed-function PMCs support the followin .It PMC_CAP_USER Ta Yes .It PMC_CAP_WRITE Ta Yes .El +.Ss Class Name Prefix +These pmcs are named using a class name prefix of +.Dq Li iaf- . .Ss Event Qualifiers (Fixed Function PMCs) These PMCs support the following modifiers: .Bl -tag -width indent @@ -80,6 +83,11 @@ Configure the PMC to count events occurr .It Li usr Configure the PMC to count events occurring at ring levels 1, 2 or 3. +.It Li anythread +.Pq Tn Atom CPUs +Configure the PMC to count events on all logical processors sharing a +processor core. +The default is to count events on the current logical processor. .El .Pp If neither of the @@ -101,6 +109,19 @@ The number of core cycles for which the .Pq Fixed Function Counter 2 The number of reference cycles for which the core is not halted. .El +.Sh EXAMPLES +To measure the number of core cycles for which the core was not halted +use the event specifier +.Qq iaf-cpu-clk-unhalted.core . +.Pp +To measure the number of user instructions retired use the event specifier +.Qq iaf-instr-retired.any,usr . +.Pp +To measure the number of user instructions retired on all logical processors +in an +.Tn Atom +CPU, use the event specifier +.Qq iaf-instr-retired.any,usr,anythread . .Sh SEE ALSO .Xr pmc 3 , .Xr pmc.atom 3 , From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 12:11:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 760C81065673 for ; Sat, 15 Nov 2008 12:11:28 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mx1.freebsd.org (Postfix) with ESMTP id A46A48FC18 for ; Sat, 15 Nov 2008 12:11:27 +0000 (UTC) (envelope-from jkoshy.freebsd@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so1029992tib.3 for ; Sat, 15 Nov 2008 04:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:to:cc:subject :in-reply-to:references:user-agent:mime-version:content-type:from :date:sender; bh=MujI2P5w5iMvMM55LYcCcESk4JDP3Y2WODn5dQDVfUM=; b=gvQBkVZeTPdoLP2s20PrxRLcK09mPr/Qz4pI1E6LioFF1gSK8SdCyUPVxDf/XXc1Cc c7qfFfGAA00dhz12GVxY8/yDHVb1BIgBl+V30ZX+Utu5JESYd41mqKj+taGq/bC51gFy 0rHeQnZwA3824kzkqBao5rUeCENMTQ9cSh+Mw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:to:cc:subject:in-reply-to:references:user-agent :mime-version:content-type:from:date:sender; b=GEYNciHWPiGfNI+LW0PKmXqstQtU/KUIHSsx0r00tIl4iNv+VHXsEZnfFcQR+iZwG6 /rbrSa6qENK49OuAGrNI7rTFB+8L3wyFIzQ4uemmsSEStF4wvVAedbpP4rwaVB+lzHYH gX3DzU1bFirSvna4G00CZQ4zPQnyz0rAMZn0g= Received: by 10.110.49.2 with SMTP id w2mr2420121tiw.4.1226749109389; Sat, 15 Nov 2008 03:38:29 -0800 (PST) Received: from moria.unixconsulting.co.in ([117.97.126.101]) by mx.google.com with ESMTPS id 2sm3607407tif.0.2008.11.15.03.38.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 15 Nov 2008 03:38:27 -0800 (PST) Message-ID: <86ljvkudnc.wl%koshy@unixconsulting.co.in> To: Giorgos Keramidas In-Reply-To: <87skpuab5d.fsf@kobe.laptop> References: <200811091737.mA9HbssM047036@svn.freebsd.org> <87skpuab5d.fsf@kobe.laptop> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (x86_64-pc-freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII From: Joseph Koshy Date: Sat, 15 Nov 2008 17:04:53 -0000 Sender: Joseph Koshy Cc: svn-src-head@freebsd.org, Joseph Koshy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184802 - in head/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 12:11:28 -0000 > Hi Joseph, > > This seems to cause panics here. Should be fixed in change #184993. Thanks for bug report. Koshy From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 12:21:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6A801065677; Sat, 15 Nov 2008 12:21:19 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 199B08FC08; Sat, 15 Nov 2008 12:21:18 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl122-175.kln.forthnet.gr [77.49.241.175]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id mAFCL6RK006792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 15 Nov 2008 14:21:12 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id mAFCL65m049064; Sat, 15 Nov 2008 14:21:06 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id mAFCL6G0049020; Sat, 15 Nov 2008 14:21:06 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Joseph Koshy References: <200811091737.mA9HbssM047036@svn.freebsd.org> <87skpuab5d.fsf@kobe.laptop> <86ljvkudnc.wl%koshy@unixconsulting.co.in> Date: Sat, 15 Nov 2008 14:21:06 +0200 In-Reply-To: <86ljvkudnc.wl%koshy@unixconsulting.co.in> (Joseph Koshy's message of "Sat, 15 Nov 2008 17:04:53 -0000") Message-ID: <87bpwhqix9.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: mAFCL6RK006792 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.304, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.10, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184802 - in head/sys: amd64/include conf dev/hwpmc i386/include modules/hwpmc sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 12:21:19 -0000 On Sat, 15 Nov 2008 17:04:53 -0000, Joseph Koshy wrote: >> Hi Joseph, >> >> This seems to cause panics here. > > Should be fixed in change #184993. Thanks for bug report. Building a new snapshot now. Thanks for fixing this :) From owner-svn-src-all@FreeBSD.ORG Sat Nov 15 22:23:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A07B1065675; Sat, 15 Nov 2008 22:23:07 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696808FC1E; Sat, 15 Nov 2008 22:23:07 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAFMN7uD036344; Sat, 15 Nov 2008 22:23:07 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAFMN7lX036341; Sat, 15 Nov 2008 22:23:07 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200811152223.mAFMN7lX036341@svn.freebsd.org> From: Peter Wemm Date: Sat, 15 Nov 2008 22:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184996 - head/lib/libc/i386/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2008 22:23:07 -0000 Author: peter Date: Sat Nov 15 22:23:07 2008 New Revision: 184996 URL: http://svn.freebsd.org/changeset/base/184996 Log: On i386, the primary function that SYSCALL() generates is with the __sys_ prefix. Make END() match. This didn't cause a compile error, but the function size is attached to the .weak symbol, not the real one. Modified: head/lib/libc/i386/sys/pipe.S head/lib/libc/i386/sys/reboot.S head/lib/libc/i386/sys/setlogin.S Modified: head/lib/libc/i386/sys/pipe.S ============================================================================== --- head/lib/libc/i386/sys/pipe.S Sat Nov 15 11:34:30 2008 (r184995) +++ head/lib/libc/i386/sys/pipe.S Sat Nov 15 22:23:07 2008 (r184996) @@ -44,4 +44,4 @@ SYSCALL(pipe) movl %edx,4(%ecx) movl $0,%eax ret -END(pipe) +END(__sys_pipe) Modified: head/lib/libc/i386/sys/reboot.S ============================================================================== --- head/lib/libc/i386/sys/reboot.S Sat Nov 15 11:34:30 2008 (r184995) +++ head/lib/libc/i386/sys/reboot.S Sat Nov 15 22:23:07 2008 (r184996) @@ -40,4 +40,4 @@ __FBSDID("$FreeBSD$"); SYSCALL(reboot) iret -END(reboot) +END(__sys_reboot) Modified: head/lib/libc/i386/sys/setlogin.S ============================================================================== --- head/lib/libc/i386/sys/setlogin.S Sat Nov 15 11:34:30 2008 (r184995) +++ head/lib/libc/i386/sys/setlogin.S Sat Nov 15 22:23:07 2008 (r184996) @@ -52,4 +52,4 @@ SYSCALL(setlogin) movl $0,CNAME(_logname_valid) #endif ret /* setlogin(name) */ -END(setlogin) +END(__sys_setlogin)