From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 14:00:33 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 365A9106566C; Tue, 27 Sep 2011 14:00:33 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C67A8FC15; Tue, 27 Sep 2011 14:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RE0WFG026733; Tue, 27 Sep 2011 14:00:32 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RE0WqE026731; Tue, 27 Sep 2011 14:00:32 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201109271400.p8RE0WqE026731@svn.freebsd.org> From: Attilio Rao Date: Tue, 27 Sep 2011 14:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225797 - stable/9/sys/kern X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 14:00:33 -0000 Author: attilio Date: Tue Sep 27 14:00:32 2011 New Revision: 225797 URL: http://svn.freebsd.org/changeset/base/225797 Log: Backout r225372. Eventhandler mutex cannot be acquired in kernel context. Sponsored by: Sandvine Incorporated Approved by: re (kib) Modified: stable/9/sys/kern/subr_kdb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/subr_kdb.c ============================================================================== --- stable/9/sys/kern/subr_kdb.c Tue Sep 27 13:50:30 2011 (r225796) +++ stable/9/sys/kern/subr_kdb.c Tue Sep 27 14:00:32 2011 (r225797) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include "opt_kdb.h" #include "opt_stack.h" -#include "opt_watchdog.h" #include #include @@ -42,9 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SW_WATCHDOG -#include -#endif #include #include @@ -591,9 +587,6 @@ kdb_trap(int type, int code, struct trap cpuset_t other_cpus; #endif struct kdb_dbbe *be; -#ifdef SW_WATCHDOG - u_int wdoglvt; -#endif register_t intr; int handled; @@ -607,10 +600,6 @@ kdb_trap(int type, int code, struct trap intr = intr_disable(); -#ifdef SW_WATCHDOG - wdoglvt = wdog_kern_last_timeout(); - wdog_kern_pat(WD_TO_NEVER); -#endif #ifdef SMP other_cpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &other_cpus); @@ -642,9 +631,6 @@ kdb_trap(int type, int code, struct trap #ifdef SMP restart_cpus(stopped_cpus); #endif -#ifdef SW_WATCHDOG - wdog_kern_pat(wdoglvt); -#endif intr_restore(intr); From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 15:08:59 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8924F1065673; Tue, 27 Sep 2011 15:08:59 +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 78C348FC0A; Tue, 27 Sep 2011 15:08:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RF8xZD028973; Tue, 27 Sep 2011 15:08:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RF8xdt028971; Tue, 27 Sep 2011 15:08:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201109271508.p8RF8xdt028971@svn.freebsd.org> From: Alexander Motin Date: Tue, 27 Sep 2011 15:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225799 - stable/9/sys/kern X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 15:08:59 -0000 Author: mav Date: Tue Sep 27 15:08:59 2011 New Revision: 225799 URL: http://svn.freebsd.org/changeset/base/225799 Log: MFC r225788: Fix interrupt counters dumping on SW_WATCHDOG fire. Approved by: re (kib) Modified: stable/9/sys/kern/kern_clock.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/kern/kern_clock.c ============================================================================== --- stable/9/sys/kern/kern_clock.c Tue Sep 27 14:28:07 2011 (r225798) +++ stable/9/sys/kern/kern_clock.c Tue Sep 27 15:08:59 2011 (r225799) @@ -842,7 +842,7 @@ watchdog_fire(void) curintr = intrcnt; curname = intrnames; inttotal = 0; - nintr = sintrcnt; + nintr = sintrcnt / sizeof(u_long); printf("interrupt total\n"); while (--nintr >= 0) { From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 17:04:13 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EF69106566B; Tue, 27 Sep 2011 17:04:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA708FC0C; Tue, 27 Sep 2011 17:04:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RH4Dwi032670; Tue, 27 Sep 2011 17:04:13 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RH4D5c032668; Tue, 27 Sep 2011 17:04:13 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201109271704.p8RH4D5c032668@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 27 Sep 2011 17:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225803 - stable/9/usr.bin/fetch X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 17:04:13 -0000 Author: des Date: Tue Sep 27 17:04:13 2011 New Revision: 225803 URL: http://svn.freebsd.org/changeset/base/225803 Log: MFH r225800: finally fix resume mode with non-cooperating server. Approved by: re (kib) Modified: stable/9/usr.bin/fetch/fetch.c Directory Properties: stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.c ============================================================================== --- stable/9/usr.bin/fetch/fetch.c Tue Sep 27 16:57:14 2011 (r225802) +++ stable/9/usr.bin/fetch/fetch.c Tue Sep 27 17:04:13 2011 (r225803) @@ -540,7 +540,7 @@ fetch(char *URL, const char *path) goto failure; } /* we got it, open local file */ - if ((of = fopen(path, "a")) == NULL) { + if ((of = fopen(path, "r+")) == NULL) { warn("%s: fopen()", path); goto failure; } @@ -559,13 +559,13 @@ fetch(char *URL, const char *path) sb = nsb; /* picked up again later */ } - /* seek to where we left off */ - if (of != NULL && fseek(of, url->offset, SEEK_SET) != 0) { - warn("%s: fseek()", path); - fclose(of); - of = NULL; - /* picked up again later */ - } + } + /* seek to where we left off */ + if (of != NULL && fseek(of, url->offset, SEEK_SET) != 0) { + warn("%s: fseek()", path); + fclose(of); + of = NULL; + /* picked up again later */ } } else if (m_flag && sb.st_size != -1) { /* mirror mode, local file exists */ From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 17:11:10 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CFD310656B6; Tue, 27 Sep 2011 17:11:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E670E8FC17; Tue, 27 Sep 2011 17:11:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RHB9Fp032932; Tue, 27 Sep 2011 17:11:09 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RHB9Nu032930; Tue, 27 Sep 2011 17:11:09 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201109271711.p8RHB9Nu032930@svn.freebsd.org> From: Ed Maste Date: Tue, 27 Sep 2011 17:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225804 - stable/9/usr.sbin/mfiutil X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 17:11:10 -0000 Author: emaste Date: Tue Sep 27 17:11:09 2011 New Revision: 225804 URL: http://svn.freebsd.org/changeset/base/225804 Log: MFC r225798: Improve battery capacity reporting When a status pointer is passed in mfi_dcmd_command does not return an errno (if the ioctl is successful), so move the test for NO_HW_PRESENT outside of the error case. This should fix incorrect reporting for systems with a dead or no battery. Additionally, handle error codes other than NO_HW_PRESENT by omitting the battery capacity display. LSI's supercap-based parts (CV series) report their data using the same interface as battery-based parts, except that they do not include the capacity stats (state of charge, cumulative charge cycles, etc.) PR: bin/160581 Approved by: re Modified: stable/9/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/9/usr.sbin/mfiutil/ (props changed) Modified: stable/9/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/9/usr.sbin/mfiutil/mfi_show.c Tue Sep 27 17:04:13 2011 (r225803) +++ stable/9/usr.sbin/mfiutil/mfi_show.c Tue Sep 27 17:11:09 2011 (r225804) @@ -141,7 +141,7 @@ show_battery(int ac, char **av) struct mfi_bbu_design_info design; struct mfi_bbu_status stat; uint8_t status; - int comma, error, fd; + int comma, error, fd, show_capacity; if (ac != 1) { warnx("show battery: extra arguments"); @@ -157,16 +157,17 @@ show_battery(int ac, char **av) if (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_CAPACITY_INFO, &cap, sizeof(cap), NULL, 0, &status) < 0) { - if (status == MFI_STAT_NO_HW_PRESENT) { - printf("mfi%d: No battery present\n", mfi_unit); - close(fd); - return (0); - } error = errno; warn("Failed to get capacity info"); close(fd); return (error); } + if (status == MFI_STAT_NO_HW_PRESENT) { + printf("mfi%d: No battery present\n", mfi_unit); + close(fd); + return (0); + } + show_capacity = (status == MFI_STAT_OK); if (mfi_dcmd_command(fd, MFI_DCMD_BBU_GET_DESIGN_INFO, &design, sizeof(design), NULL, 0, NULL) < 0) { @@ -192,10 +193,14 @@ show_battery(int ac, char **av) printf(" Model: %s\n", design.device_name); printf(" Chemistry: %s\n", design.device_chemistry); printf(" Design Capacity: %d mAh\n", design.design_capacity); - printf(" Full Charge Capacity: %d mAh\n", cap.full_charge_capacity); - printf(" Current Capacity: %d mAh\n", cap.remaining_capacity); - printf(" Charge Cycles: %d\n", cap.cycle_count); - printf(" Current Charge: %d%%\n", cap.relative_charge); + if (show_capacity) { + printf(" Full Charge Capacity: %d mAh\n", + cap.full_charge_capacity); + printf(" Current Capacity: %d mAh\n", + cap.remaining_capacity); + printf(" Charge Cycles: %d\n", cap.cycle_count); + printf(" Current Charge: %d%%\n", cap.relative_charge); + } printf(" Design Voltage: %d mV\n", design.design_voltage); printf(" Current Voltage: %d mV\n", stat.voltage); printf(" Temperature: %d C\n", stat.temperature); From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 18:40:14 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E28106564A; Tue, 27 Sep 2011 18:40:14 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB3388FC0C; Tue, 27 Sep 2011 18:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RIeDmF036151; Tue, 27 Sep 2011 18:40:13 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RIeDMF036136; Tue, 27 Sep 2011 18:40:13 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201109271840.p8RIeDMF036136@svn.freebsd.org> From: Stanislav Sedov Date: Tue, 27 Sep 2011 18:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225811 - in stable/9: . kerberos5/lib/libasn1 kerberos5/lib/libgssapi_krb5 kerberos5/lib/libgssapi_ntlm kerberos5/lib/libgssapi_spnego kerberos5/lib/libhdb kerberos5/lib/libheimntlm ke... X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 18:40:14 -0000 Author: stas Date: Tue Sep 27 18:40:13 2011 New Revision: 225811 URL: http://svn.freebsd.org/changeset/base/225811 Log: - MFC r225778: - Add missing interdependencies to kerberos libraries. Some of the kerberos libraries were not linked properly (missing dependencies), which causes 3rd party applications linking to fail when --as-needed ld flag is used. I also added the --no-undefined ld(1) flag to make sure that there're no missing dependencies. Approved by: re (kib) Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/kerberos5/lib/libasn1/Makefile stable/9/kerberos5/lib/libgssapi_krb5/Makefile stable/9/kerberos5/lib/libgssapi_ntlm/Makefile stable/9/kerberos5/lib/libgssapi_spnego/Makefile stable/9/kerberos5/lib/libhdb/Makefile stable/9/kerberos5/lib/libheimntlm/Makefile stable/9/kerberos5/lib/libhx509/Makefile stable/9/kerberos5/lib/libkadm5clnt/Makefile stable/9/kerberos5/lib/libkadm5srv/Makefile stable/9/kerberos5/lib/libkafs5/Makefile stable/9/kerberos5/lib/libkrb5/Makefile stable/9/kerberos5/lib/libroken/Makefile stable/9/tools/make_libdeps.sh Directory Properties: stable/9/kerberos5/ (props changed) stable/9/tools/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/Makefile.inc1 Tue Sep 27 18:40:13 2011 (r225811) @@ -1218,7 +1218,8 @@ _startup_libs+= lib/libc gnu/lib/libgcc__L: lib/libc__L -_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \ +_prebuild_libs= ${_kerberos5_lib_libasn1} ${_kerberos5_lib_libhdb} \ + ${_kerberos5_lib_libheimntlm} \ ${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \ ${_kerberos5_lib_libroken} \ lib/libbz2 lib/libcom_err lib/libcrypt \ @@ -1268,6 +1269,19 @@ secure/lib/libssh__L: lib/libgssapi__L k _secure_lib= secure/lib .endif +.if ${MK_KERBEROS} != "no" +kerberos5/lib/libasn1__L: lib/libcom_err__L kerberos5/lib/libroken__L +kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ + kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L +kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L kerberos5/lib/libkrb5__L +kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ + secure/lib/libcrypto__L kerberos5/lib/libroken__L +kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L lib/libcom_err__L \ + lib/libcrypt__L secure/lib/libcrypto__L kerberos5/lib/libhx509__L \ + kerberos5/lib/libroken__L +kerberos5/lib/libroken__L: lib/libcrypt__L +.endif + .if ${MK_GSSAPI} != "no" _lib_libgssapi= lib/libgssapi .endif @@ -1279,6 +1293,7 @@ _lib_libipx= lib/libipx .if ${MK_KERBEROS} != "no" _kerberos5_lib= kerberos5/lib _kerberos5_lib_libasn1= kerberos5/lib/libasn1 +_kerberos5_lib_libhdb= kerberos5/lib/libhdb _kerberos5_lib_libkrb5= kerberos5/lib/libkrb5 _kerberos5_lib_libhx509= kerberos5/lib/libhx509 _kerberos5_lib_libroken= kerberos5/lib/libroken Modified: stable/9/kerberos5/lib/libasn1/Makefile ============================================================================== --- stable/9/kerberos5/lib/libasn1/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libasn1/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,7 +1,10 @@ # $FreeBSD$ LIB= asn1 +LDFLAGS= -Wl,--no-undefined INCS= asn1_err.h heim_asn1.h +LDADD= -lcom_err -lroken +DPADD= ${LIBCOM_ERR} ${LIBROKEN} SRCS= asn1_err.c \ asn1_err.h \ Modified: stable/9/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- stable/9/kerberos5/lib/libgssapi_krb5/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libgssapi_krb5/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,7 +1,7 @@ # $FreeBSD$ LIB= gssapi_krb5 -LDFLAGS= -Wl,-Bsymbolic +LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} \ ${LIBCOM_ERR} ${LIBCRYPT} Modified: stable/9/kerberos5/lib/libgssapi_ntlm/Makefile ============================================================================== --- stable/9/kerberos5/lib/libgssapi_ntlm/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libgssapi_ntlm/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,9 +1,9 @@ # $FreeBSD$ LIB= gssapi_ntlm -LDFLAGS= -Wl,-Bsymbolic -LDADD= -lkrb5 -lhx509 -lheimntlm -lroken -DPADD= ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBROKEN} +LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined +LDADD= -lcrypto -lgssapi -lkrb5 -lhx509 -lheimntlm -lroken +DPADD= ${LIBCRYPTO} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBROKEN} SRCS= accept_sec_context.c \ acquire_cred.c \ Modified: stable/9/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- stable/9/kerberos5/lib/libgssapi_spnego/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libgssapi_spnego/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,9 +1,9 @@ # $FreeBSD$ LIB= gssapi_spnego -LDFLAGS= -Wl,-Bsymbolic -LDADD= -lgssapi -lasn1 -DPADD= ${LIBGSSAPI} ${LIBASN1} +LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined +LDADD= -lgssapi -lasn1 -lroken +DPADD= ${LIBGSSAPI} ${LIBASN1} ${LIBROKEN} SRCS= accept_sec_context.c \ compat.c \ Modified: stable/9/kerberos5/lib/libhdb/Makefile ============================================================================== --- stable/9/kerberos5/lib/libhdb/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libhdb/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,9 @@ # $FreeBSD$ LIB= hdb +LDFLAGS= -Wl,--no-undefined +LDADD= -lasn1 -lcom_err -lkrb5 -lroken +DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} INCS= hdb-private.h \ hdb-protos.h \ Modified: stable/9/kerberos5/lib/libheimntlm/Makefile ============================================================================== --- stable/9/kerberos5/lib/libheimntlm/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libheimntlm/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,9 @@ # $FreeBSD$ LIB= heimntlm +LDFLAGS= -Wl,--no-undefined +LDADD= -lcrypto -lkrb5 +DPADD= ${LIBCRYPTO} ${LIBKRB5} SRCS= ntlm.c INCS= heimntlm.h heimntlm-protos.h CFLAGS+=-I${KRB5DIR}/lib/ntlm Modified: stable/9/kerberos5/lib/libhx509/Makefile ============================================================================== --- stable/9/kerberos5/lib/libhx509/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libhx509/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,7 +1,10 @@ # $FreeBSD$ LIB= hx509 +LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/hx509/version-script.map +LDADD= -lasn1 -lcom_err -lcrypto -lroken +DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPTO} ${LIBROKEN} INCS= hx509-private.h \ hx509-protos.h \ Modified: stable/9/kerberos5/lib/libkadm5clnt/Makefile ============================================================================== --- stable/9/kerberos5/lib/libkadm5clnt/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libkadm5clnt/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,9 @@ # $FreeBSD$ LIB= kadm5clnt +LDFLAGS= -Wl,--no-undefined +LDADD= -lcom_err -lkrb5 -lroken +DPADD= ${LIBCOM_ERR} ${LIBKRB5} ${LIBROKEN} INCS= admin.h \ kadm5-private.h \ Modified: stable/9/kerberos5/lib/libkadm5srv/Makefile ============================================================================== --- stable/9/kerberos5/lib/libkadm5srv/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libkadm5srv/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,9 @@ # $FreeBSD$ LIB= kadm5srv +LDFLAGS= -Wl,--no-undefined +LDADD= -lcom_err -lhdb -lkrb5 -lroken +DPADD= ${LIBCOM_ERR} ${LIBHDB} ${LIBKRB5} ${LIBROKEN} VERSION_MAP= ${KRB5DIR}/lib/kadm5/version-script.map SRCS= acl.c \ Modified: stable/9/kerberos5/lib/libkafs5/Makefile ============================================================================== --- stable/9/kerberos5/lib/libkafs5/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libkafs5/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,9 @@ # $FreeBSD$ LIB= kafs5 +LDFLAGS= -Wl,--no-undefined +LDADD= -lasn1 -lkrb5 -lroken +DPADD= ${LIBASN1} ${LIBKRB5} ${LIBROKEN} INCS= kafs.h MAN= kafs5.3 Modified: stable/9/kerberos5/lib/libkrb5/Makefile ============================================================================== --- stable/9/kerberos5/lib/libkrb5/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libkrb5/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,7 +1,10 @@ # $FreeBSD$ LIB= krb5 +LDFLAGS= -Wl,--no-undefined VERSION_MAP= ${KRB5DIR}/lib/krb5/version-script.map +LDADD= -lasn1 -lcom_err -lcrypt -lcrypto -lhx509 -lroken +DPADD= ${LIBASN1} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO} ${LIBHX509} ${LIBROKEN} INCS= heim_err.h \ heim_threads.h \ Modified: stable/9/kerberos5/lib/libroken/Makefile ============================================================================== --- stable/9/kerberos5/lib/libroken/Makefile Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/kerberos5/lib/libroken/Makefile Tue Sep 27 18:40:13 2011 (r225811) @@ -1,6 +1,8 @@ # $FreeBSD$ LIB= roken +LDADD= -lcrypt +DPADD= ${LIBCRYPT} INCS= roken.h roken-common.h SRCS= base64.c \ Modified: stable/9/tools/make_libdeps.sh ============================================================================== --- stable/9/tools/make_libdeps.sh Tue Sep 27 18:23:58 2011 (r225810) +++ stable/9/tools/make_libdeps.sh Tue Sep 27 18:40:13 2011 (r225811) @@ -52,7 +52,7 @@ sed -E -e's;-l(ncurses|termcap)!;lib/ncurses/ncurses;g' -e's;-l(gcc)!;gnu/lib/lib\1;g' -e's;-lssp_nonshared!;gnu/lib/libssp/libssp_nonshared;g' - -e's;-l(asn1|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g' + -e's;-l(asn1|hdb|heimntlm|hx509|krb5|roken)!;kerberos5/lib/lib\1;g' -e's;-l(crypto|ssh|ssl)!;secure/lib/lib\1;g' -e's;-l([^!]+)!;lib/lib\1;g' " From owner-svn-src-stable-other@FreeBSD.ORG Tue Sep 27 19:08:28 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F9BC1065675; Tue, 27 Sep 2011 19:08:28 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF588FC15; Tue, 27 Sep 2011 19:08:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8RJ8S1t037251; Tue, 27 Sep 2011 19:08:28 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8RJ8SK8037249; Tue, 27 Sep 2011 19:08:28 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201109271908.p8RJ8SK8037249@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Tue, 27 Sep 2011 19:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225816 - stable/9/usr.bin/fetch X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2011 19:08:28 -0000 Author: des Date: Tue Sep 27 19:08:27 2011 New Revision: 225816 URL: http://svn.freebsd.org/changeset/base/225816 Log: MFH r225805: use fseeko(2) instead of fseek(2). Approved by: re (kib) Modified: stable/9/usr.bin/fetch/fetch.c Directory Properties: stable/9/usr.bin/fetch/ (props changed) Modified: stable/9/usr.bin/fetch/fetch.c ============================================================================== --- stable/9/usr.bin/fetch/fetch.c Tue Sep 27 19:02:44 2011 (r225815) +++ stable/9/usr.bin/fetch/fetch.c Tue Sep 27 19:08:27 2011 (r225816) @@ -561,8 +561,8 @@ fetch(char *URL, const char *path) } } /* seek to where we left off */ - if (of != NULL && fseek(of, url->offset, SEEK_SET) != 0) { - warn("%s: fseek()", path); + if (of != NULL && fseeko(of, url->offset, SEEK_SET) != 0) { + warn("%s: fseeko()", path); fclose(of); of = NULL; /* picked up again later */ From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 01:26:18 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7801106566B; Wed, 28 Sep 2011 01:26:18 +0000 (UTC) (envelope-from poyopoyo@puripuri.plala.or.jp) Received: from msa04b.plala.or.jp (msa04.plala.or.jp [IPv6:2400:7800:0:5010::4]) by mx1.freebsd.org (Postfix) with ESMTP id 0430A8FC08; Wed, 28 Sep 2011 01:26:17 +0000 (UTC) Received: from i220-109-122-8.s02.a026.ap.plala.or.jp ([220.109.122.8]) by msa04b.plala.or.jp with ESMTP id <20110928012616.CZVZ10746.msa04b.plala.or.jp@i220-109-122-8.s02.a026.ap.plala.or.jp>; Wed, 28 Sep 2011 10:26:16 +0900 Date: Wed, 28 Sep 2011 10:26:16 +0900 Message-ID: <86bou5sbif.wl%poyopoyo@puripuri.plala.or.jp> From: poyopoyo@puripuri.plala.or.jp To: Ken Smith In-Reply-To: <201109230051.p8N0pbV2045995@svn.freebsd.org> References: <201109230051.p8N0pbV2045995@svn.freebsd.org> Mail-Followup-To: Ken Smith , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org, poyopoyo@puripuri.plala.or.jp User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/23.3 (amd64-portbld-freebsd9.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-VirusScan: Outbound; msa04b; Wed, 28 Sep 2011 10:26:16 +0900 X-Mailman-Approved-At: Wed, 28 Sep 2011 02:36:55 +0000 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org Subject: Re: svn commit: r225736 - stable/9 X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 01:26:19 -0000 > X-SVN-Group: stable-other Perhaps time has come to modify sysadmin/conf/mailer.conf to create stable-9 group for stable/9? -- kuro From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 08:47:18 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A358C1065678; Wed, 28 Sep 2011 08:47:18 +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 8EFF88FC14; Wed, 28 Sep 2011 08:47:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8S8lIKi063653; Wed, 28 Sep 2011 08:47:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8S8lIP0063649; Wed, 28 Sep 2011 08:47:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201109280847.p8S8lIP0063649@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 28 Sep 2011 08:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225827 - head/sys/kern head/usr.bin/compress head/usr.bin/gzip releng/7.3 releng/7.3/sys/conf releng/7.3/sys/kern releng/7.3/usr.bin/compress releng/7.3/usr.bin/gzip releng/7.4 releng/... X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 08:47:18 -0000 Author: bz Date: Wed Sep 28 08:47:17 2011 New Revision: 225827 URL: http://svn.freebsd.org/changeset/base/225827 Log: Fix handling of corrupt compress(1)ed data. [11:04] Add missing length checks on unix socket addresses. [11:05] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-11:04.compress Security: CVE-2011-2895 [11:04] Security: FreeBSD-SA-11:05.unix Modified: stable/9/sys/kern/uipc_usrreq.c stable/9/usr.bin/compress/zopen.c stable/9/usr.bin/gzip/zuncompress.c Changes in other areas also in this revision: Modified: head/sys/kern/uipc_usrreq.c head/usr.bin/compress/zopen.c head/usr.bin/gzip/zuncompress.c releng/7.3/UPDATING releng/7.3/sys/conf/newvers.sh releng/7.3/sys/kern/uipc_usrreq.c releng/7.3/usr.bin/compress/zopen.c releng/7.3/usr.bin/gzip/zuncompress.c releng/7.4/UPDATING releng/7.4/sys/conf/newvers.sh releng/7.4/sys/kern/uipc_usrreq.c releng/7.4/usr.bin/compress/zopen.c releng/7.4/usr.bin/gzip/zuncompress.c releng/8.1/UPDATING releng/8.1/sys/conf/newvers.sh releng/8.1/sys/kern/uipc_usrreq.c releng/8.1/usr.bin/compress/zopen.c releng/8.1/usr.bin/gzip/zuncompress.c releng/8.2/UPDATING releng/8.2/sys/conf/newvers.sh releng/8.2/sys/kern/uipc_usrreq.c releng/8.2/usr.bin/compress/zopen.c releng/8.2/usr.bin/gzip/zuncompress.c stable/7/sys/kern/uipc_usrreq.c stable/7/usr.bin/compress/zopen.c stable/7/usr.bin/gzip/zuncompress.c stable/8/sys/kern/uipc_usrreq.c stable/8/usr.bin/compress/zopen.c stable/8/usr.bin/gzip/zuncompress.c Modified: stable/9/sys/kern/uipc_usrreq.c ============================================================================== --- stable/9/sys/kern/uipc_usrreq.c Wed Sep 28 08:19:45 2011 (r225826) +++ stable/9/sys/kern/uipc_usrreq.c Wed Sep 28 08:47:17 2011 (r225827) @@ -462,6 +462,8 @@ uipc_bind(struct socket *so, struct sock unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_bind: unp == NULL")); + if (soun->sun_len > sizeof(struct sockaddr_un)) + return (EINVAL); namelen = soun->sun_len - offsetof(struct sockaddr_un, sun_path); if (namelen <= 0) return (EINVAL); @@ -1252,6 +1254,8 @@ unp_connect(struct socket *so, struct so unp = sotounpcb(so); KASSERT(unp != NULL, ("unp_connect: unp == NULL")); + if (nam->sa_len > sizeof(struct sockaddr_un)) + return (EINVAL); len = nam->sa_len - offsetof(struct sockaddr_un, sun_path); if (len <= 0) return (EINVAL); Modified: stable/9/usr.bin/compress/zopen.c ============================================================================== --- stable/9/usr.bin/compress/zopen.c Wed Sep 28 08:19:45 2011 (r225826) +++ stable/9/usr.bin/compress/zopen.c Wed Sep 28 08:47:17 2011 (r225827) @@ -486,7 +486,7 @@ zread(void *cookie, char *rbp, int num) block_compress = maxbits & BLOCK_MASK; maxbits &= BIT_MASK; maxmaxcode = 1L << maxbits; - if (maxbits > BITS) { + if (maxbits > BITS || maxbits < 12) { errno = EFTYPE; return (-1); } @@ -513,17 +513,28 @@ zread(void *cookie, char *rbp, int num) for (code = 255; code >= 0; code--) tab_prefixof(code) = 0; clear_flg = 1; - free_ent = FIRST - 1; - if ((code = getcode(zs)) == -1) /* O, untimely death! */ - break; + free_ent = FIRST; + oldcode = -1; + continue; } incode = code; - /* Special case for KwKwK string. */ + /* Special case for kWkWk string. */ if (code >= free_ent) { + if (code > free_ent || oldcode == -1) { + /* Bad stream. */ + errno = EINVAL; + return (-1); + } *stackp++ = finchar; code = oldcode; } + /* + * The above condition ensures that code < free_ent. + * The construction of tab_prefixof in turn guarantees that + * each iteration decreases code and therefore stack usage is + * bound by 1 << BITS - 256. + */ /* Generate output characters in reverse order. */ while (code >= 256) { @@ -540,7 +551,7 @@ middle: do { } while (stackp > de_stack); /* Generate the new entry. */ - if ((code = free_ent) < maxmaxcode) { + if ((code = free_ent) < maxmaxcode && oldcode != -1) { tab_prefixof(code) = (u_short) oldcode; tab_suffixof(code) = finchar; free_ent = code + 1; Modified: stable/9/usr.bin/gzip/zuncompress.c ============================================================================== --- stable/9/usr.bin/gzip/zuncompress.c Wed Sep 28 08:19:45 2011 (r225826) +++ stable/9/usr.bin/gzip/zuncompress.c Wed Sep 28 08:47:17 2011 (r225827) @@ -247,7 +247,7 @@ zread(void *cookie, char *rbp, int num) zs->zs_block_compress = zs->zs_maxbits & BLOCK_MASK; zs->zs_maxbits &= BIT_MASK; zs->zs_maxmaxcode = 1L << zs->zs_maxbits; - if (zs->zs_maxbits > BITS) { + if (zs->zs_maxbits > BITS || zs->zs_maxbits < 12) { errno = EFTYPE; return (-1); } @@ -259,13 +259,7 @@ zread(void *cookie, char *rbp, int num) } zs->zs_free_ent = zs->zs_block_compress ? FIRST : 256; - zs->u.r.zs_finchar = zs->u.r.zs_oldcode = getcode(zs); - if (zs->u.r.zs_oldcode == -1) /* EOF already? */ - return (0); /* Get out of here */ - - /* First code must be 8 bits = char. */ - *bp++ = (u_char)zs->u.r.zs_finchar; - count--; + zs->u.r.zs_oldcode = -1; zs->u.r.zs_stackp = de_stack; while ((zs->u.r.zs_code = getcode(zs)) > -1) { @@ -275,17 +269,29 @@ zread(void *cookie, char *rbp, int num) zs->u.r.zs_code--) tab_prefixof(zs->u.r.zs_code) = 0; zs->zs_clear_flg = 1; - zs->zs_free_ent = FIRST - 1; - if ((zs->u.r.zs_code = getcode(zs)) == -1) /* O, untimely death! */ - break; + zs->zs_free_ent = FIRST; + zs->u.r.zs_oldcode = -1; + continue; } zs->u.r.zs_incode = zs->u.r.zs_code; /* Special case for KwKwK string. */ if (zs->u.r.zs_code >= zs->zs_free_ent) { + if (zs->u.r.zs_code > zs->zs_free_ent || + zs->u.r.zs_oldcode == -1) { + /* Bad stream. */ + errno = EINVAL; + return (-1); + } *zs->u.r.zs_stackp++ = zs->u.r.zs_finchar; zs->u.r.zs_code = zs->u.r.zs_oldcode; } + /* + * The above condition ensures that code < free_ent. + * The construction of tab_prefixof in turn guarantees that + * each iteration decreases code and therefore stack usage is + * bound by 1 << BITS - 256. + */ /* Generate output characters in reverse order. */ while (zs->u.r.zs_code >= 256) { @@ -302,7 +308,8 @@ middle: do { } while (zs->u.r.zs_stackp > de_stack); /* Generate the new entry. */ - if ((zs->u.r.zs_code = zs->zs_free_ent) < zs->zs_maxmaxcode) { + if ((zs->u.r.zs_code = zs->zs_free_ent) < zs->zs_maxmaxcode && + zs->u.r.zs_oldcode != -1) { tab_prefixof(zs->u.r.zs_code) = (u_short) zs->u.r.zs_oldcode; tab_suffixof(zs->u.r.zs_code) = zs->u.r.zs_finchar; zs->zs_free_ent = zs->u.r.zs_code + 1; From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 08:51:37 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07ABE106566B; Wed, 28 Sep 2011 08:51:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 8B8398FC18; Wed, 28 Sep 2011 08:51:36 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id C486B25D3860; Wed, 28 Sep 2011 08:51:34 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D2C73BD3D28; Wed, 28 Sep 2011 08:51:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id IplEqJpYVB90; Wed, 28 Sep 2011 08:51:33 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C0C92BD3C22; Wed, 28 Sep 2011 08:51:32 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <86bou5sbif.wl%poyopoyo@puripuri.plala.or.jp> Date: Wed, 28 Sep 2011 08:51:31 +0000 Content-Transfer-Encoding: 7bit Message-Id: <51E92007-864E-4A61-A333-CD1B8865D20C@FreeBSD.org> References: <201109230051.p8N0pbV2045995@svn.freebsd.org> <86bou5sbif.wl%poyopoyo@puripuri.plala.or.jp> To: poyopoyo@puripuri.plala.or.jp X-Mailer: Apple Mail (2.1084) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org, Ken Smith Subject: Re: svn commit: r225736 - stable/9 X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 08:51:37 -0000 On Sep 28, 2011, at 1:26 AM, poyopoyo@puripuri.plala.or.jp wrote: >> X-SVN-Group: stable-other > > Perhaps time has come to modify sysadmin/conf/mailer.conf to create > stable-9 group for stable/9? I have emailed postmaster to create the list yesterday and I have an approved diff for mailer.conf already waiting on the list creation to happen. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 11:49:05 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F19F3106566C; Wed, 28 Sep 2011 11:49:04 +0000 (UTC) (envelope-from poyopoyo@puripuri.plala.or.jp) Received: from msa02b.plala.or.jp (msa02.plala.or.jp [IPv6:2400:7800:0:5010::2]) by mx1.freebsd.org (Postfix) with ESMTP id D3A978FC15; Wed, 28 Sep 2011 11:49:03 +0000 (UTC) Received: from i220-109-122-8.s02.a026.ap.plala.or.jp ([220.109.122.8]) by msa02b.plala.or.jp with ESMTP id <20110928114902.GQQD16800.msa02b.plala.or.jp@i220-109-122-8.s02.a026.ap.plala.or.jp>; Wed, 28 Sep 2011 20:49:02 +0900 Date: Wed, 28 Sep 2011 20:49:02 +0900 Message-ID: <868vp8sx8x.wl%poyopoyo@puripuri.plala.or.jp> From: poyopoyo@puripuri.plala.or.jp To: "Bjoern A. Zeeb" In-Reply-To: <51E92007-864E-4A61-A333-CD1B8865D20C@FreeBSD.org> References: <201109230051.p8N0pbV2045995@svn.freebsd.org> <86bou5sbif.wl%poyopoyo@puripuri.plala.or.jp> <51E92007-864E-4A61-A333-CD1B8865D20C@FreeBSD.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/23.3 (amd64-portbld-freebsd9.0) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-VirusScan: Outbound; msa02b; Wed, 28 Sep 2011 20:49:02 +0900 X-Mailman-Approved-At: Wed, 28 Sep 2011 13:22:36 +0000 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-other@freebsd.org, Ken Smith Subject: Re: svn commit: r225736 - stable/9 X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 11:49:05 -0000 At Wed, 28 Sep 2011 08:51:31 +0000, Bjoern A. Zeeb wrote: > I have emailed postmaster to create the list yesterday and I have an > approved diff for mailer.conf already waiting on the list creation > to happen. That's nice! Thank you. -- kuro From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 19:36:22 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F99106566B; Wed, 28 Sep 2011 19:36:22 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E921A8FC19; Wed, 28 Sep 2011 19:36:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8SJaLWS086919; Wed, 28 Sep 2011 19:36:21 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8SJaLQk086917; Wed, 28 Sep 2011 19:36:21 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201109281936.p8SJaLQk086917@svn.freebsd.org> From: Kirk McKusick Date: Wed, 28 Sep 2011 19:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225850 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 19:36:22 -0000 Author: mckusick Date: Wed Sep 28 19:36:21 2011 New Revision: 225850 URL: http://svn.freebsd.org/changeset/base/225850 Log: MFC: r225806: This update eliminates the system hang reported in kern/160662 when taking a snapshot on a filesystem running with journaled soft updates. As journaled soft updates first appeared in 9.0, this will be the only MFC of this change. Approved by: re (kib) Reported by: Hans Ottevanger Fix verified by: Hans Ottevanger PR: kern/160662 Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_snapshot.c Wed Sep 28 19:01:15 2011 (r225849) +++ stable/9/sys/ufs/ffs/ffs_snapshot.c Wed Sep 28 19:36:21 2011 (r225850) @@ -203,7 +203,7 @@ ffs_snapshot(mp, snapfile) ufs2_daddr_t numblks, blkno, *blkp, *snapblklist; int error, cg, snaploc; int i, size, len, loc; - int flag; + uint64_t flag; struct timespec starttime = {0, 0}, endtime; char saved_nice = 0; long redo = 0, snaplistsize = 0; From owner-svn-src-stable-other@FreeBSD.ORG Wed Sep 28 19:38:48 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28089106564A; Wed, 28 Sep 2011 19:38:48 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D6968FC21; Wed, 28 Sep 2011 19:38:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8SJclMW087022; Wed, 28 Sep 2011 19:38:47 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8SJclbt087020; Wed, 28 Sep 2011 19:38:47 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201109281938.p8SJclbt087020@svn.freebsd.org> From: Kirk McKusick Date: Wed, 28 Sep 2011 19:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225851 - stable/9/sys/ufs/ffs X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2011 19:38:48 -0000 Author: mckusick Date: Wed Sep 28 19:38:47 2011 New Revision: 225851 URL: http://svn.freebsd.org/changeset/base/225851 Log: MFC r225807: This update eliminates a lock-order reversal warning discovered whle tracking down the system hang reported in kern/160662 and corrected in revision 225806 (MFC'ed as 225850). The LOR is not the cause of the system hang and indeed cannot cause an actual deadlock. However, it can be easily eliminated by defering the acquisition of a buflock until after all the vnode locks have been acquired. As journaled soft updates first appeared in 9.0, this will be the only MFC of this change. Approved by: re (kib) Reported by: Hans Ottevanger PR: kern/160662 Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c Modified: stable/9/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- stable/9/sys/ufs/ffs/ffs_snapshot.c Wed Sep 28 19:36:21 2011 (r225850) +++ stable/9/sys/ufs/ffs/ffs_snapshot.c Wed Sep 28 19:38:47 2011 (r225851) @@ -212,7 +212,7 @@ ffs_snapshot(mp, snapfile) struct fs *copy_fs = NULL, *fs; struct thread *td = curthread; struct inode *ip, *xp; - struct buf *bp, *nbp, *ibp, *sbp = NULL; + struct buf *bp, *nbp, *ibp; struct nameidata nd; struct mount *wrtmp; struct vattr vat; @@ -460,21 +460,14 @@ restart: * Grab a copy of the superblock and its summary information. * We delay writing it until the suspension is released below. */ - error = bread(vp, lblkno(fs, fs->fs_sblockloc), fs->fs_bsize, - KERNCRED, &sbp); - if (error) { - brelse(sbp); - sbp = NULL; - goto out1; - } - loc = blkoff(fs, fs->fs_sblockloc); - copy_fs = (struct fs *)(sbp->b_data + loc); + copy_fs = malloc((u_long)fs->fs_bsize, M_UFSMNT, M_WAITOK); bcopy(fs, copy_fs, fs->fs_sbsize); if ((fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) == 0) copy_fs->fs_clean = 1; size = fs->fs_bsize < SBLOCKSIZE ? fs->fs_bsize : SBLOCKSIZE; if (fs->fs_sbsize < size) - bzero(&sbp->b_data[loc + fs->fs_sbsize], size - fs->fs_sbsize); + bzero(&((char *)copy_fs)[fs->fs_sbsize], + size - fs->fs_sbsize); size = blkroundup(fs, fs->fs_cssize); if (fs->fs_contigsumsize > 0) size += fs->fs_ncg * sizeof(int32_t); @@ -490,8 +483,8 @@ restart: len, KERNCRED, &bp)) != 0) { brelse(bp); free(copy_fs->fs_csp, M_UFSMNT); - bawrite(sbp); - sbp = NULL; + free(copy_fs, M_UFSMNT); + copy_fs = NULL; goto out1; } bcopy(bp->b_data, space, (u_int)len); @@ -606,8 +599,8 @@ loop: vdrop(xvp); if (error) { free(copy_fs->fs_csp, M_UFSMNT); - bawrite(sbp); - sbp = NULL; + free(copy_fs, M_UFSMNT); + copy_fs = NULL; MNT_VNODE_FOREACH_ABORT(mp, mvp); goto out1; } @@ -621,8 +614,8 @@ loop: error = softdep_journal_lookup(mp, &xvp); if (error) { free(copy_fs->fs_csp, M_UFSMNT); - bawrite(sbp); - sbp = NULL; + free(copy_fs, M_UFSMNT); + copy_fs = NULL; goto out1; } xp = VTOI(xvp); @@ -688,8 +681,8 @@ loop: VI_UNLOCK(devvp); ASSERT_VOP_LOCKED(vp, "ffs_snapshot vp"); out1: - KASSERT((sn != NULL && sbp != NULL && error == 0) || - (sn == NULL && sbp == NULL && error != 0), + KASSERT((sn != NULL && copy_fs != NULL && error == 0) || + (sn == NULL && copy_fs == NULL && error != 0), ("email phk@ and mckusick@")); /* * Resume operation on filesystem. @@ -703,7 +696,7 @@ out1: vp->v_mount->mnt_stat.f_mntonname, (long)endtime.tv_sec, endtime.tv_nsec / 1000000, redo, fs->fs_ncg); } - if (sbp == NULL) + if (copy_fs == NULL) goto out; /* * Copy allocation information from all the snapshots in @@ -793,6 +786,15 @@ out1: space = (char *)space + fs->fs_bsize; bawrite(nbp); } + error = bread(vp, lblkno(fs, fs->fs_sblockloc), fs->fs_bsize, + KERNCRED, &nbp); + if (error) { + brelse(nbp); + } else { + loc = blkoff(fs, fs->fs_sblockloc); + bcopy((char *)copy_fs, &nbp->b_data[loc], fs->fs_bsize); + bawrite(nbp); + } /* * As this is the newest list, it is the most inclusive, so * should replace the previous list. @@ -822,7 +824,8 @@ out1: vrele(vp); /* Drop extra reference */ done: free(copy_fs->fs_csp, M_UFSMNT); - bawrite(sbp); + free(copy_fs, M_UFSMNT); + copy_fs = NULL; out: NDFREE(&nd, NDF_ONLY_PNBUF); if (saved_nice > 0) { From owner-svn-src-stable-other@FreeBSD.ORG Thu Sep 29 10:38:00 2011 Return-Path: Delivered-To: svn-src-stable-other@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB1A10656D8; Thu, 29 Sep 2011 10:38:00 +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 4CDC58FC1B; Thu, 29 Sep 2011 10:38:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8TAc0fA018038; Thu, 29 Sep 2011 10:38:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8TAc0Ct018036; Thu, 29 Sep 2011 10:38:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201109291038.p8TAc0Ct018036@svn.freebsd.org> From: Alexander Motin Date: Thu, 29 Sep 2011 10:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org X-SVN-Group: stable-other MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225873 - stable/9/sys/dev/ahci X-BeenThere: svn-src-stable-other@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the old stable src trees List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2011 10:38:00 -0000 Author: mav Date: Thu Sep 29 10:37:59 2011 New Revision: 225873 URL: http://svn.freebsd.org/changeset/base/225873 Log: MFC r225789: Add one more ID for the Marvell 88SE9128 6Gbps SATA controller. Approved by: re (kib) Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Thu Sep 29 10:37:42 2011 (r225872) +++ stable/9/sys/dev/ahci/ahci.c Thu Sep 29 10:37:59 2011 (r225873) @@ -197,6 +197,7 @@ static struct { {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, + {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES},