From owner-svn-src-stable@FreeBSD.ORG Sun Sep 28 11:08:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFE93EDD; Sun, 28 Sep 2014 11:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAD54327; Sun, 28 Sep 2014 11:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SB8X9r071764; Sun, 28 Sep 2014 11:08:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SB8XbN071761; Sun, 28 Sep 2014 11:08:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409281108.s8SB8XbN071761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 28 Sep 2014 11:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272246 - in stable/10/sys: compat/freebsd32 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 11:08:34 -0000 Author: kib Date: Sun Sep 28 11:08:32 2014 New Revision: 272246 URL: http://svnweb.freebsd.org/changeset/base/272246 Log: MFC r272132: Fix fcntl(2) compat32 after r270691. Approved by: re (glebius) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/kern/kern_descrip.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Sun Sep 28 11:08:32 2014 (r272246) @@ -3076,7 +3076,7 @@ freebsd32_procctl(struct thread *td, str int freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap) { - intptr_t tmp; + long tmp; switch (uap->cmd) { /* @@ -3095,5 +3095,5 @@ freebsd32_fcntl(struct thread *td, struc tmp = uap->arg; break; } - return (kern_fcntl(td, uap->fd, uap->cmd, tmp)); + return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, tmp)); } Modified: stable/10/sys/kern/kern_descrip.c ============================================================================== --- stable/10/sys/kern/kern_descrip.c Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/kern/kern_descrip.c Sun Sep 28 11:08:32 2014 (r272246) @@ -401,22 +401,27 @@ struct fcntl_args { int sys_fcntl(struct thread *td, struct fcntl_args *uap) { + + return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, uap->arg)); +} + +int +kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg) +{ struct flock fl; struct __oflock ofl; - intptr_t arg; + intptr_t arg1; int error; - int cmd; error = 0; - cmd = uap->cmd; - switch (uap->cmd) { + switch (cmd) { case F_OGETLK: case F_OSETLK: case F_OSETLKW: /* * Convert old flock structure to new. */ - error = copyin((void *)(intptr_t)uap->arg, &ofl, sizeof(ofl)); + error = copyin((void *)(intptr_t)arg, &ofl, sizeof(ofl)); fl.l_start = ofl.l_start; fl.l_len = ofl.l_len; fl.l_pid = ofl.l_pid; @@ -424,7 +429,7 @@ sys_fcntl(struct thread *td, struct fcnt fl.l_whence = ofl.l_whence; fl.l_sysid = 0; - switch (uap->cmd) { + switch (cmd) { case F_OGETLK: cmd = F_GETLK; break; @@ -435,33 +440,33 @@ sys_fcntl(struct thread *td, struct fcnt cmd = F_SETLKW; break; } - arg = (intptr_t)&fl; + arg1 = (intptr_t)&fl; break; case F_GETLK: case F_SETLK: case F_SETLKW: case F_SETLK_REMOTE: - error = copyin((void *)(intptr_t)uap->arg, &fl, sizeof(fl)); - arg = (intptr_t)&fl; + error = copyin((void *)(intptr_t)arg, &fl, sizeof(fl)); + arg1 = (intptr_t)&fl; break; default: - arg = uap->arg; + arg1 = arg; break; } if (error) return (error); - error = kern_fcntl(td, uap->fd, cmd, arg); + error = kern_fcntl(td, fd, cmd, arg1); if (error) return (error); - if (uap->cmd == F_OGETLK) { + if (cmd == F_OGETLK) { ofl.l_start = fl.l_start; ofl.l_len = fl.l_len; ofl.l_pid = fl.l_pid; ofl.l_type = fl.l_type; ofl.l_whence = fl.l_whence; - error = copyout(&ofl, (void *)(intptr_t)uap->arg, sizeof(ofl)); - } else if (uap->cmd == F_GETLK) { - error = copyout(&fl, (void *)(intptr_t)uap->arg, sizeof(fl)); + error = copyout(&ofl, (void *)(intptr_t)arg, sizeof(ofl)); + } else if (cmd == F_GETLK) { + error = copyout(&fl, (void *)(intptr_t)arg, sizeof(fl)); } return (error); } Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Sun Sep 28 08:59:38 2014 (r272245) +++ stable/10/sys/sys/syscallsubr.h Sun Sep 28 11:08:32 2014 (r272246) @@ -97,6 +97,7 @@ int kern_fchmodat(struct thread *td, int int kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int uid, int gid, int flag); int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); +int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf); int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf); int kern_fstat(struct thread *td, int fd, struct stat *sbp); From owner-svn-src-stable@FreeBSD.ORG Sun Sep 28 23:15:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1634B10; Sun, 28 Sep 2014 23:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01922644; Sun, 28 Sep 2014 23:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SNFIqI025502; Sun, 28 Sep 2014 23:15:18 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SNFIge025501; Sun, 28 Sep 2014 23:15:18 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201409282315.s8SNFIge025501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 28 Sep 2014 23:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272275 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 23:15:19 -0000 Author: wblock (doc committer) Date: Sun Sep 28 23:15:18 2014 New Revision: 272275 URL: http://svnweb.freebsd.org/changeset/base/272275 Log: MFC r272137: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. Approved by: re (gjb) Modified: stable/10/etc/motd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/motd ============================================================================== --- stable/10/etc/motd Sun Sep 28 21:44:23 2014 (r272274) +++ stable/10/etc/motd Sun Sep 28 23:15:18 2014 (r272275) @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier From owner-svn-src-stable@FreeBSD.ORG Sun Sep 28 23:22:47 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C79F204; Sun, 28 Sep 2014 23:22:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37E31757; Sun, 28 Sep 2014 23:22:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8SNMlA5029916; Sun, 28 Sep 2014 23:22:47 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8SNMlGF029915; Sun, 28 Sep 2014 23:22:47 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201409282322.s8SNMlGF029915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 28 Sep 2014 23:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272276 - stable/9/etc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2014 23:22:47 -0000 Author: wblock (doc committer) Date: Sun Sep 28 23:22:46 2014 New Revision: 272276 URL: http://svnweb.freebsd.org/changeset/base/272276 Log: MFC r272137: Revised to better point to release notes and errata, security advisories, and be more specific about the -questions list. Modified: stable/9/etc/motd Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/motd ============================================================================== --- stable/9/etc/motd Sun Sep 28 23:15:18 2014 (r272275) +++ stable/9/etc/motd Sun Sep 28 23:22:46 2014 (r272276) @@ -1,12 +1,13 @@ FreeBSD ?.?.? (UNKNOWN) -Welcome to FreeBSD! Handy technical support resources: +Welcome to FreeBSD! -Security advisories and errata: https://www.FreeBSD.org/releases/ -Handbook: https://www.FreeBSD.org/handbook/ -FAQ: https://www.FreeBSD.org/faq/ -Mailing list: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ -Forums: https://forums.FreeBSD.org/ +Release Notes, Errata: https://www.FreeBSD.org/releases/ +Security Advisories: https://www.FreeBSD.org/security/ +FreeBSD Handbook: https://www.FreeBSD.org/handbook/ +FreeBSD FAQ: https://www.FreeBSD.org/faq/ +Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ +FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc @@ -14,7 +15,6 @@ For other languages, replace "en" with a Show the version of FreeBSD installed: uname -a Please include that output and any error messages when posting questions. - Introduction to manual pages: man man FreeBSD directory layout: man hier From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 13:56:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75F29BB8; Tue, 30 Sep 2014 13:56:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8A5E7C; Tue, 30 Sep 2014 13:56:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UDuXj1005945; Tue, 30 Sep 2014 13:56:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UDuX76005944; Tue, 30 Sep 2014 13:56:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301356.s8UDuX76005944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 13:56:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272301 - stable/10/sys/boot/efi/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 13:56:33 -0000 Author: emaste Date: Tue Sep 30 13:56:32 2014 New Revision: 272301 URL: http://svnweb.freebsd.org/changeset/base/272301 Log: MFC r272105: Remove duplicated header content Approved by: re (gjb, kib) Modified: stable/10/sys/boot/efi/include/eficonsctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/include/eficonsctl.h ============================================================================== --- stable/10/sys/boot/efi/include/eficonsctl.h Tue Sep 30 13:32:45 2014 (r272300) +++ stable/10/sys/boot/efi/include/eficonsctl.h Tue Sep 30 13:56:32 2014 (r272301) @@ -132,122 +132,3 @@ struct _EFI_CONSOLE_CONTROL_PROTOCOL { extern EFI_GUID gEfiConsoleControlProtocolGuid; #endif -/*- - * Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved. - * - * This program and the accompanying materials are licensed and made available - * under the terms and conditions of the BSD License which accompanies this - * distribution. The full text of the license may be found at - * http://opensource.org/licenses/bsd-license.php - * - * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR - * IMPLIED. - * - * Original Module Name: ConsoleControl.h - * Abstract: Abstraction of a Text mode or GOP/UGA screen - */ - -/* $FreeBSD */ - -#ifndef _EFI_CONS_CTL_H -#define _EFI_CONS_CTL_H - -#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \ - { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} } - -typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL; - - -typedef enum { - EfiConsoleControlScreenText, - EfiConsoleControlScreenGraphics, - EfiConsoleControlScreenMaxValue -} EFI_CONSOLE_CONTROL_SCREEN_MODE; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode, - OUT BOOLEAN *GopUgaExists, OPTIONAL - OUT BOOLEAN *StdInLocked OPTIONAL - ) -/*++ - - Routine Description: - Return the current video mode information. Also returns info about existence - of Graphics Output devices or UGA Draw devices in system, and if the Std In - device is locked. All the arguments are optional and only returned if a non - NULL pointer is passed in. - - Arguments: - This - Protocol instance pointer. - Mode - Are we in text of grahics mode. - GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device - StdInLocked - TRUE if StdIn device is keyboard locked - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode - ) -/*++ - - Routine Description: - Set the current mode to either text or graphics. Graphics is - for Quiet Boot. - - Arguments: - This - Protocol instance pointer. - Mode - Mode to set the - - Returns: - EFI_SUCCESS - Mode information returned. - ---*/ -; - - -typedef -EFI_STATUS -(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) ( - IN EFI_CONSOLE_CONTROL_PROTOCOL *This, - IN CHAR16 *Password - ) -/*++ - - Routine Description: - Lock Std In devices until Password is typed. - - Arguments: - This - Protocol instance pointer. - Password - Password needed to unlock screen. NULL means unlock keyboard - - Returns: - EFI_SUCCESS - Mode information returned. - EFI_DEVICE_ERROR - Std In not locked - ---*/ -; - - - -struct _EFI_CONSOLE_CONTROL_PROTOCOL { - EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode; - EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn; -}; - -extern EFI_GUID gEfiConsoleControlProtocolGuid; - -#endif From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 15:05:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74FE8C9A; Tue, 30 Sep 2014 15:05:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6060F978; Tue, 30 Sep 2014 15:05:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UF5Sb1041038; Tue, 30 Sep 2014 15:05:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UF5SAd041037; Tue, 30 Sep 2014 15:05:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301505.s8UF5SAd041037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272302 - stable/9/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:05:28 -0000 Author: emaste Date: Tue Sep 30 15:05:27 2014 New Revision: 272302 URL: http://svnweb.freebsd.org/changeset/base/272302 Log: MFC r271432: Merge upstream Clang rev 205331 debuginfo crash fix: Debug info: fix a crash when emitting IndirectFieldDecls, which were previously not handled at all. rdar://problem/16348575 Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 13:56:32 2014 (r272301) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:05:27 2014 (r272302) @@ -1239,7 +1239,7 @@ CollectTemplateParams(const TemplatePara V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. - if (isa(D)) { + if (isa(D) || isa(D)) { // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 15:07:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABE66DEF; Tue, 30 Sep 2014 15:07:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D777996; Tue, 30 Sep 2014 15:07:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UF77ix041345; Tue, 30 Sep 2014 15:07:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UF77am041344; Tue, 30 Sep 2014 15:07:07 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301507.s8UF77am041344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272303 - stable/9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:07:07 -0000 Author: emaste Date: Tue Sep 30 15:07:06 2014 New Revision: 272303 URL: http://svnweb.freebsd.org/changeset/base/272303 Log: MFC r271433: Add clang patch corresponding to r271432 Added: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff - copied unchanged from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Modified: Directory Properties: stable/9/contrib/llvm/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff (from r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Tue Sep 30 15:07:06 2014 (r272303, copy of r271433, head/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff) @@ -0,0 +1,46 @@ +commit 96365aef99ec463375dfdaf6eb260823e0477b6a +Author: Adrian Prantl +Date: Tue Apr 1 17:52:06 2014 +0000 + + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 + + git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 82db942..2556cf9 100644 +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, + V = CGM.GetAddrOfFunction(FD); + // Member data pointers have special handling too to compute the fixed + // offset within the object. +- if (isa(D)) { ++ if (isa(D) || isa(D)) { + // These five lines (& possibly the above member function pointer + // handling) might be able to be refactored to use similar code in + // CodeGenModule::getMemberPointerConstant +diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +new file mode 100644 +index 0000000..131ceba +--- /dev/null ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +@@ -0,0 +1,17 @@ ++// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s ++// ++// Test that indirect field decls are handled gracefully. ++// rdar://problem/16348575 ++// ++template class Foo { }; ++ ++struct Bar { ++ int i1; ++ // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E] ++ union { ++ // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int] ++ int i2; ++ }; ++}; ++ ++Foo the_foo; From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 15:10:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6A2BF8; Tue, 30 Sep 2014 15:10:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7676A8F; Tue, 30 Sep 2014 15:10:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UFAf1Q044909; Tue, 30 Sep 2014 15:10:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UFAfQr044906; Tue, 30 Sep 2014 15:10:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301510.s8UFAfQr044906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 15:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272304 - in stable/9/contrib/llvm: patches tools/clang/lib/CodeGen X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:10:42 -0000 Author: emaste Date: Tue Sep 30 15:10:40 2014 New Revision: 272304 URL: http://svnweb.freebsd.org/changeset/base/272304 Log: MFC Clang debug info crash fix 271282: Merge Clang debug info crash fix rev 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 271283: Add clang patch for r271282 Note that r271282 contains only the src change from Clang rev 200797. This patch file includes two follow-on changes to the test case, which do not apply to the copy in the FreeBSD tree. Upstream Clang revisions: 200797: Debug info: fix a crasher when when emitting debug info for not-yet-completed templated types. getTypeSize() needs a complete type. rdar://problem/15931354 200798: Simplify testcase from r200797 some more. 200805: Further simplify r200797 and add an explanatory comment. PR: 193347 Added: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff - copied unchanged from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff (from r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Tue Sep 30 15:10:40 2014 (r272304, copy of r271283, head/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff) @@ -0,0 +1,51 @@ +diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp +index 59ba47c..dddc7e7 100644 +--- a/lib/CodeGen/CGDebugInfo.cpp ++++ b/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { + if (T && (!T.isForwardDecl() || !RD->getDefinition())) + return T; + +- // If this is just a forward declaration, construct an appropriately +- // marked node and just return it. +- if (!RD->getDefinition()) ++ // If this is just a forward or incomplete declaration, construct an ++ // appropriately marked node and just return it. ++ const RecordDecl *D = RD->getDefinition(); ++ if (!D || !D->isCompleteDefinition()) + return getOrCreateRecordFwdDecl(Ty, RDContext); + + uint64_t Size = CGM.getContext().getTypeSize(Ty); +diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp +new file mode 100644 +index 0000000..b2b7073 +--- /dev/null ++++ b/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,27 @@ ++// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s ++// This test is for a crash when emitting debug info for not-yet-completed ++// types. ++// Test that we don't actually emit a forward decl for the offending class: ++// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// rdar://problem/15931354 ++template class Derived; ++ ++template class Base { ++ static Derived *create(); ++}; ++ ++template struct Derived : Base { ++}; ++ ++Base *f; ++ ++// During the instantiation of Derived, Base becomes required to be ++// complete - since the declaration has already been emitted (due to 'f', ++// above), we immediately try to build debug info for Base which then ++// requires the (incomplete definition) of Derived which is problematic. ++// ++// (if 'f' is not present, the point at which Base becomes required to be ++// complete during the instantiation of Derived is a no-op because ++// Base was never emitted so we ignore it and carry on until we ++// wire up the base class of Derived in the debug info later on) ++Derived d; Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:07:06 2014 (r272303) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Tue Sep 30 15:10:40 2014 (r272304) @@ -2233,9 +2233,10 @@ llvm::DICompositeType CGDebugInfo::Creat if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; - // If this is just a forward declaration, construct an appropriately - // marked node and just return it. - if (!RD->getDefinition()) + // If this is just a forward or incomplete declaration, construct an + // appropriately marked node and just return it. + const RecordDecl *D = RD->getDefinition(); + if (!D || !D->isCompleteDefinition()) return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 16:14:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF00F9E3; Tue, 30 Sep 2014 16:14:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEF701EC; Tue, 30 Sep 2014 16:14:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGE5o3077771; Tue, 30 Sep 2014 16:14:05 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGE3wS077754; Tue, 30 Sep 2014 16:14:03 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409301614.s8UGE3wS077754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 30 Sep 2014 16:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272307 - in stable/10/contrib/atf: . atf-c atf-c++ atf-sh doc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:14:06 -0000 Author: rodrigc Date: Tue Sep 30 16:14:02 2014 New Revision: 272307 URL: http://svnweb.freebsd.org/changeset/base/272307 Log: MFC r271875, r272046, r272049, r272056 -> Reference the test case "packs" to fix warnings -> Delete mentions to removed manpages -> Minor fixes to docs Approved by: re (gjb) Modified: stable/10/contrib/atf/FREEBSD-upgrade stable/10/contrib/atf/NEWS stable/10/contrib/atf/atf-c++/atf-c++-api.3 stable/10/contrib/atf/atf-c/atf-c-api.3 stable/10/contrib/atf/atf-c/macros_h_test.c stable/10/contrib/atf/atf-sh/atf-check.1 stable/10/contrib/atf/atf-sh/atf-sh-api.3 stable/10/contrib/atf/atf-sh/atf-sh.1 stable/10/contrib/atf/doc/atf-test-case.4 stable/10/contrib/atf/doc/atf-test-program.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/atf/FREEBSD-upgrade ============================================================================== --- stable/10/contrib/atf/FREEBSD-upgrade Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/FREEBSD-upgrade Tue Sep 30 16:14:02 2014 (r272307) @@ -7,10 +7,9 @@ branches and you are supposed to follow http://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html -The ATF source code is hosted on Google Code as a subcomponent of the -Kyua project: +The ATF source code is hosted on GitHub: - http://code.google.com/p/kyua/downloads/list + https://github.com/jmmv/atf and is imported into the atf vendor branch (see base/vendor/atf/). @@ -42,7 +41,7 @@ the vendor branch as you easily risk com tree. Lastly, with the list of old and new files in this import, make sure -to udpate the reachover Makefiles accordingly. +to update the reachover Makefiles accordingly. Test the build (keeping in mind the WITH_TESTS/WITHOUT_TESTS knobs) and, if all looks good, you are ready to commit all the changes in one go. Modified: stable/10/contrib/atf/NEWS ============================================================================== --- stable/10/contrib/atf/NEWS Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/NEWS Tue Sep 30 16:14:02 2014 (r272307) @@ -14,6 +14,9 @@ the 'tools' directory for your own consu * Removed the deprecated tools. This includes atf-config, atf-report, atf-run and atf-version. +* Issue #8: Fixed atf-c/macros_test:use test failures spotted by the clang + that ships with FreeBSD 11.0-CURRENT. + Changes in version 0.19 *********************** Modified: stable/10/contrib/atf/atf-c++/atf-c++-api.3 ============================================================================== --- stable/10/contrib/atf/atf-c++/atf-c++-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c++/atf-c++-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 15, 2013 +.Dd March 2, 2014 .Dt ATF-C++-API 3 .Os .Sh NAME @@ -330,9 +330,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_fail "reason" Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -368,9 +367,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn expect_timeout "reason" Expects the test case to execute for longer than its timeout. @@ -631,5 +629,4 @@ ATF_INIT_TEST_CASES(tcs) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-c/atf-c-api.3 ============================================================================== --- stable/10/contrib/atf/atf-c/atf-c-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c/atf-c-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 15, 2013 +.Dd March 2, 2014 .Dt ATF-C-API 3 .Os .Sh NAME @@ -409,9 +409,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_fail "reason" "..." Any failure (be it fatal or non-fatal) raised in this mode is recorded. @@ -443,9 +442,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_tc_expect_timeout "reason" "..." Expects the test case to execute for longer than its timeout. @@ -771,5 +769,4 @@ ATF_TP_ADD_TCS(tp) .Ed .Sh SEE ALSO .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-c/macros_h_test.c ============================================================================== --- stable/10/contrib/atf/atf-c/macros_h_test.c Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-c/macros_h_test.c Tue Sep 30 16:14:02 2014 (r272307) @@ -87,6 +87,7 @@ ATF_TC(TEST_MACRO_1); ATF_TC_HEAD(TEST_MACRO_1, tc) { if (tc != NULL) {} } ATF_TC_BODY(TEST_MACRO_1, tc) { if (tc != NULL) {} } atf_tc_t *test_name_1 = &ATF_TC_NAME(TEST_MACRO_1); +atf_tc_pack_t *test_pack_1 = &ATF_TC_PACK_NAME(TEST_MACRO_1); void (*head_1)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_1); void (*body_1)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_1); ATF_TC_WITH_CLEANUP(TEST_MACRO_2); @@ -94,10 +95,12 @@ ATF_TC_HEAD(TEST_MACRO_2, tc) { if (tc ! ATF_TC_BODY(TEST_MACRO_2, tc) { if (tc != NULL) {} } ATF_TC_CLEANUP(TEST_MACRO_2, tc) { if (tc != NULL) {} } atf_tc_t *test_name_2 = &ATF_TC_NAME(TEST_MACRO_2); +atf_tc_pack_t *test_pack_2 = &ATF_TC_PACK_NAME(TEST_MACRO_2); void (*head_2)(atf_tc_t *) = ATF_TC_HEAD_NAME(TEST_MACRO_2); void (*body_2)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_2); void (*cleanup_2)(const atf_tc_t *) = ATF_TC_CLEANUP_NAME(TEST_MACRO_2); ATF_TC_WITHOUT_HEAD(TEST_MACRO_3); ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} } atf_tc_t *test_name_3 = &ATF_TC_NAME(TEST_MACRO_3); +atf_tc_pack_t *test_pack_3 = &ATF_TC_PACK_NAME(TEST_MACRO_3); void (*body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3); Modified: stable/10/contrib/atf/atf-sh/atf-check.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-check.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-check.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 27, 2010 +.Dd March 2, 2014 .Dt ATF-CHECK 1 .Os .Sh NAME @@ -118,15 +118,20 @@ Analyzes standard error (syntax identica Executes .Ar command as a shell command line, executing it with the system shell defined by -.Va ATF_SHELL -in -.Xr atf-config 1 . +.Va ATF_SHELL . You should avoid using this flag if at all possible to prevent shell quoting issues. .El .Sh EXIT STATUS .Nm exits 0 on success, and other (unspecified) value on failure. +.Sh ENVIRONMENT +.Bl -tag -width ATFXSHELLXX -compact +.It Va ATF_SHELL +Path to the system shell to be used when the +.Fl x +is given to run commands. +.El .Sh EXAMPLES .Bd -literal -offset indent # Exit code 0, nothing on stdout/stderr @@ -146,6 +151,3 @@ atf-check -s signal:sigsegv my_program # Combined checks atf-check -o match:foo -o not-match:bar echo foo baz .Ed -.Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf 7 Modified: stable/10/contrib/atf/atf-sh/atf-sh-api.3 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh-api.3 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-sh-api.3 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 13, 2013 +.Dd March 2, 2014 .Dt ATF-SH-API 3 .Os .Sh NAME @@ -224,9 +224,8 @@ If .Va exitcode is not .Sq -1 , -.Xr atf-run 1 -will validate that the exit code of the test case matches the one provided -in this call. +the runtime engine will validate that the exit code of the test case +matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_expect_fail "reason" Any failure raised in this mode is recorded, but such failures do not report @@ -258,9 +257,8 @@ If .Va signo is not .Sq -1 , -.Xr atf-run 1 -will validate that the signal that terminated the test case matches the one -provided in this call. +the runtime engine will validate that the signal that terminated the test +case matches the one provided in this call. Otherwise, the exact value will be ignored. .It Fn atf_expect_timeout "reason" "..." Expects the test case to execute for longer than its timeout. @@ -339,5 +337,4 @@ atf_check -s exit:0 -o match:"^foo$" -e .Sh SEE ALSO .Xr atf-sh 1 , .Xr atf-test-program 1 , -.Xr atf-test-case 4 , -.Xr atf 7 +.Xr atf-test-case 4 Modified: stable/10/contrib/atf/atf-sh/atf-sh.1 ============================================================================== --- stable/10/contrib/atf/atf-sh/atf-sh.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/atf-sh/atf-sh.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2013 +.Dd March 2, 2014 .Dt ATF-SH 1 .Os .Sh NAME @@ -47,10 +47,8 @@ library. .Pp .Nm is not a real interpreter though: it is just a wrapper around -the system-wide shell defined by the -.Sq atf_shell -configuration value in -.Xr atf-config 1 . +the system-wide shell defined by +.Va ATF_SHELL . .Nm executes the interpreter, loads the .Xr atf-sh-api 3 @@ -68,7 +66,10 @@ The following options are available: .It Fl h Shows a short summary of all available options and their purpose. .El +.Sh ENVIRONMENT +.Bl -tag -width ATFXSHELLXX -compact +.It Va ATF_SHELL +Path to the system shell to be used in the generated scripts. +.El .Sh SEE ALSO -.Xr atf-config 1 , -.Xr atf-sh-api 3 , -.Xr atf 7 +.Xr atf-sh-api 3 Modified: stable/10/contrib/atf/doc/atf-test-case.4 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-case.4 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/doc/atf-test-case.4 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 13, 2011 +.Dd March 2, 2014 .Dt ATF-TEST-CASE 4 .Os .Sh NAME @@ -171,9 +171,7 @@ Type: boolean. Optional. .Pp If set to true, specifies that the test case has a cleanup routine that has -to be executed by -.Xr atf-run 1 -during the cleanup phase of the execution. +to be executed by the runtime engine during the cleanup phase of the execution. This property is automatically set by the framework when defining a test case with a cleanup routine, so it should never be set by hand. .It ident @@ -251,8 +249,7 @@ the test case is .Pp If the test case is running as root and this property is .Sq unprivileged , -.Xr atf-run 1 -will automatically drop the privileges if the +the runtime engine will automatically drop the privileges if the .Sq unprivileged-user configuration property is set; otherwise the test case is .Em skipped . @@ -314,7 +311,4 @@ Test cases are always executed with a fi .Sq 0022 . The test case's code is free to change this during execution. .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf-test-program 1 , -.Xr atf-formats 5 , -.Xr atf 7 +.Xr atf-test-program 1 Modified: stable/10/contrib/atf/doc/atf-test-program.1 ============================================================================== --- stable/10/contrib/atf/doc/atf-test-program.1 Tue Sep 30 16:10:49 2014 (r272306) +++ stable/10/contrib/atf/doc/atf-test-program.1 Tue Sep 30 16:14:02 2014 (r272307) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 6, 2011 +.Dd March 2, 2014 .Dt ATF-TEST-PROGRAM 1 .Os .Sh NAME @@ -61,16 +61,17 @@ instead of the test case body; see Note that the test case is .Em executed without isolation , so it can and probably will create and modify files in the current directory. -To execute test cases in a controller manner, refer to -.Xr atf-run 1 , -which is the preferred way to run test cases. +To execute test cases in a controller manner, you need a runtime engine +that understands the ATF interface. +The recommended runtime engine is +.Xr kyua 1 . You should only execute test cases by hand for debugging purposes. .Pp In the second synopsis form, the test program will list all available test cases alongside their meta-data properties in a format that is machine parseable. This list is processed by -.Xr atf-run 1 +.Xr kyua 1 to know how to execute the test cases of a given test program. .Pp The following options are available: @@ -99,5 +100,4 @@ to the value .Ar value . .El .Sh SEE ALSO -.Xr atf-run 1 , -.Xr atf 7 +.Xr kyua 1 From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 16:36:51 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02B65565; Tue, 30 Sep 2014 16:36:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2E46690; Tue, 30 Sep 2014 16:36:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGaoq9087923; Tue, 30 Sep 2014 16:36:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGaolq087922; Tue, 30 Sep 2014 16:36:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409301636.s8UGaolq087922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 30 Sep 2014 16:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272309 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:36:51 -0000 Author: emaste Date: Tue Sep 30 16:36:50 2014 New Revision: 272309 URL: http://svnweb.freebsd.org/changeset/base/272309 Log: MFC r271549 (nwhitehorn): Create /tmp/bsdinstall_etc even if we aren't starting the installer so that dhclient can write resolv.conf when used from the live environment. PR: 176078 Approved by: re Modified: stable/10/release/rc.local Directory Properties: stable/10/ (props changed) Modified: stable/10/release/rc.local ============================================================================== --- stable/10/release/rc.local Tue Sep 30 16:17:12 2014 (r272308) +++ stable/10/release/rc.local Tue Sep 30 16:36:50 2014 (r272309) @@ -10,6 +10,9 @@ MACHINE=`uname -m` +# resolv.conf from DHCP ends up in here, so make sure the directory exists +mkdir /tmp/bsdinstall_etc + kbdcontrol -d >/dev/null 2>&1 if [ $? -eq 0 ]; then # Syscons: use xterm, start interesting things on other VTYs From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 16:55:23 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 507E6393; Tue, 30 Sep 2014 16:55:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B90A92C; Tue, 30 Sep 2014 16:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UGtNbW097610; Tue, 30 Sep 2014 16:55:23 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UGtKFg097599; Tue, 30 Sep 2014 16:55:20 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201409301655.s8UGtKFg097599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 30 Sep 2014 16:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272313 - in stable/10/sys: amd64/conf conf dev/ixl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 16:55:23 -0000 Author: bz Date: Tue Sep 30 16:55:19 2014 New Revision: 272313 URL: http://svnweb.freebsd.org/changeset/base/272313 Log: MFC 271745,271834,271899,271900,271913,272022,272023: Revert changes to shared code of the ixl and ixlv drivers to allow for easier long-term maintainability. Restrict the drivers to building on amd64 for now as it is only tested on that 64bit architecture. Just depend on PCI and neither INET nor INET6; also make sure we can build individual drivers and they do not depend on each other anymore. Reviewed by: gnn, eric.joyner intel.com PR: 193824 Approved by: re (gjb) Modified: stable/10/sys/amd64/conf/GENERIC stable/10/sys/amd64/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/conf/files.amd64 stable/10/sys/dev/ixl/i40e_alloc.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_osdep.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl_txrx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/amd64/conf/GENERIC Tue Sep 30 16:55:19 2014 (r272313) @@ -208,6 +208,8 @@ device de # DEC/Intel DC21x4x (``Tuli device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family device ixgbe # Intel PRO/10GbE PCIE Ethernet Family +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') Modified: stable/10/sys/amd64/conf/NOTES ============================================================================== --- stable/10/sys/amd64/conf/NOTES Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/amd64/conf/NOTES Tue Sep 30 16:55:19 2014 (r272313) @@ -305,6 +305,8 @@ options DRM_DEBUG # Include debug print # Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters # Requires the iwn firmware module +# ixl: Intel XL710 40Gbe PCIE Ethernet +# ixlv: Intel XL710 40Gbe VF PCIE Ethernet # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlxen: Mellanox ConnectX HCA Ethernet # mthca: Mellanox HCA InfiniBand @@ -323,6 +325,8 @@ options ED_SIC device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet device mthca # Mellanox HCA InfiniBand Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/conf/NOTES Tue Sep 30 16:55:19 2014 (r272313) @@ -2090,8 +2090,6 @@ device em # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet -device ixl # Intel XL710 40Gbe PCIE Ethernet -device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/conf/files.amd64 Tue Sep 30 16:55:19 2014 (r272313) @@ -203,6 +203,26 @@ dev/ipmi/ipmi_smbios.c optional ipmi dev/ipmi/ipmi_ssif.c optional ipmi smbus dev/ipmi/ipmi_pci.c optional ipmi pci dev/ipmi/ipmi_linux.c optional ipmi compat_linux32 +dev/ixl/if_ixl.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/if_ixlv.c optional ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixlvc.c optional ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_txrx.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_osdep.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_lan_hmc.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_hmc.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_common.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_nvm.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/i40e_adminq.c optional ixl pci | ixlv pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa Modified: stable/10/sys/dev/ixl/i40e_alloc.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_alloc.h Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_alloc.h Tue Sep 30 16:55:19 2014 (r272313) @@ -51,15 +51,16 @@ enum i40e_memory_type { }; /* prototype for functions used for dynamic memory allocation */ -enum i40e_status_code i40e_allocate_dma(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, - bus_size_t size, u32 alignment); -enum i40e_status_code i40e_free_dma(struct i40e_hw *hw, + enum i40e_memory_type type, + u64 size, u32 alignment); +enum i40e_status_code i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem); -enum i40e_status_code i40e_allocate_virt(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size); -enum i40e_status_code i40e_free_virt(struct i40e_hw *hw, +enum i40e_status_code i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem); #endif /* _I40E_ALLOC_H_ */ Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_common.c Tue Sep 30 16:55:19 2014 (r272313) @@ -4375,8 +4375,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)(uintptr_t)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); @@ -4458,8 +4458,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)(uintptr_t)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); Modified: stable/10/sys/dev/ixl/i40e_osdep.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_osdep.c Tue Sep 30 16:55:19 2014 (r272313) @@ -49,22 +49,22 @@ i40e_dmamap_cb(void *arg, bus_dma_segmen } i40e_status -i40e_allocate_virt(struct i40e_hw *hw, struct i40e_virt_mem *m, u32 size) +i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size) { - m->va = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); - return(m->va == NULL); + mem->va = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); + return(mem->va == NULL); } i40e_status -i40e_free_virt(struct i40e_hw *hw, struct i40e_virt_mem *m) +i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem) { - free(m->va, M_DEVBUF); + free(mem->va, M_DEVBUF); return(0); } i40e_status -i40e_allocate_dma(struct i40e_hw *hw, struct i40e_dma_mem *dma, - bus_size_t size, u32 alignment) +i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem, + enum i40e_memory_type type __unused, u64 size, u32 alignment) { device_t dev = ((struct i40e_osdep *)hw->back)->dev; int err; @@ -81,25 +81,25 @@ i40e_allocate_dma(struct i40e_hw *hw, st BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ NULL, /* lockfuncarg */ - &dma->tag); + &mem->tag); if (err != 0) { device_printf(dev, "i40e_allocate_dma: bus_dma_tag_create failed, " "error %u\n", err); goto fail_0; } - err = bus_dmamem_alloc(dma->tag, (void **)&dma->va, - BUS_DMA_NOWAIT | BUS_DMA_ZERO, &dma->map); + err = bus_dmamem_alloc(mem->tag, (void **)&mem->va, + BUS_DMA_NOWAIT | BUS_DMA_ZERO, &mem->map); if (err != 0) { device_printf(dev, "i40e_allocate_dma: bus_dmamem_alloc failed, " "error %u\n", err); goto fail_1; } - err = bus_dmamap_load(dma->tag, dma->map, dma->va, + err = bus_dmamap_load(mem->tag, mem->map, mem->va, size, i40e_dmamap_cb, - &dma->pa, + &mem->pa, BUS_DMA_NOWAIT); if (err != 0) { device_printf(dev, @@ -107,28 +107,28 @@ i40e_allocate_dma(struct i40e_hw *hw, st "error %u\n", err); goto fail_2; } - dma->size = size; - bus_dmamap_sync(dma->tag, dma->map, + mem->size = size; + bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); return (0); fail_2: - bus_dmamem_free(dma->tag, dma->va, dma->map); + bus_dmamem_free(mem->tag, mem->va, mem->map); fail_1: - bus_dma_tag_destroy(dma->tag); + bus_dma_tag_destroy(mem->tag); fail_0: - dma->map = NULL; - dma->tag = NULL; + mem->map = NULL; + mem->tag = NULL; return (err); } i40e_status -i40e_free_dma(struct i40e_hw *hw, struct i40e_dma_mem *dma) +i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem) { - bus_dmamap_sync(dma->tag, dma->map, + bus_dmamap_sync(mem->tag, mem->map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(dma->tag, dma->map); - bus_dmamem_free(dma->tag, dma->va, dma->map); - bus_dma_tag_destroy(dma->tag); + bus_dmamap_unload(mem->tag, mem->map); + bus_dmamem_free(mem->tag, mem->va, mem->map); + bus_dma_tag_destroy(mem->tag); return (0); } Modified: stable/10/sys/dev/ixl/i40e_osdep.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.h Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/i40e_osdep.h Tue Sep 30 16:55:19 2014 (r272313) @@ -170,9 +170,6 @@ struct i40e_hw; /* forward decl */ u16 i40e_read_pci_cfg(struct i40e_hw *, u32); void i40e_write_pci_cfg(struct i40e_hw *, u32, u16); -#define i40e_allocate_dma_mem(h, m, unused, s, a) i40e_allocate_dma(h, m, s, a) -#define i40e_free_dma_mem(h, m) i40e_free_dma(h, m) - #define i40e_debug(h, m, s, ...) i40e_debug_d(h, m, s, ##__VA_ARGS__) extern void i40e_debug_d(void *hw, u32 mask, char *fmt_str, ...); @@ -180,8 +177,6 @@ struct i40e_virt_mem { void *va; u32 size; }; -#define i40e_allocate_virt_mem(h, m, s) i40e_allocate_virt(h, m, s) -#define i40e_free_virt_mem(h, m) i40e_free_virt(h, m) /* ** This hardware supports either 16 or 32 byte rx descriptors Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/if_ixl.c Tue Sep 30 16:55:19 2014 (r272313) @@ -921,8 +921,10 @@ ixl_ioctl(struct ifnet * ifp, u_long com ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixl_init(pf); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); break; @@ -2591,7 +2593,7 @@ ixl_free_vsi(struct ixl_vsi *vsi) IXL_TX_LOCK(txr); ixl_free_que_tx(que); if (txr->base) - i40e_free_dma(&pf->hw, &txr->dma); + i40e_free_dma_mem(&pf->hw, &txr->dma); IXL_TX_UNLOCK(txr); IXL_TX_LOCK_DESTROY(txr); @@ -2600,7 +2602,7 @@ ixl_free_vsi(struct ixl_vsi *vsi) IXL_RX_LOCK(rxr); ixl_free_que_rx(que); if (rxr->base) - i40e_free_dma(&pf->hw, &rxr->dma); + i40e_free_dma_mem(&pf->hw, &rxr->dma); IXL_RX_UNLOCK(rxr); IXL_RX_LOCK_DESTROY(rxr); @@ -2668,8 +2670,8 @@ ixl_setup_stations(struct ixl_pf *pf) tsize = roundup2((que->num_desc * sizeof(struct i40e_tx_desc)) + sizeof(u32), DBA_ALIGN); - if (i40e_allocate_dma(&pf->hw, - &txr->dma, tsize, DBA_ALIGN)) { + if (i40e_allocate_dma_mem(&pf->hw, + &txr->dma, i40e_mem_reserved, tsize, DBA_ALIGN)) { device_printf(dev, "Unable to allocate TX Descriptor memory\n"); error = ENOMEM; @@ -2708,8 +2710,8 @@ ixl_setup_stations(struct ixl_pf *pf) device_get_nameunit(dev), que->me); mtx_init(&rxr->mtx, rxr->mtx_name, NULL, MTX_DEF); - if (i40e_allocate_dma(&pf->hw, - &rxr->dma, rsize, 4096)) { + if (i40e_allocate_dma_mem(&pf->hw, + &rxr->dma, i40e_mem_reserved, rsize, 4096)) { device_printf(dev, "Unable to allocate RX Descriptor memory\n"); error = ENOMEM; @@ -2735,9 +2737,9 @@ fail: rxr = &que->rxr; txr = &que->txr; if (rxr->base) - i40e_free_dma(&pf->hw, &rxr->dma); + i40e_free_dma_mem(&pf->hw, &rxr->dma); if (txr->base) - i40e_free_dma(&pf->hw, &txr->dma); + i40e_free_dma_mem(&pf->hw, &txr->dma); } early: Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/if_ixlv.c Tue Sep 30 16:55:19 2014 (r272313) @@ -755,8 +755,10 @@ ixlv_ioctl(struct ifnet *ifp, u_long com ifp->if_flags |= IFF_UP; if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) ixlv_init(sc); +#ifdef INET if (!(ifp->if_flags & IFF_NOARP)) arp_ifinit(ifp, ifa); +#endif } else error = ether_ioctl(ifp, command, data); break; @@ -1457,8 +1459,8 @@ ixlv_setup_queues(struct ixlv_sc *sc) tsize = roundup2((que->num_desc * sizeof(struct i40e_tx_desc)) + sizeof(u32), DBA_ALIGN); - if (i40e_allocate_dma(&sc->hw, - &txr->dma, tsize, DBA_ALIGN)) { + if (i40e_allocate_dma_mem(&sc->hw, + &txr->dma, i40e_mem_reserved, tsize, DBA_ALIGN)) { device_printf(dev, "Unable to allocate TX Descriptor memory\n"); error = ENOMEM; @@ -1497,8 +1499,8 @@ ixlv_setup_queues(struct ixlv_sc *sc) device_get_nameunit(dev), que->me); mtx_init(&rxr->mtx, rxr->mtx_name, NULL, MTX_DEF); - if (i40e_allocate_dma(&sc->hw, - &rxr->dma, rsize, 4096)) { //JFV - should this be DBA? + if (i40e_allocate_dma_mem(&sc->hw, + &rxr->dma, i40e_mem_reserved, rsize, 4096)) { //JFV - should this be DBA? device_printf(dev, "Unable to allocate RX Descriptor memory\n"); error = ENOMEM; @@ -1525,9 +1527,9 @@ fail: rxr = &que->rxr; txr = &que->txr; if (rxr->base) - i40e_free_dma(&sc->hw, &rxr->dma); + i40e_free_dma_mem(&sc->hw, &rxr->dma); if (txr->base) - i40e_free_dma(&sc->hw, &txr->dma); + i40e_free_dma_mem(&sc->hw, &txr->dma); } early: @@ -2346,7 +2348,7 @@ ixlv_free_queues(struct ixl_vsi *vsi) IXL_TX_LOCK(txr); ixl_free_que_tx(que); if (txr->base) - i40e_free_dma(&sc->hw, &txr->dma); + i40e_free_dma_mem(&sc->hw, &txr->dma); IXL_TX_UNLOCK(txr); IXL_TX_LOCK_DESTROY(txr); @@ -2355,7 +2357,7 @@ ixlv_free_queues(struct ixl_vsi *vsi) IXL_RX_LOCK(rxr); ixl_free_que_rx(que); if (rxr->base) - i40e_free_dma(&sc->hw, &rxr->dma); + i40e_free_dma_mem(&sc->hw, &rxr->dma); IXL_RX_UNLOCK(rxr); IXL_RX_LOCK_DESTROY(rxr); Modified: stable/10/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/10/sys/dev/ixl/ixl_txrx.c Tue Sep 30 16:53:08 2014 (r272312) +++ stable/10/sys/dev/ixl/ixl_txrx.c Tue Sep 30 16:55:19 2014 (r272313) @@ -1085,10 +1085,12 @@ ixl_allocate_rx_data(struct ixl_queue *q int ixl_init_rx_ring(struct ixl_queue *que) { + struct rx_ring *rxr = &que->rxr; +#if defined(INET6) || defined(INET) struct ixl_vsi *vsi = que->vsi; struct ifnet *ifp = vsi->ifp; - struct rx_ring *rxr = &que->rxr; struct lro_ctrl *lro = &rxr->lro; +#endif struct ixl_rx_buf *buf; bus_dma_segment_t pseg[1], hseg[1]; int rsize, nsegs, error = 0; @@ -1187,6 +1189,7 @@ skip_head: rxr->bytes = 0; rxr->discard = FALSE; +#if defined(INET6) || defined(INET) /* ** Now set up the LRO interface: */ @@ -1200,6 +1203,7 @@ skip_head: rxr->lro_enabled = TRUE; lro->ifp = vsi->ifp; } +#endif bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -1274,6 +1278,8 @@ ixl_free_que_rx(struct ixl_queue *que) static __inline void ixl_rx_input(struct rx_ring *rxr, struct ifnet *ifp, struct mbuf *m, u8 ptype) { + +#if defined(INET6) || defined(INET) /* * ATM LRO is only for IPv4/TCP packets and TCP checksum of the packet * should be computed by hardware. Also it should not have VLAN tag in @@ -1293,6 +1299,7 @@ ixl_rx_input(struct rx_ring *rxr, struct if (tcp_lro_rx(&rxr->lro, m, 0) == 0) return; } +#endif IXL_RX_UNLOCK(rxr); (*ifp->if_input)(ifp, m); IXL_RX_LOCK(rxr); @@ -1350,8 +1357,10 @@ ixl_rxeof(struct ixl_queue *que, int cou struct ixl_vsi *vsi = que->vsi; struct rx_ring *rxr = &que->rxr; struct ifnet *ifp = vsi->ifp; +#if defined(INET6) || defined(INET) struct lro_ctrl *lro = &rxr->lro; struct lro_entry *queued; +#endif int i, nextp, processed = 0; union i40e_rx_desc *cur; struct ixl_rx_buf *rbuf, *nbuf; @@ -1559,6 +1568,7 @@ next_desc: rxr->next_check = i; +#if defined(INET6) || defined(INET) /* * Flush any outstanding LRO work */ @@ -1566,6 +1576,7 @@ next_desc: SLIST_REMOVE_HEAD(&lro->lro_active, next); tcp_lro_flush(lro, queued); } +#endif IXL_RX_UNLOCK(rxr); return (FALSE); From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 17:55:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EEC77DB; Tue, 30 Sep 2014 17:55:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57141FA; Tue, 30 Sep 2014 17:55:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UHt1qg026470; Tue, 30 Sep 2014 17:55:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UHswqh026385; Tue, 30 Sep 2014 17:54:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409301754.s8UHswqh026385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 17:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272322 - in stable/10: . contrib/hyperv contrib/hyperv/tools etc/devd etc/mtree libexec libexec/hyperv share/mk sys/conf sys/dev/hyperv/include sys/dev/hyperv/utilities sys/modules/hyp... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 17:55:01 -0000 Author: delphij Date: Tue Sep 30 17:54:57 2014 New Revision: 272322 URL: http://svnweb.freebsd.org/changeset/base/272322 Log: MFC r271493,271688-271689,271696,271854,272139-272143: Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD. While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary. The HyperV utilities are only built for i386 and amd64 targets. Approved by: re (gjb) Added: stable/10/contrib/hyperv/ - copied from r271493, head/contrib/hyperv/ stable/10/etc/devd/hyperv.conf - copied, changed from r271696, head/etc/devd/hyperv.conf stable/10/libexec/hyperv/ - copied from r271493, head/libexec/hyperv/ stable/10/sys/dev/hyperv/utilities/hv_kvp.c - copied unchanged from r271493, head/sys/dev/hyperv/utilities/hv_kvp.c stable/10/sys/dev/hyperv/utilities/unicode.h - copied unchanged from r271493, head/sys/dev/hyperv/utilities/unicode.h stable/10/tools/build/options/WITHOUT_HYPERV - copied unchanged from r271493, head/tools/build/options/WITHOUT_HYPERV stable/10/tools/build/options/WITH_HYPERV - copied unchanged from r271493, head/tools/build/options/WITH_HYPERV stable/10/usr.sbin/hyperv/ - copied from r271493, head/usr.sbin/hyperv/ Modified: stable/10/ObsoleteFiles.inc stable/10/contrib/hyperv/tools/hv_kvp_daemon.c stable/10/etc/devd/Makefile stable/10/etc/mtree/BSD.usr.dist stable/10/etc/mtree/BSD.var.dist stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/utilities/hv_kvp.h stable/10/sys/dev/hyperv/utilities/hv_util.c stable/10/sys/modules/hyperv/utilities/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile.amd64 stable/10/usr.sbin/Makefile.i386 Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/ObsoleteFiles.inc Tue Sep 30 17:54:57 2014 (r272322) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20140917: hv_kvpd rc.d script removed in favor of devd configuration +OLD_FILES+=etc/rc.d/hv_kvpd # 20140814: libopie version bump OLD_LIBS+=usr/lib/libopie.so.7 OLD_LIBS+=usr/lib32/libopie.so.7 Modified: stable/10/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- head/contrib/hyperv/tools/hv_kvp_daemon.c Sat Sep 13 02:15:31 2014 (r271493) +++ stable/10/contrib/hyperv/tools/hv_kvp_daemon.c Tue Sep 30 17:54:57 2014 (r272322) @@ -284,12 +284,10 @@ kvp_file_init(void) int i; int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; - if (access("/var/db/hyperv/pool", F_OK)) { - if (mkdir("/var/db/hyperv/pool", - S_IRUSR | S_IWUSR | S_IROTH)) { - KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); - exit(EXIT_FAILURE); - } + if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 && + errno != EISDIR) { + KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); + exit(EXIT_FAILURE); } for (i = 0; i < HV_KVP_POOL_COUNT; i++) @@ -307,11 +305,13 @@ kvp_file_init(void) filep = fopen(fname, "r"); if (!filep) { + close(fd); return (1); } record = malloc(alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } @@ -336,6 +336,7 @@ kvp_file_init(void) record = realloc(record, alloc_unit * num_blocks); if (record == NULL) { + close(fd); fclose(filep); return (1); } @@ -600,8 +601,7 @@ kvp_mac_to_if_name(char *mac) struct ifaddrs *head_ifaddrs_ptr; struct sockaddr_dl *sdl; int status; - size_t i; - char *buf_ptr; + char *buf_ptr, *p; status = getifaddrs(&ifaddrs_ptr); @@ -611,18 +611,17 @@ kvp_mac_to_if_name(char *mac) sdl = (struct sockaddr_dl *)(uintptr_t)ifaddrs_ptr->ifa_addr; if (sdl->sdl_type == IFT_ETHER) { buf_ptr = strdup(ether_ntoa((struct ether_addr *)(LLADDR(sdl)))); - for (i = 0; i < strlen(buf_ptr); i++) - { - buf_ptr[i] = toupper(buf_ptr[i]); - } - - if (strncmp(buf_ptr, mac, strlen(mac)) == 0) { - /* Caller will free the memory */ - if_name = strdup(ifaddrs_ptr->ifa_name); - free(buf_ptr); - break; - }else if (buf_ptr != NULL) { - free(buf_ptr); + if (buf_ptr != NULL) { + for (p = buf_ptr; *p != '\0'; p++) + *p = toupper(*p); + + if (strncmp(buf_ptr, mac, strlen(mac)) == 0) { + /* Caller will free the memory */ + if_name = strdup(ifaddrs_ptr->ifa_name); + free(buf_ptr); + break; + } else + free(buf_ptr); } } } while ((ifaddrs_ptr = ifaddrs_ptr->ifa_next) != NULL); @@ -1249,7 +1248,7 @@ kvp_op_enumerate(struct hv_kvp_msg *op_m case IntegrationServicesVersion: strcpy(key_name, "IntegrationServicesVersion"); - strcpy(key_value, lic_version); + strlcpy(key_value, lic_version, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); break; case NetworkAddressIPv4: @@ -1265,32 +1264,32 @@ kvp_op_enumerate(struct hv_kvp_msg *op_m break; case OSBuildNumber: - strcpy(key_value, os_build); + strlcpy(key_value, os_build, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSBuildNumber"); break; case OSName: - strcpy(key_value, os_name); + strlcpy(key_value, os_name, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSName"); break; case OSMajorVersion: - strcpy(key_value, os_major); + strlcpy(key_value, os_major, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSMajorVersion"); break; case OSMinorVersion: - strcpy(key_value, os_minor); + strlcpy(key_value, os_minor, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSMinorVersion"); break; case OSVersion: - strcpy(key_value, os_build); + strlcpy(key_value, os_build, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "OSVersion"); break; case ProcessorArchitecture: - strcpy(key_value, processor_arch); + strlcpy(key_value, processor_arch, HV_KVP_EXCHANGE_MAX_VALUE_SIZE); strcpy(key_name, "ProcessorArchitecture"); break; Modified: stable/10/etc/devd/Makefile ============================================================================== --- stable/10/etc/devd/Makefile Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/devd/Makefile Tue Sep 30 17:54:57 2014 (r272322) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + FILES= uath.conf usb.conf .if ${MACHINE} == "powerpc" @@ -10,6 +12,10 @@ FILES+= apple.conf FILES+= asus.conf .endif +.if ${MK_HYPERV} != "no" +FILES+= hyperv.conf +.endif + NO_OBJ= FILESDIR= /etc/devd FILESMODE= 644 Copied and modified: stable/10/etc/devd/hyperv.conf (from r271696, head/etc/devd/hyperv.conf) ============================================================================== --- head/etc/devd/hyperv.conf Wed Sep 17 02:32:22 2014 (r271696, copy source) +++ stable/10/etc/devd/hyperv.conf Tue Sep 30 17:54:57 2014 (r272322) @@ -6,7 +6,7 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "CREATE"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "/usr/sbin/hv_kvp_daemon"; }; @@ -14,6 +14,6 @@ notify 10 { match "system" "DEVFS"; match "subsystem" "CDEV"; match "type" "DESTROY"; - match "cdev" "/dev/hv_kvp_dev"; + match "cdev" "hv_kvp_dev"; action "pkill -x hv_kvp_daemon"; }; Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/mtree/BSD.usr.dist Tue Sep 30 17:54:57 2014 (r272322) @@ -108,6 +108,8 @@ .. bsdinstall .. + hyperv + .. lpr ru .. Modified: stable/10/etc/mtree/BSD.var.dist ============================================================================== --- stable/10/etc/mtree/BSD.var.dist Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/etc/mtree/BSD.var.dist Tue Sep 30 17:54:57 2014 (r272322) @@ -42,6 +42,8 @@ .. freebsd-update mode=0700 .. + hyperv mode=0700 + .. ipf mode=0700 .. pkg Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/libexec/Makefile Tue Sep 30 17:54:57 2014 (r272322) @@ -10,6 +10,7 @@ SUBDIR= ${_atf} \ fingerd \ ftpd \ getty \ + ${_hyperv} \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ @@ -42,6 +43,10 @@ _atrun= atrun _comsat= comsat .endif +.if ${MK_HYPERV} != "no" +_hyperv= hyperv +.endif + .if ${MK_NIS} != "no" _mknetid= mknetid _ypxfr= ypxfr Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/share/mk/bsd.own.mk Tue Sep 30 17:54:57 2014 (r272322) @@ -438,6 +438,12 @@ __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT .endif +# HyperV is only available for x86 and amd64. +.if ${__T} == "amd64" || ${__T} == "i386" +__DEFAULT_YES_OPTIONS+=HYPERV +.else +__DEFAULT_NO_OPTIONS+=HYPERV +.endif .undef __T # Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/conf/files.amd64 Tue Sep 30 17:54:57 2014 (r272322) @@ -254,6 +254,7 @@ dev/hyperv/netvsc/hv_netvsc_drv_freebsd. dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_kvp.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hv_channel.c optional hyperv dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/conf/files.i386 Tue Sep 30 17:54:57 2014 (r272322) @@ -227,6 +227,7 @@ dev/hyperv/netvsc/hv_netvsc_drv_freebsd. dev/hyperv/netvsc/hv_rndis_filter.c optional hyperv dev/hyperv/stordisengage/hv_ata_pci_disengage.c optional hyperv dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c optional hyperv +dev/hyperv/utilities/hv_kvp.c optional hyperv dev/hyperv/utilities/hv_util.c optional hyperv dev/hyperv/vmbus/hv_channel.c optional hyperv dev/hyperv/vmbus/hv_channel_mgmt.c optional hyperv Modified: stable/10/sys/dev/hyperv/include/hyperv.h ============================================================================== --- stable/10/sys/dev/hyperv/include/hyperv.h Tue Sep 30 17:41:16 2014 (r272321) +++ stable/10/sys/dev/hyperv/include/hyperv.h Tue Sep 30 17:54:57 2014 (r272322) @@ -795,5 +795,34 @@ hv_get_phys_addr(void *virt) return (ret); } + +/** + * KVP related structures + * + */ +typedef struct hv_vmbus_service { + hv_guid guid; /* Hyper-V GUID */ + char *name; /* name of service */ + boolean_t enabled; /* service enabled */ + hv_work_queue *work_queue; /* background work queue */ + + /* + * function to initialize service + */ + int (*init)(struct hv_vmbus_service *); + + /* + * function to process Hyper-V messages + */ + void (*callback)(void *); +} hv_vmbus_service; + +extern uint8_t* receive_buffer[]; +extern hv_vmbus_service service_table[]; + +void hv_kvp_callback(void *context); +int hv_kvp_init(hv_vmbus_service *serv); +void hv_kvp_deinit(void); + #endif /* __HYPERV_H__ */ Copied: stable/10/sys/dev/hyperv/utilities/hv_kvp.c (from r271493, head/sys/dev/hyperv/utilities/hv_kvp.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/hyperv/utilities/hv_kvp.c Tue Sep 30 17:54:57 2014 (r272322, copy of r271493, head/sys/dev/hyperv/utilities/hv_kvp.c) @@ -0,0 +1,1001 @@ +/*- + * Copyright (c) 2014 Microsoft Corp. + * 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 ``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 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. + */ + +/* + * Author: Sainath Varanasi. + * Date: 4/2012 + * Email: bsdic@microsoft.com + */ + +#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 "unicode.h" +#include "hv_kvp.h" + +/* hv_kvp defines */ +#define BUFFERSIZE sizeof(struct hv_kvp_msg) +#define KVP_SUCCESS 0 +#define KVP_ERROR 1 +#define kvp_hdr hdr.kvp_hdr + +/* hv_kvp debug control */ +static int hv_kvp_log = 0; +SYSCTL_INT(_dev, OID_AUTO, hv_kvp_log, CTLFLAG_RW, &hv_kvp_log, 0, + "hv_kvp log"); + +#define hv_kvp_log_error(...) do { \ + if (hv_kvp_log > 0) \ + log(LOG_ERR, "hv_kvp: " __VA_ARGS__); \ +} while (0) + +#define hv_kvp_log_info(...) do { \ + if (hv_kvp_log > 1) \ + log(LOG_INFO, "hv_kvp: " __VA_ARGS__); \ +} while (0) + +/* character device prototypes */ +static d_open_t hv_kvp_dev_open; +static d_close_t hv_kvp_dev_close; +static d_read_t hv_kvp_dev_daemon_read; +static d_write_t hv_kvp_dev_daemon_write; +static d_poll_t hv_kvp_dev_daemon_poll; + +/* hv_kvp prototypes */ +static int hv_kvp_req_in_progress(void); +static void hv_kvp_transaction_init(uint32_t, hv_vmbus_channel *, uint64_t, uint8_t *); +static void hv_kvp_send_msg_to_daemon(void); +static void hv_kvp_process_request(void *context); + +/* hv_kvp character device structure */ +static struct cdevsw hv_kvp_cdevsw = +{ + .d_version = D_VERSION, + .d_open = hv_kvp_dev_open, + .d_close = hv_kvp_dev_close, + .d_read = hv_kvp_dev_daemon_read, + .d_write = hv_kvp_dev_daemon_write, + .d_poll = hv_kvp_dev_daemon_poll, + .d_name = "hv_kvp_dev", +}; +static struct cdev *hv_kvp_dev; +static struct hv_kvp_msg *hv_kvp_dev_buf; +struct proc *daemon_task; + +/* + * Global state to track and synchronize multiple + * KVP transaction requests from the host. + */ +static struct { + + /* Pre-allocated work item for queue */ + hv_work_item work_item; + + /* Unless specified the pending mutex should be + * used to alter the values of the following paramters: + * 1. req_in_progress + * 2. req_timed_out + * 3. pending_reqs. + */ + struct mtx pending_mutex; + + /* To track if transaction is active or not */ + boolean_t req_in_progress; + /* Tracks if daemon did not reply back in time */ + boolean_t req_timed_out; + /* Tracks if daemon is serving a request currently */ + boolean_t daemon_busy; + /* Count of KVP requests from Hyper-V. */ + uint64_t pending_reqs; + + + /* Length of host message */ + uint32_t host_msg_len; + + /* Pointer to channel */ + hv_vmbus_channel *channelp; + + /* Host message id */ + uint64_t host_msg_id; + + /* Current kvp message from the host */ + struct hv_kvp_msg *host_kvp_msg; + + /* Current kvp message for daemon */ + struct hv_kvp_msg daemon_kvp_msg; + + /* Rcv buffer for communicating with the host*/ + uint8_t *rcv_buf; + + /* Device semaphore to control communication */ + struct sema dev_sema; + + /* Indicates if daemon registered with driver */ + boolean_t register_done; + + /* Character device status */ + boolean_t dev_accessed; +} kvp_globals; + +/* global vars */ +MALLOC_DECLARE(M_HV_KVP_DEV_BUF); +MALLOC_DEFINE(M_HV_KVP_DEV_BUF, "hv_kvp_dev buffer", "buffer for hv_kvp_dev module"); + +/* + * hv_kvp low level functions + */ + +/* + * Check if kvp transaction is in progres + */ +static int +hv_kvp_req_in_progress(void) +{ + + return (kvp_globals.req_in_progress); +} + + +/* + * This routine is called whenever a message is received from the host + */ +static void +hv_kvp_transaction_init(uint32_t rcv_len, hv_vmbus_channel *rcv_channel, + uint64_t request_id, uint8_t *rcv_buf) +{ + + /* Store all the relevant message details in the global structure */ + /* Do not need to use mutex for req_in_progress here */ + kvp_globals.req_in_progress = true; + kvp_globals.host_msg_len = rcv_len; + kvp_globals.channelp = rcv_channel; + kvp_globals.host_msg_id = request_id; + kvp_globals.rcv_buf = rcv_buf; + kvp_globals.host_kvp_msg = (struct hv_kvp_msg *)&rcv_buf[ + sizeof(struct hv_vmbus_pipe_hdr) + + sizeof(struct hv_vmbus_icmsg_hdr)]; +} + + +/* + * hv_kvp - version neogtiation function + */ +static void +hv_kvp_negotiate_version(struct hv_vmbus_icmsg_hdr *icmsghdrp, + struct hv_vmbus_icmsg_negotiate *negop, + uint8_t *buf) +{ + int icframe_vercnt; + int icmsg_vercnt; + + icmsghdrp->icmsgsize = 0x10; + + negop = (struct hv_vmbus_icmsg_negotiate *)&buf[ + sizeof(struct hv_vmbus_pipe_hdr) + + sizeof(struct hv_vmbus_icmsg_hdr)]; + icframe_vercnt = negop->icframe_vercnt; + icmsg_vercnt = negop->icmsg_vercnt; + + /* + * Select the framework version number we will support + */ + if ((icframe_vercnt >= 2) && (negop->icversion_data[1].major == 3)) { + icframe_vercnt = 3; + if (icmsg_vercnt >= 2) + icmsg_vercnt = 4; + else + icmsg_vercnt = 3; + } else { + icframe_vercnt = 1; + icmsg_vercnt = 1; + } + + negop->icframe_vercnt = 1; + negop->icmsg_vercnt = 1; + negop->icversion_data[0].major = icframe_vercnt; + negop->icversion_data[0].minor = 0; + negop->icversion_data[1].major = icmsg_vercnt; + negop->icversion_data[1].minor = 0; +} + + +/* + * Convert ip related info in umsg from utf8 to utf16 and store in hmsg + */ +static int +hv_kvp_convert_utf8_ipinfo_to_utf16(struct hv_kvp_msg *umsg, + struct hv_kvp_ip_msg *host_ip_msg) +{ + int err_ip, err_subnet, err_gway, err_dns, err_adap; + int UNUSED_FLAG = 1; + + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.ip_addr, + strlen((char *)umsg->body.kvp_ip_val.ip_addr), + UNUSED_FLAG, + &err_ip); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.sub_net, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.sub_net, + strlen((char *)umsg->body.kvp_ip_val.sub_net), + UNUSED_FLAG, + &err_subnet); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.gate_way, + MAX_GATEWAY_SIZE, + (char *)umsg->body.kvp_ip_val.gate_way, + strlen((char *)umsg->body.kvp_ip_val.gate_way), + UNUSED_FLAG, + &err_gway); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.dns_addr, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.dns_addr, + strlen((char *)umsg->body.kvp_ip_val.dns_addr), + UNUSED_FLAG, + &err_dns); + utf8_to_utf16((uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_IP_ADDR_SIZE, + (char *)umsg->body.kvp_ip_val.adapter_id, + strlen((char *)umsg->body.kvp_ip_val.adapter_id), + UNUSED_FLAG, + &err_adap); + + host_ip_msg->kvp_ip_val.dhcp_enabled = umsg->body.kvp_ip_val.dhcp_enabled; + host_ip_msg->kvp_ip_val.addr_family = umsg->body.kvp_ip_val.addr_family; + + return (err_ip | err_subnet | err_gway | err_dns | err_adap); +} + + +/* + * Convert ip related info in hmsg from utf16 to utf8 and store in umsg + */ +static int +hv_kvp_convert_utf16_ipinfo_to_utf8(struct hv_kvp_ip_msg *host_ip_msg, + struct hv_kvp_msg *umsg) +{ + int err_ip, err_subnet, err_gway, err_dns, err_adap; + int UNUSED_FLAG = 1; + int guid_index; + struct hv_device *hv_dev; /* GUID Data Structure */ + hn_softc_t *sc; /* hn softc structure */ + char if_name[4]; + unsigned char guid_instance[40]; + char *guid_data = NULL; + char buf[39]; + + struct guid_extract { + char a1[2]; + char a2[2]; + char a3[2]; + char a4[2]; + char b1[2]; + char b2[2]; + char c1[2]; + char c2[2]; + char d[4]; + char e[12]; + }; + + struct guid_extract *id; + device_t *devs; + int devcnt; + + /* IP Address */ + utf16_to_utf8((char *)umsg->body.kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.ip_addr, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_ip); + + /* Adapter ID : GUID */ + utf16_to_utf8((char *)umsg->body.kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + UNUSED_FLAG, + &err_adap); + + if (devclass_get_devices(devclass_find("hn"), &devs, &devcnt) == 0) { + for (devcnt = devcnt - 1; devcnt >= 0; devcnt--) { + sc = device_get_softc(devs[devcnt]); + + /* Trying to find GUID of Network Device */ + hv_dev = sc->hn_dev_obj; + + for (guid_index = 0; guid_index < 16; guid_index++) { + sprintf(&guid_instance[guid_index * 2], "%02x", + hv_dev->device_id.data[guid_index]); + } + + guid_data = (char *)guid_instance; + id = (struct guid_extract *)guid_data; + snprintf(buf, sizeof(buf), "{%.2s%.2s%.2s%.2s-%.2s%.2s-%.2s%.2s-%.4s-%s}", + id->a4, id->a3, id->a2, id->a1, + id->b2, id->b1, id->c2, id->c1, id->d, id->e); + guid_data = NULL; + sprintf(if_name, "%s%d", "hn", device_get_unit(devs[devcnt])); + + if (strncmp(buf, (char *)umsg->body.kvp_ip_val.adapter_id, 39) == 0) { + strcpy((char *)umsg->body.kvp_ip_val.adapter_id, if_name); + break; + } + } + free(devs, M_TEMP); + } + + /* Address Family , DHCP , SUBNET, Gateway, DNS */ + umsg->kvp_hdr.operation = host_ip_msg->operation; + umsg->body.kvp_ip_val.addr_family = host_ip_msg->kvp_ip_val.addr_family; + umsg->body.kvp_ip_val.dhcp_enabled = host_ip_msg->kvp_ip_val.dhcp_enabled; + utf16_to_utf8((char *)umsg->body.kvp_ip_val.sub_net, MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.sub_net, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_subnet); + + utf16_to_utf8((char *)umsg->body.kvp_ip_val.gate_way, MAX_GATEWAY_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.gate_way, + MAX_GATEWAY_SIZE, + UNUSED_FLAG, + &err_gway); + + utf16_to_utf8((char *)umsg->body.kvp_ip_val.dns_addr, MAX_IP_ADDR_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.dns_addr, + MAX_IP_ADDR_SIZE, + UNUSED_FLAG, + &err_dns); + + return (err_ip | err_subnet | err_gway | err_dns | err_adap); +} + + +/* + * Prepare a user kvp msg based on host kvp msg (utf16 to utf8) + * Ensure utf16_utf8 takes care of the additional string terminating char!! + */ +static void +hv_kvp_convert_hostmsg_to_usermsg(void) +{ + int utf_err = 0; + uint32_t value_type; + struct hv_kvp_ip_msg *host_ip_msg = (struct hv_kvp_ip_msg *) + kvp_globals.host_kvp_msg; + + struct hv_kvp_msg *hmsg = kvp_globals.host_kvp_msg; + struct hv_kvp_msg *umsg = &kvp_globals.daemon_kvp_msg; + + memset(umsg, 0, sizeof(struct hv_kvp_msg)); + + umsg->kvp_hdr.operation = hmsg->kvp_hdr.operation; + umsg->kvp_hdr.pool = hmsg->kvp_hdr.pool; + + switch (umsg->kvp_hdr.operation) { + case HV_KVP_OP_SET_IP_INFO: + hv_kvp_convert_utf16_ipinfo_to_utf8(host_ip_msg, umsg); + break; + + case HV_KVP_OP_GET_IP_INFO: + utf16_to_utf8((char *)umsg->body.kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, + (uint16_t *)host_ip_msg->kvp_ip_val.adapter_id, + MAX_ADAPTER_ID_SIZE, 1, &utf_err); + + umsg->body.kvp_ip_val.addr_family = + host_ip_msg->kvp_ip_val.addr_family; + break; + + case HV_KVP_OP_SET: + value_type = hmsg->body.kvp_set.data.value_type; + + switch (value_type) { + case HV_REG_SZ: + umsg->body.kvp_set.data.value_size = + utf16_to_utf8( + (char *)umsg->body.kvp_set.data.msg_value.value, + HV_KVP_EXCHANGE_MAX_VALUE_SIZE - 1, + (uint16_t *)hmsg->body.kvp_set.data.msg_value.value, + hmsg->body.kvp_set.data.value_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_set.data.value_size = + umsg->body.kvp_set.data.value_size / 2; + break; + + case HV_REG_U32: + umsg->body.kvp_set.data.value_size = + sprintf(umsg->body.kvp_set.data.msg_value.value, "%d", + hmsg->body.kvp_set.data.msg_value.value_u32) + 1; + break; + + case HV_REG_U64: + umsg->body.kvp_set.data.value_size = + sprintf(umsg->body.kvp_set.data.msg_value.value, "%llu", + (unsigned long long) + hmsg->body.kvp_set.data.msg_value.value_u64) + 1; + break; + } + + umsg->body.kvp_set.data.key_size = + utf16_to_utf8( + umsg->body.kvp_set.data.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_set.data.key, + hmsg->body.kvp_set.data.key_size, + 1, &utf_err); + + /* utf8 encoding */ + umsg->body.kvp_set.data.key_size = + umsg->body.kvp_set.data.key_size / 2; + break; + + case HV_KVP_OP_GET: + umsg->body.kvp_get.data.key_size = + utf16_to_utf8(umsg->body.kvp_get.data.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_get.data.key, + hmsg->body.kvp_get.data.key_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_get.data.key_size = + umsg->body.kvp_get.data.key_size / 2; + break; + + case HV_KVP_OP_DELETE: + umsg->body.kvp_delete.key_size = + utf16_to_utf8(umsg->body.kvp_delete.key, + HV_KVP_EXCHANGE_MAX_KEY_SIZE - 1, + (uint16_t *)hmsg->body.kvp_delete.key, + hmsg->body.kvp_delete.key_size, + 1, &utf_err); + /* utf8 encoding */ + umsg->body.kvp_delete.key_size = + umsg->body.kvp_delete.key_size / 2; + break; + + case HV_KVP_OP_ENUMERATE: + umsg->body.kvp_enum_data.index = + hmsg->body.kvp_enum_data.index; + break; + + default: + hv_kvp_log_info("%s: daemon_kvp_msg: Invalid operation : %d\n", + __func__, umsg->kvp_hdr.operation); + } +} + + +/* + * Prepare a host kvp msg based on user kvp msg (utf8 to utf16) + */ +static int +hv_kvp_convert_usermsg_to_hostmsg(void) +{ + int hkey_len = 0, hvalue_len = 0, utf_err = 0; + struct hv_kvp_exchg_msg_value *host_exchg_data; + char *key_name, *value; + + struct hv_kvp_msg *umsg = &kvp_globals.daemon_kvp_msg; + struct hv_kvp_msg *hmsg = kvp_globals.host_kvp_msg; + struct hv_kvp_ip_msg *host_ip_msg = (struct hv_kvp_ip_msg *)hmsg; + + switch (hmsg->kvp_hdr.operation) { + case HV_KVP_OP_GET_IP_INFO: + return (hv_kvp_convert_utf8_ipinfo_to_utf16(umsg, host_ip_msg)); + + case HV_KVP_OP_SET_IP_INFO: + case HV_KVP_OP_SET: + case HV_KVP_OP_DELETE: + return (KVP_SUCCESS); + + case HV_KVP_OP_ENUMERATE: + host_exchg_data = &hmsg->body.kvp_enum_data.data; + key_name = umsg->body.kvp_enum_data.data.key; + hkey_len = utf8_to_utf16((uint16_t *)host_exchg_data->key, + ((HV_KVP_EXCHANGE_MAX_KEY_SIZE / 2) - 2), + key_name, strlen(key_name), + 1, &utf_err); + /* utf16 encoding */ + host_exchg_data->key_size = 2 * (hkey_len + 1); + value = umsg->body.kvp_enum_data.data.msg_value.value; + hvalue_len = utf8_to_utf16( + (uint16_t *)host_exchg_data->msg_value.value, + ((HV_KVP_EXCHANGE_MAX_VALUE_SIZE / 2) - 2), + value, strlen(value), + 1, &utf_err); + host_exchg_data->value_size = 2 * (hvalue_len + 1); + host_exchg_data->value_type = HV_REG_SZ; + + if ((hkey_len < 0) || (hvalue_len < 0)) + return (HV_KVP_E_FAIL); + + return (KVP_SUCCESS); + + case HV_KVP_OP_GET: + host_exchg_data = &hmsg->body.kvp_get.data; + value = umsg->body.kvp_get.data.msg_value.value; + hvalue_len = utf8_to_utf16( + (uint16_t *)host_exchg_data->msg_value.value, + ((HV_KVP_EXCHANGE_MAX_VALUE_SIZE / 2) - 2), + value, strlen(value), + 1, &utf_err); + /* Convert value size to uft16 */ + host_exchg_data->value_size = 2 * (hvalue_len + 1); + /* Use values by string */ + host_exchg_data->value_type = HV_REG_SZ; + + if ((hkey_len < 0) || (hvalue_len < 0)) + return (HV_KVP_E_FAIL); + + return (KVP_SUCCESS); + + default: + return (HV_KVP_E_FAIL); + } +} + + +/* + * Send the response back to the host. + */ +static void +hv_kvp_respond_host(int error) +{ + struct hv_vmbus_icmsg_hdr *hv_icmsg_hdrp; + + hv_icmsg_hdrp = (struct hv_vmbus_icmsg_hdr *) + &kvp_globals.rcv_buf[sizeof(struct hv_vmbus_pipe_hdr)]; + + if (error) + error = HV_KVP_E_FAIL; + + hv_icmsg_hdrp->status = error; + hv_icmsg_hdrp->icflags = HV_ICMSGHDRFLAG_TRANSACTION | HV_ICMSGHDRFLAG_RESPONSE; + + error = hv_vmbus_channel_send_packet(kvp_globals.channelp, + kvp_globals.rcv_buf, + kvp_globals.host_msg_len, kvp_globals.host_msg_id, + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, 0); + + if (error) + hv_kvp_log_info("%s: hv_kvp_respond_host: sendpacket error:%d\n", + __func__, error); +} + + +/* + * This is the main kvp kernel process that interacts with both user daemon + * and the host + */ +static void +hv_kvp_send_msg_to_daemon(void) +{ + /* Prepare kvp_msg to be sent to user */ + hv_kvp_convert_hostmsg_to_usermsg(); + + /* Send the msg to user via function deamon_read - setting sema */ + sema_post(&kvp_globals.dev_sema); +} + + +/* + * Function to read the kvp request buffer from host + * and interact with daemon + */ +static void +hv_kvp_process_request(void *context) +{ + uint8_t *kvp_buf; + hv_vmbus_channel *channel = context; + uint32_t recvlen = 0; + uint64_t requestid; + struct hv_vmbus_icmsg_hdr *icmsghdrp; + int ret = 0; + uint64_t pending_cnt = 1; + + hv_kvp_log_info("%s: entering hv_kvp_process_request\n", __func__); + kvp_buf = receive_buffer[HV_KVP]; + ret = hv_vmbus_channel_recv_packet(channel, kvp_buf, 2 * PAGE_SIZE, + &recvlen, &requestid); + + /* + * We start counting only after the daemon registers + * and therefore there could be requests pending in + * the VMBus that are not reflected in pending_cnt. + * Therefore we continue reading as long as either of + * the below conditions is true. + */ + + while ((pending_cnt>0) || ((ret == 0) && (recvlen > 0))) { + + if ((ret == 0) && (recvlen>0)) { + + icmsghdrp = (struct hv_vmbus_icmsg_hdr *) + &kvp_buf[sizeof(struct hv_vmbus_pipe_hdr)]; + + hv_kvp_transaction_init(recvlen, channel, requestid, kvp_buf); + if (icmsghdrp->icmsgtype == HV_ICMSGTYPE_NEGOTIATE) { + hv_kvp_negotiate_version(icmsghdrp, NULL, kvp_buf); + hv_kvp_respond_host(ret); + + /* + * It is ok to not acquire the mutex before setting + * req_in_progress here because negotiation is the + * first thing that happens and hence there is no + * chance of a race condition. + */ + + kvp_globals.req_in_progress = false; + hv_kvp_log_info("%s :version negotiated\n", __func__); + + } else { + if (!kvp_globals.daemon_busy) { + + hv_kvp_log_info("%s: issuing qury to daemon\n", __func__); + mtx_lock(&kvp_globals.pending_mutex); + kvp_globals.req_timed_out = false; + kvp_globals.daemon_busy = true; + mtx_unlock(&kvp_globals.pending_mutex); + + hv_kvp_send_msg_to_daemon(); + hv_kvp_log_info("%s: waiting for daemon\n", __func__); + } + + /* Wait 5 seconds for daemon to respond back */ + tsleep(&kvp_globals, 0, "kvpworkitem", 5 * hz); + hv_kvp_log_info("%s: came out of wait\n", __func__); + } + } + + mtx_lock(&kvp_globals.pending_mutex); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 20:32:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79007601; Tue, 30 Sep 2014 20:32:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5978C9B2; Tue, 30 Sep 2014 20:32:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UKWSS6002617; Tue, 30 Sep 2014 20:32:28 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UKWRS4002613; Tue, 30 Sep 2014 20:32:27 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201409302032.s8UKWRS4002613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 30 Sep 2014 20:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272327 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 20:32:28 -0000 Author: brooks Date: Tue Sep 30 20:32:27 2014 New Revision: 272327 URL: http://svnweb.freebsd.org/changeset/base/272327 Log: MFC the altera_atse.4. This was intended to have been merged along with r256752. This commit contains the altera_atse.4 portions of r256752, r257656, and r270268. Approved by: re (gjb) Sponsored by: DARPA/AFRL Added: stable/10/share/man/man4/altera_atse.4 - copied unchanged from r272311, head/share/man/man4/altera_atse.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Tue Sep 30 20:29:58 2014 (r272326) +++ stable/10/share/man/man4/Makefile Tue Sep 30 20:32:27 2014 (r272327) @@ -36,6 +36,7 @@ MAN= aac.4 \ alc.4 \ ale.4 \ alpm.4 \ + altera_atse.4 \ altera_avgen.4 \ altera_jtag_uart.4 \ altera_sdcard.4 \ Copied: stable/10/share/man/man4/altera_atse.4 (from r272311, head/share/man/man4/altera_atse.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/altera_atse.4 Tue Sep 30 20:32:27 2014 (r272327, copy of r272311, head/share/man/man4/altera_atse.4) @@ -0,0 +1,119 @@ +.\"- +.\" Copyright (c) 2013-2014 SRI International +.\" All rights reserved. +.\" +.\" This software was developed by SRI International and the University of +.\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) +.\" ("CTSRD"), as part of the DARPA CRASH research programme. +.\" +.\" 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 May 21, 2014 +.Dt ALTERA_ATSE 4 +.Os +.Sh NAME +.Nm atse +.Nd driver for the Altera Triple-Speed Ethernet MegaCore +.Sh SYNOPSIS +.Cd "device atse" +.Cd "options ATSE_CFI_HACK" +.Pp +In +.Pa /boot/device.hints : +.Cd hint.atse.0.at="nexus0" +.Cd hint.atse.0.maddr=0x7f007000 +.Cd hint.atse.0.msize=0x540 +.Cd hint.atse.0.rc_irq=1 +.Cd hint.atse.0.rx_maddr=0x7f007500 +.Cd hint.atse.0.rx_msize=0x8 +.Cd hint.atse.0.rxc_maddr=0x7f007520 +.Cd hint.atse.0.rxc_msize=0x20 +.Cd hint.atse.0.tx_irq=2 +.Cd hint.atse.0.tx_maddr=0x7f007400 +.Cd hint.atse.0.tx_msize=0x8 +.Cd hint.atse.0.txc_maddr=0x7f007420 +.Cd hint.atse.0.txc_msize=0x20 +.Cd hint.e1000phy.0.at="miibus0" +.Cd hint.e1000phy.0.phyno=0 +.Sh DESCRIPTION +The +.Nm +device driver provides support for the Altera Triple-Speed Ethernet +MegaCore. +.Sh HARDWARE +The current version of the +.Nm +driver supports the Ethernet MegaCore as described in version 11.1 of +Altera's documentation when the device is configured with internal FIFOs. +.Sh MAC SELECTION +The default MAC address for each +.Nm +interface is derived from a value stored in +.Xr cfi 4 +flash. +The value is managed by the +.Xr atsectl 8 +utility. +.Pp +Only a single MAC address may be stored in flash. +If the address begins with the Altera prefix 00:07:ed and ends in 00 then +up to 16 addresses will be derived from it by adding the unit number of +the interface to the stored address. +For other prefixes, the address will be assigned to atse0 and random +addresses will be used for other interfaces. +If the stored address is invalid, for example all zero's, multicast, or the +default address shipped on all DE4 boards (00:07:ed:ff:ed:15) then a random +address is generated when the device is attached. +.Sh SEE ALSO +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ifconfig 8 +.Rs +.%T Triple-Speed Ethernet MegaCore Function User Guide +.%D November 2011 +.%I Altera Corporation +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +The +.Nm +device driver and this manual page were +developed by SRI International and the University of Cambridge Computer +Laboratory under DARPA/AFRL contract +.Pq FA8750-10-C-0237 +.Pq Do CTSRD Dc , +as part of the DARPA CRASH research programme. +This device driver was written by +.An Bjoern A. Zeeb . +.Sh BUGS +The +.Nm +driver only supports a single configuration of the MegaCore as installed +on the Terasic Technologies Altera DE4 Development and Education Board. +.Pp +Only gigabit Ethernet speeds are currently supported. From owner-svn-src-stable@FreeBSD.ORG Tue Sep 30 21:03:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76192863; Tue, 30 Sep 2014 21:03:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47658D80; Tue, 30 Sep 2014 21:03:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8UL3Ifc017265; Tue, 30 Sep 2014 21:03:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8UL3HCW017263; Tue, 30 Sep 2014 21:03:17 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409302103.s8UL3HCW017263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 30 Sep 2014 21:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272332 - in stable/10/sys/cddl: boot/zfs contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 21:03:18 -0000 Author: delphij Date: Tue Sep 30 21:03:17 2014 New Revision: 272332 URL: http://svnweb.freebsd.org/changeset/base/272332 Log: MFC r271526: MFV r271510: Enforce 4K as smallest indirect block size (previously the smallest indirect block size was 1K but that was never used). This makes some space estimates more accurate and uses less memory for some data structures. Illumos issue: 5141 zfs minimum indirect block size is 4K Approved by: re (gjb) Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/boot/zfs/zfsimpl.h ============================================================================== --- stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 30 20:57:25 2014 (r272331) +++ stable/10/sys/cddl/boot/zfs/zfsimpl.h Tue Sep 30 21:03:17 2014 (r272332) @@ -840,7 +840,7 @@ struct uberblock { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Tue Sep 30 20:57:25 2014 (r272331) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h Tue Sep 30 21:03:17 2014 (r272332) @@ -56,7 +56,7 @@ extern "C" { * Fixed constants. */ #define DNODE_SHIFT 9 /* 512 bytes */ -#define DN_MIN_INDBLKSHIFT 10 /* 1k */ +#define DN_MIN_INDBLKSHIFT 12 /* 4k */ #define DN_MAX_INDBLKSHIFT 14 /* 16k */ #define DNODE_BLOCK_SHIFT 14 /* 16k */ #define DNODE_CORE_SIZE 64 /* 64 bytes for dnode sans blkptrs */ From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 10:26:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF354B1; Wed, 1 Oct 2014 10:26:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 089FCC93; Wed, 1 Oct 2014 10:26:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91AQhZY002577; Wed, 1 Oct 2014 10:26:43 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91AQh7l002576; Wed, 1 Oct 2014 10:26:43 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011026.s91AQh7l002576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272351 - stable/10/lib/libpam/modules/pam_login_access X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:26:44 -0000 Author: des Date: Wed Oct 1 10:26:43 2014 New Revision: 272351 URL: https://svnweb.freebsd.org/changeset/base/272351 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Approved by: re (kib) Modified: stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 08:26:51 2014 (r272350) +++ stable/10/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:26:43 2014 (r272351) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 10:29:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDBCB65F; Wed, 1 Oct 2014 10:29:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D954CCB9; Wed, 1 Oct 2014 10:29:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91ATEN3003029; Wed, 1 Oct 2014 10:29:14 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91ATENJ003028; Wed, 1 Oct 2014 10:29:14 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011029.s91ATENJ003028@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272352 - stable/9/lib/libpam/modules/pam_login_access X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:29:15 -0000 Author: des Date: Wed Oct 1 10:29:14 2014 New Revision: 272352 URL: https://svnweb.freebsd.org/changeset/base/272352 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:26:43 2014 (r272351) +++ stable/9/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:29:14 2014 (r272352) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 10:35:52 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBF098A9; Wed, 1 Oct 2014 10:35:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C79E2D86; Wed, 1 Oct 2014 10:35:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91AZqQK007566; Wed, 1 Oct 2014 10:35:52 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91AZqEJ007565; Wed, 1 Oct 2014 10:35:52 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410011035.s91AZqEJ007565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 10:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272353 - stable/8/lib/libpam/modules/pam_login_access X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 10:35:53 -0000 Author: des Date: Wed Oct 1 10:35:52 2014 New Revision: 272353 URL: https://svnweb.freebsd.org/changeset/base/272353 Log: MFH (r272280, r272281, r272348): allow use with null user and rhost PR: 83099 193927 Modified: stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Directory Properties: stable/8/lib/libpam/ (props changed) Modified: stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c ============================================================================== --- stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:29:14 2014 (r272352) +++ stable/8/lib/libpam/modules/pam_login_access/pam_login_access.c Wed Oct 1 10:35:52 2014 (r272353) @@ -85,17 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int if (login_access(user, rhost) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in from %s", - user, rhost); + (const char *)user, (const char *)rhost); } else if (tty != NULL && *(const char *)tty != '\0') { PAM_LOG("Checking login.access for user %s on tty %s", (const char *)user, (const char *)tty); if (login_access(user, tty) != 0) return (PAM_SUCCESS); PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", - user, tty); + (const char *)user, (const char *)tty); } else { - PAM_VERBOSE_ERROR("PAM_RHOST or PAM_TTY required"); - return (PAM_AUTHINFO_UNAVAIL); + PAM_LOG("Checking login.access for user %s", + (const char *)user); + if (login_access(user, "***unknown***") != 0) + return (PAM_SUCCESS); + PAM_VERBOSE_ERROR("%s is not allowed to log in", + (const char *)user); } return (PAM_AUTH_ERR); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 16:18:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A75E3F7; Wed, 1 Oct 2014 16:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66C8FF08; Wed, 1 Oct 2014 16:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91GIfx3071252; Wed, 1 Oct 2014 16:18:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91GIfR5071251; Wed, 1 Oct 2014 16:18:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410011618.s91GIfR5071251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 1 Oct 2014 16:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272372 - stable/10/bin/rm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:18:41 -0000 Author: gjb Date: Wed Oct 1 16:18:40 2014 New Revision: 272372 URL: https://svnweb.freebsd.org/changeset/base/272372 Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. When building a kernel with a high -j value on a high core count machine, during the cleanobj phase we can wind up doing multiple rm -rf at the same time for modules that have subdirectories. This exposed this race (sometimes) as fts_read can return an error if the directory is removed by another rm -rf. Since the intent of the -f flag was to ignore errors, even if this was a bug in fts_read, we should ignore the error like we've been instructed to do. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/bin/rm/rm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/rm/rm.c ============================================================================== --- stable/10/bin/rm/rm.c Wed Oct 1 16:16:01 2014 (r272371) +++ stable/10/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) @@ -335,7 +335,7 @@ err: warn("%s", p->fts_path); eval = 1; } - if (errno) + if (!fflag && errno) err(1, "fts_read"); fts_close(fts); } From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 16:19:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8D9530; Wed, 1 Oct 2014 16:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A3B6F13; Wed, 1 Oct 2014 16:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91GJ0T9071338; Wed, 1 Oct 2014 16:19:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91GJ0W4071337; Wed, 1 Oct 2014 16:19:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410011619.s91GJ0W4071337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 1 Oct 2014 16:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272373 - stable/9/bin/rm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 16:19:00 -0000 Author: gjb Date: Wed Oct 1 16:18:59 2014 New Revision: 272373 URL: https://svnweb.freebsd.org/changeset/base/272373 Log: MFC r268376 (imp): rm -rf can fail sometimes with an error from fts_read. Make it honor fflag to ignore fts_read errors, but stop deleting from that directory because no further progress can be made. When building a kernel with a high -j value on a high core count machine, during the cleanobj phase we can wind up doing multiple rm -rf at the same time for modules that have subdirectories. This exposed this race (sometimes) as fts_read can return an error if the directory is removed by another rm -rf. Since the intent of the -f flag was to ignore errors, even if this was a bug in fts_read, we should ignore the error like we've been instructed to do. Sponsored by: The FreeBSD Foundation Modified: stable/9/bin/rm/rm.c Directory Properties: stable/9/bin/rm/ (props changed) Modified: stable/9/bin/rm/rm.c ============================================================================== --- stable/9/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) +++ stable/9/bin/rm/rm.c Wed Oct 1 16:18:59 2014 (r272373) @@ -329,7 +329,7 @@ err: warn("%s", p->fts_path); eval = 1; } - if (errno) + if (!fflag && errno) err(1, "fts_read"); fts_close(fts); } From owner-svn-src-stable@FreeBSD.ORG Wed Oct 1 23:15:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B32FBA9; Wed, 1 Oct 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C6BCBF; Wed, 1 Oct 2014 23:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s91NFOKn074883; Wed, 1 Oct 2014 23:15:24 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s91NFOPY074882; Wed, 1 Oct 2014 23:15:24 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201410012315.s91NFOPY074882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Wed, 1 Oct 2014 23:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272388 - stable/10/sys/amd64/vmm/io X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 23:15:24 -0000 Author: grehan Date: Wed Oct 1 23:15:23 2014 New Revision: 272388 URL: https://svnweb.freebsd.org/changeset/base/272388 Log: MFC r272193 Allow the PIC's IMR register to be read before ICW initialisation. As of git submit e179f6914152eca9, the Linux kernel does a simple probe of the PIC by writing a pattern to the IMR and then reading it back, prior to the init sequence of ICW words. The bhyve PIC emulation wasn't allowing the IMR to be read until the ICW sequence was complete. This limitation isn't required so relax the test. With this change, Linux kernels 3.15-rc2 and later won't hang on boot when calibrating the local APIC. Approved by: re (gjb) Modified: stable/10/sys/amd64/vmm/io/vatpic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/vmm/io/vatpic.c ============================================================================== --- stable/10/sys/amd64/vmm/io/vatpic.c Wed Oct 1 22:18:07 2014 (r272387) +++ stable/10/sys/amd64/vmm/io/vatpic.c Wed Oct 1 23:15:23 2014 (r272388) @@ -600,20 +600,19 @@ vatpic_write(struct vatpic *vatpic, stru VATPIC_LOCK(vatpic); if (port & ICU_IMR_OFFSET) { - if (atpic->ready) { + switch (atpic->icw_num) { + case 2: + error = vatpic_icw2(vatpic, atpic, val); + break; + case 3: + error = vatpic_icw3(vatpic, atpic, val); + break; + case 4: + error = vatpic_icw4(vatpic, atpic, val); + break; + default: error = vatpic_ocw1(vatpic, atpic, val); - } else { - switch (atpic->icw_num) { - case 2: - error = vatpic_icw2(vatpic, atpic, val); - break; - case 3: - error = vatpic_icw3(vatpic, atpic, val); - break; - case 4: - error = vatpic_icw4(vatpic, atpic, val); - break; - } + break; } } else { if (val & (1 << 4)) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 04:56:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 592819DC; Thu, 2 Oct 2014 04:56:11 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2D61D9; Thu, 2 Oct 2014 04:56:10 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 777BC1A2354; Thu, 2 Oct 2014 14:56:08 +1000 (EST) Date: Thu, 2 Oct 2014 14:56:05 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Glen Barber Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <201410011618.s91GIfR5071251@svn.freebsd.org> Message-ID: <20141002141656.Y1807@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=dMCfxopb c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=5KYu8npawQ8VuZliGPcA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 04:56:11 -0000 On Wed, 1 Oct 2014, Glen Barber wrote: > Log: > MFC r268376 (imp): > > rm -rf can fail sometimes with an error from fts_read. Make it > honor fflag to ignore fts_read errors, but stop deleting from > that directory because no further progress can be made. I asked for this to be backed out in -current. It is not suitable for MFC. > When building a kernel with a high -j value on a high core count > machine, during the cleanobj phase we can wind up doing multiple > rm -rf at the same time for modules that have subdirectories. This > exposed this race (sometimes) as fts_read can return an error if > the directory is removed by another rm -rf. Since the intent of > the -f flag was to ignore errors, even if this was a bug in > fts_read, we should ignore the error like we've been instructed > to do. That may be the intent for sloppy uses, but the meaning of the -f flag is to suppress confirmation and diagnostic messages and modification of the exit status in the case of nonexistent files. (Note that POSIX's OPTIONS section is buggy and only says that this applies to nonexistent operands. Only the main part of the specification says that -f applies recursively.) It is not for breaking reporting of all detected errors. > ============================================================================== > --- stable/10/bin/rm/rm.c Wed Oct 1 16:16:01 2014 (r272371) > +++ stable/10/bin/rm/rm.c Wed Oct 1 16:18:40 2014 (r272372) > @@ -335,7 +335,7 @@ err: > warn("%s", p->fts_path); > eval = 1; > } > - if (errno) > + if (!fflag && errno) > err(1, "fts_read"); > fts_close(fts); > } All other checks of errno in limit the effect of fflag to ENOENT errors. Changing the above to to the same might give conformance to POSIX, depending on whether fts_read() sets errno to ENOENT only when there is an ENOENT error relevant to rm. But I don't like that either. It is only correct to ignore the error for races between multiple rm's where the the interference is limited enough to allow one of the rm's to complete the removal, and moreover, all of the rm's that fail early wait to synchronize with one that actually completes. But the races are caused in the first place by lack of synchronization. See old mail for more details. Bruce From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 06:16:34 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D6E58A0; Thu, 2 Oct 2014 06:16:33 +0000 (UTC) Date: Thu, 2 Oct 2014 02:16:28 -0400 From: Glen Barber To: Bruce Evans Subject: Re: svn commit: r272372 - stable/10/bin/rm Message-ID: <20141002061628.GO1275@hub.FreeBSD.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tbUdrdPJASQ8VKrP" Content-Disposition: inline In-Reply-To: <20141002141656.Y1807@besplex.bde.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:16:34 -0000 --tbUdrdPJASQ8VKrP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > On Wed, 1 Oct 2014, Glen Barber wrote: >=20 > >Log: > > MFC r268376 (imp): > > > > rm -rf can fail sometimes with an error from fts_read. Make it > > honor fflag to ignore fts_read errors, but stop deleting from > > that directory because no further progress can be made. >=20 > I asked for this to be backed out in -current. It is not suitable for MF= C. >=20 It fixes an immediate issue that prevents high-concurrent make(1) jobs =66rom stomping over each other. If there is a more suitable solution, it needs to be introduced in head/ first, pending MFC for 10.1-RELEASE. In the meantime, we lack any alternate fix, and this resolves the immediate issue at hand. > See old mail for more details. >=20 I saw the original email. I do not see a proposed patch. Glen --tbUdrdPJASQ8VKrP Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJULO28AAoJEAMUWKVHj+KTRb4QAJPHU3MvHC6fZCb3dO18+IW7 aAk8flpEKs7uXmpxNebzJhP5pu3zSk+6H/gkmAtTVPJkc+WQZ9RtlmdZrx/LaZrl 26AreERBOzVQy5E4m7hYkmTwuGRHo9+JRu2inPLgEQoAaeLDv82D/su4dCTzs7vV clVwcLLJi7mZ3aHYKSL8TW+v3jK4gwXMLqfEQMQbyB2Vd185iD0N3G6w+iKKf4Zh jfMGclmvVnCZg7Cq7dM9yL5JgyDuojRRj+AvD5SbA8XcFfyBO+XmAXsMJ7dYpGC/ IySwKKo4HzQn7Bkdlt2nNMOk0WrPX4i3KovCTr/Nj5BTsD9mtMH/5qq199v29DKn NpMmZUXcLf5L7tYLhn1sH4bELZ3TlNICUrcLIUYEkqjln1f50w0rnznFUu80uVek Y9WSDqHCekD/gPSsa/32RZLj99+/aDWDG9jHMmn0IdSRePHny9X/ha6JNOlzjG9T fDAQm9Q/LiiuF7RSiNhAZGC/e4FY9PHdP6GPSHR7xhIqwy4CEuSi3zPewpEMRVNg eRhOiBZtSnXYiYDIaqOMwR/Q7byV/Y+aBp8P7YXo1qBP5oISPm1fKkvBoBYKp9K4 9R9la3v9VHDP5gGSNKlhxqjcwN1C0dYgaS638a+0HFYtuYLwYA2pX4Uwc0krBg9s sFeXRKjjR+feNxL03g5S =6Xl2 -----END PGP SIGNATURE----- --tbUdrdPJASQ8VKrP-- From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 06:25:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01BB1D9A; Thu, 2 Oct 2014 06:25:17 +0000 (UTC) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0494BCB; Thu, 2 Oct 2014 06:25:16 +0000 (UTC) Received: by mail-ig0-f172.google.com with SMTP id r2so1413795igi.5 for ; Wed, 01 Oct 2014 23:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Me6UIyK4/wTNux/jKnXhkavPJRnR6KM7gT4BTWTdTBk=; b=GV5o0ROjiR+qN3US+rtvxp/mWIhTpC8XAA7eO2dXm8UNaIUmFQQdRP6eYe+7ybVSIE 25nfYOLyN4j3ZmTmxJc/2hmrvK38PN7lgz+Ge7vTMKcipz2s7iAfAAzsdw40WpYlWSZh nHJHb5u9CwpNJTDYVVKp2Tsi3Xyy6eQ2Q2I3Hi8E2bZv1FudEl/0CoZrKugtIzeRNLTY jrI1uJGFYWM5cmX63rAL21uVkGI1Rzp+IDznStKjGON6r/mXs8MmfQegpbqN/Px5oTs3 bbtXqrOYIlXNf4efwcUi7Cyjcp0ffx/6kczlXupMr5LGqfl/RyhO7pTBFHEVSpCoBDdQ ttog== MIME-Version: 1.0 X-Received: by 10.50.57.110 with SMTP id h14mr1681081igq.26.1412231115811; Wed, 01 Oct 2014 23:25:15 -0700 (PDT) Received: by 10.50.227.42 with HTTP; Wed, 1 Oct 2014 23:25:15 -0700 (PDT) In-Reply-To: <20141002061628.GO1275@hub.FreeBSD.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> Date: Wed, 1 Oct 2014 23:25:15 -0700 Message-ID: Subject: Re: svn commit: r272372 - stable/10/bin/rm From: NGie Cooper To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org, Bruce Evans X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 06:25:17 -0000 On Wed, Oct 1, 2014 at 11:16 PM, Glen Barber wrote: > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: >> On Wed, 1 Oct 2014, Glen Barber wrote: >> >> >Log: >> > MFC r268376 (imp): >> > >> > rm -rf can fail sometimes with an error from fts_read. Make it >> > honor fflag to ignore fts_read errors, but stop deleting from >> > that directory because no further progress can be made. >> >> I asked for this to be backed out in -current. It is not suitable for MFC. >> > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > from stomping over each other. The real problem is noted in this bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192490 ; the SUBDIR_PARALLEL logic is executing multiple instances of the clean/cleandir .PHONY targets. I agree with bde@ that this commit is papering over a bigger problem, but it's annoying enough and causes enough false positives that I understand why gjb@ MFCed the commit imp@ did in head. Thank you.. From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 10:46:16 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 937D3DE; Thu, 2 Oct 2014 10:46:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AEC1CDE; Thu, 2 Oct 2014 10:46:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92AkGDn002518; Thu, 2 Oct 2014 10:46:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92AkD8D002493; Thu, 2 Oct 2014 10:46:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021046.s92AkD8D002493@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 10:46:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272407 - in stable/10: contrib/ofed/libibverbs/examples contrib/ofed/libmlx4/src sys/conf sys/modules/mlx4 sys/modules/mlxen sys/ofed/drivers/infiniband/hw/mlx4 sys/ofed/drivers/net/ml... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 10:46:16 -0000 Author: hselasky Date: Thu Oct 2 10:46:12 2014 New Revision: 272407 URL: https://svnweb.freebsd.org/changeset/base/272407 Log: MFC r272027: Hardware driver update from Mellanox Technologies, including: - improved performance - better stability - new features - bugfixes Supported HCAs: - ConnectX-2 - ConnectX-3 - ConnectX-3 Pro NOTE: - TSO feature needs r271946, which is not yet merged. Sponsored by: Mellanox Technologies Approved by: re, glebius Added: stable/10/sys/ofed/drivers/net/mlx4/mlx4_stats.h - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/mlx4_stats.h stable/10/sys/ofed/drivers/net/mlx4/utils.c - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/utils.c stable/10/sys/ofed/drivers/net/mlx4/utils.h - copied unchanged from r272027, head/sys/ofed/drivers/net/mlx4/utils.h Modified: stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c stable/10/contrib/ofed/libibverbs/examples/device_list.c stable/10/contrib/ofed/libibverbs/examples/devinfo.c stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h stable/10/sys/conf/files stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/alloc.c stable/10/sys/ofed/drivers/net/mlx4/catas.c stable/10/sys/ofed/drivers/net/mlx4/cmd.c stable/10/sys/ofed/drivers/net/mlx4/cq.c stable/10/sys/ofed/drivers/net/mlx4/en_cq.c stable/10/sys/ofed/drivers/net/mlx4/en_ethtool.c stable/10/sys/ofed/drivers/net/mlx4/en_main.c stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/en_port.c stable/10/sys/ofed/drivers/net/mlx4/en_port.h stable/10/sys/ofed/drivers/net/mlx4/en_resources.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/en_selftest.c stable/10/sys/ofed/drivers/net/mlx4/en_tx.c stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/icm.c stable/10/sys/ofed/drivers/net/mlx4/icm.h stable/10/sys/ofed/drivers/net/mlx4/intf.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/ofed/drivers/net/mlx4/mlx4.h stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h stable/10/sys/ofed/drivers/net/mlx4/mr.c stable/10/sys/ofed/drivers/net/mlx4/pd.c stable/10/sys/ofed/drivers/net/mlx4/port.c stable/10/sys/ofed/drivers/net/mlx4/profile.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/reset.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/drivers/net/mlx4/sense.c stable/10/sys/ofed/drivers/net/mlx4/srq.c stable/10/sys/ofed/drivers/net/mlx4/sys_tune.c stable/10/sys/ofed/include/linux/mlx4/cmd.h stable/10/sys/ofed/include/linux/mlx4/cq.h stable/10/sys/ofed/include/linux/mlx4/device.h stable/10/sys/ofed/include/linux/mlx4/driver.h stable/10/sys/ofed/include/linux/mlx4/qp.h stable/10/sys/ofed/include/linux/mlx4/srq.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/asyncwatch.c Thu Oct 2 10:46:12 2014 (r272407) @@ -35,8 +35,6 @@ #endif /* HAVE_CONFIG_H */ #include -#include -#include #include Modified: stable/10/contrib/ofed/libibverbs/examples/device_list.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/device_list.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/device_list.c Thu Oct 2 10:46:12 2014 (r272407) @@ -36,9 +36,6 @@ #include -#include -#include - #include #include Modified: stable/10/contrib/ofed/libibverbs/examples/devinfo.c ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/devinfo.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libibverbs/examples/devinfo.c Thu Oct 2 10:46:12 2014 (r272407) @@ -41,8 +41,6 @@ #include #include #include -#include -#include #include #include Modified: stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/contrib/ofed/libmlx4/src/mlx4-abi.h Thu Oct 2 10:46:12 2014 (r272407) @@ -36,7 +36,7 @@ #include #define MLX4_UVERBS_MIN_ABI_VERSION 2 -#define MLX4_UVERBS_MAX_ABI_VERSION 3 +#define MLX4_UVERBS_MAX_ABI_VERSION 4 struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/conf/files Thu Oct 2 10:46:12 2014 (r272407) @@ -3745,7 +3745,7 @@ ofed/drivers/net/mlx4/sys_tune.c option ofed/drivers/net/mlx4/en_cq.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" -ofed/drivers/net/mlx4/en_frag.c optional mlxen \ +ofed/drivers/net/mlx4/utils.c optional mlxen \ no-depend obj-prefix "mlx4_" \ compile-with "${OFED_C_NOIMP} -I$S/ofed/drivers/net/mlx4/" ofed/drivers/net/mlx4/en_main.c optional mlxen \ Modified: stable/10/sys/modules/mlx4/Makefile ============================================================================== --- stable/10/sys/modules/mlx4/Makefile Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/modules/mlx4/Makefile Thu Oct 2 10:46:12 2014 (r272407) @@ -5,7 +5,7 @@ .PATH: ${.CURDIR}/../../ofed/include/linux KMOD = mlx4 -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h +SRCS = device_if.h bus_if.h pci_if.h vnode_if.h opt_inet.h opt_inet6.h SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c linux_compat.c linux_radix.c linux_idr.c SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_tune.c Modified: stable/10/sys/modules/mlxen/Makefile ============================================================================== --- stable/10/sys/modules/mlxen/Makefile Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/modules/mlxen/Makefile Thu Oct 2 10:46:12 2014 (r272407) @@ -5,8 +5,8 @@ KMOD = mlxen SRCS = device_if.h bus_if.h pci_if.h vnode_if.h -SRCS += en_cq.c en_frag.c en_main.c en_netdev.c en_port.c en_resources.c -SRCS += en_rx.c en_tx.c +SRCS += en_cq.c en_main.c en_netdev.c en_port.c en_resources.c +SRCS += en_rx.c en_tx.c utils.c SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1081,7 +1081,7 @@ static void handle_lid_change_event(stru if (mlx4_is_master(dev->dev) && !dev->sriov.is_going_down) mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, - MLX4_EQ_PORT_INFO_LID_CHANGE_MASK); + MLX4_EQ_PORT_INFO_LID_CHANGE_MASK, 0, 0); } static void handle_client_rereg_event(struct mlx4_ib_dev *dev, u8 port_num) @@ -1093,7 +1093,7 @@ static void handle_client_rereg_event(st if (!dev->sriov.is_going_down) { mlx4_ib_mcg_port_cleanup(&dev->sriov.demux[port_num - 1], 0); mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, - MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK); + MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK, 0, 0); } } mlx4_ib_dispatch_event(dev, port_num, IB_EVENT_CLIENT_REREGISTER); @@ -1191,7 +1191,7 @@ void handle_port_mgmt_change_event(struc /*if master, notify all slaves*/ if (mlx4_is_master(dev->dev)) mlx4_gen_slaves_port_mgt_ev(dev->dev, port, - MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK); + MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK, 0, 0); } if (changed_attr & MLX4_EQ_PORT_INFO_CLIENT_REREG_MASK) Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1005,7 +1005,7 @@ static int flow_spec_to_net_rule(struct case IB_FLOW_IB_UC: spec_l2->id = MLX4_NET_TRANS_RULE_ID_IB; if(flow_spec->l2_id.ib_uc.qpn) { - spec_l2->ib.r_u_qpn = cpu_to_be32(flow_spec->l2_id.ib_uc.qpn); + spec_l2->ib.l3_qpn = cpu_to_be32(flow_spec->l2_id.ib_uc.qpn); spec_l2->ib.qpn_msk = cpu_to_be32(0xffffff); } break; @@ -2013,7 +2013,7 @@ static void *mlx4_ib_add(struct mlx4_dev for (i = 0; i < ibdev->num_ports; ++i) { if (mlx4_ib_port_link_layer(&ibdev->ib_dev, i + 1) == IB_LINK_LAYER_ETHERNET) { - err = mlx4_counter_alloc(ibdev->dev, &ibdev->counters[i]); + err = mlx4_counter_alloc(ibdev->dev, i + 1, &ibdev->counters[i]); if (err) ibdev->counters[i] = -1; } else @@ -2112,7 +2112,7 @@ err_steer_qp_release: err_counter: for (; i; --i) if (ibdev->counters[i - 1] != -1) - mlx4_counter_free(ibdev->dev, ibdev->counters[i - 1]); + mlx4_counter_free(ibdev->dev, i, ibdev->counters[i - 1]); err_map: iounmap(ibdev->priv_uar.map); @@ -2200,7 +2200,7 @@ static void mlx4_ib_remove(struct mlx4_d iounmap(ibdev->priv_uar.map); for (p = 0; p < ibdev->num_ports; ++p) if (ibdev->counters[p] != -1) - mlx4_counter_free(ibdev->dev, ibdev->counters[p]); + mlx4_counter_free(ibdev->dev, p + 1, ibdev->counters[p]); mlx4_foreach_port(p, dev, MLX4_PORT_TYPE_IB) mlx4_CLOSE_PORT(dev, p); Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Oct 2 10:46:12 2014 (r272407) @@ -2679,10 +2679,10 @@ static int mlx4_wq_overflow(struct mlx4_ static __be32 convert_access(int acc) { - return (acc & IB_ACCESS_REMOTE_ATOMIC ? cpu_to_be32(MLX4_WQE_FMR_PERM_ATOMIC) : 0) | - (acc & IB_ACCESS_REMOTE_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_REMOTE_WRITE) : 0) | - (acc & IB_ACCESS_REMOTE_READ ? cpu_to_be32(MLX4_WQE_FMR_PERM_REMOTE_READ) : 0) | - (acc & IB_ACCESS_LOCAL_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_WRITE) : 0) | + return (acc & IB_ACCESS_REMOTE_ATOMIC ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_ATOMIC) : 0) | + (acc & IB_ACCESS_REMOTE_WRITE ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_WRITE) : 0) | + (acc & IB_ACCESS_REMOTE_READ ? cpu_to_be32(MLX4_WQE_FMR_AND_BIND_PERM_REMOTE_READ) : 0) | + (acc & IB_ACCESS_LOCAL_WRITE ? cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_WRITE) : 0) | cpu_to_be32(MLX4_WQE_FMR_PERM_LOCAL_READ); } @@ -2709,10 +2709,12 @@ static void set_fmr_seg(struct mlx4_wqe_ static void set_local_inv_seg(struct mlx4_wqe_local_inval_seg *iseg, u32 rkey) { - iseg->flags = 0; - iseg->mem_key = cpu_to_be32(rkey); - iseg->guest_id = 0; - iseg->pa = 0; + iseg->mem_key = cpu_to_be32(rkey); + + iseg->reserved1 = 0; + iseg->reserved2 = 0; + iseg->reserved3[0] = 0; + iseg->reserved3[1] = 0; } static __always_inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg, Modified: stable/10/sys/ofed/drivers/net/mlx4/alloc.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -70,9 +70,9 @@ u32 mlx4_bitmap_alloc(struct mlx4_bitmap return obj; } -void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj) +void mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr) { - mlx4_bitmap_free_range(bitmap, obj, 1); + mlx4_bitmap_free_range(bitmap, obj, 1, use_rr); } static unsigned long find_aligned_range(unsigned long *bitmap, @@ -148,11 +148,17 @@ u32 mlx4_bitmap_avail(struct mlx4_bitmap return bitmap->avail; } -void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt) +void mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt, + int use_rr) { obj &= bitmap->max + bitmap->reserved_top - 1; spin_lock(&bitmap->lock); + if (!use_rr) { + bitmap->last = min(bitmap->last, obj); + bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) + & bitmap->mask; + } bitmap_clear(bitmap->table, obj, cnt); bitmap->avail += cnt; spin_unlock(&bitmap->lock); Modified: stable/10/sys/ofed/drivers/net/mlx4/catas.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/catas.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/catas.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -34,10 +34,11 @@ #include #include -#include "mlx4.h" +#include -#define MLX4_CATAS_POLL_INTERVAL (5 * HZ) +#include "mlx4.h" +#define MLX4_CATAS_POLL_INTERVAL (5 * HZ) static DEFINE_SPINLOCK(catas_lock); @@ -156,11 +157,13 @@ void mlx4_stop_catas_poll(struct mlx4_de del_timer_sync(&priv->catas_err.timer); - if (priv->catas_err.map) + if (priv->catas_err.map) { iounmap(priv->catas_err.map); + priv->catas_err.map = NULL; + } spin_lock_irq(&catas_lock); - list_del(&priv->catas_err.list); + list_del_init(&priv->catas_err.list); spin_unlock_irq(&catas_lock); } Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Oct 2 10:39:07 2014 (r272406) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Oct 2 10:46:12 2014 (r272407) @@ -1,6 +1,6 @@ /* * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. - * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved. + * Copyright (c) 2005, 2006, 2007, 2008, 2014 Mellanox Technologies. All rights reserved. * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved. * * This software is available to you under a choice of one of two @@ -34,14 +34,17 @@ #include #include +#include #include #include #include +#include #include #include #include +#include #include "mlx4.h" #include "fw.h" @@ -110,6 +113,14 @@ enum { GO_BIT_TIMEOUT_MSECS = 10000 }; +enum mlx4_vlan_transition { + MLX4_VLAN_TRANSITION_VST_VST = 0, + MLX4_VLAN_TRANSITION_VST_VGT = 1, + MLX4_VLAN_TRANSITION_VGT_VST = 2, + MLX4_VLAN_TRANSITION_VGT_VGT = 3, +}; + + struct mlx4_cmd_context { struct completion done; int result; @@ -152,6 +163,131 @@ static int mlx4_status_to_errno(u8 statu return trans_table[status]; } +static const char *cmd_to_str(u16 cmd) +{ + switch (cmd) { + case MLX4_CMD_SYS_EN: return "SYS_EN"; + case MLX4_CMD_SYS_DIS: return "SYS_DIS"; + case MLX4_CMD_MAP_FA: return "MAP_FA"; + case MLX4_CMD_UNMAP_FA: return "UNMAP_FA"; + case MLX4_CMD_RUN_FW: return "RUN_FW"; + case MLX4_CMD_MOD_STAT_CFG: return "MOD_STAT_CFG"; + case MLX4_CMD_QUERY_DEV_CAP: return "QUERY_DEV_CAP"; + case MLX4_CMD_QUERY_FW: return "QUERY_FW"; + case MLX4_CMD_ENABLE_LAM: return "ENABLE_LAM"; + case MLX4_CMD_DISABLE_LAM: return "DISABLE_LAM"; + case MLX4_CMD_QUERY_DDR: return "QUERY_DDR"; + case MLX4_CMD_QUERY_ADAPTER: return "QUERY_ADAPTER"; + case MLX4_CMD_INIT_HCA: return "INIT_HCA"; + case MLX4_CMD_CLOSE_HCA: return "CLOSE_HCA"; + case MLX4_CMD_INIT_PORT: return "INIT_PORT"; + case MLX4_CMD_CLOSE_PORT: return "CLOSE_PORT"; + case MLX4_CMD_QUERY_HCA: return "QUERY_HCA"; + case MLX4_CMD_QUERY_PORT: return "QUERY_PORT"; + case MLX4_CMD_SENSE_PORT: return "SENSE_PORT"; + case MLX4_CMD_HW_HEALTH_CHECK: return "HW_HEALTH_CHECK"; + case MLX4_CMD_SET_PORT: return "SET_PORT"; + case MLX4_CMD_SET_NODE: return "SET_NODE"; + case MLX4_CMD_QUERY_FUNC: return "QUERY_FUNC"; + case MLX4_CMD_MAP_ICM: return "MAP_ICM"; + case MLX4_CMD_UNMAP_ICM: return "UNMAP_ICM"; + case MLX4_CMD_MAP_ICM_AUX: return "MAP_ICM_AUX"; + case MLX4_CMD_UNMAP_ICM_AUX: return "UNMAP_ICM_AUX"; + case MLX4_CMD_SET_ICM_SIZE: return "SET_ICM_SIZE"; + /*master notify fw on finish for slave's flr*/ + case MLX4_CMD_INFORM_FLR_DONE: return "INFORM_FLR_DONE"; + case MLX4_CMD_GET_OP_REQ: return "GET_OP_REQ"; + + /* TPT commands */ + case MLX4_CMD_SW2HW_MPT: return "SW2HW_MPT"; + case MLX4_CMD_QUERY_MPT: return "QUERY_MPT"; + case MLX4_CMD_HW2SW_MPT: return "HW2SW_MPT"; + case MLX4_CMD_READ_MTT: return "READ_MTT"; + case MLX4_CMD_WRITE_MTT: return "WRITE_MTT"; + case MLX4_CMD_SYNC_TPT: return "SYNC_TPT"; + + /* EQ commands */ + case MLX4_CMD_MAP_EQ: return "MAP_EQ"; + case MLX4_CMD_SW2HW_EQ: return "SW2HW_EQ"; + case MLX4_CMD_HW2SW_EQ: return "HW2SW_EQ"; + case MLX4_CMD_QUERY_EQ: return "QUERY_EQ"; + + /* CQ commands */ + case MLX4_CMD_SW2HW_CQ: return "SW2HW_CQ"; + case MLX4_CMD_HW2SW_CQ: return "HW2SW_CQ"; + case MLX4_CMD_QUERY_CQ: return "QUERY_CQ:"; + case MLX4_CMD_MODIFY_CQ: return "MODIFY_CQ:"; + + /* SRQ commands */ + case MLX4_CMD_SW2HW_SRQ: return "SW2HW_SRQ"; + case MLX4_CMD_HW2SW_SRQ: return "HW2SW_SRQ"; + case MLX4_CMD_QUERY_SRQ: return "QUERY_SRQ"; + case MLX4_CMD_ARM_SRQ: return "ARM_SRQ"; + + /* QP/EE commands */ + case MLX4_CMD_RST2INIT_QP: return "RST2INIT_QP"; + case MLX4_CMD_INIT2RTR_QP: return "INIT2RTR_QP"; + case MLX4_CMD_RTR2RTS_QP: return "RTR2RTS_QP"; + case MLX4_CMD_RTS2RTS_QP: return "RTS2RTS_QP"; + case MLX4_CMD_SQERR2RTS_QP: return "SQERR2RTS_QP"; + case MLX4_CMD_2ERR_QP: return "2ERR_QP"; + case MLX4_CMD_RTS2SQD_QP: return "RTS2SQD_QP"; + case MLX4_CMD_SQD2SQD_QP: return "SQD2SQD_QP"; + case MLX4_CMD_SQD2RTS_QP: return "SQD2RTS_QP"; + case MLX4_CMD_2RST_QP: return "2RST_QP"; + case MLX4_CMD_QUERY_QP: return "QUERY_QP"; + case MLX4_CMD_INIT2INIT_QP: return "INIT2INIT_QP"; + case MLX4_CMD_SUSPEND_QP: return "SUSPEND_QP"; + case MLX4_CMD_UNSUSPEND_QP: return "UNSUSPEND_QP"; + /* special QP and management commands */ + case MLX4_CMD_CONF_SPECIAL_QP: return "CONF_SPECIAL_QP"; + case MLX4_CMD_MAD_IFC: return "MAD_IFC"; + + /* multicast commands */ + case MLX4_CMD_READ_MCG: return "READ_MCG"; + case MLX4_CMD_WRITE_MCG: return "WRITE_MCG"; + case MLX4_CMD_MGID_HASH: return "MGID_HASH"; + + /* miscellaneous commands */ + case MLX4_CMD_DIAG_RPRT: return "DIAG_RPRT"; + case MLX4_CMD_NOP: return "NOP"; + case MLX4_CMD_ACCESS_MEM: return "ACCESS_MEM"; + case MLX4_CMD_SET_VEP: return "SET_VEP"; + + /* Ethernet specific commands */ + case MLX4_CMD_SET_VLAN_FLTR: return "SET_VLAN_FLTR"; + case MLX4_CMD_SET_MCAST_FLTR: return "SET_MCAST_FLTR"; + case MLX4_CMD_DUMP_ETH_STATS: return "DUMP_ETH_STATS"; + + /* Communication channel commands */ + case MLX4_CMD_ARM_COMM_CHANNEL: return "ARM_COMM_CHANNEL"; + case MLX4_CMD_GEN_EQE: return "GEN_EQE"; + + /* virtual commands */ + case MLX4_CMD_ALLOC_RES: return "ALLOC_RES"; + case MLX4_CMD_FREE_RES: return "FREE_RES"; + case MLX4_CMD_MCAST_ATTACH: return "MCAST_ATTACH"; + case MLX4_CMD_UCAST_ATTACH: return "UCAST_ATTACH"; + case MLX4_CMD_PROMISC: return "PROMISC"; + case MLX4_CMD_QUERY_FUNC_CAP: return "QUERY_FUNC_CAP"; + case MLX4_CMD_QP_ATTACH: return "QP_ATTACH"; + + /* debug commands */ + case MLX4_CMD_QUERY_DEBUG_MSG: return "QUERY_DEBUG_MSG"; + case MLX4_CMD_SET_DEBUG_MSG: return "SET_DEBUG_MSG"; + + /* statistics commands */ + case MLX4_CMD_QUERY_IF_STAT: return "QUERY_IF_STAT"; + case MLX4_CMD_SET_IF_STAT: return "SET_IF_STAT"; + + /* register/delete flow steering network rules */ + case MLX4_QP_FLOW_STEERING_ATTACH: return "QP_FLOW_STEERING_ATTACH"; + case MLX4_QP_FLOW_STEERING_DETACH: return "QP_FLOW_STEERING_DETACH"; + case MLX4_FLOW_STEERING_IB_UC_QP_RANGE: return "FLOW_STEERING_IB_UC_QP_RANGE"; + default: return "OTHER"; + } +} + static u8 mlx4_errno_to_status(int errno) { switch (errno) { @@ -244,6 +380,17 @@ static int mlx4_comm_cmd_wait(struct mlx down(&cmd->event_sem); + end = msecs_to_jiffies(timeout) + jiffies; + while (comm_pending(dev) && time_before(jiffies, end)) + cond_resched(); + if (comm_pending(dev)) { + mlx4_warn(dev, "mlx4_comm_cmd_wait: Comm channel " + "is not idle. My toggle is %d (op: 0x%x)\n", + mlx4_priv(dev)->cmd.comm_toggle, op); + up(&cmd->event_sem); + return -EAGAIN; + } + spin_lock(&cmd->context_lock); BUG_ON(cmd->free_head < 0); context = &cmd->context[cmd->free_head]; @@ -255,12 +402,8 @@ static int mlx4_comm_cmd_wait(struct mlx mlx4_comm_cmd_post(dev, op, param); - if (!wait_for_completion_timeout(&context->done, - msecs_to_jiffies(timeout))) { - mlx4_warn(dev, "communication channel command 0x%x timed out\n", op); - err = -EBUSY; - goto out; - } + /* In slave, wait unconditionally for completion */ + wait_for_completion(&context->done); err = context->result; if (err && context->fw_status != CMD_STAT_MULTI_FUNC_REQ) { @@ -309,14 +452,29 @@ static int cmd_pending(struct mlx4_dev * !!(status & swab32(1 << HCR_T_BIT))); } -static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param, - u32 in_modifier, u8 op_modifier, u16 op, u16 token, - int event) +static int get_status(struct mlx4_dev *dev, u32 *status, int *go_bit, + int *t_bit) +{ + if (pci_channel_offline(dev->pdev)) + return -EIO; + + *status = readl(mlx4_priv(dev)->cmd.hcr + HCR_STATUS_OFFSET); + *t_bit = !!(*status & swab32(1 << HCR_T_BIT)); + *go_bit = !!(*status & swab32(1 << HCR_GO_BIT)); + + return 0; +} + +static int mlx4_cmd_post(struct mlx4_dev *dev, struct timespec *ts1, + u64 in_param, u64 out_param, u32 in_modifier, + u8 op_modifier, u16 op, u16 token, int event) { struct mlx4_cmd *cmd = &mlx4_priv(dev)->cmd; u32 __iomem *hcr = cmd->hcr; int ret = -EAGAIN; unsigned long end; + int err, go_bit = 0, t_bit = 0; + u32 status = 0; mutex_lock(&cmd->hcr_mutex); @@ -363,6 +521,9 @@ static int mlx4_cmd_post(struct mlx4_dev __raw_writel((__force u32) cpu_to_be32(out_param & 0xfffffffful), hcr + 4); __raw_writel((__force u32) cpu_to_be32(token << 16), hcr + 5); + if (ts1) + ktime_get_ts(ts1); + /* __raw_writel may not order writes. */ wmb(); @@ -383,6 +544,15 @@ static int mlx4_cmd_post(struct mlx4_dev ret = 0; out: + if (ret) { + err = get_status(dev, &status, &go_bit, &t_bit); + mlx4_warn(dev, "Could not post command %s (0x%x): ret=%d, " + "in_param=0x%llx, in_mod=0x%x, op_mod=0x%x, " + "get_status err=%d, status_reg=0x%x, go_bit=%d, " + "t_bit=%d, toggle=0x%x\n", cmd_to_str(op), op, ret, + (unsigned long long) in_param, in_modifier, op_modifier, err, status, + go_bit, t_bit, cmd->toggle); + } mutex_unlock(&cmd->hcr_mutex); return ret; } @@ -439,7 +609,7 @@ static int mlx4_slave_cmd(struct mlx4_de ret = mlx4_status_to_errno(vhcr->status); } else mlx4_err(dev, "failed execution of VHCR_POST command" - "opcode 0x%x\n", op); + "opcode %s (0x%x)\n", cmd_to_str(op), op); } mutex_unlock(&priv->cmd.slave_cmd_mutex); @@ -467,7 +637,7 @@ static int mlx4_cmd_poll(struct mlx4_dev goto out; } - err = mlx4_cmd_post(dev, in_param, out_param ? *out_param : 0, + err = mlx4_cmd_post(dev, NULL, in_param, out_param ? *out_param : 0, in_modifier, op_modifier, op, CMD_POLL_TOKEN, 0); if (err) goto out; @@ -487,7 +657,8 @@ static int mlx4_cmd_poll(struct mlx4_dev } if (cmd_pending(dev)) { - mlx4_warn(dev, "command 0x%x timed out (go bit not cleared)\n", op); + mlx4_warn(dev, "command %s (0x%x) timed out (go bit not cleared)\n", + cmd_to_str(op), op); err = -ETIMEDOUT; goto out; } @@ -502,8 +673,8 @@ static int mlx4_cmd_poll(struct mlx4_dev __raw_readl(hcr + HCR_STATUS_OFFSET)) >> 24; err = mlx4_status_to_errno(stat); if (err) - mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n", - op, stat); + mlx4_err(dev, "command %s (0x%x) failed: fw status = 0x%x\n", + cmd_to_str(op), op, stat); out: up(&priv->cmd.poll_sem); @@ -527,19 +698,6 @@ void mlx4_cmd_event(struct mlx4_dev *dev complete(&context->done); } -static int get_status(struct mlx4_dev *dev, u32 *status, int *go_bit, - int *t_bit) -{ - if (pci_channel_offline(dev->pdev)) - return -EIO; - - *status = readl(mlx4_priv(dev)->cmd.hcr + HCR_STATUS_OFFSET); - *t_bit = !!(*status & swab32(1 << HCR_T_BIT)); - *go_bit = !!(*status & swab32(1 << HCR_GO_BIT)); - - return 0; -} - static int mlx4_cmd_wait(struct mlx4_dev *dev, u64 in_param, u64 *out_param, int out_is_imm, u32 in_modifier, u8 op_modifier, u16 op, unsigned long timeout) @@ -549,6 +707,12 @@ static int mlx4_cmd_wait(struct mlx4_dev int err = 0; int go_bit = 0, t_bit = 0, stat_err; u32 status = 0; + struct timespec ts1, ts2; + ktime_t t1, t2, delta; + s64 ds; + + if (out_is_imm && !out_param) + return -EINVAL; down(&cmd->event_sem); @@ -561,29 +725,38 @@ static int mlx4_cmd_wait(struct mlx4_dev init_completion(&context->done); - err = mlx4_cmd_post(dev, in_param, out_param ? *out_param : 0, + err = mlx4_cmd_post(dev, &ts1, in_param, out_param ? *out_param : 0, in_modifier, op_modifier, op, context->token, 1); - if (err) { - mlx4_warn(dev, "command 0x%x could not be posted (%d)\n", - op, err); + if (err) goto out; - } if (!wait_for_completion_timeout(&context->done, msecs_to_jiffies(timeout))) { stat_err = get_status(dev, &status, &go_bit, &t_bit); - mlx4_warn(dev, "command 0x%x timed out: " - "get_status err=%d, status=0x%x, go_bit=%d, " - "t_bit=%d, toggle=0x%x\n", op, stat_err, status, - go_bit, t_bit, mlx4_priv(dev)->cmd.toggle); + mlx4_warn(dev, "command %s (0x%x) timed out: in_param=0x%llx, " + "in_mod=0x%x, op_mod=0x%x, get_status err=%d, " + "status_reg=0x%x, go_bit=%d, t_bit=%d, toggle=0x%x\n" + , cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, + op_modifier, stat_err, status, go_bit, t_bit, + mlx4_priv(dev)->cmd.toggle); err = -EBUSY; goto out; } + if (mlx4_debug_level & MLX4_DEBUG_MASK_CMD_TIME) { + ktime_get_ts(&ts2); + t1 = timespec_to_ktime(ts1); + t2 = timespec_to_ktime(ts2); + delta = ktime_sub(t2, t1); + ds = ktime_to_ns(delta); + pr_info("mlx4: fw exec time for %s is %lld nsec\n", cmd_to_str(op), (long long) ds); + } err = context->result; if (err) { - mlx4_err(dev, "command 0x%x failed: fw status = 0x%x\n", - op, context->fw_status); + mlx4_err(dev, "command %s (0x%x) failed: in_param=0x%llx, " + "in_mod=0x%x, op_mod=0x%x, fw status = 0x%x\n", + cmd_to_str(op), op, (unsigned long long) in_param, in_modifier, + op_modifier, context->fw_status); goto out; } @@ -640,7 +813,7 @@ static int mlx4_ACCESS_MEM(struct mlx4_d (slave & ~0x7f) | (size & 0xff)) { mlx4_err(dev, "Bad access mem params - slave_addr:0x%llx " "master_addr:0x%llx slave_id:%d size:%d\n", - (long long)slave_addr, (long long)master_addr, slave, size); + (unsigned long long) slave_addr, (unsigned long long) master_addr, slave, size); return -EINVAL; } @@ -813,6 +986,24 @@ static int mlx4_MAD_IFC_wrapper(struct m vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); } +static int MLX4_CMD_DIAG_RPRT_wrapper(struct mlx4_dev *dev, int slave, + struct mlx4_vhcr *vhcr, + struct mlx4_cmd_mailbox *inbox, + struct mlx4_cmd_mailbox *outbox, + struct mlx4_cmd_info *cmd) +{ + return -EPERM; +} + +static int MLX4_CMD_UPDATE_QP_wrapper(struct mlx4_dev *dev, int slave, + struct mlx4_vhcr *vhcr, + struct mlx4_cmd_mailbox *inbox, + struct mlx4_cmd_mailbox *outbox, + struct mlx4_cmd_info *cmd) +{ + return -EPERM; +} + int mlx4_DMA_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -950,6 +1141,16 @@ static struct mlx4_cmd_info cmd_info[] = .wrapper = NULL }, { + .opcode = MLX4_CMD_DIAG_RPRT, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = MLX4_CMD_DIAG_RPRT_wrapper + }, + { .opcode = MLX4_CMD_NOP, .has_inbox = false, .has_outbox = false, @@ -1247,6 +1448,16 @@ static struct mlx4_cmd_info cmd_info[] = .wrapper = mlx4_GEN_QP_wrapper }, { + .opcode = MLX4_CMD_UPDATE_QP, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = MLX4_CMD_UPDATE_QP_wrapper + }, + { .opcode = MLX4_CMD_CONF_SPECIAL_QP, .has_inbox = false, .has_outbox = false, @@ -1348,6 +1559,17 @@ static struct mlx4_cmd_info cmd_info[] = .verify = NULL, .wrapper = mlx4_QP_FLOW_STEERING_DETACH_wrapper }, + /* wol commands */ + { + .opcode = MLX4_CMD_MOD_STAT_CFG, + .has_inbox = false, + .has_outbox = false, + .out_is_imm = false, + .encode_slave_id = false, + .skip_err_print = true, + .verify = NULL, + .wrapper = mlx4_MOD_STAT_CFG_wrapper + }, }; static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave, @@ -1401,8 +1623,8 @@ static int mlx4_master_process_vhcr(stru } } if (!cmd) { - mlx4_err(dev, "Unknown command:0x%x accepted from slave:%d\n", - vhcr->op, slave); + mlx4_err(dev, "unparavirt command: %s (0x%x) accepted from slave:%d\n", + cmd_to_str(vhcr->op), vhcr->op, slave); vhcr_cmd->status = CMD_STAT_BAD_PARAM; goto out_status; } @@ -1420,8 +1642,8 @@ static int mlx4_master_process_vhcr(stru if (mlx4_ACCESS_MEM(dev, inbox->dma, slave, vhcr->in_param, MLX4_MAILBOX_SIZE, 1)) { - mlx4_err(dev, "%s: Failed reading inbox (cmd:0x%x)\n", - __func__, cmd->opcode); + mlx4_err(dev, "%s: Failed reading inbox for cmd %s (0x%x)\n", + __func__, cmd_to_str(cmd->opcode), cmd->opcode); vhcr_cmd->status = CMD_STAT_INTERNAL_ERR; goto out_status; } @@ -1429,9 +1651,9 @@ static int mlx4_master_process_vhcr(stru /* Apply permission and bound checks if applicable */ if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { - mlx4_warn(dev, "Command:0x%x from slave: %d failed protection " - "checks for resource_id:%d\n", vhcr->op, slave, - vhcr->in_modifier); + mlx4_warn(dev, "Command %s (0x%x) from slave: %d failed protection " + "checks for resource_id: %d\n", cmd_to_str(vhcr->op), + vhcr->op, slave, vhcr->in_modifier); vhcr_cmd->status = CMD_STAT_BAD_OP; goto out_status; } @@ -1470,9 +1692,13 @@ static int mlx4_master_process_vhcr(stru } if (err) { - mlx4_warn(dev, "vhcr command:0x%x slave:%d failed with" - " error:%d, status %d\n", - vhcr->op, slave, vhcr->errno, err); + if (!cmd->skip_err_print) + mlx4_warn(dev, "vhcr command %s (0x%x) slave:%d " + "in_param 0x%llx in_mod=0x%x, op_mod=0x%x " + "failed with error:%d, status %d\n", + cmd_to_str(vhcr->op), vhcr->op, slave, + (unsigned long long) vhcr->in_param, vhcr->in_modifier, + vhcr->op_modifier, vhcr->errno, err); vhcr_cmd->status = mlx4_errno_to_status(err); goto out_status; } @@ -1487,7 +1713,7 @@ static int mlx4_master_process_vhcr(stru /* If we failed to write back the outbox after the *command was successfully executed, we must fail this * slave, as it is now in undefined state */ - mlx4_err(dev, "%s:Failed writing outbox\n", __func__); + mlx4_err(dev, "%s: Failed writing outbox\n", __func__); goto out; } } @@ -1516,6 +1742,75 @@ out: return ret; } +static int mlx4_master_immediate_activate_vlan_qos(struct mlx4_priv *priv, + int slave, int port) +{ + struct mlx4_vport_oper_state *vp_oper; + struct mlx4_vport_state *vp_admin; + struct mlx4_vf_immed_vlan_work *work; + int err; + int admin_vlan_ix = NO_INDX; + + vp_oper = &priv->mfunc.master.vf_oper[slave].vport[port]; + vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; + + if (vp_oper->state.default_vlan == vp_admin->default_vlan && + vp_oper->state.default_qos == vp_admin->default_qos) + return 0; + + work = kzalloc(sizeof(*work), GFP_KERNEL); + if (!work) + return -ENOMEM; + + if (vp_oper->state.default_vlan != vp_admin->default_vlan) { + if (MLX4_VGT != vp_admin->default_vlan) { + err = __mlx4_register_vlan(&priv->dev, port, + vp_admin->default_vlan, + &admin_vlan_ix); + if (err) { + mlx4_warn((&priv->dev), + "No vlan resources slave %d, port %d\n", + slave, port); + return err; + } + } else { + admin_vlan_ix = NO_INDX; + } + work->flags |= MLX4_VF_IMMED_VLAN_FLAG_VLAN; + mlx4_dbg((&(priv->dev)), + "alloc vlan %d idx %d slave %d port %d\n", + (int)(vp_admin->default_vlan), + admin_vlan_ix, slave, port); + } + + /* save original vlan ix and vlan id */ + work->orig_vlan_id = vp_oper->state.default_vlan; + work->orig_vlan_ix = vp_oper->vlan_idx; + + /* handle new qos */ + if (vp_oper->state.default_qos != vp_admin->default_qos) + work->flags |= MLX4_VF_IMMED_VLAN_FLAG_QOS; + + if (work->flags & MLX4_VF_IMMED_VLAN_FLAG_VLAN) + vp_oper->vlan_idx = admin_vlan_ix; + + vp_oper->state.default_vlan = vp_admin->default_vlan; + vp_oper->state.default_qos = vp_admin->default_qos; + + /* iterate over QPs owned by this slave, using UPDATE_QP */ + work->port = port; + work->slave = slave; + work->qos = vp_oper->state.default_qos; + work->vlan_id = vp_oper->state.default_vlan; + work->vlan_ix = vp_oper->vlan_idx; + work->priv = priv; + INIT_WORK(&work->work, mlx4_vf_immed_vlan_work_handler); + queue_work(priv->mfunc.master.comm_wq, &work->work); + + return 0; +} + + static int mlx4_master_activate_admin_state(struct mlx4_priv *priv, int slave) { int port, err; @@ -1527,7 +1822,7 @@ static int mlx4_master_activate_admin_st vp_admin = &priv->mfunc.master.vf_admin[slave].vport[port]; vp_oper->state = *vp_admin; if (MLX4_VGT != vp_admin->default_vlan) { - err = mlx4_register_vlan(&priv->dev, port, + err = __mlx4_register_vlan(&priv->dev, port, vp_admin->default_vlan, &(vp_oper->vlan_idx)); if (err) { vp_oper->vlan_idx = NO_INDX; @@ -1548,12 +1843,12 @@ static int mlx4_master_activate_admin_st err = vp_oper->mac_idx; vp_oper->mac_idx = NO_INDX; mlx4_warn((&priv->dev), - "No mac resorces slave %d, port %d\n", + "No mac resources slave %d, port %d\n", slave, port); return err; } mlx4_dbg((&(priv->dev)), "alloc mac %llx idx %d slave %d port %d\n", - (long long)vp_oper->state.mac, vp_oper->mac_idx, slave, port); + (unsigned long long) vp_oper->state.mac, vp_oper->mac_idx, slave, port); } } return 0; @@ -1599,6 +1894,7 @@ static void mlx4_master_do_cmd(struct ml if (cmd == MLX4_COMM_CMD_RESET) { mlx4_warn(dev, "Received reset from slave:%d\n", slave); slave_state[slave].active = false; + slave_state[slave].old_vlan_api = false; mlx4_master_deactivate_admin_state(priv, slave); for (i = 0; i < MLX4_EVENT_TYPES_NUM; ++i) { slave_state[slave].event_eq[i].eqn = -1; @@ -1619,7 +1915,7 @@ static void mlx4_master_do_cmd(struct ml /*command from slave in the middle of FLR*/ if (cmd != MLX4_COMM_CMD_RESET && MLX4_COMM_CMD_FLR == slave_state[slave].last_cmd) { - mlx4_warn(dev, "slave:%d is Trying to run cmd(0x%x) " + mlx4_warn(dev, "slave:%d is Trying to run cmd (0x%x) " "in the middle of FLR\n", slave, cmd); return; } @@ -1630,7 +1926,6 @@ static void mlx4_master_do_cmd(struct ml goto reset_slave; slave_state[slave].vhcr_dma = ((u64) param) << 48; priv->mfunc.master.slave_state[slave].cookie = 0; - mutex_init(&priv->mfunc.master.gen_eqe_mutex[slave]); break; case MLX4_COMM_CMD_VHCR1: if (slave_state[slave].last_cmd != MLX4_COMM_CMD_VHCR0) @@ -1658,7 +1953,7 @@ static void mlx4_master_do_cmd(struct ml mutex_lock(&priv->cmd.slave_cmd_mutex); if (mlx4_master_process_vhcr(dev, slave, NULL)) { - mlx4_err(dev, "Failed processing vhcr for slave:%d," + mlx4_err(dev, "Failed processing vhcr for slave: %d," " resetting slave.\n", slave); mutex_unlock(&priv->cmd.slave_cmd_mutex); goto reset_slave; @@ -1666,7 +1961,7 @@ static void mlx4_master_do_cmd(struct ml mutex_unlock(&priv->cmd.slave_cmd_mutex); break; default: - mlx4_warn(dev, "Bad comm cmd:%d from slave:%d\n", cmd, slave); + mlx4_warn(dev, "Bad comm cmd: %d from slave: %d\n", cmd, slave); goto reset_slave; } spin_lock_irqsave(&priv->mfunc.master.slave_state_lock, flags); @@ -1676,8 +1971,8 @@ static void mlx4_master_do_cmd(struct ml is_going_down = 1; spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); if (is_going_down) { - mlx4_warn(dev, "Slave is going down aborting command(%d)" - " executing from slave:%d\n", + mlx4_warn(dev, "Slave is going down aborting command (%d)" + " executing from slave: %d\n", cmd, slave); return; } @@ -1696,8 +1991,6 @@ reset_slave: spin_unlock_irqrestore(&priv->mfunc.master.slave_state_lock, flags); /*with slave in the middle of flr, no need to clean resources again.*/ inform_slave_state: - memset(&slave_state[slave].event_eq, 0, - sizeof(struct mlx4_slave_event_eq_info)); __raw_writel((__force u32) cpu_to_be32(reply), &priv->mfunc.comm[slave].slave_read); wmb(); @@ -1751,7 +2044,10 @@ void mlx4_master_comm_channel(struct wor comm_cmd >> 16 & 0xff, comm_cmd & 0xffff, toggle); ++served; - } + } else + mlx4_err(dev, "slave %d out of sync." + " read toggle %d, write toggle %d.\n", slave, slt, + toggle); } } @@ -1759,6 +2055,19 @@ void mlx4_master_comm_channel(struct wor mlx4_warn(dev, "Got command event with bitmask from %d slaves" " but %d were served\n", reported, served); +} +/* master command processing */ +void mlx4_master_arm_comm_channel(struct work_struct *work) +{ + struct mlx4_mfunc_master_ctx *master = + container_of(work, + struct mlx4_mfunc_master_ctx, + arm_comm_work); + struct mlx4_mfunc *mfunc = + container_of(master, struct mlx4_mfunc, master); + struct mlx4_priv *priv = + container_of(mfunc, struct mlx4_priv, mfunc); + struct mlx4_dev *dev = &priv->dev; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 16:41:44 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F9A1ED; Thu, 2 Oct 2014 16:41:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4083EDBF; Thu, 2 Oct 2014 16:41:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GfiDv077123; Thu, 2 Oct 2014 16:41:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GfieR077111; Thu, 2 Oct 2014 16:41:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021641.s92GfieR077111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272417 - stable/10/etc/devd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:41:44 -0000 Author: hselasky Date: Thu Oct 2 16:41:43 2014 New Revision: 272417 URL: https://svnweb.freebsd.org/changeset/base/272417 Log: MFC r272253: Regenerate usb.conf Approved by: re, gjb Modified: stable/10/etc/devd/usb.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd/usb.conf ============================================================================== --- stable/10/etc/devd/usb.conf Thu Oct 2 16:36:37 2014 (r272416) +++ stable/10/etc/devd/usb.conf Thu Oct 2 16:41:43 2014 (r272417) @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee1 8|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 16:43:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C61683C1; Thu, 2 Oct 2014 16:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A86A0DE4; Thu, 2 Oct 2014 16:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GhbhK077621; Thu, 2 Oct 2014 16:43:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Ghb4g077620; Thu, 2 Oct 2014 16:43:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021643.s92Ghb4g077620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272418 - stable/9/etc/devd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:43:38 -0000 Author: hselasky Date: Thu Oct 2 16:43:37 2014 New Revision: 272418 URL: https://svnweb.freebsd.org/changeset/base/272418 Log: MFC r272253: Regenerate usb.conf Modified: stable/9/etc/devd/usb.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd/usb.conf ============================================================================== --- stable/9/etc/devd/usb.conf Thu Oct 2 16:41:43 2014 (r272417) +++ stable/9/etc/devd/usb.conf Thu Oct 2 16:43:37 2014 (r272418) @@ -65,7 +65,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + match "product" "(0x2016|0x2116|0x2216)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x241d|0x251d)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "(0x3016|0x3116)"; action "kldload -n uipaq"; }; @@ -129,7 +145,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee 8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x6015|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xa6d1|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee1 8|0xeee8|0xeee9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -1057,7 +1073,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a)"; + match "product" "(0x3416|0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1097,7 +1113,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x020d|0x020e|0x020f|0x0215|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; + match "product" "(0x020d|0x020e|0x020f|0x0210|0x0214|0x0215|0x0216|0x0217|0x0218|0x0219|0x021a|0x021b|0x021c)"; action "kldload -n atp"; }; @@ -2353,7 +2369,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x17b5|0x17cb)"; + match "product" "0x17b5"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17ba"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x17cb"; action "kldload -n ng_ubt"; }; @@ -2481,7 +2513,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x018a|0x317f)"; + match "product" "(0x0179|0x018a|0x317f)"; action "kldload -n if_urtwn"; }; @@ -2513,7 +2545,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8176|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2929,6 +2961,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; + match "product" "0x0072"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; match "product" "0x061c"; action "kldload -n if_axe"; }; @@ -3577,7 +3617,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "0x155b"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "product" "(0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3753,7 +3809,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5020|0x5041|0x5100|0x6000|0x6002|0x7001|0x7031|0x7042)"; action "kldload -n u3g"; }; @@ -4553,7 +4609,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1cf1"; - match "product" "(0x0001|0x0004)"; + match "product" "(0x0001|0x0004|0x0022)"; action "kldload -n uftdi"; }; @@ -4568,6 +4624,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x1d34"; + match "product" "0x0004"; + action "kldload -n uled"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1d4d"; match "product" "(0x0002|0x000c|0x000e|0x0010)"; action "kldload -n if_run"; @@ -4633,7 +4697,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d)"; + match "product" "(0x3307|0x3308|0x3309|0x330a|0x330d|0x330f)"; action "kldload -n if_urtwn"; }; @@ -4665,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f)"; + match "product" "(0x3c09|0x3c0a|0x3c15|0x3c1a|0x3c1b|0x3c1f|0x3c20)"; action "kldload -n if_run"; }; @@ -4689,6 +4753,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; + match "product" "0x4a00"; + action "kldload -n if_axge"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; match "product" "(0x7e12|0xa805)"; action "kldload -n u3g"; }; @@ -5232,6 +5304,36 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x16"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x46"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x12d1"; + match "intclass" "0xff"; + match "intsubclass" "0x02"; + match "intprotocol" "0x76"; + action "kldload -n if_cdce"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x00"; @@ -5399,5 +5501,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2621 USB entries processed +# 2643 USB entries processed From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 16:48:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20EE663C; Thu, 2 Oct 2014 16:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C852E22; Thu, 2 Oct 2014 16:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gm5ax078441; Thu, 2 Oct 2014 16:48:05 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Gm5j3078439; Thu, 2 Oct 2014 16:48:05 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021648.s92Gm5j3078439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272420 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:48:06 -0000 Author: hselasky Date: Thu Oct 2 16:48:05 2014 New Revision: 272420 URL: https://svnweb.freebsd.org/changeset/base/272420 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:45:00 2014 (r272419) +++ stable/9/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:48:05 2014 (r272420) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/9/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/9/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:45:00 2014 (r272419) +++ stable/9/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:48:05 2014 (r272420) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 16:49:24 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2539377F; Thu, 2 Oct 2014 16:49:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10B32E2B; Thu, 2 Oct 2014 16:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92GnNdx078653; Thu, 2 Oct 2014 16:49:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GnNIv078651; Thu, 2 Oct 2014 16:49:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021649.s92GnNIv078651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272421 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:49:24 -0000 Author: hselasky Date: Thu Oct 2 16:49:22 2014 New Revision: 272421 URL: https://svnweb.freebsd.org/changeset/base/272421 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:48:05 2014 (r272420) +++ stable/8/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:49:22 2014 (r272421) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/8/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:48:05 2014 (r272420) +++ stable/8/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:49:22 2014 (r272421) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 16:57:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4CDC3E; Thu, 2 Oct 2014 16:57:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 788AEF2D; Thu, 2 Oct 2014 16:57:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Gvjr7083237; Thu, 2 Oct 2014 16:57:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92GvjDe083235; Thu, 2 Oct 2014 16:57:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410021657.s92GvjDe083235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 2 Oct 2014 16:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272423 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 16:57:45 -0000 Author: hselasky Date: Thu Oct 2 16:57:44 2014 New Revision: 272423 URL: https://svnweb.freebsd.org/changeset/base/272423 Log: MFC r272254: Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Approved by: re, gjb Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/sound/usb/uaudioreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:56:00 2014 (r272422) +++ stable/10/sys/dev/sound/usb/uaudio.c Thu Oct 2 16:57:44 2014 (r272423) @@ -238,7 +238,7 @@ struct uaudio_chan { #define UAUDIO_SYNC_LESS 2 }; -#define UMIDI_CABLES_MAX 16 /* units */ +#define UMIDI_EMB_JACK_MAX 16 /* units */ #define UMIDI_TX_FRAMES 256 /* units */ #define UMIDI_TX_BUFFER (UMIDI_TX_FRAMES * 4) /* bytes */ @@ -269,7 +269,7 @@ struct umidi_sub_chan { struct umidi_chan { - struct umidi_sub_chan sub[UMIDI_CABLES_MAX]; + struct umidi_sub_chan sub[UMIDI_EMB_JACK_MAX]; struct mtx mtx; struct usb_xfer *xfer[UMIDI_N_TRANSFER]; @@ -281,7 +281,7 @@ struct umidi_chan { uint8_t write_open_refcount; uint8_t curr_cable; - uint8_t max_cable; + uint8_t max_emb_jack; uint8_t valid; uint8_t single_command; }; @@ -1487,6 +1487,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ union uaudio_asid asid = { NULL }; union uaudio_asf1d asf1d = { NULL }; union uaudio_sed sed = { NULL }; + struct usb_midi_streaming_endpoint_descriptor *msid = NULL; usb_endpoint_descriptor_audio_t *ed1 = NULL; const struct usb_audio_control_descriptor *acdp = NULL; struct usb_config_descriptor *cd = usbd_get_config_descriptor(udev); @@ -1504,6 +1505,7 @@ uaudio_chan_fill_info_sub(struct uaudio_ uint8_t bChannels; uint8_t bBitResolution; uint8_t audio_if = 0; + uint8_t midi_if = 0; uint8_t uma_if_class; while ((desc = usb_desc_foreach(cd, desc))) { @@ -1539,7 +1541,8 @@ uaudio_chan_fill_info_sub(struct uaudio_ ((id->bInterfaceClass == UICLASS_VENDOR) && (sc->sc_uq_au_vendor_class != 0))); - if ((uma_if_class != 0) && (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { + if ((uma_if_class != 0) && + (id->bInterfaceSubClass == UISUBCLASS_AUDIOSTREAM)) { audio_if = 1; } else { audio_if = 0; @@ -1551,13 +1554,16 @@ uaudio_chan_fill_info_sub(struct uaudio_ /* * XXX could allow multiple MIDI interfaces */ + midi_if = 1; if ((sc->sc_midi_chan.valid == 0) && - usbd_get_iface(udev, curidx)) { + (usbd_get_iface(udev, curidx) != NULL)) { sc->sc_midi_chan.iface_index = curidx; sc->sc_midi_chan.iface_alt_index = alt_index; sc->sc_midi_chan.valid = 1; } + } else { + midi_if = 0; } asid.v1 = NULL; asf1d.v1 = NULL; @@ -1566,14 +1572,25 @@ uaudio_chan_fill_info_sub(struct uaudio_ } if (audio_if == 0) { - if ((acdp == NULL) && - (desc->bDescriptorType == UDESC_CS_INTERFACE) && - (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && - (desc->bLength >= sizeof(*acdp))) { - acdp = (void *)desc; - audio_rev = UGETW(acdp->bcdADC); - } + if (midi_if == 0) { + if ((acdp == NULL) && + (desc->bDescriptorType == UDESC_CS_INTERFACE) && + (desc->bDescriptorSubtype == UDESCSUB_AC_HEADER) && + (desc->bLength >= sizeof(*acdp))) { + acdp = (void *)desc; + audio_rev = UGETW(acdp->bcdADC); + } + } else { + msid = (void *)desc; + /* get the maximum number of embedded jacks in use, if any */ + if (msid->bLength >= sizeof(*msid) && + msid->bDescriptorType == UDESC_CS_ENDPOINT && + msid->bDescriptorSubtype == MS_GENERAL && + msid->bNumEmbMIDIJack > sc->sc_midi_chan.max_emb_jack) { + sc->sc_midi_chan.max_emb_jack = msid->bNumEmbMIDIJack; + } + } /* * Don't collect any USB audio descriptors if * this is not an USB audio stream interface. @@ -5225,8 +5242,7 @@ umidi_bulk_read_callback(struct usb_xfer */ sub = &chan->sub[cn]; - if ((cmd_len != 0) && - (cn < chan->max_cable) && + if ((cmd_len != 0) && (cn < chan->max_emb_jack) && (sub->read_open != 0)) { /* Send data to the application */ @@ -5462,7 +5478,7 @@ tr_setup: } chan->curr_cable++; - if (chan->curr_cable >= chan->max_cable) + if (chan->curr_cable >= chan->max_emb_jack) chan->curr_cable = 0; if (chan->curr_cable == start_cable) { @@ -5499,7 +5515,7 @@ umidi_sub_by_fifo(struct usb_fifo *fifo) struct umidi_sub_chan *sub; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) { sub = &chan->sub[n]; if ((sub->fifo.fp[USB_FIFO_RX] == fifo) || (sub->fifo.fp[USB_FIFO_TX] == fifo)) { @@ -5682,12 +5698,12 @@ umidi_probe(device_t dev) if (chan->single_command != 0) device_printf(dev, "Single command MIDI quirk enabled\n"); - if ((chan->max_cable > UMIDI_CABLES_MAX) || - (chan->max_cable == 0)) { - chan->max_cable = UMIDI_CABLES_MAX; + if ((chan->max_emb_jack == 0) || + (chan->max_emb_jack > UMIDI_EMB_JACK_MAX)) { + chan->max_emb_jack = UMIDI_EMB_JACK_MAX; } - for (n = 0; n < chan->max_cable; n++) { + for (n = 0; n < chan->max_emb_jack; n++) { sub = &chan->sub[n]; @@ -5725,9 +5741,8 @@ umidi_detach(device_t dev) struct umidi_chan *chan = &sc->sc_midi_chan; uint32_t n; - for (n = 0; n < UMIDI_CABLES_MAX; n++) { + for (n = 0; n < UMIDI_EMB_JACK_MAX; n++) usb_fifo_detach(&chan->sub[n].fifo); - } mtx_lock(&chan->mtx); Modified: stable/10/sys/dev/sound/usb/uaudioreg.h ============================================================================== --- stable/10/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:56:00 2014 (r272422) +++ stable/10/sys/dev/sound/usb/uaudioreg.h Thu Oct 2 16:57:44 2014 (r272423) @@ -119,6 +119,13 @@ struct usb_audio_streaming_endpoint_desc uWord wLockDelay; } __packed; +struct usb_midi_streaming_endpoint_descriptor { + uByte bLength; + uByte bDescriptorType; + uByte bDescriptorSubtype; + uByte bNumEmbMIDIJack; +} __packed; + struct usb_audio_streaming_type1_descriptor { uByte bLength; uByte bDescriptorType; @@ -378,6 +385,7 @@ struct usb_audio_extension_unit_1 { #define MASTER_CHAN 0 +#define MS_GENERAL 1 #define AS_GENERAL 1 #define FORMAT_TYPE 2 #define FORMAT_SPECIFIC 3 From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 17:19:33 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98192330; Thu, 2 Oct 2014 17:19:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8177A23A; Thu, 2 Oct 2014 17:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HJX87092987; Thu, 2 Oct 2014 17:19:33 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HJX9v092986; Thu, 2 Oct 2014 17:19:33 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201410021719.s92HJX9v092986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 2 Oct 2014 17:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272424 - stable/10/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:19:33 -0000 Author: allanjude (doc committer) Date: Thu Oct 2 17:19:32 2014 New Revision: 272424 URL: https://svnweb.freebsd.org/changeset/base/272424 Log: MFC r272274: Change the /var dataset in the default ZFS layout to have the ZFS property canmount=off, making /var/db/pkg part of the / dataset, so installed package files are consistent with the package database when using ZFS boot environments (beadm). PR: 193971 Reviewed by: Shawn Webb, bcr Approved by: re (gjb), jmg Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Oct 2 16:57:44 2014 (r272423) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Oct 2 17:19:32 2014 (r272424) @@ -156,7 +156,7 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA /usr/src # Create /var and friends - /var mountpoint=/var + /var mountpoint=/var,canmount=off /var/crash exec=off,setuid=off /var/log exec=off,setuid=off /var/mail atime=on From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 17:41:28 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF266CEA; Thu, 2 Oct 2014 17:41:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9927AD; Thu, 2 Oct 2014 17:41:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HfSbA004334; Thu, 2 Oct 2014 17:41:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HfSCq004333; Thu, 2 Oct 2014 17:41:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021741.s92HfSCq004333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272425 - stable/10/sys/cddl/boot/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:41:28 -0000 Author: delphij Date: Thu Oct 2 17:41:27 2014 New Revision: 272425 URL: https://svnweb.freebsd.org/changeset/base/272425 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Approved by: re (gjb) Modified: stable/10/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/10/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:19:32 2014 (r272424) +++ stable/10/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:41:27 2014 (r272425) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 17:42:03 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4DBE3B; Thu, 2 Oct 2014 17:42:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 792FA7CB; Thu, 2 Oct 2014 17:42:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Hg3sG006304; Thu, 2 Oct 2014 17:42:03 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Hg3Kl006303; Thu, 2 Oct 2014 17:42:03 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021742.s92Hg3Kl006303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272426 - stable/9/sys/cddl/boot/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:42:03 -0000 Author: delphij Date: Thu Oct 2 17:42:02 2014 New Revision: 272426 URL: https://svnweb.freebsd.org/changeset/base/272426 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Modified: stable/9/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/9/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:41:27 2014 (r272425) +++ stable/9/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:02 2014 (r272426) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 17:42:21 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E24E4FBD; Thu, 2 Oct 2014 17:42:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3E77D8; Thu, 2 Oct 2014 17:42:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HgLsO006417; Thu, 2 Oct 2014 17:42:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HgLNb006416; Thu, 2 Oct 2014 17:42:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021742.s92HgLNb006416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 17:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272427 - stable/8/sys/cddl/boot/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:42:22 -0000 Author: delphij Date: Thu Oct 2 17:42:21 2014 New Revision: 272427 URL: https://svnweb.freebsd.org/changeset/base/272427 Log: MFC r272389: Diff reduction with kernel code: instruct the compiler that the data of these types may be unaligned to their "normal" alignment and exercise caution when accessing them. PR: 194071 Modified: stable/8/sys/cddl/boot/zfs/lz4.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/boot/zfs/lz4.c ============================================================================== --- stable/8/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:02 2014 (r272426) +++ stable/8/sys/cddl/boot/zfs/lz4.c Thu Oct 2 17:42:21 2014 (r272427) @@ -83,6 +83,17 @@ lz4_decompress(void *s_start, void *d_st #endif /* + * Unaligned memory access is automatically enabled for "common" CPU, + * such as x86. For others CPU, the compiler will be more cautious, and + * insert extra code to ensure aligned access is respected. If you know + * your target CPU supports unaligned memory access, you may want to + * force this option manually to improve performance + */ +#if defined(__ARM_FEATURE_UNALIGNED) +#define LZ4_FORCE_UNALIGNED_ACCESS 1 +#endif + +/* * Compiler Options */ #if __STDC_VERSION__ >= 199901L /* C99 */ @@ -113,6 +124,10 @@ lz4_decompress(void *s_start, void *d_st #define S32 int32_t #define U64 uint64_t +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack(1) +#endif + typedef struct _U16_S { U16 v; } U16_S; @@ -123,6 +138,10 @@ typedef struct _U64_S { U64 v; } U64_S; +#ifndef LZ4_FORCE_UNALIGNED_ACCESS +#pragma pack() +#endif + #define A64(x) (((U64_S *)(x))->v) #define A32(x) (((U32_S *)(x))->v) #define A16(x) (((U16_S *)(x))->v) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 17:58:48 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D7BF7B9; Thu, 2 Oct 2014 17:58:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68B57943; Thu, 2 Oct 2014 17:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92HwmJ3012081; Thu, 2 Oct 2014 17:58:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92HwmGh012080; Thu, 2 Oct 2014 17:58:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021758.s92HwmGh012080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 17:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272428 - stable/10/usr.sbin/mountd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 17:58:48 -0000 Author: bdrewery Date: Thu Oct 2 17:58:47 2014 New Revision: 272428 URL: https://svnweb.freebsd.org/changeset/base/272428 Log: MFC r270183: Avoid showing stale errors when nmount(2) fails. This should not be documented in relnotes as it still fails due to a race with unmounting, but no longer shows bogus details. Approved by: re (gjb) Modified: stable/10/usr.sbin/mountd/mountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Thu Oct 2 17:42:21 2014 (r272427) +++ stable/10/usr.sbin/mountd/mountd.c Thu Oct 2 17:58:47 2014 (r272428) @@ -1744,6 +1744,7 @@ get_exportlist(void) iov[3].iov_len = strlen(fsp->f_mntonname) + 1; iov[5].iov_base = fsp->f_mntfromname; iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; + errmsg[0] = '\0'; if (nmount(iov, iovlen, fsp->f_flags) < 0 && errno != ENOENT && errno != ENOTSUP) { @@ -2501,6 +2502,7 @@ do_mount(struct exportlist *ep, struct g iov[3].iov_len = strlen(fsb->f_mntonname) + 1; iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; + errmsg[0] = '\0'; while (nmount(iov, iovlen, fsb->f_flags) < 0) { if (cp) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:00:17 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94289906; Thu, 2 Oct 2014 18:00:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9E8956; Thu, 2 Oct 2014 18:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I0HLt014357; Thu, 2 Oct 2014 18:00:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I0HHX014356; Thu, 2 Oct 2014 18:00:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021800.s92I0HHX014356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272429 - stable/9/usr.sbin/mountd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:00:17 -0000 Author: bdrewery Date: Thu Oct 2 18:00:16 2014 New Revision: 272429 URL: https://svnweb.freebsd.org/changeset/base/272429 Log: MFC r270183: Avoid showing stale errors when nmount(2) fails. Modified: stable/9/usr.sbin/mountd/mountd.c Directory Properties: stable/9/usr.sbin/mountd/ (props changed) Modified: stable/9/usr.sbin/mountd/mountd.c ============================================================================== --- stable/9/usr.sbin/mountd/mountd.c Thu Oct 2 17:58:47 2014 (r272428) +++ stable/9/usr.sbin/mountd/mountd.c Thu Oct 2 18:00:16 2014 (r272429) @@ -1747,6 +1747,7 @@ get_exportlist(void) iov[3].iov_len = strlen(fsp->f_mntonname) + 1; iov[5].iov_base = fsp->f_mntfromname; iov[5].iov_len = strlen(fsp->f_mntfromname) + 1; + errmsg[0] = '\0'; if (nmount(iov, iovlen, fsp->f_flags) < 0 && errno != ENOENT && errno != ENOTSUP) { @@ -2504,6 +2505,7 @@ do_mount(struct exportlist *ep, struct g iov[3].iov_len = strlen(fsb->f_mntonname) + 1; iov[5].iov_base = fsb->f_mntfromname; /* "from" */ iov[5].iov_len = strlen(fsb->f_mntfromname) + 1; + errmsg[0] = '\0'; while (nmount(iov, iovlen, fsb->f_flags) < 0) { if (cp) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:05:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E980ADA; Thu, 2 Oct 2014 18:05:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89EC3A18; Thu, 2 Oct 2014 18:05:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I51nk016570; Thu, 2 Oct 2014 18:05:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I5183016569; Thu, 2 Oct 2014 18:05:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021805.s92I5183016569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:05:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272430 - stable/10/etc/periodic/daily X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:05:01 -0000 Author: bdrewery Date: Thu Oct 2 18:05:00 2014 New Revision: 272430 URL: https://svnweb.freebsd.org/changeset/base/272430 Log: MFC r271321: Don't cross mount boundaries when cleaning tmp files. Approved by: re (gjb) Relnotes: yes Modified: stable/10/etc/periodic/daily/110.clean-tmps Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/periodic/daily/110.clean-tmps ============================================================================== --- stable/10/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:00:16 2014 (r272429) +++ stable/10/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:00 2014 (r272430) @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:05:54 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF60CC19; Thu, 2 Oct 2014 18:05:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9B2A60; Thu, 2 Oct 2014 18:05:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I5shm016764; Thu, 2 Oct 2014 18:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I5s41016763; Thu, 2 Oct 2014 18:05:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021805.s92I5s41016763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272431 - stable/9/etc/periodic/daily X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:05:54 -0000 Author: bdrewery Date: Thu Oct 2 18:05:53 2014 New Revision: 272431 URL: https://svnweb.freebsd.org/changeset/base/272431 Log: MFC r271321: Don't cross mount boundaries when cleaning tmp files. Relnotes: yes Modified: stable/9/etc/periodic/daily/110.clean-tmps Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/periodic/daily/110.clean-tmps ============================================================================== --- stable/9/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:00 2014 (r272430) +++ stable/9/etc/periodic/daily/110.clean-tmps Thu Oct 2 18:05:53 2014 (r272431) @@ -45,8 +45,8 @@ case "$daily_clean_tmps_enable" in rc=$(for dir in $daily_clean_tmps_dirs do [ ."${dir#/}" != ."$dir" -a -d $dir ] && cd $dir && { - find -d . -type f $args -delete $print - find -d . ! -name . -type d $dargs -delete $print + find -x -d . -type f $args -delete $print + find -x -d . ! -name . -type d $dargs -delete $print } | sed "s,^\\., $dir," done | tee /dev/stderr | wc -l) [ -z "$print" ] && rc=0 From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:08:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B73DBD92; Thu, 2 Oct 2014 18:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2ECAA7C; Thu, 2 Oct 2014 18:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I8UuW017160; Thu, 2 Oct 2014 18:08:30 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I8UGl017159; Thu, 2 Oct 2014 18:08:30 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021808.s92I8UGl017159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:08:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272432 - stable/10/usr.sbin/newsyslog X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:08:30 -0000 Author: bdrewery Date: Thu Oct 2 18:08:30 2014 New Revision: 272432 URL: https://svnweb.freebsd.org/changeset/base/272432 Log: MFC r272028: Make it more explicitly clear that -t will not change filename. Approved by: re (gjb) Modified: stable/10/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:05:53 2014 (r272431) +++ stable/10/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:08:30 2014 (r272432) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd May 19, 2014 +.Dd September 23, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -156,6 +156,7 @@ will create the .Dq rotated logfiles using the specified time format instead of the default sequential filenames. +The filename used will be kept until it is deleted. The time format is described in the .Xr strftime 3 manual page. From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:09:32 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 324F6EE7; Thu, 2 Oct 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D905A88; Thu, 2 Oct 2014 18:09:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92I9VOO017474; Thu, 2 Oct 2014 18:09:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92I9Vut017473; Thu, 2 Oct 2014 18:09:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021809.s92I9Vut017473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272433 - stable/9/usr.sbin/newsyslog X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:09:32 -0000 Author: bdrewery Date: Thu Oct 2 18:09:31 2014 New Revision: 272433 URL: https://svnweb.freebsd.org/changeset/base/272433 Log: MFC r272028: Make it more explicitly clear that -t will not change filename. Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 Directory Properties: stable/9/usr.sbin/newsyslog/ (props changed) Modified: stable/9/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:08:30 2014 (r272432) +++ stable/9/usr.sbin/newsyslog/newsyslog.8 Thu Oct 2 18:09:31 2014 (r272433) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd May 19, 2014 +.Dd September 23, 2014 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -156,6 +156,7 @@ will create the .Dq rotated logfiles using the specified time format instead of the default sequential filenames. +The filename used will be kept until it is deleted. The time format is described in the .Xr strftime 3 manual page. From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:11:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 880AE1F4; Thu, 2 Oct 2014 18:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 738EEAB4; Thu, 2 Oct 2014 18:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IBEvG019352; Thu, 2 Oct 2014 18:11:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IBEL8019351; Thu, 2 Oct 2014 18:11:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021811.s92IBEL8019351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272434 - stable/10/sbin/savecore X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:11:14 -0000 Author: bdrewery Date: Thu Oct 2 18:11:13 2014 New Revision: 272434 URL: https://svnweb.freebsd.org/changeset/base/272434 Log: MFC r271720: If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix a FILE* leak in getbounds(). PR: 192032 Approved by: re (gjb) Modified: stable/10/sbin/savecore/savecore.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/savecore/savecore.c ============================================================================== --- stable/10/sbin/savecore/savecore.c Thu Oct 2 18:09:31 2014 (r272433) +++ stable/10/sbin/savecore/savecore.c Thu Oct 2 18:11:13 2014 (r272434) @@ -151,7 +151,10 @@ getbounds(void) { } if (fgets(buf, sizeof buf, fp) == NULL) { - syslog(LOG_WARNING, "unable to read from bounds, using 0"); + if (feof(fp)) + syslog(LOG_WARNING, "bounds file is empty, using 0"); + else + syslog(LOG_WARNING, "bounds file: %s", strerror(errno)); fclose(fp); return (ret); } @@ -160,6 +163,7 @@ getbounds(void) { ret = (int)strtol(buf, NULL, 10); if (ret == 0 && (errno == EINVAL || errno == ERANGE)) syslog(LOG_WARNING, "invalid value found in bounds, using 0"); + fclose(fp); return (ret); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:12:19 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA6E432F; Thu, 2 Oct 2014 18:12:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6010B53; Thu, 2 Oct 2014 18:12:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92ICJhw021462; Thu, 2 Oct 2014 18:12:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92ICJjE021461; Thu, 2 Oct 2014 18:12:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410021812.s92ICJjE021461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 2 Oct 2014 18:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272435 - stable/9/sbin/savecore X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:12:19 -0000 Author: bdrewery Date: Thu Oct 2 18:12:18 2014 New Revision: 272435 URL: https://svnweb.freebsd.org/changeset/base/272435 Log: MFC r271720: If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix a FILE* leak in getbounds(). PR: 192032 Modified: stable/9/sbin/savecore/savecore.c Directory Properties: stable/9/sbin/savecore/ (props changed) Modified: stable/9/sbin/savecore/savecore.c ============================================================================== --- stable/9/sbin/savecore/savecore.c Thu Oct 2 18:11:13 2014 (r272434) +++ stable/9/sbin/savecore/savecore.c Thu Oct 2 18:12:18 2014 (r272435) @@ -149,7 +149,10 @@ getbounds(void) { } if (fgets(buf, sizeof buf, fp) == NULL) { - syslog(LOG_WARNING, "unable to read from bounds, using 0"); + if (feof(fp)) + syslog(LOG_WARNING, "bounds file is empty, using 0"); + else + syslog(LOG_WARNING, "bounds file: %s", strerror(errno)); fclose(fp); return (ret); } @@ -158,6 +161,7 @@ getbounds(void) { ret = (int)strtol(buf, NULL, 10); if (ret == 0 && (errno == EINVAL || errno == ERANGE)) syslog(LOG_WARNING, "invalid value found in bounds, using 0"); + fclose(fp); return (ret); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:26:41 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDB01CE9; Thu, 2 Oct 2014 18:26:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA13FCA8; Thu, 2 Oct 2014 18:26:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IQfRv027109; Thu, 2 Oct 2014 18:26:41 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IQf0U027108; Thu, 2 Oct 2014 18:26:41 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021826.s92IQf0U027108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272438 - stable/10/usr.bin/at X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:26:42 -0000 Author: delphij Date: Thu Oct 2 18:26:40 2014 New Revision: 272438 URL: https://svnweb.freebsd.org/changeset/base/272438 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Approved by: re (gjb) Modified: stable/10/usr.bin/at/at.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/at/at.c ============================================================================== --- stable/10/usr.bin/at/at.c Thu Oct 2 18:23:53 2014 (r272437) +++ stable/10/usr.bin/at/at.c Thu Oct 2 18:26:40 2014 (r272438) @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -389,8 +390,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:32:18 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AF2EF7F; Thu, 2 Oct 2014 18:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26821D67; Thu, 2 Oct 2014 18:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IWIV1031402; Thu, 2 Oct 2014 18:32:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IWINC031401; Thu, 2 Oct 2014 18:32:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021832.s92IWINC031401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272439 - stable/9/usr.bin/at X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:32:18 -0000 Author: delphij Date: Thu Oct 2 18:32:17 2014 New Revision: 272439 URL: https://svnweb.freebsd.org/changeset/base/272439 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Modified: stable/9/usr.bin/at/at.c Directory Properties: stable/9/usr.bin/at/ (props changed) Modified: stable/9/usr.bin/at/at.c ============================================================================== --- stable/9/usr.bin/at/at.c Thu Oct 2 18:26:40 2014 (r272438) +++ stable/9/usr.bin/at/at.c Thu Oct 2 18:32:17 2014 (r272439) @@ -369,6 +369,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -391,8 +392,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 18:32:30 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9259136; Thu, 2 Oct 2014 18:32:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5076D6A; Thu, 2 Oct 2014 18:32:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92IWU4u031486; Thu, 2 Oct 2014 18:32:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92IWUb3031485; Thu, 2 Oct 2014 18:32:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410021832.s92IWUb3031485@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 18:32:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r272440 - stable/8/usr.bin/at X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 18:32:31 -0000 Author: delphij Date: Thu Oct 2 18:32:30 2014 New Revision: 272440 URL: https://svnweb.freebsd.org/changeset/base/272440 Log: MFC r272288,272289: When setting environment variables in the atrun script, use the "export foo=bar" form instead of "foo=bar; export foo" since the former allows the shell to catch variable names that are not valid shell identifiers. This will cause /bin/sh to exit with an error (which gets mailed to the at user) and it will not run the script. Obtained from: OpenBSD (r1.63 millert) Modified: stable/8/usr.bin/at/at.c Directory Properties: stable/8/usr.bin/at/ (props changed) Modified: stable/8/usr.bin/at/at.c ============================================================================== --- stable/8/usr.bin/at/at.c Thu Oct 2 18:32:17 2014 (r272439) +++ stable/8/usr.bin/at/at.c Thu Oct 2 18:32:30 2014 (r272440) @@ -369,6 +369,7 @@ writefile(time_t runtimer, char queue) if (export) { + (void)fputs("export ", fp); fwrite(*atenv, sizeof(char), eqp-*atenv, fp); for(ap = eqp;*ap != '\0'; ap++) { @@ -391,8 +392,6 @@ writefile(time_t runtimer, char queue) fputc(*ap, fp); } } - fputs("; export ", fp); - fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp); fputc('\n', fp); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 21:19:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B064AD2D; Thu, 2 Oct 2014 21:19:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8277C295; Thu, 2 Oct 2014 21:19:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92LJEf7011209; Thu, 2 Oct 2014 21:19:14 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92LJDJo011206; Thu, 2 Oct 2014 21:19:13 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201410022119.s92LJDJo011206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 2 Oct 2014 21:19:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272450 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:19:14 -0000 Author: sbruno Date: Thu Oct 2 21:19:13 2014 New Revision: 272450 URL: https://svnweb.freebsd.org/changeset/base/272450 Log: MFC r271141: Allow multiple image activators to run on the same execution by changing imgp->interpreted to a bitmask instead of, functionally, a bool. Approved by: re (gjb) Modified: stable/10/sys/kern/imgact_binmisc.c stable/10/sys/kern/imgact_shell.c stable/10/sys/sys/imgact.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_binmisc.c ============================================================================== --- stable/10/sys/kern/imgact_binmisc.c Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/kern/imgact_binmisc.c Thu Oct 2 21:19:13 2014 (r272450) @@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params } /* No interpreter nesting allowed. */ - if (imgp->interpreted) { + if (imgp->interpreted & IMGACT_BINMISC) { mtx_unlock(&interp_list_mtx); return (ENOEXEC); } - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_BINMISC; if (imgp->args->fname != NULL) { fname = imgp->args->fname; Modified: stable/10/sys/kern/imgact_shell.c ============================================================================== --- stable/10/sys/kern/imgact_shell.c Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/kern/imgact_shell.c Thu Oct 2 21:19:13 2014 (r272450) @@ -115,10 +115,10 @@ exec_shell_imgact(imgp) * Don't allow a shell script to be the shell for a shell * script. :-) */ - if (imgp->interpreted) + if (imgp->interpreted & IMGACT_SHELL) return (ENOEXEC); - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_SHELL; /* * At this point we have the first page of the file mapped. Modified: stable/10/sys/sys/imgact.h ============================================================================== --- stable/10/sys/sys/imgact.h Thu Oct 2 21:18:16 2014 (r272449) +++ stable/10/sys/sys/imgact.h Thu Oct 2 21:19:13 2014 (r272450) @@ -61,7 +61,9 @@ struct image_params { unsigned long entry_addr; /* entry address of target executable */ unsigned long reloc_base; /* load address of image */ char vmspace_destroyed; /* flag - we've blown away original vm space */ - char interpreted; /* flag - this executable is interpreted */ +#define IMGACT_SHELL 0x1 +#define IMGACT_BINMISC 0x2 + unsigned char interpreted; /* mask of interpreters that have run */ char opened; /* flag - we have opened executable vnode */ char *interpreter_name; /* name of the interpreter */ void *auxargs; /* ELF Auxinfo structure pointer */ From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 21:21:38 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B96BB171; Thu, 2 Oct 2014 21:21:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8301B35D; Thu, 2 Oct 2014 21:21:38 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 55131B977; Thu, 2 Oct 2014 17:21:37 -0400 (EDT) From: John Baldwin To: Glen Barber Subject: Re: svn commit: r272372 - stable/10/bin/rm Date: Thu, 2 Oct 2014 17:13:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> In-Reply-To: <20141002061628.GO1275@hub.FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201410021713.57943.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 02 Oct 2014 17:21:37 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, Bruce Evans X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 21:21:38 -0000 On Thursday, October 02, 2014 2:16:28 am Glen Barber wrote: > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > > On Wed, 1 Oct 2014, Glen Barber wrote: > > > > >Log: > > > MFC r268376 (imp): > > > > > > rm -rf can fail sometimes with an error from fts_read. Make it > > > honor fflag to ignore fts_read errors, but stop deleting from > > > that directory because no further progress can be made. > > > > I asked for this to be backed out in -current. It is not suitable for MFC. > > > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > from stomping over each other. > > If there is a more suitable solution, it needs to be introduced in head/ > first, pending MFC for 10.1-RELEASE. > > In the meantime, we lack any alternate fix, and this resolves the > immediate issue at hand. > > > See old mail for more details. > > > > I saw the original email. I do not see a proposed patch. I think the proposed patch is to revert this and fix the broken Makefiles instead. The problem with changing rm to workaround a bug in FreeBSD's Makefiles is we are breaking rm(1) for everyone else in the world to cater to a bug in our build system. Are you happy that we are invoking the same commands in parallel for a make target? In some cases it may be ok, but there are many others where it is not (e.g. if two jobs are both compiling the same .o file, the second one might replace an object file out from under a subsequent link that starts after the first one finishes). Instead of breaking rm, you should be harassing whoever broke make (or added the SUBDIR_PARALLEL logic). Presumably you can build without -j as a workaround. -- John Baldwin From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 22:16:01 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73D3DEEE; Thu, 2 Oct 2014 22:16:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44EB8AC2; Thu, 2 Oct 2014 22:16:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92MG1Gq039117; Thu, 2 Oct 2014 22:16:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92MG10Y039116; Thu, 2 Oct 2014 22:16:01 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410022216.s92MG10Y039116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 22:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272453 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:16:01 -0000 Author: delphij Date: Thu Oct 2 22:16:00 2014 New Revision: 272453 URL: https://svnweb.freebsd.org/changeset/base/272453 Log: MFC r271527: MFV r271511: Use fnvlist_* to make code more readable. Illumos issue: 5135 zpool_find_import_cached() can use fnvlist_* Approved by: re (gjb) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 2 22:05:48 2014 (r272452) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Thu Oct 2 22:16:00 2014 (r272453) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ @@ -1426,21 +1426,15 @@ zpool_find_import_cached(libzfs_handle_t elem = NULL; while ((elem = nvlist_next_nvpair(raw, elem)) != NULL) { - verify(nvpair_value_nvlist(elem, &src) == 0); + src = fnvpair_value_nvlist(elem); - verify(nvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME, - &name) == 0); + name = fnvlist_lookup_string(src, ZPOOL_CONFIG_POOL_NAME); if (poolname != NULL && strcmp(poolname, name) != 0) continue; - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != 0) { - verify(nvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID, - &this_guid) == 0); - if (guid != this_guid) - continue; - } + this_guid = fnvlist_lookup_uint64(src, ZPOOL_CONFIG_POOL_GUID); + if (guid != 0 && guid != this_guid) + continue; if (pool_active(hdl, name, this_guid, &active) != 0) { nvlist_free(raw); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 22:52:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE16D7E5; Thu, 2 Oct 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8ECDE1D; Thu, 2 Oct 2014 22:52:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s92Mq5KA057329; Thu, 2 Oct 2014 22:52:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s92Mq5sb057328; Thu, 2 Oct 2014 22:52:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410022252.s92Mq5sb057328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 2 Oct 2014 22:52:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272456 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 22:52:06 -0000 Author: delphij Date: Thu Oct 2 22:52:05 2014 New Revision: 272456 URL: https://svnweb.freebsd.org/changeset/base/272456 Log: MFC r271528: MFV r271512: Illumos issue: 5136 fix write throttle comment in dsl_pool.c Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Oct 2 22:33:35 2014 (r272455) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Oct 2 22:52:05 2014 (r272456) @@ -116,8 +116,8 @@ int zfs_delay_min_dirty_percent = 60; /* * This controls how quickly the delay approaches infinity. - * Larger values cause it to delay less for a given amount of dirty data. - * Therefore larger values will cause there to be more dirty data for a + * Larger values cause it to delay more for a given amount of dirty data. + * Therefore larger values will cause there to be less dirty data for a * given throughput. * * For the smoothest delay, this value should be about 1 billion divided @@ -130,11 +130,6 @@ int zfs_delay_min_dirty_percent = 60; uint64_t zfs_delay_scale = 1000 * 1000 * 1000 / 2000; -/* - * XXX someday maybe turn these into #defines, and you have to tune it on a - * per-pool basis using zfs.conf. - */ - #ifdef __FreeBSD__ extern int zfs_vdev_async_write_active_max_dirty_percent; From owner-svn-src-stable@FreeBSD.ORG Thu Oct 2 23:35:07 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0867346; Thu, 2 Oct 2014 23:35:07 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 80C51273; Thu, 2 Oct 2014 23:35:07 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 8EF813C6BCF; Fri, 3 Oct 2014 09:34:59 +1000 (EST) Date: Fri, 3 Oct 2014 09:34:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <201410021713.57943.jhb@freebsd.org> Message-ID: <20141003084842.T998@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=zzPu0r9sZ4VNOpkXl7cA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Bruce Evans X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2014 23:35:07 -0000 On Thu, 2 Oct 2014, John Baldwin wrote: > On Thursday, October 02, 2014 2:16:28 am Glen Barber wrote: >> On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: >>> On Wed, 1 Oct 2014, Glen Barber wrote: >>> >>>> Log: >>>> MFC r268376 (imp): >>>> >>>> rm -rf can fail sometimes with an error from fts_read. Make it >>>> honor fflag to ignore fts_read errors, but stop deleting from >>>> that directory because no further progress can be made. >>> >>> I asked for this to be backed out in -current. It is not suitable for > MFC. >> >> It fixes an immediate issue that prevents high-concurrent make(1) jobs >> from stomping over each other. >> >> If there is a more suitable solution, it needs to be introduced in head/ >> first, pending MFC for 10.1-RELEASE. >> >> In the meantime, we lack any alternate fix, and this resolves the >> immediate issue at hand. >> >>> See old mail for more details. >> >> I saw the original email. I do not see a proposed patch. My mail gave hints for hundreds of patches. None of them are good enough to propose. You could at least limit the special case to the errno that fts_read() returns when it gets confused instead of ignoring all errors. > I think the proposed patch is to revert this and fix the broken Makefiles > instead. The problem with changing rm to workaround a bug in FreeBSD's > Makefiles is we are breaking rm(1) for everyone else in the world to cater to > a bug in our build system. There is still the larger problem with fts_read(). Applications like rm are specified to do a complete tree walk, with special handling for files that do not exist. If fts_read() is going to abort in the middle of a tree walk, then it is unusable for implementing applications like rm. > Are you happy that we are invoking the same commands in parallel for a make > target? In some cases it may be ok, but there are many others where it is not > (e.g. if two jobs are both compiling the same .o file, the second one might > replace an object file out from under a subsequent link that starts after the > first one finishes). Instead of breaking rm, you should be harassing whoever > broke make (or added the SUBDIR_PARALLEL logic). Presumably you can build > without -j as a workaround. Even multiple rm -f's for cleaning an otherwise static tree aren't safe unless rm -f works as specified. It's hard to think of a single safe example using standard utilities (except make itself, used more carefully). Bruce From owner-svn-src-stable@FreeBSD.ORG Fri Oct 3 00:13:11 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6458E817; Fri, 3 Oct 2014 00:13:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46E0281B; Fri, 3 Oct 2014 00:13:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930DABZ098257; Fri, 3 Oct 2014 00:13:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930DAso098256; Fri, 3 Oct 2014 00:13:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030013.s930DAso098256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:13:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272459 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:13:11 -0000 Author: gjb Date: Fri Oct 3 00:13:10 2014 New Revision: 272459 URL: https://svnweb.freebsd.org/changeset/base/272459 Log: Update stable/10 to -RC1 in preparation of branching releng/10.1 Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Thu Oct 2 23:26:49 2014 (r272458) +++ stable/10/sys/conf/newvers.sh Fri Oct 3 00:13:10 2014 (r272459) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="BETA3" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Fri Oct 3 00:58:43 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A76452F8; Fri, 3 Oct 2014 00:58:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93ACEBDA; Fri, 3 Oct 2014 00:58:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s930whC3017862; Fri, 3 Oct 2014 00:58:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s930whpS017861; Fri, 3 Oct 2014 00:58:43 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410030058.s930whpS017861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 3 Oct 2014 00:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272464 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 00:58:43 -0000 Author: gjb Date: Fri Oct 3 00:58:42 2014 New Revision: 272464 URL: https://svnweb.freebsd.org/changeset/base/272464 Log: Bump __FreeBSD_version after releng/10.1 branch. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/param.h Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Fri Oct 3 00:58:34 2014 (r272463) +++ stable/10/sys/sys/param.h Fri Oct 3 00:58:42 2014 (r272464) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000717 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001500 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 03:11:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 475E9F47; Sat, 4 Oct 2014 03:11:10 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F032528C; Sat, 4 Oct 2014 03:11:09 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id et14so2427844pad.31 for ; Fri, 03 Oct 2014 20:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=qnDAyq3iNCuTH8OIX8dkSJI6pQYsK2kAgyM+EpB+Lw0=; b=CeyEY9XQPKMf/pEjQUP6Yf2X3f874CQjl9rypWW02uWGzOV7JMPsjzBo8lAoS7pD/8 xKA4IZYdDoAmp6Edq7l4T5Xm5z3l8gSQU70oBwQODzmRIQmtzJyqd4t0omuk73tkvaCY 0PqErtlNi7VZ9dmXO54UEpoBOK8J4fxEgJ622wPwCaeTzyIYBUBvw1EH/EErZq8YCOMI brgEYIXiZxJ/9JFIkXB6TkxqBGUsU0HXNyt6vWM5/y8hxxmuMV9nbcaDTIBCqR64gb9M q5VdInUfxSmKVK3SkIMVhCqcF1597D4NYlogk+kHpWxZWR62k4/ztvkbr9ptwkWJx0H/ 7emg== X-Received: by 10.66.219.6 with SMTP id pk6mr10827030pac.35.1412392269331; Fri, 03 Oct 2014 20:11:09 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:44b4:d70:65e5:35a5? ([2601:8:ab80:7d6:44b4:d70:65e5:35a5]) by mx.google.com with ESMTPSA id t11sm5258287pdj.89.2014.10.03.20.11.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 20:11:08 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r272372 - stable/10/bin/rm From: Garrett Cooper In-Reply-To: <20141003084842.T998@besplex.bde.org> Date: Fri, 3 Oct 2014 20:11:02 -0700 Message-Id: References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 03:11:10 -0000 --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 2, 2014, at 16:34, Bruce Evans wrote: > There is still the larger problem with fts_read(). Applications like = rm > are specified to do a complete tree walk, with special handling for = files > that do not exist. If fts_read() is going to abort in the middle of a > tree walk, then it is unusable for implementing applications like rm. +1. In this case I was doing a du -sh /* while I was running rm -Rf /rel = (an old make release directory tree). This stopped the du -sh: $ sudo du -sh /* = = =20 8.0K /COPYRIGHT 996K /bin 218M /boot 0B /boot.config 2.5K /dev 4.0K /entropy 2.2M /etc 1.0G /home 16M /lib 280K /libexec 4.0K /media 4.0K /mnt 4.0K /proc du: /rel/usr/ports/net/samba36: No such file or directory du: /rel/usr/ports/net/aslookup: No such file or directory du: /rel/usr/ports/net/p5-Net-Amazon-AWSSign: No such file or directory du: /rel/usr/ports/net/p5-Net-Server-SS-PreFork: No such file or = directory du: /rel/usr/ports/net/lla: No such file or directory du: /rel/usr/ports/net/sslh: No such file or directory du: /rel/usr/ports/net/wmlj: No such file or directory du: /rel/usr/ports/net/sendsms: No such file or directory du: /rel/usr/ports/net/uriparser: No such file or directory du: /rel/usr/ports/net/p5-Data-IPV4-Range-Parse: No such file or = directory du: /rel/usr/ports/net/cagibi: No such file or directory du: /rel/usr/ports/net/fsplib: No such file or directory du: fts_read: No such file or directory The problem with changing fts_read to ignore ENOENT or other = errors will break compatibility with Linux [and other OSes potentially], = and is not the correct solution for this issue. I do however think that = the errnos to ignore with -f should be... - EACCES - ENOENT - EPERM =85 as filtering out these errors would handle the case that -f = should handle according to the manpage: -f Attempt to remove the files without prompting for = confirmation, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the = exit status to reflect an error. The -f option overrides any = previous -i options. Thanks, -Garrett --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUL2VGAAoJEMZr5QU6S73ejPIH/1OaP9BHeJlVIwCwtzE9od2u yOMa8KH/4gzsYRQ15puBrZ2CDBIuwFbLmuAp1aaoiSCTf+EUqDCG4RT1+LcQ/d3D E+XHCqQ6RrgVuxyRohYcfFQk0bhvrc8sRkQaKBzRHCqk8TCHPoJydi9Ix7Ir2lem tPQOyq9fdUQlzN6dFdBMUAQCrwC0sN8Ozk0qxDeQnlMgD/w/paOemmQ3Bx4Yw7Pv 17C6ZsdccUtDwLB7yXtKLd7WMeJYUEtoqZKI4AEIIzBqyJdek0EBBxELoSFsL/bG 8RPvxEV4Pwi+CM/ItVjxnugwSMF/6s1vI89enoBJJgcUyEf1MXo1K2SylBQaoGU= =5ft1 -----END PGP SIGNATURE----- --Apple-Mail=_7CDEB9E0-CF06-451B-971D-D7DC20EFC349-- From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 04:09:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 988954F2; Sat, 4 Oct 2014 04:09:05 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 683708E5; Sat, 4 Oct 2014 04:09:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XaGeP-000KRl-NJ; Sat, 04 Oct 2014 04:08:57 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s9448uMD022630; Fri, 3 Oct 2014 22:08:56 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/UUThfTFteRu4pWOmYWTkC X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r272372 - stable/10/bin/rm From: Ian Lepore To: NGie Cooper In-Reply-To: References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> Content-Type: text/plain; charset="us-ascii" Date: Fri, 03 Oct 2014 22:08:55 -0600 Message-ID: <1412395735.12052.104.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org, svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , Glen Barber , Bruce Evans X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 04:09:05 -0000 On Wed, 2014-10-01 at 23:25 -0700, NGie Cooper wrote: > On Wed, Oct 1, 2014 at 11:16 PM, Glen Barber wrote: > > On Thu, Oct 02, 2014 at 02:56:05PM +1000, Bruce Evans wrote: > >> On Wed, 1 Oct 2014, Glen Barber wrote: > >> > >> >Log: > >> > MFC r268376 (imp): > >> > > >> > rm -rf can fail sometimes with an error from fts_read. Make it > >> > honor fflag to ignore fts_read errors, but stop deleting from > >> > that directory because no further progress can be made. > >> > >> I asked for this to be backed out in -current. It is not suitable for MFC. > >> > > > > It fixes an immediate issue that prevents high-concurrent make(1) jobs > > from stomping over each other. > > The real problem is noted in this bug: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192490 ; the > SUBDIR_PARALLEL logic is executing multiple instances of the > clean/cleandir .PHONY targets. > > I agree with bde@ that this commit is papering over a bigger problem, > but it's annoying enough and causes enough false positives that I > understand why gjb@ MFCed the commit imp@ did in head. > > Thank you.. > I agree that the change to rm only papers over the real problem. I think bug 192490 should be re-opened so that we can address the actual build system problem, but I don't know if that's allowed for in the new bugzilla workflows, or if we need to open a new report now. I've been digging into the actual build system problem this evening, and I'm starting to think that all the reported failures that contain enough of the log to be useful show that the build failed in a directory that has subdirectories. That is, one of the failures appeared to be caused by rm -rf running concurrently in usr.bin/lex and usr.bin/lex/lib. Another failure involves modules/aic7xxx and modules/aic7xxx/ahc. In another log it appeared that ata/atapci/chipsets was being deleted simulataneously with ata/atapci/chipsets/ataacard and several other subdirs under chipsets/. If this is indeed the cause of the problem I'm too tired right now to think of a fix, but I at least wanted to get what I found in writing before I sleep and completely forget it. :) BTW, I didn't see any evidence that the exact same path was being multiply deleted at the same time. That is, no duplicated entries in SUBDIR lists or accidentally processing the entire sys/modules hiearchy twice in parallel somehow through two different parent paths or anything like that. -- Ian From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 05:50:06 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0735F542; Sat, 4 Oct 2014 05:50:06 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8ABA8308; Sat, 4 Oct 2014 05:50:05 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 8AC844228DF; Sat, 4 Oct 2014 15:49:57 +1000 (EST) Date: Sat, 4 Oct 2014 15:49:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: Message-ID: <20141004145802.M1399@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=fvDlOjIf c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=RB0AxxmXJQVUJ4zGl94A:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Bruce Evans X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:50:06 -0000 On Fri, 3 Oct 2014, Garrett Cooper wrote: > On Oct 2, 2014, at 16:34, Bruce Evans wrote: > >> There is still the larger problem with fts_read(). Applications like rm >> are specified to do a complete tree walk, with special handling for file= s >> that do not exist. If fts_read() is going to abort in the middle of a >> tree walk, then it is unusable for implementing applications like rm. > > +1. In this case I was doing a du -sh /* while I was running rm -Rf /rel = (an old make release directory tree). This stopped the du -sh: > > $ sudo du -sh /* > 8.0K /COPYRIGHT > 996K /bin > ... > du: /rel/usr/ports/net/fsplib: No such file or directory > du: fts_read: No such file or directory It is fine garbage collection to delete itself, but that should be more like "du: du: No such file or directory" :-). > =09The problem with changing fts_read to ignore ENOENT or other errors wi= ll break compatibility with Linux [and other OSes potentially], and is not = the correct solution for this issue. I do however think that the errnos to = ignore with -f should be... > > - EACCES > - ENOENT > - EPERM No, the only error that can be safely ignored in most cases is ENOENT. EACCES and EPERM mean that rm has failed to remove the requested files. More errors could be ignored under a different option. > =09=85 as filtering out these errors would handle the case that -f should= handle according to the manpage: > > -f Attempt to remove the files without prompting for confirmatio= n, > regardless of the file's permissions. If the file does not > exist, do not display a diagnostic message or modify the exit > status to reflect an error. The -f option overrides any prev= ious > -i options. I didn't realize theat the man page was that broken. It doesn't even menti= on the main effect of -f -- to ignore errors for nonexistent files. This is discussed in the COMPATIBILITY section, with quite bad wording: % COMPATIBILITY % The rm utility differs from historical implementations in that the -= f % option only masks attempts to remove non-existent files instead of m= ask- % ing a large variety of errors. The -v option is non-standard and it= s use % in scripts is not recommended. "masks attempts to remove" is strange wording. rm doesn't attempt to remove nonexistent files; it attempts to remove existent files ... The code doesn't do anything like that. It is close to POSIX, and just tries to remove existent files and then ignores the ENOENT error for nonexistent files iff -f. These bugs haven't changed since FreeBSD-1 (Net/2?). They are only in the man page. The change to POSIX conformance is documented in the FreeBSD-1 version: %%% /* * rm -- *=09This rm is different from historic rm's, but is expected to match *=09POSIX 1003.2 behavior. The most visible difference is that -f *=09has two specific effects now, ignore non-existent files and force * =09file removal. */ %%% This hasn't changed, and neither has the man page which apparently documents a version before this. I think it is misleading to say "force file removal". I still tend to think of the f in rm -f being "force". That seems to have been last correct in 1988 (?) before Net/2. All f does is to force is turn off some checking and interactivity. It doesn't do things like clobbering immutable flags so that unlink() can work. Bruce From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 05:59:10 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B55BE6A9; Sat, 4 Oct 2014 05:59:10 +0000 (UTC) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 70A673CD; Sat, 4 Oct 2014 05:59:09 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id CCB87D43D00; Sat, 4 Oct 2014 15:59:00 +1000 (EST) Date: Sat, 4 Oct 2014 15:58:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bruce Evans Subject: Re: svn commit: r272372 - stable/10/bin/rm In-Reply-To: <20141004145802.M1399@besplex.bde.org> Message-ID: <20141004155126.W1586@besplex.bde.org> References: <201410011618.s91GIfR5071251@svn.freebsd.org> <20141002141656.Y1807@besplex.bde.org> <20141002061628.GO1275@hub.FreeBSD.org> <201410021713.57943.jhb@freebsd.org> <20141003084842.T998@besplex.bde.org> <20141004145802.M1399@besplex.bde.org> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=MM4l8k_P8ruoUpHBXfQA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: src-committers@freebsd.org, svn-src-stable-10@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Glen Barber , Garrett Cooper X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 05:59:10 -0000 On Sat, 4 Oct 2014, Bruce Evans wrote: > On Fri, 3 Oct 2014, Garrett Cooper wrote: >> =09=85 as filtering out these errors would handle the case that -f shoul= d=20 >> handle according to the manpage: >>=20 >> -f Attempt to remove the files without prompting for confirmati= on, >> regardless of the file's permissions. If the file does not >> exist, do not display a diagnostic message or modify the exi= t >> status to reflect an error. The -f option overrides any=20 >> previous >> -i options. > > I didn't realize theat the man page was that broken. It doesn't even men= tion > the main effect of -f -- to ignore errors for nonexistent files. This is > discussed in the COMPATIBILITY section, with quite bad wording: Oops, I missed the second sentence in the above. > % COMPATIBILITY > % The rm utility differs from historical implementations in that the= -f > % option only masks attempts to remove non-existent files instead of= =20 > mask- > % ing a large variety of errors. The -v option is non-standard and = its=20 > use > % in scripts is not recommended. > > "masks attempts to remove" is strange wording. rm doesn't attempt to > remove nonexistent files; it attempts to remove existent files ... > > The code doesn't do anything like that. It is close to POSIX, and just > tries to remove existent files and then ignores the ENOENT error for > nonexistent files iff -f. I misread this too. There are only minor wording problems. Bruce From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 14:38:39 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8BF8CBE; Sat, 4 Oct 2014 14:38:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4860B0F; Sat, 4 Oct 2014 14:38:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EcdFm085102; Sat, 4 Oct 2014 14:38:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Ecde0085101; Sat, 4 Oct 2014 14:38:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410041438.s94Ecde0085101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Oct 2014 14:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272525 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:38:39 -0000 Author: trasz Date: Sat Oct 4 14:38:39 2014 New Revision: 272525 URL: https://svnweb.freebsd.org/changeset/base/272525 Log: MFC 271759: Add missing links to taskqueue(9). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sat Oct 4 14:30:16 2014 (r272524) +++ stable/10/share/man/man9/Makefile Sat Oct 4 14:38:39 2014 (r272525) @@ -1345,6 +1345,7 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_block.9 \ taskqueue.9 taskqueue_cancel.9 \ + taskqueue.9 taskqueue_cancel_timeout.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ taskqueue.9 TASKQUEUE_DECLARE.9 \ @@ -1352,13 +1353,18 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 TASKQUEUE_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_drain.9 \ taskqueue.9 taskqueue_drain_all.9 \ + taskqueue.9 taskqueue_drain_timeout.9 \ taskqueue.9 taskqueue_enqueue.9 \ taskqueue.9 taskqueue_enqueue_fast.9 \ + taskqueue.9 taskqueue_enqueue_timeout.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE.9 \ taskqueue.9 TASKQUEUE_FAST_DEFINE_THREAD.9 \ taskqueue.9 taskqueue_free.9 \ taskqueue.9 taskqueue_member.9 \ taskqueue.9 taskqueue_run.9 \ + taskqueue.9 taskqueue_set_callback.9 \ + taskqueue.9 taskqueue_start_threads.9 \ + taskqueue.9 taskqueue_start_threads_pinned.9 \ taskqueue.9 taskqueue_unblock.9 MLINKS+=time.9 boottime.9 \ time.9 time_second.9 \ From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 14:40:13 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2419FE11; Sat, 4 Oct 2014 14:40:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C286B1E; Sat, 4 Oct 2014 14:40:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94EeCsu085545; Sat, 4 Oct 2014 14:40:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94EeCOr085544; Sat, 4 Oct 2014 14:40:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201410041440.s94EeCOr085544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Oct 2014 14:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272526 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 14:40:13 -0000 Author: trasz Date: Sat Oct 4 14:40:12 2014 New Revision: 272526 URL: https://svnweb.freebsd.org/changeset/base/272526 Log: MFC 271761: Add missing link to TIMEOUT_TASK_INIT(9). Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Sat Oct 4 14:38:39 2014 (r272525) +++ stable/10/share/man/man9/Makefile Sat Oct 4 14:40:12 2014 (r272526) @@ -1365,7 +1365,8 @@ MLINKS+=taskqueue.9 TASK_INIT.9 \ taskqueue.9 taskqueue_set_callback.9 \ taskqueue.9 taskqueue_start_threads.9 \ taskqueue.9 taskqueue_start_threads_pinned.9 \ - taskqueue.9 taskqueue_unblock.9 + taskqueue.9 taskqueue_unblock.9 \ + taskqueue.9 TIMEOUT_TASK_INIT.9 MLINKS+=time.9 boottime.9 \ time.9 time_second.9 \ time.9 time_uptime.9 From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 17:46:05 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 579DD89D; Sat, 4 Oct 2014 17:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28F2AF08; Sat, 4 Oct 2014 17:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Hk5hP077211; Sat, 4 Oct 2014 17:46:05 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Hk5Xn077210; Sat, 4 Oct 2014 17:46:05 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410041746.s94Hk5Xn077210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 17:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272531 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 17:46:05 -0000 Author: pfg Date: Sat Oct 4 17:46:04 2014 New Revision: 272531 URL: https://svnweb.freebsd.org/changeset/base/272531 Log: MFC r271467, r271468: ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:21:30 2014 (r272530) +++ stable/10/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:46:04 2014 (r272531) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,11 @@ #include #include -#include -#include +#include #include +#include +#include +#include #include #include "opt_directio.h" @@ -94,6 +97,7 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; +static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -124,6 +128,7 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, + .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2058,3 +2063,43 @@ ext2_write(struct vop_write_args *ap) } return (error); } + +/* + * get page routine + */ +static int +ext2_getpages(struct vop_getpages_args *ap) +{ + int i; + vm_page_t mreq; + int pcount; + + pcount = round_page(ap->a_count) / PAGE_SIZE; + mreq = ap->a_m[ap->a_reqpage]; + + /* + * if ANY DEV_BSIZE blocks are valid on a large filesystem block, + * then the entire page is valid. Since the page may be mapped, + * user programs might reference data beyond the actual end of file + * occuring within the page. We have to zero that data. + */ + VM_OBJECT_WLOCK(mreq->object); + if (mreq->valid) { + if (mreq->valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + for (i = 0; i < pcount; i++) { + if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_free(ap->a_m[i]); + vm_page_unlock(ap->a_m[i]); + } + } + VM_OBJECT_WUNLOCK(mreq->object); + return VM_PAGER_OK; + } + VM_OBJECT_WUNLOCK(mreq->object); + + return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, + ap->a_count, + ap->a_reqpage); +} From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 17:49:37 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C63A4CB8; Sat, 4 Oct 2014 17:49:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97CAFF39; Sat, 4 Oct 2014 17:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94Hnbqs077790; Sat, 4 Oct 2014 17:49:37 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Hnbb2077789; Sat, 4 Oct 2014 17:49:37 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410041749.s94Hnbb2077789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 17:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272532 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 17:49:37 -0000 Author: pfg Date: Sat Oct 4 17:49:36 2014 New Revision: 272532 URL: https://svnweb.freebsd.org/changeset/base/272532 Log: MFC r271467, r271468: ext2fs: add ext2_getpages(). Literally copy/pasted from ffs_getpages(). Tested with: fsx Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:46:04 2014 (r272531) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 17:49:36 2014 (r272532) @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -65,9 +66,11 @@ #include #include -#include -#include +#include #include +#include +#include +#include #include #include "opt_directio.h" @@ -96,6 +99,7 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; +static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -126,6 +130,7 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, + .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2067,3 +2072,43 @@ ext2_write(struct vop_write_args *ap) } return (error); } + +/* + * get page routine + */ +static int +ext2_getpages(struct vop_getpages_args *ap) +{ + int i; + vm_page_t mreq; + int pcount; + + pcount = round_page(ap->a_count) / PAGE_SIZE; + mreq = ap->a_m[ap->a_reqpage]; + + /* + * if ANY DEV_BSIZE blocks are valid on a large filesystem block, + * then the entire page is valid. Since the page may be mapped, + * user programs might reference data beyond the actual end of file + * occuring within the page. We have to zero that data. + */ + VM_OBJECT_WLOCK(mreq->object); + if (mreq->valid) { + if (mreq->valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + for (i = 0; i < pcount; i++) { + if (i != ap->a_reqpage) { + vm_page_lock(ap->a_m[i]); + vm_page_free(ap->a_m[i]); + vm_page_unlock(ap->a_m[i]); + } + } + VM_OBJECT_WUNLOCK(mreq->object); + return VM_PAGER_OK; + } + VM_OBJECT_WUNLOCK(mreq->object); + + return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, + ap->a_count, + ap->a_reqpage); +} From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 19:34:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1F1496F; Sat, 4 Oct 2014 19:33:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD82DBEB; Sat, 4 Oct 2014 19:33:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94JXxl7032243; Sat, 4 Oct 2014 19:33:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94JXxGa032241; Sat, 4 Oct 2014 19:33:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041933.s94JXxGa032241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 19:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272540 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 19:34:00 -0000 Author: kib Date: Sat Oct 4 19:33:58 2014 New Revision: 272540 URL: https://svnweb.freebsd.org/changeset/base/272540 Log: MFC r271747: - Use NULL instead of 0 for fpcurthread. - Note the quirk with the interrupt enabled state of the dna handler. - Use just panic() instead of printf() and panic(). Print tid instead of pid, the fpu state is per-thread. MFC r271924: Update and clarify comments. Remove the useless counter for impossible, but seen in wild situation (on buggy hypervisors). Modified: stable/10/sys/amd64/amd64/fpu.c stable/10/sys/amd64/amd64/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/fpu.c ============================================================================== --- stable/10/sys/amd64/amd64/fpu.c Sat Oct 4 19:32:46 2014 (r272539) +++ stable/10/sys/amd64/amd64/fpu.c Sat Oct 4 19:33:58 2014 (r272540) @@ -362,7 +362,7 @@ fpuexit(struct thread *td) stop_emulating(); fpusave(curpcb->pcb_save); start_emulating(); - PCPU_SET(fpcurthread, 0); + PCPU_SET(fpcurthread, NULL); } critical_exit(); } @@ -603,33 +603,37 @@ fputrap_sse(void) } /* - * Implement device not available (DNA) exception + * Device Not Available (DNA, #NM) exception handler. * - * It would be better to switch FP context here (if curthread != fpcurthread) - * and not necessarily for every context switch, but it is too hard to - * access foreign pcb's. + * It would be better to switch FP context here (if curthread != + * fpcurthread) and not necessarily for every context switch, but it + * is too hard to access foreign pcb's. */ - -static int err_count = 0; - void fpudna(void) { + /* + * This handler is entered with interrupts enabled, so context + * switches may occur before critical_enter() is executed. If + * a context switch occurs, then when we regain control, our + * state will have been completely restored. The CPU may + * change underneath us, but the only part of our context that + * lives in the CPU is CR0.TS and that will be "restored" by + * setting it on the new CPU. + */ critical_enter(); + if (PCPU_GET(fpcurthread) == curthread) { - printf("fpudna: fpcurthread == curthread %d times\n", - ++err_count); + printf("fpudna: fpcurthread == curthread\n"); stop_emulating(); critical_exit(); return; } if (PCPU_GET(fpcurthread) != NULL) { - printf("fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", - PCPU_GET(fpcurthread), - PCPU_GET(fpcurthread)->td_proc->p_pid, - curthread, curthread->td_proc->p_pid); - panic("fpudna"); + panic("fpudna: fpcurthread = %p (%d), curthread = %p (%d)\n", + PCPU_GET(fpcurthread), PCPU_GET(fpcurthread)->td_tid, + curthread, curthread->td_tid); } stop_emulating(); /* Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Sat Oct 4 19:32:46 2014 (r272539) +++ stable/10/sys/amd64/amd64/trap.c Sat Oct 4 19:33:58 2014 (r272540) @@ -450,8 +450,8 @@ trap(struct trapframe *frame) case T_XMMFLT: /* SIMD floating-point exception */ case T_FPOPFLT: /* FPU operand fetch fault */ /* - * XXXKIB for now disable any FPU traps in kernel - * handler registration seems to be overkill + * For now, supporting kernel handler + * registration for FPU traps is overkill. */ trap_fatal(frame, 0); goto out; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 19:37:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E6F1B42; Sat, 4 Oct 2014 19:37:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 002DBC18; Sat, 4 Oct 2014 19:37:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94JbiB2032784; Sat, 4 Oct 2014 19:37:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94Jbiq5032783; Sat, 4 Oct 2014 19:37:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410041937.s94Jbiq5032783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Oct 2014 19:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272541 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 19:37:45 -0000 Author: kib Date: Sat Oct 4 19:37:44 2014 New Revision: 272541 URL: https://svnweb.freebsd.org/changeset/base/272541 Log: MFC r272130: In kern_linkat() and kern_renameat(), do not call namei(9) while holding a write reference on the filesystem. Try to get write reference in unblocked way after all vnodes are resolved; if failed, drop all locks and retry after waiting for suspension end. Modified: stable/10/sys/kern/vfs_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_syscalls.c ============================================================================== --- stable/10/sys/kern/vfs_syscalls.c Sat Oct 4 19:33:58 2014 (r272540) +++ stable/10/sys/kern/vfs_syscalls.c Sat Oct 4 19:37:44 2014 (r272541) @@ -1552,10 +1552,10 @@ kern_linkat(struct thread *td, int fd1, cap_rights_t rights; int error; +again: bwillwrite(); NDINIT_AT(&nd, LOOKUP, follow | AUDITVNODE1, segflg, path1, fd1, td); -again: if ((error = namei(&nd)) != 0) return (error); NDFREE(&nd, NDF_ONLY_PNBUF); @@ -1564,50 +1564,65 @@ again: vrele(vp); return (EPERM); /* POSIX */ } - if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) { - vrele(vp); - return (error); - } NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | AUDITVNODE2, segflg, path2, fd2, cap_rights_init(&rights, CAP_LINKAT), td); if ((error = namei(&nd)) == 0) { if (nd.ni_vp != NULL) { + NDFREE(&nd, NDF_ONLY_PNBUF); if (nd.ni_dvp == nd.ni_vp) vrele(nd.ni_dvp); else vput(nd.ni_dvp); vrele(nd.ni_vp); - error = EEXIST; - } else if ((error = vn_lock(vp, LK_EXCLUSIVE)) == 0) { + vrele(vp); + return (EEXIST); + } else if (nd.ni_dvp->v_mount != vp->v_mount) { /* - * Check for cross-device links. No need to - * recheck vp->v_type, since it cannot change - * for non-doomed vnode. + * Cross-device link. No need to recheck + * vp->v_type, since it cannot change, except + * to VBAD. */ - if (nd.ni_dvp->v_mount != vp->v_mount) - error = EXDEV; - else - error = can_hardlink(vp, td->td_ucred); - if (error == 0) + NDFREE(&nd, NDF_ONLY_PNBUF); + vput(nd.ni_dvp); + vrele(vp); + return (EXDEV); + } else if ((error = vn_lock(vp, LK_EXCLUSIVE)) == 0) { + error = can_hardlink(vp, td->td_ucred); #ifdef MAC + if (error == 0) error = mac_vnode_check_link(td->td_ucred, nd.ni_dvp, vp, &nd.ni_cnd); - if (error == 0) #endif - error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); + if (error != 0) { + vput(vp); + vput(nd.ni_dvp); + NDFREE(&nd, NDF_ONLY_PNBUF); + return (error); + } + error = vn_start_write(vp, &mp, V_NOWAIT); + if (error != 0) { + vput(vp); + vput(nd.ni_dvp); + NDFREE(&nd, NDF_ONLY_PNBUF); + error = vn_start_write(NULL, &mp, + V_XSLEEP | PCATCH); + if (error != 0) + return (error); + goto again; + } + error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd); VOP_UNLOCK(vp, 0); vput(nd.ni_dvp); + vn_finished_write(mp); + NDFREE(&nd, NDF_ONLY_PNBUF); } else { vput(nd.ni_dvp); NDFREE(&nd, NDF_ONLY_PNBUF); vrele(vp); - vn_finished_write(mp); goto again; } - NDFREE(&nd, NDF_ONLY_PNBUF); } vrele(vp); - vn_finished_write(mp); return (error); } @@ -3517,6 +3532,7 @@ kern_renameat(struct thread *td, int old cap_rights_t rights; int error; +again: bwillwrite(); #ifdef MAC NDINIT_ATRIGHTS(&fromnd, DELETE, LOCKPARENT | LOCKLEAF | SAVESTART | @@ -3537,14 +3553,6 @@ kern_renameat(struct thread *td, int old VOP_UNLOCK(fromnd.ni_vp, 0); #endif fvp = fromnd.ni_vp; - if (error == 0) - error = vn_start_write(fvp, &mp, V_WAIT | PCATCH); - if (error != 0) { - NDFREE(&fromnd, NDF_ONLY_PNBUF); - vrele(fromnd.ni_dvp); - vrele(fvp); - goto out1; - } NDINIT_ATRIGHTS(&tond, RENAME, LOCKPARENT | LOCKLEAF | NOCACHE | SAVESTART | AUDITVNODE2, pathseg, new, newfd, cap_rights_init(&rights, CAP_LINKAT), td); @@ -3557,11 +3565,30 @@ kern_renameat(struct thread *td, int old NDFREE(&fromnd, NDF_ONLY_PNBUF); vrele(fromnd.ni_dvp); vrele(fvp); - vn_finished_write(mp); goto out1; } tdvp = tond.ni_dvp; tvp = tond.ni_vp; + error = vn_start_write(fvp, &mp, V_NOWAIT); + if (error != 0) { + NDFREE(&fromnd, NDF_ONLY_PNBUF); + NDFREE(&tond, NDF_ONLY_PNBUF); + if (tvp != NULL) + vput(tvp); + if (tdvp == tvp) + vrele(tdvp); + else + vput(tdvp); + vrele(fromnd.ni_dvp); + vrele(fvp); + vrele(tond.ni_startdir); + if (fromnd.ni_startdir != NULL) + vrele(fromnd.ni_startdir); + error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH); + if (error != 0) + return (error); + goto again; + } if (tvp != NULL) { if (fvp->v_type == VDIR && tvp->v_type != VDIR) { error = ENOTDIR; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 20:35:08 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D43969E; Sat, 4 Oct 2014 20:35:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F457192; Sat, 4 Oct 2014 20:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94KZ8HH060555; Sat, 4 Oct 2014 20:35:08 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94KZ8RL060554; Sat, 4 Oct 2014 20:35:08 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410042035.s94KZ8RL060554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 4 Oct 2014 20:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r272542 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 20:35:08 -0000 Author: pfg Date: Sat Oct 4 20:35:07 2014 New Revision: 272542 URL: https://svnweb.freebsd.org/changeset/base/272542 Log: Revert r272532, It broke the build. Pointyhat: me Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 19:37:44 2014 (r272541) +++ stable/9/sys/fs/ext2fs/ext2_vnops.c Sat Oct 4 20:35:07 2014 (r272542) @@ -54,7 +54,6 @@ #include #include #include -#include #include #include #include @@ -66,11 +65,9 @@ #include #include -#include -#include -#include #include -#include +#include +#include #include #include "opt_directio.h" @@ -99,7 +96,6 @@ static int ext2_chown(struct vnode *, ui static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; -static vop_getpages_t ext2_getpages; static vop_getattr_t ext2_getattr; static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; @@ -130,7 +126,6 @@ struct vop_vector ext2_vnodeops = { .vop_close = ext2_close, .vop_create = ext2_create, .vop_fsync = ext2_fsync, - .vop_getpages = ext2_getpages, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, .vop_ioctl = ext2_ioctl, @@ -2072,43 +2067,3 @@ ext2_write(struct vop_write_args *ap) } return (error); } - -/* - * get page routine - */ -static int -ext2_getpages(struct vop_getpages_args *ap) -{ - int i; - vm_page_t mreq; - int pcount; - - pcount = round_page(ap->a_count) / PAGE_SIZE; - mreq = ap->a_m[ap->a_reqpage]; - - /* - * if ANY DEV_BSIZE blocks are valid on a large filesystem block, - * then the entire page is valid. Since the page may be mapped, - * user programs might reference data beyond the actual end of file - * occuring within the page. We have to zero that data. - */ - VM_OBJECT_WLOCK(mreq->object); - if (mreq->valid) { - if (mreq->valid != VM_PAGE_BITS_ALL) - vm_page_zero_invalid(mreq, TRUE); - for (i = 0; i < pcount; i++) { - if (i != ap->a_reqpage) { - vm_page_lock(ap->a_m[i]); - vm_page_free(ap->a_m[i]); - vm_page_unlock(ap->a_m[i]); - } - } - VM_OBJECT_WUNLOCK(mreq->object); - return VM_PAGER_OK; - } - VM_OBJECT_WUNLOCK(mreq->object); - - return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, - ap->a_count, - ap->a_reqpage); -} From owner-svn-src-stable@FreeBSD.ORG Sat Oct 4 22:52:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35F20928; Sat, 4 Oct 2014 22:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21E64115; Sat, 4 Oct 2014 22:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94MqM2H027814; Sat, 4 Oct 2014 22:52:22 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94MqLiD027813; Sat, 4 Oct 2014 22:52:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201410042252.s94MqLiD027813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 4 Oct 2014 22:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272543 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 22:52:22 -0000 Author: alc Date: Sat Oct 4 22:52:21 2014 New Revision: 272543 URL: https://svnweb.freebsd.org/changeset/base/272543 Log: MFC r271351 Fix a boundary case error in vm_reserv_alloc_contig(). Modified: stable/10/sys/vm/vm_reserv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_reserv.c ============================================================================== --- stable/10/sys/vm/vm_reserv.c Sat Oct 4 20:35:07 2014 (r272542) +++ stable/10/sys/vm/vm_reserv.c Sat Oct 4 22:52:21 2014 (r272543) @@ -299,7 +299,7 @@ vm_reserv_populate(vm_reserv_t rv) /* * Allocates a contiguous set of physical pages of the given size "npages" - * from an existing or newly-created reservation. All of the physical pages + * from existing or newly created reservations. All of the physical pages * must be at or above the given physical address "low" and below the given * physical address "high". The given value "alignment" determines the * alignment of the first physical page in the set. If the given value @@ -371,8 +371,8 @@ vm_reserv_alloc_contig(vm_object_t objec /* * Could at least one reservation fit between the first index to the - * left that can be used and the first index to the right that cannot - * be used? + * left that can be used ("leftcap") and the first index to the right + * that cannot be used ("rightcap")? */ first = pindex - VM_RESERV_INDEX(object, pindex); if (mpred != NULL) { @@ -394,6 +394,13 @@ vm_reserv_alloc_contig(vm_object_t objec if (first + maxpages > rightcap) { if (maxpages == VM_LEVEL_0_NPAGES) return (NULL); + + /* + * At least one reservation will fit between "leftcap" + * and "rightcap". However, a reservation for the + * last of the requested pages will not fit. Reduce + * the size of the upcoming allocation accordingly. + */ allocpages = minpages; } } @@ -417,16 +424,23 @@ vm_reserv_alloc_contig(vm_object_t objec } /* - * Allocate and populate the new reservations. The alignment and - * boundary specified for this allocation may be different from the - * alignment and boundary specified for the requested pages. For - * instance, the specified index may not be the first page within the - * first new reservation. + * Allocate the physical pages. The alignment and boundary specified + * for this allocation may be different from the alignment and + * boundary specified for the requested pages. For instance, the + * specified index may not be the first page within the first new + * reservation. */ m = vm_phys_alloc_contig(allocpages, low, high, ulmax(alignment, VM_LEVEL_0_SIZE), boundary > VM_LEVEL_0_SIZE ? boundary : 0); if (m == NULL) return (NULL); + + /* + * The allocated physical pages always begin at a reservation + * boundary, but they do not always end at a reservation boundary. + * Initialize every reservation that is completely covered by the + * allocated physical pages. + */ m_ret = NULL; index = VM_RESERV_INDEX(object, pindex); do { @@ -456,7 +470,7 @@ vm_reserv_alloc_contig(vm_object_t objec m += VM_LEVEL_0_NPAGES; first += VM_LEVEL_0_NPAGES; allocpages -= VM_LEVEL_0_NPAGES; - } while (allocpages > 0); + } while (allocpages >= VM_LEVEL_0_NPAGES); return (m_ret); /*