From owner-svn-src-stable-11@freebsd.org Sun Jul 24 08:12:24 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F30BA3A62; Sun, 24 Jul 2016 08:12:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 196C61CB1; Sun, 24 Jul 2016 08:12:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8CNCo070621; Sun, 24 Jul 2016 08:12:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O8CNr7070619; Sun, 24 Jul 2016 08:12:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607240812.u6O8CNr7070619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 08:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303256 - in stable/11/usr.sbin/pw: . tests X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:12:24 -0000 Author: bapt Date: Sun Jul 24 08:12:23 2016 New Revision: 303256 URL: https://svnweb.freebsd.org/changeset/base/303256 Log: iDo not try to delete the home of the user if is is not a directory for example "/dev/null" PR: 211195 Submitted by: rday Reported by: eniorm Approved by: re (kib) Modified: stable/11/usr.sbin/pw/rm_r.c stable/11/usr.sbin/pw/tests/pw_userdel.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/pw/rm_r.c ============================================================================== --- stable/11/usr.sbin/pw/rm_r.c Sun Jul 24 05:24:10 2016 (r303255) +++ stable/11/usr.sbin/pw/rm_r.c Sun Jul 24 08:12:23 2016 (r303256) @@ -50,6 +50,9 @@ rm_r(int rootfd, const char *path, uid_t path++; dirfd = openat(rootfd, path, O_DIRECTORY); + if (dirfd == -1) { + return; + } d = fdopendir(dirfd); while ((e = readdir(d)) != NULL) { Modified: stable/11/usr.sbin/pw/tests/pw_userdel.sh ============================================================================== --- stable/11/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 05:24:10 2016 (r303255) +++ stable/11/usr.sbin/pw/tests/pw_userdel.sh Sun Jul 24 08:12:23 2016 (r303256) @@ -59,9 +59,18 @@ delete_numeric_name_body() { ${PW} userdel -n 4001 } +atf_test_case home_not_a_dir +home_not_a_dir_body() { + populate_root_etc_skel + touch ${HOME}/foo + atf_check ${RPW} useradd foo -d /foo + atf_check ${RPW} userdel foo -r +} + atf_init_test_cases() { atf_add_test_case rmuser_seperate_group atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown atf_add_test_case delete_files atf_add_test_case delete_numeric_name + atf_add_test_case home_not_a_dir } From owner-svn-src-stable-11@freebsd.org Sun Jul 24 09:00:20 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A896BA396D; Sun, 24 Jul 2016 09:00:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 194F91D44; Sun, 24 Jul 2016 09:00:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O90JUS086102; Sun, 24 Jul 2016 09:00:19 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6O90HZj086080; Sun, 24 Jul 2016 09:00:17 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201607240900.u6O90HZj086080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 24 Jul 2016 09:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303260 - stable/11/share/timedef X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 09:00:20 -0000 Author: bapt Date: Sun Jul 24 09:00:16 2016 New Revision: 303260 URL: https://svnweb.freebsd.org/changeset/base/303260 Log: MFC: r303219 Add weekday to the date format of more locales Approved by: re (kib) Modified: stable/11/share/timedef/cs_CZ.ISO8859-2.src stable/11/share/timedef/cs_CZ.UTF-8.src stable/11/share/timedef/da_DK.ISO8859-15.src stable/11/share/timedef/da_DK.UTF-8.src stable/11/share/timedef/de_AT.ISO8859-15.src stable/11/share/timedef/de_AT.UTF-8.src stable/11/share/timedef/de_DE.ISO8859-15.src stable/11/share/timedef/de_DE.UTF-8.src stable/11/share/timedef/et_EE.ISO8859-15.src stable/11/share/timedef/et_EE.UTF-8.src stable/11/share/timedef/fi_FI.ISO8859-15.src stable/11/share/timedef/fi_FI.UTF-8.src stable/11/share/timedef/hr_HR.ISO8859-2.src stable/11/share/timedef/hr_HR.UTF-8.src stable/11/share/timedef/is_IS.ISO8859-15.src stable/11/share/timedef/is_IS.UTF-8.src stable/11/share/timedef/nb_NO.ISO8859-15.src stable/11/share/timedef/nb_NO.UTF-8.src stable/11/share/timedef/nn_NO.ISO8859-15.src stable/11/share/timedef/nn_NO.UTF-8.src stable/11/share/timedef/sk_SK.ISO8859-2.src stable/11/share/timedef/sk_SK.UTF-8.src Directory Properties: stable/11/ (props changed) Modified: stable/11/share/timedef/cs_CZ.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/cs_CZ.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/cs_CZ.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y %H:%M:%S +%A %e %B %Y %H:%M:%S # # AM/PM dopoledne odpoledne # # date_fmt -%e. %B %Y %H:%M:%S %Z +%A %e %B %Y %H:%M:%S %Z # # Long month names (without case ending) leden Modified: stable/11/share/timedef/cs_CZ.UTF-8.src ============================================================================== --- stable/11/share/timedef/cs_CZ.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/cs_CZ.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y %H:%M:%S +%A %e %B %Y %H:%M:%S # # AM/PM dopoledne odpoledne # # date_fmt -%e. %B %Y %H:%M:%S %Z +%A %e %B %Y %H:%M:%S %Z # # Long month names (without case ending) leden Modified: stable/11/share/timedef/da_DK.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/da_DK.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/da_DK.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lrdag %d/%m/%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/da_DK.UTF-8.src ============================================================================== --- stable/11/share/timedef/da_DK.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/da_DK.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d/%m/%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/de_AT.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/de_AT.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_AT.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Jnner Modified: stable/11/share/timedef/de_AT.UTF-8.src ============================================================================== --- stable/11/share/timedef/de_AT.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_AT.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Jänner Modified: stable/11/share/timedef/de_DE.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/de_DE.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_DE.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Januar Modified: stable/11/share/timedef/de_DE.UTF-8.src ============================================================================== --- stable/11/share/timedef/de_DE.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/de_DE.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ Samstag %d.%m.%y # # c_fmt -%e. %B %Y um %H:%M:%S +%A %e %B %Y um %H:%M:%S # # AM/PM vorm. nachm. # # date_fmt -%e. %B %Y um %H:%M:%S %Z +%A %e %B %Y um %H:%M:%S %Z # # Long month names (without case ending) Januar Modified: stable/11/share/timedef/et_EE.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/et_EE.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/et_EE.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laupev %d.%m.%y # # c_fmt -%e. %B %Y %H:%M.%S +%A %e %B %Y %H:%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y %H:%M.%S %Z +%A %e %B %Y %H:%M.%S %Z # # Long month names (without case ending) jaanuar Modified: stable/11/share/timedef/et_EE.UTF-8.src ============================================================================== --- stable/11/share/timedef/et_EE.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/et_EE.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laupäev %d.%m.%y # # c_fmt -%e. %B %Y %H:%M.%S +%A %e %B %Y %H:%M.%S # # AM/PM AM PM # # date_fmt -%e. %B %Y %H:%M.%S %Z +%A %e %B %Y %H:%M.%S %Z # # Long month names (without case ending) jaanuar Modified: stable/11/share/timedef/fi_FI.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/fi_FI.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/fi_FI.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lauantaina %d.%m.%Y # # c_fmt -%e. %B %Y klo %H.%M.%S +%A %e %B %Y klo %H.%M.%S # # AM/PM ap. ip. # # date_fmt -%e. %B %Y klo %H.%M.%S %Z +%A %e %B %Y klo %H.%M.%S %Z # # Long month names (without case ending) tammikuuta Modified: stable/11/share/timedef/fi_FI.UTF-8.src ============================================================================== --- stable/11/share/timedef/fi_FI.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/fi_FI.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lauantaina %d.%m.%Y # # c_fmt -%e. %B %Y klo %H.%M.%S +%A %e %B %Y klo %H.%M.%S # # AM/PM ap. ip. # # date_fmt -%e. %B %Y klo %H.%M.%S %Z +%A %e %B %Y klo %H.%M.%S %Z # # Long month names (without case ending) tammikuuta Modified: stable/11/share/timedef/hr_HR.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/hr_HR.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/hr_HR.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ subota %d.%m.%Y. # # c_fmt -%e. %B %Y. u %H:%M:%S +%A %e %B %Y. u %H:%M:%S # # AM/PM AM PM # # date_fmt -%e. %B %Y. u %H:%M:%S %Z +%A %e %B %Y. u %H:%M:%S %Z # # Long month names (without case ending) sijenja Modified: stable/11/share/timedef/hr_HR.UTF-8.src ============================================================================== --- stable/11/share/timedef/hr_HR.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/hr_HR.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ subota %d.%m.%Y. # # c_fmt -%e. %B %Y. u %H:%M:%S +%A %e %B %Y. u %H:%M:%S # # AM/PM AM PM # # date_fmt -%e. %B %Y. u %H:%M:%S %Z +%A %e %B %Y. u %H:%M:%S %Z # # Long month names (without case ending) siječnja Modified: stable/11/share/timedef/is_IS.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/is_IS.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/is_IS.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laugardagur %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM f.h. e.h. # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) janar Modified: stable/11/share/timedef/is_IS.UTF-8.src ============================================================================== --- stable/11/share/timedef/is_IS.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/is_IS.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laugardagur %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM f.h. e.h. # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) janúar Modified: stable/11/share/timedef/nb_NO.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/nb_NO.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nb_NO.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lrdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM a.m. p.m. # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nb_NO.UTF-8.src ============================================================================== --- stable/11/share/timedef/nb_NO.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nb_NO.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ lørdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H.%M.%S +%A %e %B %Y kl. %H.%M.%S # # AM/PM a.m. p.m. # # date_fmt -%e. %B %Y kl. %H.%M.%S %Z +%A %e %B %Y kl. %H.%M.%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nn_NO.ISO8859-15.src ============================================================================== --- stable/11/share/timedef/nn_NO.ISO8859-15.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nn_NO.ISO8859-15.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laurdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM formiddag ettermiddag # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/nn_NO.UTF-8.src ============================================================================== --- stable/11/share/timedef/nn_NO.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/nn_NO.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ laurdag %d.%m.%Y # # c_fmt -%e. %B %Y kl. %H:%M:%S +%A %e %B %Y kl. %H:%M:%S # # AM/PM formiddag ettermiddag # # date_fmt -%e. %B %Y kl. %H:%M:%S %Z +%A %e %B %Y kl. %H:%M:%S %Z # # Long month names (without case ending) januar Modified: stable/11/share/timedef/sk_SK.ISO8859-2.src ============================================================================== --- stable/11/share/timedef/sk_SK.ISO8859-2.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/sk_SK.ISO8859-2.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y, %H:%M:%S +%A %e %B %Y, %H:%M:%S # # AM/PM dopoludnia odpoludnia # # date_fmt -%e. %B %Y, %H:%M:%S %Z +%A %e %B %Y, %H:%M:%S %Z # # Long month names (without case ending) janura Modified: stable/11/share/timedef/sk_SK.UTF-8.src ============================================================================== --- stable/11/share/timedef/sk_SK.UTF-8.src Sun Jul 24 08:52:49 2016 (r303259) +++ stable/11/share/timedef/sk_SK.UTF-8.src Sun Jul 24 09:00:16 2016 (r303260) @@ -56,14 +56,14 @@ sobota %d.%m.%y # # c_fmt -%e. %B %Y, %H:%M:%S +%A %e %B %Y, %H:%M:%S # # AM/PM dopoludnia odpoludnia # # date_fmt -%e. %B %Y, %H:%M:%S %Z +%A %e %B %Y, %H:%M:%S %Z # # Long month names (without case ending) januára From owner-svn-src-stable-11@freebsd.org Sun Jul 24 10:00:30 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A09DB9B8CB; Sun, 24 Jul 2016 10:00:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 757921D27; Sun, 24 Jul 2016 10:00:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OA0TPS008858; Sun, 24 Jul 2016 10:00:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OA0TK7008856; Sun, 24 Jul 2016 10:00:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201607241000.u6OA0TK7008856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 24 Jul 2016 10:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303262 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 10:00:30 -0000 Author: trasz Date: Sun Jul 24 10:00:29 2016 New Revision: 303262 URL: https://svnweb.freebsd.org/changeset/base/303262 Log: MFC r303132: Add documentation for "ctld -u", the UCL configuration file format. Submitted by: jceel@ Approved by: re (kib) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D7222 Modified: stable/11/usr.sbin/ctld/ctl.conf.5 stable/11/usr.sbin/ctld/ctld.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- stable/11/usr.sbin/ctld/ctl.conf.5 Sun Jul 24 09:15:11 2016 (r303261) +++ stable/11/usr.sbin/ctld/ctl.conf.5 Sun Jul 24 10:00:29 2016 (r303262) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 9, 2015 +.Dd July 21, 2016 .Dt CTL.CONF 5 .Os .Sh NAME @@ -481,6 +481,97 @@ target naa.50015178f369f092 { lun 0 example_1 } .Ed +.Pp +An equivalent configuration in UCL format, for use with +.Fl u : +.Bd -literal +auth-group { + ag0 { + chap-mutual = [ + { + user = "user" + secret = "secretsecret" + mutual-user = "mutualuser" + mutual-secret = "mutualsecret" + }, + { + user = "user2" + secret = "secret2secret2" + mutual-user = "mutualuser" + mutual-secret = "mutualsecret" + } + ] + } + + ag1 { + auth-type = none + initiator-name = [ + "iqn.2012-06.com.example:initiatorhost1", + "iqn.2012-06.com.example:initiatorhost2" + ] + initiator-portal = [192.168.1.1/24, "[2001:db8::de:ef]"] + } +} + +portal-group { + pg0 { + discovery-auth-group = no-authentication + listen = [ + 0.0.0.0:3260, + "[::]:3260", + "[fe80::be:ef]:3261" + ] + } +} + +lun { + example_0 { + path = /dev/zvol/tank/example_0 + blocksize = 4096 + size = "4G" + } + + example_1 { + path = /dev/zvol/tank/example_1 + options { + naa = "0x50015178f369f093" + } + } + + example_2 { + path = /dev/zvol/tank/example_2 + options { + vendor = "FreeBSD" + } + } +} + +target { + "iqn.2012-06.com.example:target0" { + alias = "Example target" + auth-group = no-authentication + lun = [ + { number = 0, name = example_0 }, + ] + } + + "iqn.2012-06.com.example:target1" { + auth-group = ag0 + portal-group { name = pg0 } + lun = [ + { number = 0, name = example_1 }, + { number = 1, name = example_2 } + ] + } + + naa.50015178f369f092 { + port = isp0 + lun = [ + { number = 0, name = example_1 } + ] + } +} +.Ed .Sh SEE ALSO .Xr ctl 4 , .Xr ctladm 8 , Modified: stable/11/usr.sbin/ctld/ctld.8 ============================================================================== --- stable/11/usr.sbin/ctld/ctld.8 Sun Jul 24 09:15:11 2016 (r303261) +++ stable/11/usr.sbin/ctld/ctld.8 Sun Jul 24 10:00:29 2016 (r303262) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2015 +.Dd July 21, 2016 .Dt CTLD 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm .Op Fl d .Op Fl f Ar config-file +.Op Fl u .Sh DESCRIPTION The .Nm @@ -84,6 +85,8 @@ The daemon sends verbose debug output to put itself in the background. The daemon will also not fork and will exit after processing one connection. This option is only intended for debugging the target. +.It Fl u +Use UCL configuration file format instead of the traditional non-UCL format. .El .Sh FILES .Bl -tag -width ".Pa /var/run/ctld.pid" -compact From owner-svn-src-stable-11@freebsd.org Sun Jul 24 14:50:18 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1733BA3FB0; Sun, 24 Jul 2016 14:50:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 9C0ED1E2B; Sun, 24 Jul 2016 14:50:18 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OEoH24018524; Sun, 24 Jul 2016 14:50:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OEoH0W018514; Sun, 24 Jul 2016 14:50:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201607241450.u6OEoH0W018514@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 24 Jul 2016 14:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303267 - in stable/11: sys/netinet usr.bin/netstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 14:50:18 -0000 Author: tuexen Date: Sun Jul 24 14:50:16 2016 New Revision: 303267 URL: https://svnweb.freebsd.org/changeset/base/303267 Log: MFC r302904: Fix a bug which results in a core dump when running netstat with the -W option and having a listening SCTP socket. The bug was introduced in r279122 when adding support for libxo. MFC r302907: When calling netstat -Laptcp the local address values are not aligned with the corresponding entry in the table header. r295136 increased the value width from 14 to 32 without the corresponding change to the table header. This commit adds the change to the table header width. MFC r302917: Ensure that the -a, -W, -L options for SCTP behave similar as for TCP. MFC r302928: Address a potential memory leak found a the clang static code analyzer running on the userland stack. MFC r302930: Don't free a data chunk twice. Found by the clang static code analyzer running for the userland stack. MFC r302935: Deal with a portential memory allocation failure, which was reported by the clang static code analyzer. Joint work with rrs@. MFC r302942: Add missing sctps_reasmusrmsgs counter. Joint work with rrs@. MFC r302945: Don't duplicate code for SCTP, just use the ones used for UDP and TCP. This fixes a bug with link local addresses. This will require and upcoming change in the kernel to bring SCTP to the same behaviour as UDP and TCP. MFC r302949: Fix the PR-SCTP behaviour. This is done by rrs@. MFC r302950: Add a constant required by RFC 7496. MFC r303024: netstat and sockstat expect the IPv6 link local addresses to have an embedded scope. So don't recover. MFC r303025: Use correct order of conditions to avoid NULL deref. MFC r303073: Fix a bug in deferred stream reset processing which results in using a length field before it is set. Thanks to Taylor Brandstetter for reporting the issue and providing a fix. Approved by: re (kib) Modified: stable/11/sys/netinet/sctp_auth.c stable/11/sys/netinet/sctp_constants.h stable/11/sys/netinet/sctp_header.h stable/11/sys/netinet/sctp_indata.c stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_sysctl.c stable/11/sys/netinet/sctp_uio.h stable/11/usr.bin/netstat/inet.c stable/11/usr.bin/netstat/sctp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_auth.c ============================================================================== --- stable/11/sys/netinet/sctp_auth.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_auth.c Sun Jul 24 14:50:16 2016 (r303267) @@ -542,7 +542,7 @@ sctp_insert_sharedkey(struct sctp_keyhea } } /* shouldn't reach here */ - return (0); + return (EINVAL); } void @@ -622,8 +622,11 @@ sctp_copy_skeylist(const struct sctp_key LIST_FOREACH(skey, src, next) { new_skey = sctp_copy_sharedkey(skey); if (new_skey != NULL) { - (void)sctp_insert_sharedkey(dest, new_skey); - count++; + if (sctp_insert_sharedkey(dest, new_skey)) { + sctp_free_sharedkey(new_skey); + } else { + count++; + } } } return (count); Modified: stable/11/sys/netinet/sctp_constants.h ============================================================================== --- stable/11/sys/netinet/sctp_constants.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_constants.h Sun Jul 24 14:50:16 2016 (r303267) @@ -345,6 +345,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_RTT_FROM_NON_DATA 0 #define SCTP_RTT_FROM_DATA 1 +#define PR_SCTP_UNORDERED_FLAG 0x0001 /* IP hdr (20/40) + 12+2+2 (enet) + sctp common 12 */ #define SCTP_FIRST_MBUF_RESV 68 Modified: stable/11/sys/netinet/sctp_header.h ============================================================================== --- stable/11/sys/netinet/sctp_header.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_header.h Sun Jul 24 14:50:16 2016 (r303267) @@ -397,7 +397,7 @@ struct sctp_strseq { struct sctp_strseq_mid { uint16_t stream; - uint16_t reserved; + uint16_t flags; uint32_t msg_id; }; Modified: stable/11/sys/netinet/sctp_indata.c ============================================================================== --- stable/11/sys/netinet/sctp_indata.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_indata.c Sun Jul 24 14:50:16 2016 (r303267) @@ -753,7 +753,7 @@ sctp_handle_old_data(struct sctp_tcb *st */ struct sctp_tmit_chunk *chk, *lchk, *tchk; uint32_t fsn; - struct sctp_queued_to_read *nc = NULL; + struct sctp_queued_to_read *nc; int cnt_added; if (control->first_frag_seen == 0) { @@ -768,6 +768,11 @@ restart: TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, lchk) { if (chk->rec.data.fsn_num == fsn) { /* Ok lets add it */ + sctp_alloc_a_readq(stcb, nc); + if (nc == NULL) { + break; + } + memset(nc, 0, sizeof(struct sctp_queued_to_read)); TAILQ_REMOVE(&control->reasm, chk, sctp_next); sctp_add_chk_to_control(control, strm, stcb, asoc, chk); fsn++; @@ -781,7 +786,6 @@ restart: * on the control queue to a new * control. */ - sctp_alloc_a_readq(stcb, nc); sctp_build_readq_entry_from_ctl(nc, control); tchk = TAILQ_FIRST(&control->reasm); if (tchk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { @@ -819,6 +823,7 @@ restart: if (control->on_strm_q) { TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); control->on_strm_q = 0; + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); } if (control->on_read_q == 0) { sctp_add_to_readq(stcb->sctp_ep, stcb, control, @@ -826,16 +831,19 @@ restart: SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED); } sctp_wakeup_the_read_socket(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); - if ((nc) && (nc->first_frag_seen)) { + if ((nc->first_frag_seen) && !TAILQ_EMPTY(&nc->reasm)) { /* * Switch to the new guy and * continue */ control = nc; - nc = NULL; goto restart; + } else { + sctp_free_a_readq(stcb, nc); } return (1); + } else { + sctp_free_a_readq(stcb, nc); } } else { /* Can't add more */ @@ -961,11 +969,6 @@ place_chunk: * should not happen since the FSN is a TSN and it * should have been dropped earlier. */ - if (chk->data) { - sctp_m_freem(chk->data); - chk->data = NULL; - } - sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); sctp_abort_in_reasm(stcb, control, chk, abort_flag, SCTP_FROM_SCTP_INDATA + SCTP_LOC_5); @@ -1026,6 +1029,7 @@ sctp_deliver_reasm_check(struct sctp_tcb control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->uno_inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -1080,6 +1084,7 @@ done_un: control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -1125,6 +1130,7 @@ deliver_more: control, control->on_strm_q); } #endif + SCTP_STAT_INCR_COUNTER64(sctps_reasmusrmsgs); TAILQ_REMOVE(&strm->inqueue, control, next_instrm); control->on_strm_q = 0; } @@ -5277,10 +5283,11 @@ sctp_kick_prsctp_reorder_queue(struct sc } } + static void sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, struct sctp_association *asoc, - uint16_t stream, uint32_t seq) + uint16_t stream, uint32_t seq, int ordered, int old) { struct sctp_queued_to_read *control; struct sctp_stream_in *strm; @@ -5295,7 +5302,7 @@ sctp_flush_reassm_for_str_seq(struct sct * queue. */ strm = &asoc->strmin[stream]; - control = find_reasm_entry(strm, (uint32_t) seq, 0, 0); + control = find_reasm_entry(strm, (uint32_t) seq, ordered, old); if (control == NULL) { /* Not found */ return; @@ -5427,6 +5434,7 @@ sctp_handle_forward_tsn(struct sctp_tcb unsigned int num_str; uint32_t sequence; uint16_t stream; + uint16_t ordered, flags; int old; struct sctp_strseq *stseq, strseqbuf; struct sctp_strseq_mid *stseq_m, strseqbuf_m; @@ -5452,6 +5460,12 @@ sctp_handle_forward_tsn(struct sctp_tcb } stream = ntohs(stseq_m->stream); sequence = ntohl(stseq_m->msg_id); + flags = ntohs(stseq_m->flags); + if (flags & PR_SCTP_UNORDERED_FLAG) { + ordered = 0; + } else { + ordered = 1; + } } else { stseq = (struct sctp_strseq *)sctp_m_getptr(m, offset, sizeof(struct sctp_strseq), @@ -5462,6 +5476,7 @@ sctp_handle_forward_tsn(struct sctp_tcb } stream = ntohs(stseq->stream); sequence = (uint32_t) ntohs(stseq->sequence); + ordered = 1; } /* Convert */ @@ -5487,7 +5502,7 @@ sctp_handle_forward_tsn(struct sctp_tcb asoc->fragmented_delivery_inprogress = 0; } strm = &asoc->strmin[stream]; - sctp_flush_reassm_for_str_seq(stcb, asoc, stream, sequence); + sctp_flush_reassm_for_str_seq(stcb, asoc, stream, sequence, ordered, old); TAILQ_FOREACH(ctl, &stcb->sctp_ep->read_queue, next) { if ((ctl->sinfo_stream == stream) && (ctl->sinfo_ssn == sequence)) { Modified: stable/11/sys/netinet/sctp_output.c ============================================================================== --- stable/11/sys/netinet/sctp_output.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_output.c Sun Jul 24 14:50:16 2016 (r303267) @@ -10383,7 +10383,7 @@ sctp_fill_in_rest: /* no more to look at */ break; } - if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) { + if ((at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) && old) { /* We don't report these */ continue; } @@ -10504,7 +10504,7 @@ sctp_fill_in_rest: tp1 = TAILQ_NEXT(at, sctp_next); if (tp1 == NULL) break; - if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) { + if (old && (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED)) { /* We don't report these */ i--; at = tp1; @@ -10519,8 +10519,11 @@ sctp_fill_in_rest: strseq++; } else { strseq_m->stream = ntohs(at->rec.data.stream_number); - strseq_m->reserved = ntohs(0); strseq_m->msg_id = ntohl(at->rec.data.stream_seq); + if (at->rec.data.rcv_flags & SCTP_DATA_UNORDERED) + strseq_m->flags = ntohs(PR_SCTP_UNORDERED_FLAG); + else + strseq_m->flags = 0; strseq_m++; } at = tp1; @@ -11937,7 +11940,6 @@ sctp_send_deferred_reset_response(struct return; } SCTP_BUF_RESV_UF(chk->data, SCTP_MIN_OVERHEAD); - sctp_add_stream_reset_result(chk, ent->seq, response); /* setup chunk parameters */ chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; @@ -11952,6 +11954,7 @@ sctp_send_deferred_reset_response(struct ch->chunk_length = htons(chk->book_size); atomic_add_int(&chk->whoTo->ref_count, 1); SCTP_BUF_LEN(chk->data) = chk->send_size; + sctp_add_stream_reset_result(chk, ent->seq, response); /* insert the chunk for sending */ TAILQ_INSERT_TAIL(&asoc->control_send_queue, chk, Modified: stable/11/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/11/sys/netinet/sctp_sysctl.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_sysctl.c Sun Jul 24 14:50:16 2016 (r303267) @@ -279,15 +279,6 @@ sctp_sysctl_copy_out_local_addresses(str if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { if (local_scope == 0) continue; - if (sin6->sin6_scope_id == 0) { - /* - * bad link - * local - * address - */ - if (sa6_recoverscope(sin6) != 0) - continue; - } } if ((site_scope == 0) && (IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))) continue; Modified: stable/11/sys/netinet/sctp_uio.h ============================================================================== --- stable/11/sys/netinet/sctp_uio.h Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/sys/netinet/sctp_uio.h Sun Jul 24 14:50:16 2016 (r303267) @@ -259,7 +259,8 @@ struct sctp_snd_all_completes { /* The lower four bits is an enumeration of PR-SCTP policies */ #define SCTP_PR_SCTP_NONE 0x0000/* Reliable transfer */ #define SCTP_PR_SCTP_TTL 0x0001/* Time based PR-SCTP */ -#define SCTP_PR_SCTP_BUF 0x0002/* Buffer based PR-SCTP */ +#define SCTP_PR_SCTP_PRIO 0x0002/* Buffer based PR-SCTP */ +#define SCTP_PR_SCTP_BUF SCTP_PR_SCTP_PRIO /* For backwards compatibility */ #define SCTP_PR_SCTP_RTX 0x0003/* Number of retransmissions based PR-SCTP */ #define SCTP_PR_SCTP_MAX SCTP_PR_SCTP_RTX #define SCTP_PR_SCTP_ALL 0x000f/* Used for aggregated stats */ Modified: stable/11/usr.bin/netstat/inet.c ============================================================================== --- stable/11/usr.bin/netstat/inet.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/usr.bin/netstat/inet.c Sun Jul 24 14:50:16 2016 (r303267) @@ -418,10 +418,10 @@ protopr(u_long off, const char *name, in "Tcpcb"); if (Lflag) xo_emit((Aflag && !Wflag) ? - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-18.18s}" : + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-18.18s}" : ((!Wflag || af1 == AF_INET) ? - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-22.22s}" : - "{T:/%-5.5s} {T:/%-14.14s} {T:/%-45.45s}"), + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-22.22s}" : + "{T:/%-5.5s} {T:/%-32.32s} {T:/%-45.45s}"), "Proto", "Listen", "Local Address"); else if (Tflag) xo_emit((Aflag && !Wflag) ? Modified: stable/11/usr.bin/netstat/sctp.c ============================================================================== --- stable/11/usr.bin/netstat/sctp.c Sun Jul 24 14:42:11 2016 (r303266) +++ stable/11/usr.bin/netstat/sctp.c Sun Jul 24 14:50:16 2016 (r303267) @@ -104,93 +104,14 @@ struct xraddr_entry { LIST_ENTRY(xraddr_entry) xraddr_entries; }; -/* - * Construct an Internet address representation. - * If numeric_addr has been supplied, give - * numeric value, otherwise try for symbolic name. - */ #ifdef INET -static char * -inetname(struct in_addr *inp) -{ - char *cp; - static char line[MAXHOSTNAMELEN]; - struct hostent *hp; - struct netent *np; - - cp = 0; - if (!numeric_addr && inp->s_addr != INADDR_ANY) { - int net = inet_netof(*inp); - int lna = inet_lnaof(*inp); - - if (lna == INADDR_ANY) { - np = getnetbyaddr(net, AF_INET); - if (np) - cp = np->n_name; - } - if (cp == NULL) { - hp = gethostbyaddr((char *)inp, sizeof (*inp), AF_INET); - if (hp) { - cp = hp->h_name; - trimdomain(cp, strlen(cp)); - } - } - } - if (inp->s_addr == INADDR_ANY) - strcpy(line, "*"); - else if (cp) { - strlcpy(line, cp, sizeof(line)); - } else { - inp->s_addr = ntohl(inp->s_addr); -#define C(x) ((u_int)((x) & 0xff)) - sprintf(line, "%u.%u.%u.%u", C(inp->s_addr >> 24), - C(inp->s_addr >> 16), C(inp->s_addr >> 8), C(inp->s_addr)); - inp->s_addr = htonl(inp->s_addr); - } - return (line); -} +char * +inetname(struct in_addr *inp); #endif #ifdef INET6 -static char ntop_buf[INET6_ADDRSTRLEN]; - -static char * -inet6name(struct in6_addr *in6p) -{ - char *cp; - static char line[50]; - struct hostent *hp; - static char domain[MAXHOSTNAMELEN]; - static int first = 1; - - if (first && !numeric_addr) { - first = 0; - if (gethostname(domain, MAXHOSTNAMELEN) == 0 && - (cp = strchr(domain, '.'))) - (void) strcpy(domain, cp + 1); - else - domain[0] = 0; - } - cp = 0; - if (!numeric_addr && !IN6_IS_ADDR_UNSPECIFIED(in6p)) { - hp = gethostbyaddr((char *)in6p, sizeof(*in6p), AF_INET6); - if (hp) { - if ((cp = strchr(hp->h_name, '.')) && - !strcmp(cp + 1, domain)) - *cp = 0; - cp = hp->h_name; - } - } - if (IN6_IS_ADDR_UNSPECIFIED(in6p)) - strcpy(line, "*"); - else if (cp) - strcpy(line, cp); - else - sprintf(line, "%s", - inet_ntop(AF_INET6, (void *)in6p, ntop_buf, - sizeof(ntop_buf))); - return (line); -} +char * +inet6name(struct in6_addr *in6p); #endif static void @@ -447,7 +368,8 @@ sctp_process_inpcb(struct xsctp_inpcb *x first = 0; } xladdr = (struct xsctp_laddr *)(buf + *offset); - if (Lflag && !is_listening) { + if ((!aflag && is_listening) || + (Lflag && !is_listening)) { sctp_skip_xinpcb_ifneed(buf, buflen, offset); return; } @@ -513,8 +435,10 @@ retry: xo_open_instance("local-address"); if (xladdr_total == 0) { - xo_emit("{:protocol/%-6.6s/%s} {:type/%-5.5s/%s} ", - pname, tname); + if (!Lflag) { + xo_emit("{:protocol/%-6.6s/%s} " + "{:type/%-5.5s/%s} ", pname, tname); + } } else { xo_emit("\n"); xo_emit(Lflag ? "{P:/%-21.21s} " : "{P:/%-12.12s} ", @@ -529,7 +453,7 @@ retry: "{:state/CLOSED}", " "); } else { xo_emit("{P:/%-45.45s} " - "{:state:LISTEN}", " "); + "{:state/LISTEN}", " "); } } else { if (process_closed) { From owner-svn-src-stable-11@freebsd.org Sun Jul 24 16:32:35 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DD8FBA3798; Sun, 24 Jul 2016 16:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2C647163C; Sun, 24 Jul 2016 16:32:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6OGWYui059594; Sun, 24 Jul 2016 16:32:34 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6OGWYwH059593; Sun, 24 Jul 2016 16:32:34 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201607241632.u6OGWYwH059593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jul 2016 16:32:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303268 - stable/11/sys/dev/ixgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 16:32:35 -0000 Author: sbruno Date: Sun Jul 24 16:32:34 2016 New Revision: 303268 URL: https://svnweb.freebsd.org/changeset/base/303268 Log: MFC r303032 Fixup DA cable detection routines to not set the cable type to unknown if they do not match one of two cable types. PR: 150249 Approved by: re (gjb) Modified: stable/11/sys/dev/ixgbe/ixgbe_phy.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ixgbe/ixgbe_phy.c ============================================================================== --- stable/11/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 14:50:16 2016 (r303267) +++ stable/11/sys/dev/ixgbe/ixgbe_phy.c Sun Jul 24 16:32:34 2016 (r303268) @@ -1534,21 +1534,18 @@ s32 ixgbe_identify_sfp_module_generic(st hw->phy.type = ixgbe_phy_sfp_intel; break; default: - if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_passive_unknown; - else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) - hw->phy.type = - ixgbe_phy_sfp_active_unknown; - else - hw->phy.type = ixgbe_phy_sfp_unknown; + hw->phy.type = ixgbe_phy_sfp_unknown; break; } } /* Allow any DA cable vendor */ if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | - IXGBE_SFF_DA_ACTIVE_CABLE)) { + IXGBE_SFF_DA_ACTIVE_CABLE)) { + if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_passive_unknown; + else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_active_unknown; status = IXGBE_SUCCESS; goto out; } From owner-svn-src-stable-11@freebsd.org Mon Jul 25 13:29:00 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0D7BA3FBE; Mon, 25 Jul 2016 13:29:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 163C41206; Mon, 25 Jul 2016 13:29:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PDSxMP020854; Mon, 25 Jul 2016 13:28:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PDSxHe020852; Mon, 25 Jul 2016 13:28:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607251328.u6PDSxHe020852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jul 2016 13:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303290 - in stable/11/sys: kern vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 13:29:00 -0000 Author: kib Date: Mon Jul 25 13:28:59 2016 New Revision: 303290 URL: https://svnweb.freebsd.org/changeset/base/303290 Log: MFC r302567: In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called, if vnode is VMIO. For VMIO vnodes, set BO_DEAD in vm_object_terminate(). MFC r302580: Fix grammar. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_subr.c stable/11/sys/vm/vm_object.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_subr.c ============================================================================== --- stable/11/sys/kern/vfs_subr.c Mon Jul 25 11:25:33 2016 (r303289) +++ stable/11/sys/kern/vfs_subr.c Mon Jul 25 13:28:59 2016 (r303290) @@ -3232,7 +3232,13 @@ vgonel(struct vnode *vp) TAILQ_EMPTY(&vp->v_bufobj.bo_clean.bv_hd) && vp->v_bufobj.bo_clean.bv_cnt == 0, ("vp %p bufobj not invalidated", vp)); - vp->v_bufobj.bo_flag |= BO_DEAD; + + /* + * For VMIO bufobj, BO_DEAD is set in vm_object_terminate() + * after the object's page queue is flushed. + */ + if (vp->v_bufobj.bo_object == NULL) + vp->v_bufobj.bo_flag |= BO_DEAD; BO_UNLOCK(&vp->v_bufobj); /* Modified: stable/11/sys/vm/vm_object.c ============================================================================== --- stable/11/sys/vm/vm_object.c Mon Jul 25 11:25:33 2016 (r303289) +++ stable/11/sys/vm/vm_object.c Mon Jul 25 13:28:59 2016 (r303290) @@ -741,6 +741,10 @@ vm_object_terminate(vm_object_t object) vinvalbuf(vp, V_SAVE, 0, 0); + BO_LOCK(&vp->v_bufobj); + vp->v_bufobj.bo_flag |= BO_DEAD; + BO_UNLOCK(&vp->v_bufobj); + VM_OBJECT_WLOCK(object); } From owner-svn-src-stable-11@freebsd.org Mon Jul 25 14:16:30 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D665BA4A7A; Mon, 25 Jul 2016 14:16:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B4BBB1C3F; Mon, 25 Jul 2016 14:16:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEGSKH038883; Mon, 25 Jul 2016 14:16:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEGSts038882; Mon, 25 Jul 2016 14:16:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251416.u6PEGSts038882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 14:16:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303292 - stable/11/contrib/libcxxrt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:16:30 -0000 Author: emaste Date: Mon Jul 25 14:16:28 2016 New Revision: 303292 URL: https://svnweb.freebsd.org/changeset/base/303292 Log: MFC r303157: libcxxrt: add padding in __cxa_allocate_* to fix alignment The addition of the referenceCount to __cxa_allocate_exception put the unwindHeader at offset 0x58 in __cxa_exception, but it requires 16-byte alignment. In order to avoid changing the current __cxa_exception ABI (and thus breaking its consumers), add explicit padding in the allocation routines (and account for it when freeing). This is intended as a lower-risk change for FreeBSD 11. A "more correct" fix should be prepared for upstream and -CURRENT. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/libcxxrt/exception.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libcxxrt/exception.cc ============================================================================== --- stable/11/contrib/libcxxrt/exception.cc Mon Jul 25 13:31:18 2016 (r303291) +++ stable/11/contrib/libcxxrt/exception.cc Mon Jul 25 14:16:28 2016 (r303292) @@ -572,6 +572,19 @@ static void free_exception(char *e) } } +#ifdef __LP64__ +/** + * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte + * alignment but it was broken by the addition of the referenceCount. + * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep + * compatibility with consumers of the broken __cxa_exception, explicitly add + * padding on allocation (and account for it on free). + */ +static const int exception_alignment_padding = 8; +#else +static const int exception_alignment_padding = 0; +#endif + /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -580,16 +593,19 @@ static void free_exception(char *e) */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = thrown_size + sizeof(__cxa_exception); + size_t size = exception_alignment_padding + sizeof(__cxa_exception) + + thrown_size; char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_exception); + return buffer + exception_alignment_padding + sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = sizeof(__cxa_dependent_exception); + size_t size = exception_alignment_padding + + sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_dependent_exception); + return buffer + exception_alignment_padding + + sizeof(__cxa_dependent_exception); } /** @@ -617,7 +633,8 @@ extern "C" void __cxa_free_exception(voi } } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } static void releaseException(__cxa_exception *exception) @@ -644,7 +661,8 @@ void __cxa_free_dependent_exception(void { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } /** From owner-svn-src-stable-11@freebsd.org Mon Jul 25 14:35:49 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6522BA4F80; Mon, 25 Jul 2016 14:35:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 870271B01; Mon, 25 Jul 2016 14:35:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEZmgg046618; Mon, 25 Jul 2016 14:35:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEZmR4046617; Mon, 25 Jul 2016 14:35:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251435.u6PEZmR4046617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303296 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:35:49 -0000 Author: delphij Date: Mon Jul 25 14:35:48 2016 New Revision: 303296 URL: https://svnweb.freebsd.org/changeset/base/303296 Log: MFC r302542: Use _PATH_DEVNULL instead of hardcoding. Approved by: re (kib) Modified: stable/11/usr.bin/mail/collect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/collect.c ============================================================================== --- stable/11/usr.bin/mail/collect.c Mon Jul 25 14:35:14 2016 (r303295) +++ stable/11/usr.bin/mail/collect.c Mon Jul 25 14:35:48 2016 (r303296) @@ -339,9 +339,9 @@ cont: int nullfd, tempfd, rc; char tempname2[PATHSIZE]; - if ((nullfd = open("/dev/null", O_RDONLY, 0)) + if ((nullfd = open(_PATH_DEVNULL, O_RDONLY, 0)) == -1) { - warn("/dev/null"); + warn(_PATH_DEVNULL); break; } From owner-svn-src-stable-11@freebsd.org Mon Jul 25 14:52:13 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6A96BA34A5; Mon, 25 Jul 2016 14:52:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 990181A63; Mon, 25 Jul 2016 14:52:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PEqCnd054009; Mon, 25 Jul 2016 14:52:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PEqC4t054008; Mon, 25 Jul 2016 14:52:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201607251452.u6PEqC4t054008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 25 Jul 2016 14:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303300 - stable/11/usr.bin/bsdiff/bspatch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 14:52:13 -0000 Author: delphij Date: Mon Jul 25 14:52:12 2016 New Revision: 303300 URL: https://svnweb.freebsd.org/changeset/base/303300 Log: Fix bspatch heap overflow vulnerability. Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Approved by: re (so@ blanket) Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c Modified: stable/11/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- stable/11/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:49:15 2016 (r303299) +++ stable/11/usr.bin/bsdiff/bspatch/bspatch.c Mon Jul 25 14:52:12 2016 (r303300) @@ -164,6 +164,10 @@ int main(int argc,char * argv[]) } /* Sanity-check */ + if ((ctrl[0] < 0) || (ctrl[1] < 0)) + errx(1,"Corrupt patch\n"); + + /* Sanity-check */ if(newpos+ctrl[0]>newsize) errx(1,"Corrupt patch\n"); From owner-svn-src-stable-11@freebsd.org Mon Jul 25 15:03:16 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39460BA38E9; Mon, 25 Jul 2016 15:03:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 01FBF1576; Mon, 25 Jul 2016 15:03:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PF3FjX058070; Mon, 25 Jul 2016 15:03:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PF3FEV058068; Mon, 25 Jul 2016 15:03:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607251503.u6PF3FEV058068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 25 Jul 2016 15:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303302 - stable/11/usr.bin/mail X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:03:16 -0000 Author: pfg Date: Mon Jul 25 15:03:14 2016 New Revision: 303302 URL: https://svnweb.freebsd.org/changeset/base/303302 Log: MFC r302911: mail(1): Avoid closing negative file descriptors. CID: 1008105, 1008106 Approved by: re (gjb) Modified: stable/11/usr.bin/mail/quit.c stable/11/usr.bin/mail/v7.local.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mail/quit.c ============================================================================== --- stable/11/usr.bin/mail/quit.c Mon Jul 25 14:53:04 2016 (r303301) +++ stable/11/usr.bin/mail/quit.c Mon Jul 25 15:03:14 2016 (r303302) @@ -228,7 +228,8 @@ quit(void) return; } (void)Fclose(obuf); - (void)close(open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= 0) + (void)close(fd); if ((obuf = Fopen(mbox, "r+")) == NULL) { warn("%s", mbox); (void)Fclose(ibuf); Modified: stable/11/usr.bin/mail/v7.local.c ============================================================================== --- stable/11/usr.bin/mail/v7.local.c Mon Jul 25 14:53:04 2016 (r303301) +++ stable/11/usr.bin/mail/v7.local.c Mon Jul 25 15:03:14 2016 (r303302) @@ -68,9 +68,12 @@ findmail(char *user, char *buf, int bufl void demail(void) { + int fd; if (value("keep") != NULL || rm(mailname) < 0) - (void)close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)); + if ((fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= + 0) + (void)close(fd); } /* From owner-svn-src-stable-11@freebsd.org Mon Jul 25 15:56:39 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07450BA4557; Mon, 25 Jul 2016 15:56:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B1B6513D8; Mon, 25 Jul 2016 15:56:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PFubKp077246; Mon, 25 Jul 2016 15:56:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PFub3S077245; Mon, 25 Jul 2016 15:56:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251556.u6PFub3S077245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 15:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303306 - stable/11/lib/librt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 15:56:39 -0000 Author: jhb Date: Mon Jul 25 15:56:37 2016 New Revision: 303306 URL: https://svnweb.freebsd.org/changeset/base/303306 Log: MFC 302860: Fix aio system call wrappers in librt. - Update aio_return/waitcomplete wrappers for the ssize_t return type. - Fix the aio_return() wrapper to fail with EINVAL on a pending job. This matches the semantics of the in-kernel system call. Also, aio_return() returns errors via errno, not via the return value. Approved by: re (gjb) Sponsored by: Chelsio Communications Modified: stable/11/lib/librt/aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/librt/aio.c ============================================================================== --- stable/11/lib/librt/aio.c Mon Jul 25 15:05:01 2016 (r303305) +++ stable/11/lib/librt/aio.c Mon Jul 25 15:56:37 2016 (r303306) @@ -54,8 +54,8 @@ typedef void (*aio_func)(union sigval va extern int __sys_aio_read(struct aiocb *iocb); extern int __sys_aio_write(struct aiocb *iocb); -extern int __sys_aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout); -extern int __sys_aio_return(struct aiocb *iocb); +extern ssize_t __sys_aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout); +extern ssize_t __sys_aio_return(struct aiocb *iocb); extern int __sys_aio_error(struct aiocb *iocb); extern int __sys_aio_fsync(int op, struct aiocb *iocb); @@ -136,12 +136,13 @@ __aio_write(struct aiocb *iocb) return aio_io(iocb, &__sys_aio_write); } -int +ssize_t __aio_waitcomplete(struct aiocb **iocbp, struct timespec *timeout) { + ssize_t ret; int err; - int ret = __sys_aio_waitcomplete(iocbp, timeout); + ret = __sys_aio_waitcomplete(iocbp, timeout); if (*iocbp) { if ((*iocbp)->aio_sigevent.sigev_notify == SIGEV_THREAD) { err = errno; @@ -155,13 +156,20 @@ __aio_waitcomplete(struct aiocb **iocbp, return (ret); } -int +ssize_t __aio_return(struct aiocb *iocb) { if (iocb->aio_sigevent.sigev_notify == SIGEV_THREAD) { - if (__sys_aio_error(iocb) == EINPROGRESS) - return (EINPROGRESS); + if (__sys_aio_error(iocb) == EINPROGRESS) { + /* + * Fail with EINVAL to match the semantics of + * __sys_aio_return() for an in-progress + * request. + */ + errno = EINVAL; + return (-1); + } __sigev_list_lock(); __sigev_delete(SI_ASYNCIO, (sigev_id_t)iocb); __sigev_list_unlock(); From owner-svn-src-stable-11@freebsd.org Mon Jul 25 17:18:00 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B00BA33BA; Mon, 25 Jul 2016 17:18:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 7230C10CD; Mon, 25 Jul 2016 17:18:00 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PHHxdO006979; Mon, 25 Jul 2016 17:17:59 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PHHx6m006978; Mon, 25 Jul 2016 17:17:59 GMT (envelope-from np@FreeBSD.org) Message-Id: <201607251717.u6PHHx6m006978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 25 Jul 2016 17:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303311 - stable/11/usr.sbin/ctld X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 17:18:00 -0000 Author: np Date: Mon Jul 25 17:17:59 2016 New Revision: 303311 URL: https://svnweb.freebsd.org/changeset/base/303311 Log: MFC r303199: ctld(8): Fix MaxBurstLength negotiation. The target must reply with the selected value of MaxBurstSize instead of just echoing back the initiator's offered value. Reviewed by: mav@ Approved by: re@ (gjb@) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7278 Modified: stable/11/usr.sbin/ctld/login.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/ctld/login.c ============================================================================== --- stable/11/usr.sbin/ctld/login.c Mon Jul 25 16:28:02 2016 (r303310) +++ stable/11/usr.sbin/ctld/login.c Mon Jul 25 17:17:59 2016 (r303311) @@ -569,7 +569,7 @@ login_negotiate_key(struct pdu *request, tmp = MAX_BURST_LENGTH; } conn->conn_max_burst_length = tmp; - keys_add(response_keys, name, value); + keys_add_int(response_keys, name, tmp); } else if (strcmp(name, "FirstBurstLength") == 0) { tmp = strtoul(value, NULL, 10); if (tmp <= 0) { From owner-svn-src-stable-11@freebsd.org Mon Jul 25 17:37:03 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC21FBA3B48; Mon, 25 Jul 2016 17:37:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CA09D1CD7; Mon, 25 Jul 2016 17:37:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PHb3fR014404; Mon, 25 Jul 2016 17:37:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PHb2Z4014400; Mon, 25 Jul 2016 17:37:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607251737.u6PHb2Z4014400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jul 2016 17:37:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303312 - in stable/11: share/man/man4 sys/dev/vt sys/dev/vt/hw/fb X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 17:37:04 -0000 Author: bdrewery Date: Mon Jul 25 17:37:02 2016 New Revision: 303312 URL: https://svnweb.freebsd.org/changeset/base/303312 Log: MFC r303043: Increase vt(4) framebuffer maximum size PR: 210382 Approved by: re (gjb) Modified: stable/11/share/man/man4/vt.4 stable/11/sys/dev/vt/hw/fb/vt_fb.c stable/11/sys/dev/vt/vt.h stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/vt.4 ============================================================================== --- stable/11/share/man/man4/vt.4 Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/share/man/man4/vt.4 Mon Jul 25 17:37:02 2016 (r303312) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 2016 +.Dd July 19, 2016 .Dt "VIRTUAL TERMINALS" 4 .Os .Sh NAME @@ -36,8 +36,8 @@ .Cd "options VT_MAXWINDOWS=N" .Cd "options VT_ALT_TO_ESC_HACK=1" .Cd "options VT_TWOBUTTON_MOUSE" -.Cd "options VT_FB_DEFAULT_WIDTH=X" -.Cd "options VT_FB_DEFAULT_HEIGHT=Y" +.Cd "options VT_FB_MAX_WIDTH=X" +.Cd "options VT_FB_MAX_HEIGHT=Y" .Cd "options SC_NO_CUTPASTE" .Cd "device vt" .Pp Modified: stable/11/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/11/sys/dev/vt/hw/fb/vt_fb.c Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/hw/fb/vt_fb.c Mon Jul 25 17:37:02 2016 (r303312) @@ -416,10 +416,10 @@ vt_fb_init(struct vt_device *vd) int err; info = vd->vd_softc; - vd->vd_height = MIN(VT_FB_DEFAULT_HEIGHT, info->fb_height); + vd->vd_height = MIN(VT_FB_MAX_HEIGHT, info->fb_height); margin = (info->fb_height - vd->vd_height) >> 1; vd->vd_transpose = margin * info->fb_stride; - vd->vd_width = MIN(VT_FB_DEFAULT_WIDTH, info->fb_width); + vd->vd_width = MIN(VT_FB_MAX_WIDTH, info->fb_width); margin = (info->fb_width - vd->vd_width) >> 1; vd->vd_transpose += margin * (info->fb_bpp / NBBY); vd->vd_video_dev = info->fb_video_dev; Modified: stable/11/sys/dev/vt/vt.h ============================================================================== --- stable/11/sys/dev/vt/vt.h Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/vt.h Mon Jul 25 17:37:02 2016 (r303312) @@ -377,11 +377,11 @@ void vt_upgrade(struct vt_device *vd); #define PIXEL_WIDTH(w) ((w) / 8) #define PIXEL_HEIGHT(h) ((h) / 16) -#ifndef VT_FB_DEFAULT_WIDTH -#define VT_FB_DEFAULT_WIDTH 2048 +#ifndef VT_FB_MAX_WIDTH +#define VT_FB_MAX_WIDTH 4096 #endif -#ifndef VT_FB_DEFAULT_HEIGHT -#define VT_FB_DEFAULT_HEIGHT 1200 +#ifndef VT_FB_MAX_HEIGHT +#define VT_FB_MAX_HEIGHT 2400 #endif /* name argument is not used yet. */ Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Mon Jul 25 17:17:59 2016 (r303311) +++ stable/11/sys/dev/vt/vt_core.c Mon Jul 25 17:37:02 2016 (r303312) @@ -181,8 +181,8 @@ static void vt_resume_handler(void *priv SET_DECLARE(vt_drv_set, struct vt_driver); -#define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_DEFAULT_HEIGHT)) -#define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_DEFAULT_WIDTH)) +#define _VTDEFH MAX(100, PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)) +#define _VTDEFW MAX(200, PIXEL_WIDTH(VT_FB_MAX_WIDTH)) struct terminal vt_consterm; static struct vt_window vt_conswindow; From owner-svn-src-stable-11@freebsd.org Mon Jul 25 18:25:20 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56FA0B9CCC5; Mon, 25 Jul 2016 18:25:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 269D41EB8; Mon, 25 Jul 2016 18:25:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PIPJQQ033005; Mon, 25 Jul 2016 18:25:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PIPJI5033003; Mon, 25 Jul 2016 18:25:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607251825.u6PIPJI5033003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jul 2016 18:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303314 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 18:25:20 -0000 Author: bdrewery Date: Mon Jul 25 18:25:19 2016 New Revision: 303314 URL: https://svnweb.freebsd.org/changeset/base/303314 Log: MFC r303195: Don't run find(1) for __MPATH with NO_MODULES set. Approved by: re (gjb) Modified: stable/11/sys/conf/config.mk stable/11/sys/conf/kern.pre.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/config.mk ============================================================================== --- stable/11/sys/conf/config.mk Mon Jul 25 18:24:54 2016 (r303313) +++ stable/11/sys/conf/config.mk Mon Jul 25 18:25:19 2016 (r303314) @@ -54,7 +54,7 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | .export KERN_OPTS .endif -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m .export __MPATH .endif Modified: stable/11/sys/conf/kern.pre.mk ============================================================================== --- stable/11/sys/conf/kern.pre.mk Mon Jul 25 18:24:54 2016 (r303313) +++ stable/11/sys/conf/kern.pre.mk Mon Jul 25 18:25:19 2016 (r303314) @@ -192,7 +192,7 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(__MPATH) +.if !defined(NO_MODULES) && !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m .endif @@ -212,7 +212,9 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif +.if !defined(NO_MODULES) MKMODULESENV+= __MPATH="${__MPATH}" +.endif # Architecture and output format arguments for objdump to convert image to # object file From owner-svn-src-stable-11@freebsd.org Mon Jul 25 19:16:51 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B88FBA0EAA; Mon, 25 Jul 2016 19:16:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E98E31ED6; Mon, 25 Jul 2016 19:16:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJGoh3051873; Mon, 25 Jul 2016 19:16:50 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJGo7x051872; Mon, 25 Jul 2016 19:16:50 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607251916.u6PJGo7x051872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 19:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303316 - stable/11/share/man/man3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:16:51 -0000 Author: jhb Date: Mon Jul 25 19:16:49 2016 New Revision: 303316 URL: https://svnweb.freebsd.org/changeset/base/303316 Log: MFC 302861: Fix rendering issues. - Use Ta to separate column headers. - Correct width of the 'Code' column in the last table. Approved by: re (gjb) Modified: stable/11/share/man/man3/siginfo.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man3/siginfo.3 ============================================================================== --- stable/11/share/man/man3/siginfo.3 Mon Jul 25 19:16:30 2016 (r303315) +++ stable/11/share/man/man3/siginfo.3 Mon Jul 25 19:16:49 2016 (r303316) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2012 +.Dd July 14, 2016 .Dt SIGINFO 3 .Os .Sh NAME @@ -54,7 +54,7 @@ In either case, the system returns the i .Vt siginfo_t , which includes the following information: .Bl -column ".Vt union signal" ".Va si_overrun" -.It Sy "Type Member Description" +.It Sy Type Ta Sy Member Ta Sy Description .It Vt int Ta Va si_signo Ta signal number .It Vt int Ta Va si_errno Ta @@ -107,7 +107,7 @@ for use as values of that are signal-specific or non-signal-specific reasons why the signal was generated: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Code Reason" +.It Sy Signal Ta Sy Code Ta Sy Reason .It Dv SIGILL Ta Dv ILL_ILLOPC Ta illegal opcode .It Ta Dv ILL_ILLOPN Ta @@ -206,7 +206,7 @@ signal sent by .Pp In addition, the following signal-specific information is available: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" -.It Sy "Signal Member Value" +.It Sy Signal Ta Sy Member Ta Sy Value .It Dv SIGILL Ta Va si_addr Ta address of faulting instruction .It Ta Va si_trapno Ta @@ -240,8 +240,8 @@ or .El .Pp Finally, the following code-specific information is available: -.Bl -column ".Dv SI_QUEUE" ".Va si_overrun" -.It Sy "Code Member Value" +.Bl -column ".Dv SI_ASYNCIO" ".Va si_overrun" +.It Sy Code Ta Sy Member Ta Sy Value .It Dv SI_USER Ta Va si_pid Ta the process ID that sent the signal .It Ta Va si_uid Ta From owner-svn-src-stable-11@freebsd.org Mon Jul 25 19:37:11 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB92BBA1630; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B6D341D14; Mon, 25 Jul 2016 19:37:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PJbAni059307; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PJbAum059304; Mon, 25 Jul 2016 19:37:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607251937.u6PJbAum059304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jul 2016 19:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303318 - in stable/11/contrib/llvm/projects/libunwind: include src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 19:37:12 -0000 Author: emaste Date: Mon Jul 25 19:37:10 2016 New Revision: 303318 URL: https://svnweb.freebsd.org/changeset/base/303318 Log: Merge LLVM libunwind fixes r302475: libunwind: limit stack usage in unwind cursor This may be reworked upstream but in the interim should address the stack usage issue reported in the PR. r303061: libunwind: Properly align _Unwind_Exception. _Unwind_Exception is required to be double word aligned. GCC has interpreted this to mean "use the maximum useful alignment for the target" so follow that lead. PR: 206384 (r302475) Obtained from: LLVM review D22543 (r303061) Approved by: re (gjb) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h stable/11/contrib/llvm/projects/libunwind/include/unwind.h stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/__libunwind_config.h Mon Jul 25 19:37:10 2016 (r303318) @@ -22,30 +22,37 @@ # define _LIBUNWIND_TARGET_I386 1 # define _LIBUNWIND_CONTEXT_SIZE 8 # define _LIBUNWIND_CURSOR_SIZE 19 +# define _LIBUNWIND_MAX_REGISTER 9 # elif defined(__x86_64__) # define _LIBUNWIND_TARGET_X86_64 1 # define _LIBUNWIND_CONTEXT_SIZE 21 # define _LIBUNWIND_CURSOR_SIZE 33 +# define _LIBUNWIND_MAX_REGISTER 17 # elif defined(__ppc__) # define _LIBUNWIND_TARGET_PPC 1 # define _LIBUNWIND_CONTEXT_SIZE 117 # define _LIBUNWIND_CURSOR_SIZE 128 +# define _LIBUNWIND_MAX_REGISTER 113 # elif defined(__aarch64__) # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_CONTEXT_SIZE 66 # define _LIBUNWIND_CURSOR_SIZE 78 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__arm__) # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_CONTEXT_SIZE 60 # define _LIBUNWIND_CURSOR_SIZE 67 +# define _LIBUNWIND_MAX_REGISTER 96 # elif defined(__or1k__) # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 16 # define _LIBUNWIND_CURSOR_SIZE 28 +# define _LIBUNWIND_MAX_REGISTER 32 # elif defined(__riscv__) # define _LIBUNWIND_TARGET_RISCV 1 # define _LIBUNWIND_CONTEXT_SIZE 128 /* XXX */ # define _LIBUNWIND_CURSOR_SIZE 140 /* XXX */ +# define _LIBUNWIND_MAX_REGISTER 96 # else # error "Unsupported architecture." # endif @@ -58,6 +65,7 @@ # define _LIBUNWIND_TARGET_OR1K 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 +# define _LIBUNWIND_MAX_REGISTER 120 #endif // _LIBUNWIND_IS_NATIVE_ONLY #endif // ____LIBUNWIND_CONFIG_H__ Modified: stable/11/contrib/llvm/projects/libunwind/include/unwind.h ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/include/unwind.h Mon Jul 25 19:37:10 2016 (r303318) @@ -128,7 +128,7 @@ struct _Unwind_Exception { // added for binary compatibility. uint32_t reserved[3]; #endif -}; +} __attribute__((__aligned__)); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int version, Modified: stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp ============================================================================== --- stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:18:42 2016 (r303317) +++ stable/11/contrib/llvm/projects/libunwind/src/DwarfParser.hpp Mon Jul 25 19:37:10 2016 (r303318) @@ -62,7 +62,7 @@ public: }; enum { - kMaxRegisterNumber = 120 + kMaxRegisterNumber = _LIBUNWIND_MAX_REGISTER }; enum RegisterSavedWhere { kRegisterUnused, From owner-svn-src-stable-11@freebsd.org Mon Jul 25 20:02:13 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5C1BA41D6; Mon, 25 Jul 2016 20:02:13 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DE3DB105D; Mon, 25 Jul 2016 20:02:12 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PK2CYZ073649; Mon, 25 Jul 2016 20:02:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PK2CVS073648; Mon, 25 Jul 2016 20:02:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201607252002.u6PK2CVS073648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 25 Jul 2016 20:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303319 - stable/11/usr.sbin/camdd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 20:02:13 -0000 Author: asomers Date: Mon Jul 25 20:02:11 2016 New Revision: 303319 URL: https://svnweb.freebsd.org/changeset/base/303319 Log: MFC r303091 Fix camdd for host-aware and host-managed SMR disks. This should've gone in as part of r300207 Approved by: re (gjb) Modified: stable/11/usr.sbin/camdd/camdd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/camdd/camdd.c ============================================================================== --- stable/11/usr.sbin/camdd/camdd.c Mon Jul 25 19:37:10 2016 (r303318) +++ stable/11/usr.sbin/camdd/camdd.c Mon Jul 25 20:02:11 2016 (r303319) @@ -1292,6 +1292,7 @@ camdd_probe_pass(struct cam_device *cam_ case T_CDROM: case T_OPTICAL: case T_RBC: + case T_ZBC_HM: break; default: errx(1, "Unsupported SCSI device type %d", scsi_dev_type); From owner-svn-src-stable-11@freebsd.org Mon Jul 25 23:37:49 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38967BA51AC; Mon, 25 Jul 2016 23:37:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 01BFA1756; Mon, 25 Jul 2016 23:37:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6PNbmbf055558; Mon, 25 Jul 2016 23:37:48 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6PNbl2V055548; Mon, 25 Jul 2016 23:37:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607252337.u6PNbl2V055548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 25 Jul 2016 23:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303324 - in stable/11: lib/libc/sys share/man/man3 share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 23:37:49 -0000 Author: jhb Date: Mon Jul 25 23:37:47 2016 New Revision: 303324 URL: https://svnweb.freebsd.org/changeset/base/303324 Log: MFC 302899: Add documentation for the sigevent structure. - Add a sigevent(3) manpage to give a general overview of the sigevent structure and the available notification mechanisms. - Document that AIO requests contain a nested sigevent structure that can be used to request completion notification. - Expand the sigevent details in other manuals to note details such as the extra values stored in a queued signal's information or in a posted kevent. Approved by: re (gjb) Added: stable/11/share/man/man3/sigevent.3 - copied unchanged from r302899, head/share/man/man3/sigevent.3 Modified: stable/11/lib/libc/sys/aio_fsync.2 stable/11/lib/libc/sys/aio_mlock.2 stable/11/lib/libc/sys/aio_read.2 stable/11/lib/libc/sys/aio_write.2 stable/11/lib/libc/sys/lio_listio.2 stable/11/lib/libc/sys/mq_notify.2 stable/11/lib/libc/sys/timer_create.2 stable/11/share/man/man3/Makefile stable/11/share/man/man4/aio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/11/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_fsync.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 27, 2013 +.Dd July 15, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -71,6 +71,29 @@ while it is in progress. .Pp If the request could not be enqueued (generally due to invalid arguments), the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . +.Sh RESTRICTIONS +The asynchronous I/O Control Block structure pointed to by +.Fa iocb +must remain valid until the +operation has completed. +For this reason, use of auto (stack) variables +for these objects is discouraged. +.Pp +The asynchronous I/O control buffer +.Fa iocb +should be zeroed before the +.Fn aio_fsync +call to avoid passing bogus context information to the kernel. +.Pp +Modifications of the Asynchronous I/O Control Block structure or the +buffer contents after the request has been enqueued, but before the +request has completed, are not allowed. .Sh RETURN VALUES .Rv -std aio_fsync .Sh ERRORS @@ -80,6 +103,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_fsync @@ -138,6 +165,7 @@ system calls. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr fsync 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/11/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_mlock.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 3, 2013 +.Dd July 15, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -64,6 +64,12 @@ If the request could not be enqueued (ge .Xr aio 4 limits), then the call returns without having enqueued the request. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -92,6 +98,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_mlock @@ -116,6 +126,7 @@ if the request was explicitly cancelled .Xr aio_error 2 , .Xr aio_return 2 , .Xr mlock 2 , +.Xr sigevent 3 , .Xr aio 4 .Sh PORTABILITY The Modified: stable/11/lib/libc/sys/aio_read.2 ============================================================================== --- stable/11/lib/libc/sys/aio_read.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_read.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 1998 +.Dd July 15, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -79,6 +79,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -115,6 +121,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_read @@ -191,6 +201,7 @@ would be invalid. .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , .Xr aio_write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/aio_write.2 ============================================================================== --- stable/11/lib/libc/sys/aio_write.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/aio_write.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 2, 1999 +.Dd July 15, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -85,6 +85,12 @@ If the request is successfully enqueued, .Fa iocb->aio_offset can be modified during the request as context, so this value must not be referenced after the request is enqueued. +.Pp +The +.Fa iocb->aio_sigevent +structure can be used to request notification of the request's +completion as described in +.Xr aio 4 . .Sh RESTRICTIONS The Asynchronous I/O Control Block structure pointed to by .Fa iocb @@ -119,6 +125,10 @@ system call will fail if: .Bl -tag -width Er .It Bq Er EAGAIN The request was not queued because of system resource limitations. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa iocb->aio_sigevent.sigev_notify +is invalid or not supported. .It Bq Er ENOSYS The .Fn aio_write @@ -186,6 +196,7 @@ would be invalid. .Xr aio_return 2 , .Xr aio_suspend 2 , .Xr aio_waitcomplete 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/lio_listio.2 ============================================================================== --- stable/11/lib/libc/sys/lio_listio.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/lio_listio.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2003 +.Dd July 15, 2016 .Dt LIO_LISTIO 2 .Os .Sh NAME @@ -83,14 +83,52 @@ If .Fa mode is .Dv LIO_NOWAIT , -the requests are processed asynchronously, and the signal specified by .Fa sig -is sent when all operations have completed. +can be used to request asynchronous notification when all operations have +completed. If .Fa sig is .Dv NULL , -the calling process is not notified of I/O completion. +no notification is sent. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta Fa list +.It Va filter Ta Dv EVFILT_LIO +.It Va udata Ta +value stored in +.Fa sig->sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Fa sig->sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Fa sig->sigev_value +is passed to the +.Fa sig->sigev_notify_function +as described in +.Xr sigevent 3 . .Pp The order in which the requests are carried out is not specified; in particular, there is no guarantee that they will be executed in @@ -136,6 +174,10 @@ or .Fa nent is greater than .Dv AIO_LISTIO_MAX . +.It Bq Er EINVAL +The asynchronous notification method in +.Fa sig->sigev_notify +is invalid or not supported. .It Bq Er EINTR A signal interrupted the system call before it could be completed. .It Bq Er EIO @@ -166,6 +208,7 @@ structure individually by calling .Xr aio_write 2 , .Xr read 2 , .Xr write 2 , +.Xr sigevent 3 , .Xr siginfo 3 , .Xr aio 4 .Sh STANDARDS Modified: stable/11/lib/libc/sys/mq_notify.2 ============================================================================== --- stable/11/lib/libc/sys/mq_notify.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/mq_notify.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -37,7 +37,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2005 +.Dd July 15, 2016 .Dt MQ_NOTIFY 2 .Os .Sh NAME @@ -77,18 +77,27 @@ is .Dv SIGEV_NONE , then no signal will be posted, but the error status and the return status for the operation will be set appropriately. -If -.Fa notification->sigev_notify -is -.Dv SIGEV_SIGNAL , -then the signal specified in +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the signal specified in .Fa notification->sigev_signo -will be sent to the process. -The signal will be queued to the process and the value specified in +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa notification->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_MESGQ +.It Va si_value Ta +the value stored in .Fa notification->sigev_value -will be the -.Va si_value -component of the generated signal. +.It Va si_mqd Ta Fa mqdes +.El .Pp If .Fa notification @@ -123,11 +132,16 @@ The argument is not a valid message queue descriptor. .It Bq Er EBUSY Process is already registered for notification by the message queue. +.It Bq Er EINVAL +The asynchronous notification method in +.Fa notification->sigev_notify +is invalid or not supported. .El .Sh SEE ALSO .Xr mq_open 2 , .Xr mq_send 2 , .Xr mq_timedsend 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/11/lib/libc/sys/timer_create.2 ============================================================================== --- stable/11/lib/libc/sys/timer_create.2 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/lib/libc/sys/timer_create.2 Mon Jul 25 23:37:47 2016 (r303324) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2009 +.Dd July 15, 2016 .Dt TIMER_CREATE 2 .Os .Sh NAME @@ -74,6 +74,36 @@ structure. This structure, allocated by the application, defines the asynchronous notification to occur when the timer expires. +.Pp +If +.Fa evp->sigev_notify +is +.Dv SIGEV_SIGNO +or +.Dv SIGEV_THREAD_ID , +the signal specified in +.Fa evp->sigev_signo +will be sent to the calling process +.Pq Dv SIGEV_SIGNO +or to the thread whose LWP ID is +.Fa evp->sigev_notify_thread_id +.Pq Dv SIGEV_THREAD_ID . +The information for the queued signal will include: +.Bl -column ".Va si_value" +.It Sy Member Ta Sy Value +.It Va si_code Ta Dv SI_TIMER +.It Va si_value Ta +the value stored in +.Fa evp->sigev_value +.It Va si_timerid Ta timer ID +.It Va si_overrun Ta timer overrun count +.It Va si_errno Ta +If timer overrun is +.Brq Dv DELAYTIMER_MAX , +an error code defined in +.In errno.h +.El +.Pp If the .Fa evp argument is @@ -88,12 +118,14 @@ member having the value .Dv SIGEV_SIGNAL , the .Va sigev_signo -having a default signal number, and the +having a default signal number +.Pq Dv SIGALRM , +and the .Va sigev_value member having the value of the timer ID. .Pp -The implementations supports a +This implementation supports a .Fa clock_id of .Dv CLOCK_REALTIME @@ -144,6 +176,8 @@ The calling process has already created this implementation. .It Bq Er EINVAL The specified clock ID is not supported. +.It Bq Er EINVAL +The specified asynchronous notification method is not supported. .It Bq Er EFAULT Any arguments point outside the allocated address space or there is a memory protection fault. @@ -152,6 +186,7 @@ memory protection fault. .Xr clock_getres 2 , .Xr timer_delete 2 , .Xr timer_getoverrun 2 , +.Xr sigevent 3 , .Xr siginfo 3 .Sh STANDARDS The Modified: stable/11/share/man/man3/Makefile ============================================================================== --- stable/11/share/man/man3/Makefile Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/share/man/man3/Makefile Mon Jul 25 23:37:47 2016 (r303324) @@ -15,6 +15,7 @@ MAN= assert.3 \ offsetof.3 \ ${PTHREAD_MAN} \ queue.3 \ + sigevent.3 \ siginfo.3 \ stdarg.3 \ sysexits.3 \ Copied: stable/11/share/man/man3/sigevent.3 (from r302899, head/share/man/man3/sigevent.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/share/man/man3/sigevent.3 Mon Jul 25 23:37:47 2016 (r303324, copy of r302899, head/share/man/man3/sigevent.3) @@ -0,0 +1,127 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2016 John H. Baldwin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 15, 2016 +.Dt SIGEVENT 3 +.Os +.Sh NAME +.Nm sigevent +.Nd "asynchronous event notification" +.Sh SYNOPSIS +.In signal.h +.Sh DESCRIPTION +Some operations permit threads to request asychronous notification of events +via a +.Vt struct sigevent +structure. +This structure contains several fields that describe the requested notification: +.Bl -column ".Vt void (*)(union sigval)" ".Va sigev_notify_kevent_flags" +.It Sy Type Ta Sy Member Ta Sy Description +.It Vt int Ta sigev_notify Ta notification method +.It Vt int Ta sigev_signo Ta signal number +.It Vt union sigval Ta sigev_value Ta signal value +.It Vt int Ta sigev_notify_kqueue Ta +.Xr kqueue 2 +file descriptor +.It Vt unsigned short Ta sigev_notify_kevent_flags Ta kevent flags +.It Vt lwpid_t Ta sigev_notify_thread_id Ta LWP ID +.It Vt void (*)(union sigval) Ta sigev_notify_function Ta +callback function pointer +.It Vt pthread_attr_t * Ta sigev_notify_attributes Ta +callback thread attributes +.El +.Pp +The +.Va sigev_notify +field specifies the notification method used when the event triggers: +.Bl -tag -width ".Dv SIGEV_THREAD_ID" +.It Dv SIGEV_NONE +No notification is sent. +.It Dv SIGEV_SIGNAL +The signal +.Va sigev_signo +is queued as a real-time signal to the calling process. +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.It Dv SIGEV_THREAD +The notification function in +.Va sigev_notify_function +is called in a separate thread context. +The thread is created with the attributes specified in +.Va *sigev_notify_attributes . +The value stored in +.Va sigev_value +is passed as the sole argument to +.Va sigev_notify_function . +If +.Va sigev_notify_attributes +is +.Dv NULL , +the thread is created with default attributes. +.It Dv SIGEV_KEVENT +A new kevent is posted to the kqueue +.Va sigev_notify_kqueue . +The +.Va udata +member of the kevent structure contains the value stored in +.Va sigev_value . +The meaning of other fields in the kevent are specific to the type of triggered +event. +.It Dv SIGEV_THREAD_ID +The signal +.Va sigev_signo +is queued to the thread whose LWP ID is +.Va sigev_notify_thread_id . +The value stored in +.Va sigev_value +will be present in the +.Va si_value +of the +.Vt siginfo_t +structure of the queued signal. +.El +.Sh NOTES +Note that programs wishing to use +.Dv SIGEV_THREAD +notifications must link against the +.Lb librt . +.Sh SEE ALSO +.Xr aio_read 2 , +.Xr mq_notify 2 , +.Xr timer_create 2 , +.Xr siginfo 3 +.Sh STANDARDS +The +.Vt struct sigevent +type conforms to +.St -p1003.1-2004 . Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Mon Jul 25 23:06:37 2016 (r303323) +++ stable/11/share/man/man4/aio.4 Mon Jul 25 23:37:47 2016 (r303324) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2016 +.Dd July 15, 2016 .Dt AIO 4 .Os .Sh NAME @@ -137,6 +137,54 @@ The number of outstanding asynchronous I The maximum number of outstanding asynchronous I/O requests permitted system-wide. .El +.Pp +Asynchronous I/O control buffers should be zeroed before initializing +individual fields. +This ensures all fields are initialized. +.Pp +All asynchronous I/O control buffers contain a +.Vt sigevent +structure in the +.Va aio_sigevent +field which can be used to request notification when an operation completes. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta asynchronous I/O control buffer pointer +.It Va filter Ta Dv EVFILT_AIO +.It Va udata Ta +value stored in +.Va aio_sigevent.sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Va sigevent.sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Va aio_sigevent.sigev_value +is passed to the +.Va aio_sigevent.sigev_notify_function +as described in +.Xr sigevent 3 . .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -146,6 +194,7 @@ system-wide. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , +.Xr sigevent 3 , .Xr sysctl 8 .Sh HISTORY The From owner-svn-src-stable-11@freebsd.org Tue Jul 26 05:26:08 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8D69BA515F; Tue, 26 Jul 2016 05:26:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 8488E1F4E; Tue, 26 Jul 2016 05:26:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5Q7ZQ086700; Tue, 26 Jul 2016 05:26:07 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5Q7qK086699; Tue, 26 Jul 2016 05:26:07 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260526.u6Q5Q7qK086699@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303330 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:26:08 -0000 Author: allanjude Date: Tue Jul 26 05:26:07 2016 New Revision: 303330 URL: https://svnweb.freebsd.org/changeset/base/303330 Log: MFC: r302941 At the start of the installation process, all ZFS pools are exported and all GELI instances are detached, to allow a restarted install to proceed. PR: 210814 Approved by: re (gjb) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:06:00 2016 (r303329) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:07 2016 (r303330) @@ -224,6 +224,7 @@ ZFS_UNMOUNT='zfs unmount "%s"' ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' ZPOOL_DESTROY='zpool destroy "%s"' ZPOOL_EXPORT='zpool export "%s"' +ZPOOL_EXPORT_F='zpool export -f "%s"' ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' ZPOOL_LABELCLEAR_F='zpool labelclear -f "%s"' ZPOOL_SET='zpool set %s "%s"' @@ -783,6 +784,14 @@ zfs_create_diskpart() # NOTE: `-F' required to destroy if partitions still exist. # NOTE: Failure is ok here, blank disk will have nothing to destroy. # + f_dprintf "$funcname: Exporting ZFS pools..." + zpool list -Ho name | while read z_name; do + f_eval_catch -d $funcname zpool "$ZPOOL_EXPORT_F" $z_name + done + f_dprintf "$funcname: Detaching all GELI providers..." + geli status | tail -n +2 | while read g_name g_status g_component; do + f_eval_catch -d $funcname geli "$GELI_DETACH_F" $g_name + done f_dprintf "$funcname: Destroying all data/layouts on \`%s'..." "$disk" f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" $disk f_eval_catch -d $funcname graid "$GRAID_DELETE" $disk From owner-svn-src-stable-11@freebsd.org Tue Jul 26 05:26:54 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15ACBA51C7; Tue, 26 Jul 2016 05:26:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 80CA2120E; Tue, 26 Jul 2016 05:26:54 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5Qrtg086784; Tue, 26 Jul 2016 05:26:53 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5QrWO086783; Tue, 26 Jul 2016 05:26:53 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260526.u6Q5QrWO086783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303331 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:26:54 -0000 Author: allanjude Date: Tue Jul 26 05:26:53 2016 New Revision: 303331 URL: https://svnweb.freebsd.org/changeset/base/303331 Log: MFC: r302940 Fix error in bsdinstall triggered when doing a GELI encrypted install to an MBR formatted disk Approved by: re (gjb) Sponsored by: ScaleEngine Inc. Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:07 2016 (r303330) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Tue Jul 26 05:26:53 2016 (r303331) @@ -1393,8 +1393,9 @@ zfs_create_boot() "-o altroot=\"$BSDINSTALL_CHROOT\"" "$zroot_name" || return $FAILURE if [ "$ZFSBOOT_BOOT_POOL" ]; then + # Import the bootpool, but do not mount it yet f_eval_catch $funcname zpool "$ZPOOL_IMPORT_WITH_OPTIONS" \ - "-o altroot=\"$BSDINSTALL_CHROOT\"" \ + "-o altroot=\"$BSDINSTALL_CHROOT\" -N" \ "$bootpool_name" || return $FAILURE fi fi From owner-svn-src-stable-11@freebsd.org Tue Jul 26 05:27:28 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BDC3BA5221; Tue, 26 Jul 2016 05:27:28 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 E0537136A; Tue, 26 Jul 2016 05:27:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5RRBk086853; Tue, 26 Jul 2016 05:27:27 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5RR1M086852; Tue, 26 Jul 2016 05:27:27 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201607260527.u6Q5RR1M086852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 26 Jul 2016 05:27:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303332 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:27:28 -0000 Author: allanjude Date: Tue Jul 26 05:27:26 2016 New Revision: 303332 URL: https://svnweb.freebsd.org/changeset/base/303332 Log: MFC: r302790, r302795 Add new menu to bsdinstall to allow user to set date and time after selecting timezone. The 'skip' button is the default selection. Submitted by: des Approved by: re (gjb) Modified: stable/11/usr.sbin/bsdinstall/scripts/time Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/time ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/time Tue Jul 26 05:26:53 2016 (r303331) +++ stable/11/usr.sbin/bsdinstall/scripts/time Tue Jul 26 05:27:26 2016 (r303332) @@ -26,4 +26,42 @@ # # $FreeBSD$ +# Select timezone chroot $BSDINSTALL_CHROOT tzsetup + +# Switch to target timezone +saved_TZ="$TZ" +TZ="${BSDINSTALL_CHROOT}/etc/localtime" +export TZ + +# Set date +exec 3>&1 +DATE=$(dialog --backtitle 'FreeBSD Installer' \ + --title 'Time & Date' \ + --ok-label 'Set Date' \ + --cancel-label 'Skip' \ + --defaultno \ + --date-format '%Y%m%d%H%M.%S' \ + --calendar '' 2 40 \ +2>&1 1>&3) && date $DATE +exec 3>&- + +# Set time +exec 3>&1 +TIME=$(dialog --backtitle 'FreeBSD Installer' \ + --title 'Time & Date' \ + --ok-label 'Set Time' \ + --cancel-label 'Skip' \ + --defaultno \ + --time-format '%H%M.%S' \ + --timebox '' 2 40 \ +2>&1 1>&3) && date $TIME +exec 3>&- + +# Switch back +if [ -n "$saved_TZ" ]; then + TZ="$saved_TZ" +else + unset TZ +fi +unset saved_TZ From owner-svn-src-stable-11@freebsd.org Tue Jul 26 05:52:55 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EF05BA5765; Tue, 26 Jul 2016 05:52:55 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 D39DD119B; Tue, 26 Jul 2016 05:52:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6Q5qsJt097525; Tue, 26 Jul 2016 05:52:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6Q5qs1e097524; Tue, 26 Jul 2016 05:52:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201607260552.u6Q5qs1e097524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 26 Jul 2016 05:52:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303333 - stable/11/sys/boot/efi/libefi X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 05:52:55 -0000 Author: manu Date: Tue Jul 26 05:52:53 2016 New Revision: 303333 URL: https://svnweb.freebsd.org/changeset/base/303333 Log: MFC: r303039 Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console. Approved by: re (gjb) Modified: stable/11/sys/boot/efi/libefi/Makefile Modified: stable/11/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/11/sys/boot/efi/libefi/Makefile Tue Jul 26 05:27:26 2016 (r303332) +++ stable/11/sys/boot/efi/libefi/Makefile Tue Jul 26 05:52:53 2016 (r303333) @@ -35,6 +35,10 @@ CFLAGS+= -I${.CURDIR}/../../common # Handle FreeBSD specific %b and %D printf format specifiers CFLAGS+= ${FORMAT_EXTENSIONS} + +# Do not use TERM_EMU on arm and arm64 as it doesn't behave well with serial console +.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64" CFLAGS+= -DTERM_EMU +.endif .include From owner-svn-src-stable-11@freebsd.org Tue Jul 26 14:12:12 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBDABBA429D; Tue, 26 Jul 2016 14:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 85AF51F51; Tue, 26 Jul 2016 14:12:12 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QECBSC085541; Tue, 26 Jul 2016 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QECBYI085540; Tue, 26 Jul 2016 14:12:11 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607261412.u6QECBYI085540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 26 Jul 2016 14:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303336 - stable/11/lib/libc/locale X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 14:12:12 -0000 Author: pfg Date: Tue Jul 26 14:12:11 2016 New Revision: 303336 URL: https://svnweb.freebsd.org/changeset/base/303336 Log: MFC r303046: libc: tag the rune initialization function prototypes visibility as hidden. It is good practice to export as few symbols as possible from your shared libraries, so use the GCC visibility attribute in this case, matching what Apple's libc does. Reference: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html Hinted by: Apple's libc 1082.20.4 Approved by: re (gjb) Modified: stable/11/lib/libc/locale/mblocal.h Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/locale/mblocal.h ============================================================================== --- stable/11/lib/libc/locale/mblocal.h Tue Jul 26 13:36:28 2016 (r303335) +++ stable/11/lib/libc/locale/mblocal.h Tue Jul 26 14:12:11 2016 (r303336) @@ -65,18 +65,18 @@ extern struct xlocale_ctype __xlocale_gl /* * Rune initialization function prototypes. */ -int _none_init(struct xlocale_ctype *, _RuneLocale *); -int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); -int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); -int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); -int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); -int _GBK_init(struct xlocale_ctype *, _RuneLocale *); -int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); -int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); -int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _none_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _ascii_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _UTF8_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_CN_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_JP_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_KR_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _EUC_TW_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB18030_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GB2312_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _GBK_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _BIG5_init(struct xlocale_ctype *, _RuneLocale *); +__hidden int _MSKanji_init(struct xlocale_ctype *, _RuneLocale *); typedef size_t (*mbrtowc_pfn_t)(wchar_t * __restrict, const char * __restrict, size_t, mbstate_t * __restrict); From owner-svn-src-stable-11@freebsd.org Tue Jul 26 15:22:22 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E9CABA57EE; Tue, 26 Jul 2016 15:22:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2E9E6171B; Tue, 26 Jul 2016 15:22:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QFMLkB011476; Tue, 26 Jul 2016 15:22:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QFMLlr011475; Tue, 26 Jul 2016 15:22:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607261522.u6QFMLlr011475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jul 2016 15:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303337 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 15:22:22 -0000 Author: emaste Date: Tue Jul 26 15:22:21 2016 New Revision: 303337 URL: https://svnweb.freebsd.org/changeset/base/303337 Log: MFC r303034: Include makewhatis in ITOOLS when MK_MAN_UTILS is true Previously it was conditional on MK_MAN. It's possible to build FreeBSD with man pages but without man page tools. MK_MAN_UTILS is the conditional used in share/man/Makefile for determining whether makewhatis is executed at install time, so it is the proper one for ITOOLS as well. PR: 210142 Approved by: re (gjb) Modified: stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Tue Jul 26 14:12:11 2016 (r303336) +++ stable/11/Makefile.inc1 Tue Jul 26 15:22:21 2016 (r303337) @@ -884,7 +884,7 @@ ITOOLS= [ awk cap_mkdb cat chflags chmod ${LOCAL_ITOOLS} # Needed for share/man -.if ${MK_MAN} != "no" +.if ${MK_MAN_UTILS} != "no" ITOOLS+=makewhatis .endif From owner-svn-src-stable-11@freebsd.org Tue Jul 26 20:26:04 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D33BA4414; Tue, 26 Jul 2016 20:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4AD5015CD; Tue, 26 Jul 2016 20:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6QKQ3SM048651; Tue, 26 Jul 2016 20:26:03 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6QKQ3FF048649; Tue, 26 Jul 2016 20:26:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201607262026.u6QKQ3FF048649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 26 Jul 2016 20:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303344 - stable/11/sys/dev/urtwn X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2016 20:26:04 -0000 Author: avos Date: Tue Jul 26 20:26:03 2016 New Revision: 303344 URL: https://svnweb.freebsd.org/changeset/base/303344 Log: MFC r303115: urtwn: fix A-MSDU tx aggregation when encryption is used. Clear unused (undocumented) CAM bytes while setting a key; without that, hardware does weird things when A-MSDU bit in QoS header is set. Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit). Reported by: many Approved by: re (gjb) Obtained from: https://github.com/s3erios/urtwm Modified: stable/11/sys/dev/urtwn/if_urtwn.c stable/11/sys/dev/urtwn/if_urtwnreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/urtwn/if_urtwn.c ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:26:03 2016 (r303344) @@ -2318,6 +2318,10 @@ urtwn_key_set_cb(struct urtwn_softc *sc, k->wk_cipher->ic_cipher, algo, k->wk_flags, k->wk_keylen, ether_sprintf(k->wk_macaddr)); + /* Clear high bits. */ + urtwn_cam_write(sc, R92C_CAM_CTL6(k->wk_keyix), 0); + urtwn_cam_write(sc, R92C_CAM_CTL7(k->wk_keyix), 0); + /* Write key. */ for (i = 0; i < 4; i++) { error = urtwn_cam_write(sc, R92C_CAM_KEY(k->wk_keyix, i), Modified: stable/11/sys/dev/urtwn/if_urtwnreg.h ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:26:03 2016 (r303344) @@ -871,6 +871,8 @@ #define R92C_CAM_CTL0(entry) ((entry) * 8 + 0) #define R92C_CAM_CTL1(entry) ((entry) * 8 + 1) #define R92C_CAM_KEY(entry, i) ((entry) * 8 + 2 + (i)) +#define R92C_CAM_CTL6(entry) ((entry) * 8 + 6) +#define R92C_CAM_CTL7(entry) ((entry) * 8 + 7) /* Bits for R92C_CAM_CTL0(i). */ #define R92C_CAM_KEYID_M 0x00000003 From owner-svn-src-stable-11@freebsd.org Wed Jul 27 05:17:56 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0A88A7AD91; Wed, 27 Jul 2016 05:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CB8261CCC; Wed, 27 Jul 2016 05:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R5HuTB044109; Wed, 27 Jul 2016 05:17:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R5Ht1n044107; Wed, 27 Jul 2016 05:17:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607270517.u6R5Ht1n044107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 05:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303359 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 05:17:57 -0000 Author: bdrewery Date: Wed Jul 27 05:17:55 2016 New Revision: 303359 URL: https://svnweb.freebsd.org/changeset/base/303359 Log: MFC r303272,r303273: r303272: SYSTEM_COMPILER: Rework the logic to allow a 'make test-system-compiler'. r303273: Fix empty WANT_COMPILER_TYPE when neither compiler is bootstrapped. Approved by: re (kib) Modified: stable/11/Makefile stable/11/Makefile.inc1 Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile ============================================================================== --- stable/11/Makefile Wed Jul 27 05:03:58 2016 (r303358) +++ stable/11/Makefile Wed Jul 27 05:17:55 2016 (r303359) @@ -131,7 +131,8 @@ TGTS= all all-man buildenv buildenvvars builddtb xdev xdev-build xdev-install \ xdev-links native-xtools stageworld stagekernel stage-packages \ create-world-packages create-kernel-packages create-packages \ - packages installconfig real-packages sign-packages package-pkg + packages installconfig real-packages sign-packages package-pkg \ + test-system-compiler # XXX: r156740: This can't work since bsd.subdir.mk is not included ever. # It will only work for SUBDIR_TARGETS in make.conf. @@ -151,7 +152,8 @@ TGTS+= ${BITGTS} META_TGT_WHITELIST+= \ _* build32 buildfiles buildincludes buildkernel buildsoft \ buildworld everything kernel-toolchain kernel-toolchains kernel \ - kernels libraries native-xtools showconfig tinderbox toolchain \ + kernels libraries native-xtools showconfig test-system-compiler \ + tinderbox toolchain \ toolchains universe world worlds xdev xdev-build .ORDER: buildworld installworld Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Wed Jul 27 05:03:58 2016 (r303358) +++ stable/11/Makefile.inc1 Wed Jul 27 05:17:55 2016 (r303359) @@ -80,50 +80,68 @@ MK_CROSS_COMPILER= no .include "share/mk/src.opts.mk" # Check if there is a local compiler that can satisfy as an external compiler. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ - (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ - !make(showconfig) && !make(native-xtools) && !make(xdev*) # Which compiler is expected to be used? .if ${MK_CLANG_BOOTSTRAP} == "yes" -_expected_compiler_type= clang +WANT_COMPILER_TYPE= clang .elif ${MK_GCC_BOOTSTRAP} == "yes" -_expected_compiler_type= gcc +WANT_COMPILER_TYPE= gcc +.else +WANT_COMPILER_TYPE= .endif -# If the expected vs CC is different then we can't skip. -# GCC cannot be used for cross-arch yet. For clang we pass -target later if -# TARGET_ARCH!=MACHINE_ARCH. -.if ${_expected_compiler_type} == ${COMPILER_TYPE} && \ - (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) -# It needs to be the same revision as we would build for the bootstrap. -.if !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${_expected_compiler_type} == "clang" -CROSS_COMPILER_FREEBSD_VERSION!= \ +.if !defined(WANT_COMPILER_FREEBSD_VERSION) +.if ${WANT_COMPILER_TYPE} == "clang" +WANT_COMPILER_FREEBSD_VERSION_FILE= lib/clang/freebsd_cc_version.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FREEBSD_CC_VERSION" {printf("%d\n", $$3)}' \ - ${SRCDIR}/lib/clang/freebsd_cc_version.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= lib/clang/include/clang/Basic/Version.inc +WANT_COMPILER_VERSION!= \ awk '$$2 == "CLANG_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ - ${SRCDIR}/lib/clang/include/clang/Basic/Version.inc || echo unknown -.elif ${_expected_compiler_type} == "gcc" -CROSS_COMPILER_FREEBSD_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown +.elif ${WANT_COMPILER_TYPE} == "gcc" +WANT_COMPILER_FREEBSD_VERSION_FILE= gnu/usr.bin/cc/cc_tools/freebsd-native.h +WANT_COMPILER_FREEBSD_VERSION!= \ awk '$$2 == "FBSD_CC_VER" {printf("%d\n", $$3)}' \ - ${SRCDIR}/gnu/usr.bin/cc/cc_tools/freebsd-native.h || echo unknown -CROSS_COMPILER_VERSION!= \ + ${SRCDIR}/${WANT_COMPILER_FREEBSD_VERSION_FILE} || echo unknown +WANT_COMPILER_VERSION_FILE= contrib/gcc/BASE-VER +WANT_COMPILER_VERSION!= \ awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3}' \ - ${SRCDIR}/contrib/gcc/BASE-VER || echo unknown + ${SRCDIR}/${WANT_COMPILER_VERSION_FILE} || echo unknown .endif -.export CROSS_COMPILER_FREEBSD_VERSION CROSS_COMPILER_VERSION -.endif # !defined(CROSS_COMPILER_FREEBSD_VERSION) -.if ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} && \ - ${COMPILER_FREEBSD_VERSION} == ${CROSS_COMPILER_FREEBSD_VERSION} +.export WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_VERSION +.endif # !defined(WANT_COMPILER_FREEBSD_VERSION) +# It needs to be the same revision as we would build for the bootstrap. +# If the expected vs CC is different then we can't skip. +# GCC cannot be used for cross-arch yet. For clang we pass -target later if +# TARGET_ARCH!=MACHINE_ARCH. +.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ + (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ + !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ + ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ + (${COMPILER_TYPE} == "clang" || ${TARGET_ARCH} == ${MACHINE_ARCH}) && \ + ${COMPILER_VERSION} == ${WANT_COMPILER_VERSION} && \ + ${COMPILER_FREEBSD_VERSION} == ${WANT_COMPILER_FREEBSD_VERSION} # Everything matches, disable the bootstrap compiler. MK_CLANG_BOOTSTRAP= no MK_GCC_BOOTSTRAP= no -.if make(buildworld) +USING_SYSTEM_COMPILER= yes +.endif # ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} +USING_SYSTEM_COMPILER?= no +TEST_SYSTEM_COMPILER_VARS= \ + USING_SYSTEM_COMPILER MK_SYSTEM_COMPILER \ + MK_CROSS_COMPILER MK_CLANG_BOOTSTRAP MK_GCC_BOOTSTRAP \ + WANT_COMPILER_TYPE WANT_COMPILER_VERSION WANT_COMPILER_VERSION_FILE \ + WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ + CC COMPILER_TYPE COMPILER_VERSION COMPILER_FREEBSD_VERSION +test-system-compiler: .PHONY +.for v in ${TEST_SYSTEM_COMPILER_VARS} + ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" +.endfor +.if ${USING_SYSTEM_COMPILER} == "yes" && \ + (make(buildworld) || make(buildkernel) || make(kernel-toolchain) || \ + make(toolchain) || make(_cross-tools)) .info SYSTEM_COMPILER: Determined that CC=${CC} matches the source tree. Not bootstrapping a cross-compiler. .endif -.endif # ${COMPILER_VERSION} == ${CROSS_COMPILER_VERSION} -.endif # ${_expected_compiler_type} == ${COMPILER_TYPE} -.endif # ${XCC:N${CCACHE_BIN}:M/*} # For installworld need to ensure that the looked-up compiler metadata is # passed along rather than trying to run cc from the restricted From owner-svn-src-stable-11@freebsd.org Wed Jul 27 05:38:10 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED50DBA6167; Wed, 27 Jul 2016 05:38:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 BBDE615C4; Wed, 27 Jul 2016 05:38:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R5c9n3051359; Wed, 27 Jul 2016 05:38:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R5c9tm051357; Wed, 27 Jul 2016 05:38:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201607270538.u6R5c9tm051357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jul 2016 05:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303360 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 05:38:11 -0000 Author: bdrewery Date: Wed Jul 27 05:38:09 2016 New Revision: 303360 URL: https://svnweb.freebsd.org/changeset/base/303360 Log: MFC r303274: Don't disable binutils/elftoolchain bootstrapping with external compiler. Approved by: re (kib) Modified: stable/11/Makefile.inc1 stable/11/Makefile.libcompat Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Wed Jul 27 05:17:55 2016 (r303359) +++ stable/11/Makefile.inc1 Wed Jul 27 05:38:09 2016 (r303360) @@ -72,7 +72,8 @@ X${COMPILER}?= ${${COMPILER}} # If a full path to an external cross compiler is given, don't build # a cross compiler. .if ${XCC:N${CCACHE_BIN}:M/*} -MK_CROSS_COMPILER= no +MK_CLANG_BOOTSTRAP= no +MK_GCC_BOOTSTRAP= no .endif # Pull in COMPILER_TYPE and COMPILER_FREEBSD_VERSION early. @@ -114,7 +115,7 @@ WANT_COMPILER_VERSION!= \ # If the expected vs CC is different then we can't skip. # GCC cannot be used for cross-arch yet. For clang we pass -target later if # TARGET_ARCH!=MACHINE_ARCH. -.if ${MK_SYSTEM_COMPILER} == "yes" && ${MK_CROSS_COMPILER} == "yes" && \ +.if ${MK_SYSTEM_COMPILER} == "yes" && \ (${MK_CLANG_BOOTSTRAP} == "yes" || ${MK_GCC_BOOTSTRAP} == "yes") && \ !make(showconfig) && !make(native-xtools) && !make(xdev*) && \ ${WANT_COMPILER_TYPE} == ${COMPILER_TYPE} && \ @@ -548,8 +549,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .endif # External compiler needs sysroot and target flags. -.if ${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") +.if ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${WORLDTMP}/usr/bin .endif @@ -577,7 +577,7 @@ TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x8 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} -.endif # ${MK_CROSS_COMPILER} == "no" +.endif # ${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no" .if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} @@ -1818,7 +1818,6 @@ _elftctools= lib/libelftc \ usr.bin/elfcopy .endif -.if ${MK_CROSS_COMPILER} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang _clang_libs= lib/clang @@ -1826,7 +1825,6 @@ _clang_libs= lib/clang .if ${MK_GCC_BOOTSTRAP} != "no" _cc= gnu/usr.bin/cc .endif -.endif .if ${MK_USB} != "no" _usb_tools= sys/boot/usb/tools .endif Modified: stable/11/Makefile.libcompat ============================================================================== --- stable/11/Makefile.libcompat Wed Jul 27 05:17:55 2016 (r303359) +++ stable/11/Makefile.libcompat Wed Jul 27 05:38:09 2016 (r303360) @@ -81,8 +81,8 @@ LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/ LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include # Force using libc++ for external GCC. # XXX: This should be checking MK_GNUCXX == no -.if ${X_COMPILER_VERSION} >= 40800 && (${MK_CROSS_COMPILER} == "no" || \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no")) +.if ${X_COMPILER_VERSION} >= 40800 && \ + (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ -nostdinc++ -L${LIBCOMPAT_OBJTREE}${.CURDIR}/lib/libc++ .endif From owner-svn-src-stable-11@freebsd.org Wed Jul 27 06:29:28 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 121E2BA6ABF; Wed, 27 Jul 2016 06:29:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 B26841E23; Wed, 27 Jul 2016 06:29:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6TQZ7069997; Wed, 27 Jul 2016 06:29:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6TQ79069996; Wed, 27 Jul 2016 06:29:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607270629.u6R6TQ79069996@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 27 Jul 2016 06:29:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303363 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:29:28 -0000 Author: ngie Date: Wed Jul 27 06:29:26 2016 New Revision: 303363 URL: https://svnweb.freebsd.org/changeset/base/303363 Log: MFC r302842: Don't delete usr/share/local/kk_KZ.UTF-8 with "make delete-old" after r302329 kk_KZ.UTF-8 was originally removed in r290494, but restored as an alias to en_US.UTF-8 in r302329 Approved by: re (kib) PR: 211046 Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-stable-11@freebsd.org Wed Jul 27 06:29:42 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50B66BA6AFE; Wed, 27 Jul 2016 06:29:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 208321F74; Wed, 27 Jul 2016 06:29:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R6TfPV070063; Wed, 27 Jul 2016 06:29:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R6TfUF070062; Wed, 27 Jul 2016 06:29:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607270629.u6R6TfUF070062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 27 Jul 2016 06:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303364 - stable/11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 06:29:42 -0000 Author: ngie Date: Wed Jul 27 06:29:41 2016 New Revision: 303364 URL: https://svnweb.freebsd.org/changeset/base/303364 Log: MFC r302842: Don't delete usr/share/local/kk_KZ.UTF-8 with "make delete-old" after r302329 kk_KZ.UTF-8 was originally removed in r290494, but restored as an alias to en_US.UTF-8 in r302329 Approved by: re (kib) PR: 211046 Modified: stable/11/ObsoleteFiles.inc Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Wed Jul 27 06:29:26 2016 (r303363) +++ stable/11/ObsoleteFiles.inc Wed Jul 27 06:29:41 2016 (r303364) @@ -460,13 +460,6 @@ OLD_FILES+=usr/share/locale/kk_KZ.PT154/ OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_NUMERIC OLD_FILES+=usr/share/locale/kk_KZ.PT154/LC_TIME OLD_DIRS+=usr/share/locale/kk_KZ.PT154/ -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_COLLATE -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_CTYPE -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MESSAGES -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_MONETARY -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_NUMERIC -OLD_FILES+=usr/share/locale/kk_KZ.UTF-8/LC_TIME -OLD_DIRS+=usr/share/locale/kk_KZ.UTF-8 OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_COLLATE OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_CTYPE OLD_FILES+=usr/share/locale/la_LN.ISO8859-1/LC_TIME From owner-svn-src-stable-11@freebsd.org Wed Jul 27 08:47:25 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9929CBA59B2; Wed, 27 Jul 2016 08:47:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 4F0AC1501; Wed, 27 Jul 2016 08:47:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6R8lO6O022044; Wed, 27 Jul 2016 08:47:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6R8lOID022042; Wed, 27 Jul 2016 08:47:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607270847.u6R8lOID022042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jul 2016 08:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303375 - stable/11/sys/ufs/ufs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 08:47:25 -0000 Author: kib Date: Wed Jul 27 08:47:24 2016 New Revision: 303375 URL: https://svnweb.freebsd.org/changeset/base/303375 Log: MFC r303090: Ensure that the UFS directory vnode' vm_object is properly sized before UFS_BALLOC() is called. Approved by: re (delphij) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c stable/11/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:26:34 2016 (r303374) +++ stable/11/sys/ufs/ufs/ufs_lookup.c Wed Jul 27 08:47:24 2016 (r303375) @@ -881,6 +881,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir struct buf *bp; u_int dsize; struct direct *ep, *nep; + u_int64_t old_isize; int error, ret, blkoff, loc, spacefree, flags, namlen; char *dirbuf; @@ -909,16 +910,18 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir return (error); } #endif + old_isize = dp->i_size; + vnode_pager_setsize(dvp, (u_long)dp->i_offset + DIRBLKSIZ); if ((error = UFS_BALLOC(dvp, (off_t)dp->i_offset, DIRBLKSIZ, cr, flags, &bp)) != 0) { if (DOINGSOFTDEP(dvp) && newdirbp != NULL) bdwrite(newdirbp); + vnode_pager_setsize(dvp, (u_long)old_isize); return (error); } dp->i_size = dp->i_offset + DIRBLKSIZ; DIP_SET(dp, i_size, dp->i_size); dp->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(dvp, (u_long)dp->i_size); dirp->d_reclen = DIRBLKSIZ; blkoff = dp->i_offset & (VFSTOUFS(dvp->v_mount)->um_mountp->mnt_stat.f_iosize - 1); Modified: stable/11/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/11/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:26:34 2016 (r303374) +++ stable/11/sys/ufs/ufs/ufs_vnops.c Wed Jul 27 08:47:24 2016 (r303375) @@ -1913,13 +1913,13 @@ ufs_mkdir(ap) dirtemplate = *dtp; dirtemplate.dot_ino = ip->i_number; dirtemplate.dotdot_ino = dp->i_number; + vnode_pager_setsize(tvp, DIRBLKSIZ); if ((error = UFS_BALLOC(tvp, (off_t)0, DIRBLKSIZ, cnp->cn_cred, BA_CLRBUF, &bp)) != 0) goto bad; ip->i_size = DIRBLKSIZ; DIP_SET(ip, i_size, DIRBLKSIZ); ip->i_flag |= IN_CHANGE | IN_UPDATE; - vnode_pager_setsize(tvp, (u_long)ip->i_size); bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate); if (DOINGSOFTDEP(tvp)) { /* From owner-svn-src-stable-11@freebsd.org Wed Jul 27 17:10:11 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17623BA6B7F; Wed, 27 Jul 2016 17:10:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 DB345166B; Wed, 27 Jul 2016 17:10:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHAA4T011781; Wed, 27 Jul 2016 17:10:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHAAGw011780; Wed, 27 Jul 2016 17:10:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201607271710.u6RHAAGw011780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jul 2016 17:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303398 - stable/11/contrib/elftoolchain/libelftc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:10:11 -0000 Author: emaste Date: Wed Jul 27 17:10:09 2016 New Revision: 303398 URL: https://svnweb.freebsd.org/changeset/base/303398 Log: MFC r303279: libelftc: fix demangling of wchar_t "wchar_t" is 7 characters long, not 6. PR: 208661 Submitted by: Daniel McRobb Approved by: re (kib) Obtained from: ELF Tool Chain r3480 Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Wed Jul 27 16:46:48 2016 (r303397) +++ stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Wed Jul 27 17:10:09 2016 (r303398) @@ -2551,7 +2551,7 @@ again: case 'w': /* wchar_t */ - if (!cpp_demangle_push_str(ddata, "wchar_t", 6)) + if (!cpp_demangle_push_str(ddata, "wchar_t", 7)) goto clean; ++ddata->cur; goto rtn; From owner-svn-src-stable-11@freebsd.org Wed Jul 27 17:55:15 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52326BA6778; Wed, 27 Jul 2016 17:55:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 165FD1472; Wed, 27 Jul 2016 17:55:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RHtEIc030518; Wed, 27 Jul 2016 17:55:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RHtEim030517; Wed, 27 Jul 2016 17:55:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607271755.u6RHtEim030517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jul 2016 17:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303402 - stable/11/usr.sbin/crashinfo X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 17:55:15 -0000 Author: jhb Date: Wed Jul 27 17:55:14 2016 New Revision: 303402 URL: https://svnweb.freebsd.org/changeset/base/303402 Log: MFC 303109: Update crashinfo to work with newer gdb from ports. If gdb from ports is installed, use it instead of the base system gdb to extract variables from a kernel. Note that base gdb and ports gdb do not support the same options for invoking a single command in batch mode, so a wrapper shell function is used. In addition, prefer kgdb from ports when generating a backtrace if present. PR: 193335 Approved by: re (gjb) Modified: stable/11/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/11/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:21:24 2016 (r303401) +++ stable/11/usr.sbin/crashinfo/crashinfo.sh Wed Jul 27 17:55:14 2016 (r303402) @@ -35,6 +35,22 @@ usage() exit 1 } +# Run a single gdb command against a kernel file in batch mode. +# The kernel file is specified as the first argument and the command +# is given in the remaining arguments. +gdb_command() +{ + local k + + k=$1 ; shift + + if [ -x /usr/local/bin/gdb ]; then + /usr/local/bin/gdb -batch -ex "$@" $k + else + echo -e "$@" | /usr/bin/gdb -x /dev/stdin -batch $k + fi +} + find_kernel() { local ivers k kvers @@ -55,8 +71,8 @@ find_kernel() # Look for a matching kernel version. for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do - kvers=$(echo 'printf " Version String: %s", version' | \ - gdb -x /dev/stdin -batch $k 2>/dev/null) + kvers=$(gdb_command $k 'printf " Version String: %s", version' \ + 2>/dev/null) if [ "$ivers" = "$kvers" ]; then KERNEL=$k break @@ -151,11 +167,10 @@ echo "Writing crash summary to $FILE." umask 077 # Simulate uname -ostype=$(echo -e printf '"%s", ostype' | gdb -x /dev/stdin -batch $KERNEL) -osrelease=$(echo -e printf '"%s", osrelease' | gdb -x /dev/stdin -batch $KERNEL) -version=$(echo -e printf '"%s", version' | gdb -x /dev/stdin -batch $KERNEL | \ - tr '\t\n' ' ') -machine=$(echo -e printf '"%s", machine' | gdb -x /dev/stdin -batch $KERNEL) +ostype=$(gdb_command $KERNEL 'printf "%s", ostype') +osrelease=$(gdb_command $KERNEL 'printf "%s", osrelease') +version=$(gdb_command $KERNEL 'printf "%s", version' | tr '\t\n' ' ') +machine=$(gdb_command $KERNEL 'printf "%s", machine') exec > $FILE 2>&1 @@ -174,7 +189,11 @@ file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then echo "bt" >> $file echo "quit" >> $file - kgdb $KERNEL $VMCORE < $file + if [ -x /usr/local/bin/kgdb ]; then + /usr/local/bin/kgdb $KERNEL $VMCORE < $file + else + kgdb $KERNEL $VMCORE < $file + fi rm -f $file echo fi From owner-svn-src-stable-11@freebsd.org Wed Jul 27 19:39:26 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEDE6BA6588; Wed, 27 Jul 2016 19:39:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 ACC2E1F89; Wed, 27 Jul 2016 19:39:26 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6RJdPge067872; Wed, 27 Jul 2016 19:39:25 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6RJdPhE067871; Wed, 27 Jul 2016 19:39:25 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201607271939.u6RJdPhE067871@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jul 2016 19:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303407 - stable/11/etc/ntp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 19:39:27 -0000 Author: cy Date: Wed Jul 27 19:39:25 2016 New Revision: 303407 URL: https://svnweb.freebsd.org/changeset/base/303407 Log: MFC r303160. Update leap-seconds to leap-seconds.3676752000. As per https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16: UTC TIME STEP on the 1st of January 2017 A positive leap second will be introduced at the end of December 2016. The sequence of dates of the UTC second markers will be: 2016 December 31, 23h 59m 59s 2016 December 31, 23h 59m 60s 2017 January 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2015 July 1, 0h UTC, to 2017 January 1 0h UTC : UTC-TAI = - 36s from 2017 January 1, 0h UTC, until further notice : UTC-TAI = - 37s Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.3676752000 See also: https://www.iers.org/SharedDocs/News/EN/BulletinC.html https://datacenter.iers.org/web/guest/eop/-/somos/5Rgv/latest/16 Relnotes: yes Approved by: re@ (delphij@) Modified: stable/11/etc/ntp/leap-seconds Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/ntp/leap-seconds ============================================================================== --- stable/11/etc/ntp/leap-seconds Wed Jul 27 19:31:25 2016 (r303406) +++ stable/11/etc/ntp/leap-seconds Wed Jul 27 19:39:25 2016 (r303407) @@ -130,7 +130,7 @@ # Washington, DC # jeffrey.prillaman@usno.navy.mil # -# Last Update of leap second values: 11 Jan 2016 +# Last Update of leap second values: 6 Jul 2016 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -138,7 +138,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3661459200 +#$ 3676752000 # # The data in this file will be updated periodically as new leap # seconds are announced. In addition to being entered on the line @@ -170,10 +170,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C 51 -# File expires on: 1 Dec 2016 +# Updated through IERS Bulletin C 52 +# File expires on: 1 Jun 2017 # -#@ 3689539200 +#@ 3705264000 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -202,6 +202,7 @@ 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 # # the following special comment contains the # hash value of the data in this file computed @@ -217,5 +218,5 @@ # the hash line is also ignored in the # computation. # -#h 63b4df04 0907d94f 2dadb7a1 684f7767 2a372421 +#h 63f8fea8 587c099d abcf130a ad525eae 3e105052 # From owner-svn-src-stable-11@freebsd.org Thu Jul 28 11:43:27 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66EE6BA5DFA; Thu, 28 Jul 2016 11:43:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 1A2D219BB; Thu, 28 Jul 2016 11:43:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SBhQs2026648; Thu, 28 Jul 2016 11:43:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SBhPQD026645; Thu, 28 Jul 2016 11:43:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281143.u6SBhPQD026645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 11:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303432 - in stable/11/sys: dev/pty kern sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 11:43:27 -0000 Author: kib Date: Thu Jul 28 11:43:25 2016 New Revision: 303432 URL: https://svnweb.freebsd.org/changeset/base/303432 Log: MFC r303151: Provide counter_warning(9) KPI. MFC r303155: Hide counted_warning(9) under #ifdef _KERNEL braces. Approved by: re (gjb) Modified: stable/11/sys/dev/pty/pty.c stable/11/sys/kern/subr_prf.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pty/pty.c ============================================================================== --- stable/11/sys/dev/pty/pty.c Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/dev/pty/pty.c Thu Jul 28 11:43:25 2016 (r303432) @@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$"); * binary emulation. */ -static unsigned int pty_warningcnt = 1; +static unsigned pty_warningcnt = 1; SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW, - &pty_warningcnt, 0, - "Warnings that will be triggered upon legacy PTY allocation"); + &pty_warningcnt, 0, + "Warnings that will be triggered upon legacy PTY allocation"); static int ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp) @@ -77,12 +77,7 @@ ptydev_fdopen(struct cdev *dev, int ffla } /* Raise a warning when a legacy PTY has been allocated. */ - if (pty_warningcnt > 0) { - pty_warningcnt--; - log(LOG_INFO, "pid %d (%s) is using legacy pty devices%s\n", - td->td_proc->p_pid, td->td_name, - pty_warningcnt ? "" : " - not logging anymore"); - } + counted_warning(&pty_warningcnt, "is using legacy pty devices"); return (0); } Modified: stable/11/sys/kern/subr_prf.c ============================================================================== --- stable/11/sys/kern/subr_prf.c Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/kern/subr_prf.c Thu Jul 28 11:43:25 2016 (r303432) @@ -1196,3 +1196,24 @@ sbuf_hexdump(struct sbuf *sb, const void } } +#ifdef _KERNEL +void +counted_warning(unsigned *counter, const char *msg) +{ + struct thread *td; + unsigned c; + + for (;;) { + c = *counter; + if (c == 0) + break; + if (atomic_cmpset_int(counter, c, c - 1)) { + td = curthread; + log(LOG_INFO, "pid %d (%s) %s%s\n", + td->td_proc->p_pid, td->td_name, msg, + c > 1 ? "" : " - not logging anymore"); + break; + } + } +} +#endif Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Thu Jul 28 11:10:13 2016 (r303431) +++ stable/11/sys/sys/systm.h Thu Jul 28 11:43:25 2016 (r303432) @@ -447,4 +447,6 @@ void intr_prof_stack_use(struct thread * extern void (*softdep_ast_cleanup)(void); +void counted_warning(unsigned *counter, const char *msg); + #endif /* !_SYS_SYSTM_H_ */ From owner-svn-src-stable-11@freebsd.org Thu Jul 28 12:06:41 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B265BA7D32; Thu, 28 Jul 2016 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 2B1131A12; Thu, 28 Jul 2016 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SC6egG034196; Thu, 28 Jul 2016 12:06:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SC6eWI034195; Thu, 28 Jul 2016 12:06:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607281206.u6SC6eWI034195@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 28 Jul 2016 12:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303434 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 12:06:41 -0000 Author: kib Date: Thu Jul 28 12:06:40 2016 New Revision: 303434 URL: https://svnweb.freebsd.org/changeset/base/303434 Log: MFC r303154: Declare aio requests on files from local filesystems safe. Approved by: re (gjb) Modified: stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Thu Jul 28 11:51:20 2016 (r303433) +++ stable/11/sys/kern/vfs_aio.c Thu Jul 28 12:06:40 2016 (r303434) @@ -1664,7 +1664,10 @@ aio_queue_file(struct file *fp, struct k struct aioliojob *lj; struct kaioinfo *ki; struct kaiocb *job2; + struct vnode *vp; + struct mount *mp; int error, opcode; + bool safe; lj = job->lio; ki = job->userproc->p_aioinfo; @@ -1685,7 +1688,16 @@ aio_queue_file(struct file *fp, struct k goto done; #endif queueit: - if (!enable_aio_unsafe) + safe = false; + if (fp->f_type == DTYPE_VNODE) { + vp = fp->f_vnode; + if (vp->v_type == VREG || vp->v_type == VDIR) { + mp = fp->f_vnode->v_mount; + if (mp == NULL || (mp->mnt_flag & MNT_LOCAL) != 0) + safe = true; + } + } + if (!(safe || enable_aio_unsafe)) return (EOPNOTSUPP); if (opcode == LIO_SYNC) { From owner-svn-src-stable-11@freebsd.org Thu Jul 28 15:54:19 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62967BA74AA; Thu, 28 Jul 2016 15:54:19 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5483D1A28; Thu, 28 Jul 2016 15:54:18 +0000 (UTC) (envelope-from robak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SFsHDj020114; Thu, 28 Jul 2016 15:54:17 GMT (envelope-from robak@FreeBSD.org) Received: (from robak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SFsHVJ020110; Thu, 28 Jul 2016 15:54:17 GMT (envelope-from robak@FreeBSD.org) Message-Id: <201607281554.u6SFsHVJ020110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: robak set sender to robak@FreeBSD.org using -f From: Bartek Rutkowski Date: Thu, 28 Jul 2016 15:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303447 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 15:54:19 -0000 Author: robak (ports committer) Date: Thu Jul 28 15:54:17 2016 New Revision: 303447 URL: https://svnweb.freebsd.org/changeset/base/303447 Log: MFC r302897: Add new System Hardening menu and options to bsdinstall. This patch add new 'hardening' file responsible for new bsdinstall 'System Hardening' menu allowing users to set some sane and carefully picked system security options (like random process id's, hiding other users/groups processes and others). All options are OFF by default in this patch due to POLA principle with intention to turn change some of them to ON by default in future. Reviewed by: adrian, allanjude, bdrewery, nwhitehorn Approved by: re@, adrian, allanjude Added: stable/11/usr.sbin/bsdinstall/scripts/hardening - copied unchanged from r302897, head/usr.sbin/bsdinstall/scripts/hardening Modified: stable/11/usr.sbin/bsdinstall/scripts/Makefile stable/11/usr.sbin/bsdinstall/scripts/auto stable/11/usr.sbin/bsdinstall/scripts/config Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/Makefile Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/Makefile Thu Jul 28 15:54:17 2016 (r303447) @@ -1,6 +1,6 @@ # $FreeBSD$ -SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ +SCRIPTS= auto adduser checksum config docsinstall entropy hardening hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ rootpass script services time umount wlanconfig zfsboot BINDIR= ${LIBEXECDIR}/bsdinstall Modified: stable/11/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/auto Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/auto Thu Jul 28 15:54:17 2016 (r303447) @@ -385,6 +385,7 @@ if [ "$NETCONFIG_DONE" != yes ]; then fi bsdinstall time bsdinstall services +bsdinstall hardening dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ "Would you like to add users to the installed system now?" 0 0 && \ @@ -401,6 +402,7 @@ finalconfig() { "Hostname" "Set system hostname" \ "Network" "Networking configuration" \ "Services" "Set daemons to run on startup" \ + "System Hardening" "Set security options" \ "Time Zone" "Set system timezone" \ "Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3) exec 3>&- @@ -426,6 +428,10 @@ finalconfig() { bsdinstall services finalconfig ;; + "System Hardening") + bsdinstall hardening + finalconfig + ;; "Time Zone") bsdinstall time finalconfig Modified: stable/11/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/config Thu Jul 28 15:49:51 2016 (r303446) +++ stable/11/usr.sbin/bsdinstall/scripts/config Thu Jul 28 15:54:17 2016 (r303447) @@ -32,6 +32,9 @@ cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* +cat $BSDINSTALL_CHROOT/etc/sysctl.conf $BSDINSTALL_TMPETC/sysctl.conf.hardening >> $BSDINSTALL_TMPETC/sysctl.conf +rm $BSDINSTALL_TMPETC/sysctl.conf.* + cp $BSDINSTALL_TMPETC/* $BSDINSTALL_CHROOT/etc cat $BSDINSTALL_TMPBOOT/loader.conf.* >> $BSDINSTALL_TMPBOOT/loader.conf Copied: stable/11/usr.sbin/bsdinstall/scripts/hardening (from r302897, head/usr.sbin/bsdinstall/scripts/hardening) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.sbin/bsdinstall/scripts/hardening Thu Jul 28 15:54:17 2016 (r303447, copy of r302897, head/usr.sbin/bsdinstall/scripts/hardening) @@ -0,0 +1,79 @@ +#!/bin/sh +#- +# Copyright (c) 2016 Bartek Rutkowski +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +: ${DIALOG_OK=0} + +echo -n > $BSDINSTALL_TMPETC/rc.conf.services + +exec 3>&1 +FEATURES=$( dialog --backtitle "FreeBSD Installer" \ + --title "System Hardening" --nocancel --notags --separate-output \ + --checklist "Choose system security hardening options:" \ + 0 0 0 \ + "hide_uids" "Hide processes running as other users" ${hide_uids:-off} \ + "hide_gids" "Hide processes running as other groups" ${hide_gids:-off} \ + "read_msgbuf" "Disable reading kernel message buffer for unprivileged users" ${read_msgbuf:-off} \ + "proc_debug" "Disable process debugging facilities for unprivileged users" ${proc_debug:-off} \ + "random_pid" "Randomize the PID of newly created processes" ${random_id:-off} \ + "stack_guard" "Insert stack guard page ahead of the growable segments" ${stack_guard:-off} \ + "clear_tmp" "Clean the /tmp filesystem on system startup" ${clear_tmp:-off} \ + "disable_syslogd" "Disable opening Syslogd network socket (disables remote logging)" ${disable_syslogd:-off} \ + "disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ +2>&1 1>&3 ) +exec 3>&- + +for feature in $FEATURES; do + if [ "$feature" = "hide_uids" ]; then + echo security.bsd.see_other_uids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "hide_gids" ]; then + echo security.bsd.see_other_gids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "read_msgbuf" ]; then + echo security.bsd.unprivileged_read_msgbuf=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "proc_debug" ]; then + echo security.bsd.unprivileged_proc_debug=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "random_id" ]; then + echo kern.randompid=$(jot -r 1 9999) >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "stack_guard" ]; then + echo security.bsd.stack_guard_page=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening + fi + if [ "$feature" = "clear_tmp" ]; then + echo 'clear_tmp_enable="YES"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi + if [ "$feature" = "disable_syslogd" ]; then + echo 'syslogd_flags="-ss"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi + if [ "$feature" = "disable_sendmail" ]; then + echo 'sendmail_enable="NONE"' >> $BSDINSTALL_TMPETC/rc.conf.hardening + fi +done + From owner-svn-src-stable-11@freebsd.org Thu Jul 28 20:31:32 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE2ADBA7800; Thu, 28 Jul 2016 20:31:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 838DC18D1; Thu, 28 Jul 2016 20:31:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SKVVer021428; Thu, 28 Jul 2016 20:31:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SKVVZK020781; Thu, 28 Jul 2016 20:31:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607282031.u6SKVVZK020781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 20:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303460 - in stable/11: lib/libc/sys share/man/man4 sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 20:31:32 -0000 Author: jhb Date: Thu Jul 28 20:31:30 2016 New Revision: 303460 URL: https://svnweb.freebsd.org/changeset/base/303460 Log: MFC 303164: Add more documentation regarding unsafe AIO requests. The asynchronous I/O changes made previously result in different behavior out of the box. Previously all AIO requests failed with ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO requests complete and others ("unsafe" requests) fail with EOPNOTSUPP. Reword the introductory paragraph in aio(4) to add a general description of AIO before describing the vfs.aio.enable_unsafe sysctl. Remove the ENOSYS error description from aio_fsync(2), aio_read(2), and aio_write(2) and replace it with a description of EOPNOTSUPP. Remove the ENOSYS error description from aio_mlock(2). Log a message to the system log the first time a process requests an "unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on the log message used for processes using the legacy pty devices. Approved by: re (gjb) Modified: stable/11/lib/libc/sys/aio_fsync.2 stable/11/lib/libc/sys/aio_mlock.2 stable/11/lib/libc/sys/aio_read.2 stable/11/lib/libc/sys/aio_write.2 stable/11/share/man/man4/aio.4 stable/11/sys/kern/vfs_aio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/aio_fsync.2 ============================================================================== --- stable/11/lib/libc/sys/aio_fsync.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_fsync.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_FSYNC 2 .Os .Sh NAME @@ -107,10 +107,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_fsync -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous file synchronization operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .It Bq Er EINVAL A value of the .Fa op Modified: stable/11/lib/libc/sys/aio_mlock.2 ============================================================================== --- stable/11/lib/libc/sys/aio_mlock.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_mlock.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_MLOCK 2 .Os .Sh NAME @@ -102,10 +102,6 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_mlock -system call is not supported. .El .Pp If the request is successfully enqueued, but subsequently cancelled Modified: stable/11/lib/libc/sys/aio_read.2 ============================================================================== --- stable/11/lib/libc/sys/aio_read.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_read.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_READ 2 .Os .Sh NAME @@ -125,10 +125,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_read -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous read operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .El .Pp The following conditions may be synchronously detected when the Modified: stable/11/lib/libc/sys/aio_write.2 ============================================================================== --- stable/11/lib/libc/sys/aio_write.2 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/lib/libc/sys/aio_write.2 Thu Jul 28 20:31:30 2016 (r303460) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO_WRITE 2 .Os .Sh NAME @@ -129,10 +129,10 @@ The request was not queued because of sy The asynchronous notification method in .Fa iocb->aio_sigevent.sigev_notify is invalid or not supported. -.It Bq Er ENOSYS -The -.Fn aio_write -system call is not supported. +.It Bq Er EOPNOTSUPP +Asynchronous write operations on the file descriptor +.Fa iocb->aio_fildes +are unsafe and unsafe asynchronous I/O operations are disabled. .El .Pp The following conditions may be synchronously detected when the Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/share/man/man4/aio.4 Thu Jul 28 20:31:30 2016 (r303460) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 15, 2016 +.Dd July 21, 2016 .Dt AIO 4 .Os .Sh NAME @@ -37,17 +37,25 @@ The .Nm facility provides system calls for asynchronous I/O. -However, asynchronous I/O operations are only enabled for certain file -types by default. -Asynchronous I/O operations for other file types may block an AIO daemon -indefinitely resulting in process and/or system hangs. -Asynchronous I/O operations can be enabled for all file types by setting +Asynchronous I/O operations are not completed synchronously by the +calling thread. +Instead, the calling thread invokes one system call to request an +asynchronous I/O operation. +The status of a completed request is retrieved later via a separate +system call. +.Pp +Asynchronous I/O operations on some file descriptor types may block an +AIO daemon indefinitely resulting in process and/or system hangs. +Operations on these file descriptor types are considered +.Dq unsafe +and disabled by default. +They can be enabled by setting the .Va vfs.aio.enable_unsafe sysctl node to a non-zero value. .Pp Asynchronous I/O operations on sockets and raw disk devices do not block -indefinitely and are enabled by default. +indefinitely and are always enabled. .Pp The .Nm Modified: stable/11/sys/kern/vfs_aio.c ============================================================================== --- stable/11/sys/kern/vfs_aio.c Thu Jul 28 20:11:34 2016 (r303459) +++ stable/11/sys/kern/vfs_aio.c Thu Jul 28 20:31:30 2016 (r303460) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -110,6 +111,11 @@ static int enable_aio_unsafe = 0; SYSCTL_INT(_vfs_aio, OID_AUTO, enable_unsafe, CTLFLAG_RW, &enable_aio_unsafe, 0, "Permit asynchronous IO on all file types, not just known-safe types"); +static unsigned int unsafe_warningcnt = 1; +SYSCTL_UINT(_vfs_aio, OID_AUTO, unsafe_warningcnt, CTLFLAG_RW, + &unsafe_warningcnt, 0, + "Warnings that will be triggered upon failed IO requests on unsafe files"); + static int max_aio_procs = MAX_AIO_PROCS; SYSCTL_INT(_vfs_aio, OID_AUTO, max_aio_procs, CTLFLAG_RW, &max_aio_procs, 0, "Maximum number of kernel processes to use for handling async IO "); @@ -1697,8 +1703,11 @@ queueit: safe = true; } } - if (!(safe || enable_aio_unsafe)) + if (!(safe || enable_aio_unsafe)) { + counted_warning(&unsafe_warningcnt, + "is attempting to use unsafe AIO requests"); return (EOPNOTSUPP); + } if (opcode == LIO_SYNC) { AIO_LOCK(ki); From owner-svn-src-stable-11@freebsd.org Thu Jul 28 21:16:20 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05030BA719A; Thu, 28 Jul 2016 21:16:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 C57F211BF; Thu, 28 Jul 2016 21:16:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6SLGIwR038467; Thu, 28 Jul 2016 21:16:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6SLGIR3038466; Thu, 28 Jul 2016 21:16:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201607282116.u6SLGIR3038466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jul 2016 21:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303462 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2016 21:16:20 -0000 Author: jhb Date: Thu Jul 28 21:16:18 2016 New Revision: 303462 URL: https://svnweb.freebsd.org/changeset/base/303462 Log: MFC 303202: Update to note that operations on local files are safe. Approved by: re (gjb) Modified: stable/11/share/man/man4/aio.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/aio.4 ============================================================================== --- stable/11/share/man/man4/aio.4 Thu Jul 28 20:51:29 2016 (r303461) +++ stable/11/share/man/man4/aio.4 Thu Jul 28 21:16:18 2016 (r303462) @@ -54,7 +54,9 @@ the .Va vfs.aio.enable_unsafe sysctl node to a non-zero value. .Pp -Asynchronous I/O operations on sockets and raw disk devices do not block +Asynchronous I/O operations on sockets, +raw disk devices, +and regular files on local filesystems do not block indefinitely and are always enabled. .Pp The From owner-svn-src-stable-11@freebsd.org Fri Jul 29 00:00:55 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96B6FBA7294; Fri, 29 Jul 2016 00:00:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5F2F61452; Fri, 29 Jul 2016 00:00:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6T00sW9099327; Fri, 29 Jul 2016 00:00:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6T00sv9099326; Fri, 29 Jul 2016 00:00:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201607290000.u6T00sv9099326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 29 Jul 2016 00:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303469 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 00:00:55 -0000 Author: gjb Date: Fri Jul 29 00:00:54 2016 New Revision: 303469 URL: https://svnweb.freebsd.org/changeset/base/303469 Log: Update stable/11 to BETA3 as part of the 11.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jul 28 22:55:21 2016 (r303468) +++ stable/11/sys/conf/newvers.sh Fri Jul 29 00:00:54 2016 (r303469) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable-11@freebsd.org Sat Jul 30 09:28:15 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02FD3BA9A51; Sat, 30 Jul 2016 09:28:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 CF1D0186D; Sat, 30 Jul 2016 09:28:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U9SDqG046591; Sat, 30 Jul 2016 09:28:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U9SDgc046587; Sat, 30 Jul 2016 09:28:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607300928.u6U9SDgc046587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 09:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303549 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:28:15 -0000 Author: kib Date: Sat Jul 30 09:28:13 2016 New Revision: 303549 URL: https://svnweb.freebsd.org/changeset/base/303549 Log: MFC r303211: Implement mtx_trylock_spin(9). Approved by: re (gjb) Modified: stable/11/share/man/man9/Makefile stable/11/share/man/man9/mutex.9 stable/11/sys/kern/kern_mutex.c stable/11/sys/sys/mutex.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/Makefile ============================================================================== --- stable/11/share/man/man9/Makefile Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/share/man/man9/Makefile Sat Jul 30 09:28:13 2016 (r303549) @@ -1181,6 +1181,8 @@ MLINKS+=mutex.9 mtx_assert.9 \ mutex.9 MTX_SYSINIT.9 \ mutex.9 mtx_trylock.9 \ mutex.9 mtx_trylock_flags.9 \ + mutex.9 mtx_trylock_spin.9 \ + mutex.9 mtx_trylock_spin_flags.9 \ mutex.9 mtx_unlock.9 \ mutex.9 mtx_unlock_flags.9 \ mutex.9 mtx_unlock_spin.9 \ Modified: stable/11/share/man/man9/mutex.9 ============================================================================== --- stable/11/share/man/man9/mutex.9 Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/share/man/man9/mutex.9 Sat Jul 30 09:28:13 2016 (r303549) @@ -28,7 +28,7 @@ .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ .\" $FreeBSD$ .\" -.Dd December 13, 2014 +.Dd July 18, 2016 .Dt MUTEX 9 .Os .Sh NAME @@ -41,6 +41,8 @@ .Nm mtx_lock_spin_flags , .Nm mtx_trylock , .Nm mtx_trylock_flags , +.Nm mtx_trylock_spin , +.Nm mtx_trylock_spin_flags , .Nm mtx_unlock , .Nm mtx_unlock_spin , .Nm mtx_unlock_flags , @@ -73,6 +75,10 @@ .Ft int .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" .Ft void +.Fn mtx_trylock_spin "struct mtx *mutex" +.Ft int +.Fn mtx_trylock_spin_flags "struct mtx *mutex" "int flags" +.Ft void .Fn mtx_unlock "struct mtx *mutex" .Ft void .Fn mtx_unlock_spin "struct mtx *mutex" @@ -249,26 +255,33 @@ argument, then the mutex can be acquired .Pp The .Fn mtx_trylock -attempts to acquire the +and +.Fn mtx_trylock_spin +functions attempt to acquire a .Dv MTX_DEF -mutex pointed to by +or +.Dv MTX_SPIN +mutex, respectively, pointed to by .Fa mutex . -If the mutex cannot be immediately acquired -.Fn mtx_trylock -will return 0, -otherwise the mutex will be acquired -and a non-zero value will be returned. +If the mutex cannot be immediately acquired, the functions will return 0, +otherwise the mutex will be acquired and a non-zero value will be returned. .Pp The .Fn mtx_trylock_flags -function has the same behavior as +and +.Fn mtx_trylock_spin_flags +functions have the same behavior as .Fn mtx_trylock -but should be used when the caller desires to pass in a +and +.Fn mtx_trylock_spin +respectively, but should be used when the caller desires to pass in a .Fa flags value. Presently, the only valid value in the .Fn mtx_trylock -case is +and +.Fn mtx_trylock_spin +cases is .Dv MTX_QUIET , and its effects are identical to those described for .Fn mtx_lock @@ -447,6 +460,13 @@ while any spin lock is held. .It Dv MTX_RECURSE Specifies that the initialized mutex is allowed to recurse. This bit must be present if the mutex is permitted to recurse. +.Pp +Note that neither +.Fn mtx_trylock +nor +.Fn mtx_trylock_spin +support recursion; +that is, attempting to acquire an already-owned mutex fails. .It Dv MTX_QUIET Do not log any mutex operations for this lock. .It Dv MTX_NOWITNESS @@ -534,3 +554,7 @@ functions appeared in .Bsx 4.1 and .Fx 5.0 . +The +.Fn mtx_trylock_spin +function was added in +.Fx 12.0 . Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/sys/kern/kern_mutex.c Sat Jul 30 09:28:13 2016 (r303549) @@ -281,6 +281,34 @@ __mtx_lock_spin_flags(volatile uintptr_t WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); } +int +__mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, const char *file, + int line) +{ + struct mtx *m; + + if (SCHEDULER_STOPPED()) + return (1); + + m = mtxlock2mtx(c); + + KASSERT(m->mtx_lock != MTX_DESTROYED, + ("mtx_trylock_spin() of destroyed mutex @ %s:%d", file, line)); + KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin, + ("mtx_trylock_spin() of sleep mutex %s @ %s:%d", + m->lock_object.lo_name, file, line)); + KASSERT((opts & MTX_RECURSE) == 0, + ("mtx_trylock_spin: unsupp. opt MTX_RECURSE on mutex %s @ %s:%d\n", + m->lock_object.lo_name, file, line)); + if (__mtx_trylock_spin(m, curthread, opts, file, line)) { + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 1, file, line); + WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); + return (1); + } + LOCK_LOG_TRY("LOCK", &m->lock_object, opts, 0, file, line); + return (0); +} + void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line) Modified: stable/11/sys/sys/mutex.h ============================================================================== --- stable/11/sys/sys/mutex.h Sat Jul 30 09:25:57 2016 (r303548) +++ stable/11/sys/sys/mutex.h Sat Jul 30 09:28:13 2016 (r303549) @@ -112,6 +112,8 @@ void __mtx_unlock_flags(volatile uintptr int line); void __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); +int __mtx_trylock_spin_flags(volatile uintptr_t *c, int opts, + const char *file, int line); void __mtx_unlock_spin_flags(volatile uintptr_t *c, int opts, const char *file, int line); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -152,6 +154,8 @@ void thread_lock_flags_(struct thread *, __mtx_unlock_flags(&(m)->mtx_lock, o, f, l) #define _mtx_lock_spin_flags(m, o, f, l) \ __mtx_lock_spin_flags(&(m)->mtx_lock, o, f, l) +#define _mtx_trylock_spin_flags(m, o, f, l) \ + __mtx_trylock_spin_flags(&(m)->mtx_lock, o, f, l) #define _mtx_unlock_spin_flags(m, o, f, l) \ __mtx_unlock_spin_flags(&(m)->mtx_lock, o, f, l) #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) @@ -212,6 +216,21 @@ void thread_lock_flags_(struct thread *, LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ mp, 0, 0, file, line); \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if (((mp)->mtx_lock != MTX_UNOWNED || !_mtx_obtain_lock((mp), _tid))) {\ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, \ + mp, 0, 0, file, line); \ + _ret = 1; \ + } \ + _ret; \ +}) #else /* SMP */ #define __mtx_lock_spin(mp, tid, opts, file, line) do { \ uintptr_t _tid = (uintptr_t)(tid); \ @@ -224,6 +243,20 @@ void thread_lock_flags_(struct thread *, (mp)->mtx_lock = _tid; \ } \ } while (0) +#define __mtx_trylock_spin(mp, tid, opts, file, line) __extension__ ({ \ + uintptr_t _tid = (uintptr_t)(tid); \ + int _ret; \ + \ + spinlock_enter(); \ + if ((mp)->mtx_lock != MTX_UNOWNED) { \ + spinlock_exit(); \ + _ret = 0; \ + } else { \ + (mp)->mtx_lock = _tid; \ + _ret = 1; \ + } \ + _ret; \ +}) #endif /* SMP */ /* Unlock a normal mutex. */ @@ -293,6 +326,10 @@ void thread_lock_flags_(struct thread *, * mtx_trylock_flags(m, opts) is used the same way as mtx_trylock() but accepts * relevant option flags `opts.' * + * mtx_trylock_spin(m) attempts to acquire MTX_SPIN mutex `m' but doesn't + * spin if it cannot. Rather, it returns 0 on failure and non-zero on + * success. It always returns failure for recursed lock attempts. + * * mtx_initialized(m) returns non-zero if the lock `m' has been initialized. * * mtx_owned(m) returns non-zero if the current thread owns the lock `m' @@ -302,6 +339,7 @@ void thread_lock_flags_(struct thread *, #define mtx_lock(m) mtx_lock_flags((m), 0) #define mtx_lock_spin(m) mtx_lock_spin_flags((m), 0) #define mtx_trylock(m) mtx_trylock_flags((m), 0) +#define mtx_trylock_spin(m) mtx_trylock_spin_flags((m), 0) #define mtx_unlock(m) mtx_unlock_flags((m), 0) #define mtx_unlock_spin(m) mtx_unlock_spin_flags((m), 0) @@ -335,6 +373,8 @@ extern struct mtx_pool *mtxpool_sleep; _mtx_unlock_flags((m), (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ _mtx_lock_spin_flags((m), (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + _mtx_trylock_spin_flags((m), (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ _mtx_unlock_spin_flags((m), (opts), (file), (line)) #else /* LOCK_DEBUG == 0 && !MUTEX_NOINLINE */ @@ -344,6 +384,8 @@ extern struct mtx_pool *mtxpool_sleep; __mtx_unlock((m), curthread, (opts), (file), (line)) #define mtx_lock_spin_flags_(m, opts, file, line) \ __mtx_lock_spin((m), curthread, (opts), (file), (line)) +#define mtx_trylock_spin_flags_(m, opts, file, line) \ + __mtx_trylock_spin((m), curthread, (opts), (file), (line)) #define mtx_unlock_spin_flags_(m, opts, file, line) \ __mtx_unlock_spin((m)) #endif /* LOCK_DEBUG > 0 || MUTEX_NOINLINE */ @@ -369,6 +411,8 @@ extern struct mtx_pool *mtxpool_sleep; mtx_unlock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_trylock_flags(m, opts) \ mtx_trylock_flags_((m), (opts), LOCK_FILE, LOCK_LINE) +#define mtx_trylock_spin_flags(m, opts) \ + mtx_trylock_spin_flags_((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_assert(m, what) \ mtx_assert_((m), (what), __FILE__, __LINE__) From owner-svn-src-stable-11@freebsd.org Sat Jul 30 09:46:30 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8D3DBA9EA9; Sat, 30 Jul 2016 09:46:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 88F311435; Sat, 30 Jul 2016 09:46:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6U9kTMf054139; Sat, 30 Jul 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6U9kTQI054138; Sat, 30 Jul 2016 09:46:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201607300946.u6U9kTQI054138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jul 2016 09:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303550 - stable/11/bin/ps X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 09:46:30 -0000 Author: kib Date: Sat Jul 30 09:46:29 2016 New Revision: 303550 URL: https://svnweb.freebsd.org/changeset/base/303550 Log: MFC r303213: Add missed required call to xo_finish() when only header is printed. Approved by: re (gjb) Modified: stable/11/bin/ps/ps.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ps/ps.c ============================================================================== --- stable/11/bin/ps/ps.c Sat Jul 30 09:28:13 2016 (r303549) +++ stable/11/bin/ps/ps.c Sat Jul 30 09:46:29 2016 (r303550) @@ -612,6 +612,7 @@ main(int argc, char *argv[]) if (nkept == 0) { printheader(); + xo_finish(); exit(1); } From owner-svn-src-stable-11@freebsd.org Sat Jul 30 20:02:10 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32BF8BA83FB; Sat, 30 Jul 2016 20:02:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0168F1D86; Sat, 30 Jul 2016 20:02:09 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6UK29vN085293; Sat, 30 Jul 2016 20:02:09 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6UK29J6085292; Sat, 30 Jul 2016 20:02:09 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201607302002.u6UK29J6085292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 30 Jul 2016 20:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303558 - stable/11/release/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 20:02:10 -0000 Author: cperciva Date: Sat Jul 30 20:02:08 2016 New Revision: 303558 URL: https://svnweb.freebsd.org/changeset/base/303558 Log: MFC r302929: Now that potentially buggy versions of Xen are automatically detected (see r302635, MFCed as r302895), there is no need to force msix interrupt migration off via loader.conf. Reverts: r302184 Approved by: re (gjb) Modified: stable/11/release/tools/ec2.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/tools/ec2.conf ============================================================================== --- stable/11/release/tools/ec2.conf Sat Jul 30 19:03:32 2016 (r303557) +++ stable/11/release/tools/ec2.conf Sat Jul 30 20:02:08 2016 (r303558) @@ -72,12 +72,6 @@ vm_extra_pre_umount() { # nodes, but apply the workaround just in case. echo 'hw.broken_txfifo="1"' >> ${DESTDIR}/boot/loader.conf - # Some EC2 instances run on a version of Xen which has a bug relating - # to the migration of MSI-X interrupts; this is visible as SR-IOV - # networking (aka. "EC2 Enhanced Networking") not being able to pass - # packets. Disable MSI-X interrupt migration to work around this bug. - echo 'machdep.disable_msix_migration="1"' >> ${DESTDIR}/boot/loader.conf - # The first time the AMI boots, the installed "first boot" scripts # should be allowed to run: # * ec2_configinit (download and process EC2 user-data)