From owner-svn-src-stable@freebsd.org Sun Oct 21 17:38:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6619FFFBF71; Sun, 21 Oct 2018 17:38:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CC5371635; Sun, 21 Oct 2018 17:38:53 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED30710B36; Sun, 21 Oct 2018 17:38:52 +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 w9LHcqSV067460; Sun, 21 Oct 2018 17:38:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9LHcqjs067459; Sun, 21 Oct 2018 17:38:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810211738.w9LHcqjs067459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 21 Oct 2018 17:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339549 - stable/12/lib/clang X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/lib/clang X-SVN-Commit-Revision: 339549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Oct 2018 17:38:53 -0000 Author: gjb Date: Sun Oct 21 17:38:52 2018 New Revision: 339549 URL: https://svnweb.freebsd.org/changeset/base/339549 Log: Uncomment -DNDEBUG in stable/12 after branching stable/12. This edit was a mistake in head, and should have been applied to stable/12 upon branching, not head. This is a direct commit to stable/12. Reported by: jbeich, dim Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/lib/clang/llvm.build.mk Modified: stable/12/lib/clang/llvm.build.mk ============================================================================== --- stable/12/lib/clang/llvm.build.mk Sun Oct 21 17:15:09 2018 (r339548) +++ stable/12/lib/clang/llvm.build.mk Sun Oct 21 17:38:52 2018 (r339549) @@ -17,7 +17,7 @@ CFLAGS+= -I${LLVM_SRCS}/include CFLAGS+= -DLLVM_BUILD_GLOBAL_ISEL CFLAGS+= -D__STDC_LIMIT_MACROS CFLAGS+= -D__STDC_CONSTANT_MACROS -#CFLAGS+= -DNDEBUG +CFLAGS+= -DNDEBUG TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} From owner-svn-src-stable@freebsd.org Mon Oct 22 07:04:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 919C8FEC2FE; Mon, 22 Oct 2018 07:04:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47E228BC56; Mon, 22 Oct 2018 07:04:45 +0000 (UTC) (envelope-from ae@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E69F18F28; Mon, 22 Oct 2018 07:04:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9M74jkG082626; Mon, 22 Oct 2018 07:04:45 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9M74jKS082625; Mon, 22 Oct 2018 07:04:45 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201810220704.w9M74jKS082625@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 22 Oct 2018 07:04:45 +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: r339580 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 339580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 07:04:45 -0000 Author: ae Date: Mon Oct 22 07:04:44 2018 New Revision: 339580 URL: https://svnweb.freebsd.org/changeset/base/339580 Log: MFC r339357: Add extra parentheses to fix "versrcreach" opcode, (oif != NULL) should not be used as condition for ternary operator. Submitted by: Tatsuki Makino Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Oct 22 06:44:20 2018 (r339579) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Mon Oct 22 07:04:44 2018 (r339580) @@ -2353,13 +2353,13 @@ do { \ case O_VERSRCREACH: /* Outgoing packets automatically pass/match */ - match = (hlen > 0 && ((oif != NULL) || + match = (hlen > 0 && ((oif != NULL) || ( #ifdef INET6 is_ipv6 ? verify_path6(&(args->f_id.src_ip6), NULL, args->f_id.fib) : #endif - verify_path(src_ip, NULL, args->f_id.fib))); + verify_path(src_ip, NULL, args->f_id.fib)))); break; case O_ANTISPOOF: From owner-svn-src-stable@freebsd.org Mon Oct 22 15:54:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 229691036598; Mon, 22 Oct 2018 15:54:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC08281223; Mon, 22 Oct 2018 15:54:28 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A82DA1E6C7; Mon, 22 Oct 2018 15:54:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9MFsS0k054157; Mon, 22 Oct 2018 15:54:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9MFsS1u054156; Mon, 22 Oct 2018 15:54:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201810221554.w9MFsS1u054156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 22 Oct 2018 15:54: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: r339597 - stable/11/sys/contrib/ck/include X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/contrib/ck/include X-SVN-Commit-Revision: 339597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 15:54:29 -0000 Author: avg Date: Mon Oct 22 15:54:28 2018 New Revision: 339597 URL: https://svnweb.freebsd.org/changeset/base/339597 Log: MFC r334189: Import CK as of commit 0f017230ccc86929f56bf44ef2dca93d7df8076b This brings us the renaming of fields in ck_queue, so that our own LIST/SLIST/TAILQ/etc won't accidentally work with them. Modified: stable/11/sys/contrib/ck/include/ck_queue.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ck/include/ck_queue.h ============================================================================== --- stable/11/sys/contrib/ck/include/ck_queue.h Mon Oct 22 15:48:07 2018 (r339596) +++ stable/11/sys/contrib/ck/include/ck_queue.h Mon Oct 22 15:54:28 2018 (r339597) @@ -125,7 +125,7 @@ */ #define CK_SLIST_HEAD(name, type) \ struct name { \ - struct type *slh_first; /* first element */ \ + struct type *cslh_first; /* first element */ \ } #define CK_SLIST_HEAD_INITIALIZER(head) \ @@ -133,20 +133,20 @@ struct name { \ #define CK_SLIST_ENTRY(type) \ struct { \ - struct type *sle_next; /* next element */ \ + struct type *csle_next; /* next element */ \ } /* * Singly-linked List functions. */ #define CK_SLIST_EMPTY(head) \ - (ck_pr_load_ptr(&(head)->slh_first) == NULL) + (ck_pr_load_ptr(&(head)->cslh_first) == NULL) #define CK_SLIST_FIRST(head) \ - (ck_pr_load_ptr(&(head)->slh_first)) + (ck_pr_load_ptr(&(head)->cslh_first)) #define CK_SLIST_NEXT(elm, field) \ - ck_pr_load_ptr(&((elm)->field.sle_next)) + ck_pr_load_ptr(&((elm)->field.csle_next)) #define CK_SLIST_FOREACH(var, head, field) \ for ((var) = CK_SLIST_FIRST((head)); \ @@ -159,59 +159,59 @@ struct { \ (var) = (tvar)) #define CK_SLIST_FOREACH_PREVPTR(var, varp, head, field) \ - for ((varp) = &(head)->slh_first; \ + for ((varp) = &(head)->cslh_first; \ ((var) = ck_pr_load_ptr(varp)) != NULL && (ck_pr_fence_load(), 1); \ - (varp) = &(var)->field.sle_next) + (varp) = &(var)->field.csle_next) #define CK_SLIST_INIT(head) do { \ - ck_pr_store_ptr(&(head)->slh_first, NULL); \ + ck_pr_store_ptr(&(head)->cslh_first, NULL); \ ck_pr_fence_store(); \ } while (0) #define CK_SLIST_INSERT_AFTER(a, b, field) do { \ - (b)->field.sle_next = (a)->field.sle_next; \ + (b)->field.csle_next = (a)->field.csle_next; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(a)->field.sle_next, b); \ + ck_pr_store_ptr(&(a)->field.csle_next, b); \ } while (0) #define CK_SLIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.sle_next = (head)->slh_first; \ + (elm)->field.csle_next = (head)->cslh_first; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(head)->slh_first, elm); \ + ck_pr_store_ptr(&(head)->cslh_first, elm); \ } while (0) #define CK_SLIST_REMOVE_AFTER(elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.sle_next, \ - (elm)->field.sle_next->field.sle_next); \ + ck_pr_store_ptr(&(elm)->field.csle_next, \ + (elm)->field.csle_next->field.csle_next); \ } while (0) #define CK_SLIST_REMOVE(head, elm, type, field) do { \ - if ((head)->slh_first == (elm)) { \ + if ((head)->cslh_first == (elm)) { \ CK_SLIST_REMOVE_HEAD((head), field); \ } else { \ - struct type *curelm = (head)->slh_first; \ - while (curelm->field.sle_next != (elm)) \ - curelm = curelm->field.sle_next; \ + struct type *curelm = (head)->cslh_first; \ + while (curelm->field.csle_next != (elm)) \ + curelm = curelm->field.csle_next; \ CK_SLIST_REMOVE_AFTER(curelm, field); \ } \ } while (0) #define CK_SLIST_REMOVE_HEAD(head, field) do { \ - ck_pr_store_ptr(&(head)->slh_first, \ - (head)->slh_first->field.sle_next); \ + ck_pr_store_ptr(&(head)->cslh_first, \ + (head)->cslh_first->field.csle_next); \ } while (0) #define CK_SLIST_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->slh_first, (head2)->slh_first); \ + ck_pr_store_ptr(&(head1)->cslh_first, (head2)->cslh_first); \ } while (0) /* * This operation is not applied atomically. */ #define CK_SLIST_SWAP(a, b, type) do { \ - struct type *swap_first = (a)->slh_first; \ - (a)->slh_first = (b)->slh_first; \ - (b)->slh_first = swap_first; \ + struct type *swap_first = (a)->cslh_first; \ + (a)->cslh_first = (b)->cslh_first; \ + (b)->cslh_first = swap_first; \ } while (0) /* @@ -219,33 +219,33 @@ struct { \ */ #define CK_STAILQ_HEAD(name, type) \ struct name { \ - struct type *stqh_first;/* first element */ \ - struct type **stqh_last;/* addr of last next element */ \ + struct type *cstqh_first;/* first element */ \ + struct type **cstqh_last;/* addr of last next element */ \ } #define CK_STAILQ_HEAD_INITIALIZER(head) \ - { NULL, &(head).stqh_first } + { NULL, &(head).cstqh_first } #define CK_STAILQ_ENTRY(type) \ struct { \ - struct type *stqe_next; /* next element */ \ + struct type *cstqe_next; /* next element */ \ } /* * Singly-linked Tail queue functions. */ #define CK_STAILQ_CONCAT(head1, head2) do { \ - if ((head2)->stqh_first != NULL) { \ - ck_pr_store_ptr((head1)->stqh_last, (head2)->stqh_first); \ + if ((head2)->cstqh_first != NULL) { \ + ck_pr_store_ptr((head1)->cstqh_last, (head2)->cstqh_first); \ ck_pr_fence_store(); \ - (head1)->stqh_last = (head2)->stqh_last; \ + (head1)->cstqh_last = (head2)->cstqh_last; \ CK_STAILQ_INIT((head2)); \ } \ } while (0) -#define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->stqh_first) == NULL) +#define CK_STAILQ_EMPTY(head) (ck_pr_load_ptr(&(head)->cstqh_first) == NULL) -#define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->stqh_first)) +#define CK_STAILQ_FIRST(head) (ck_pr_load_ptr(&(head)->cstqh_first)) #define CK_STAILQ_FOREACH(var, head, field) \ for((var) = CK_STAILQ_FIRST((head)); \ @@ -259,67 +259,67 @@ struct { \ (var) = (tvar)) #define CK_STAILQ_INIT(head) do { \ - ck_pr_store_ptr(&(head)->stqh_first, NULL); \ + ck_pr_store_ptr(&(head)->cstqh_first, NULL); \ ck_pr_fence_store(); \ - (head)->stqh_last = &(head)->stqh_first; \ + (head)->cstqh_last = &(head)->cstqh_first; \ } while (0) #define CK_STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \ - (elm)->field.stqe_next = (tqelm)->field.stqe_next; \ + (elm)->field.cstqe_next = (tqelm)->field.cstqe_next; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(tqelm)->field.stqe_next, elm); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(tqelm)->field.cstqe_next, elm); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.stqe_next = (head)->stqh_first; \ + (elm)->field.cstqe_next = (head)->cstqh_first; \ ck_pr_fence_store(); \ - ck_pr_store_ptr(&(head)->stqh_first, elm); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(head)->cstqh_first, elm); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_INSERT_TAIL(head, elm, field) do { \ - (elm)->field.stqe_next = NULL; \ + (elm)->field.cstqe_next = NULL; \ ck_pr_fence_store(); \ - ck_pr_store_ptr((head)->stqh_last, (elm)); \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr((head)->cstqh_last, (elm)); \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_NEXT(elm, field) \ - (ck_pr_load_ptr(&(elm)->field.stqe_next)) + (ck_pr_load_ptr(&(elm)->field.cstqe_next)) #define CK_STAILQ_REMOVE(head, elm, type, field) do { \ - if ((head)->stqh_first == (elm)) { \ + if ((head)->cstqh_first == (elm)) { \ CK_STAILQ_REMOVE_HEAD((head), field); \ } else { \ - struct type *curelm = (head)->stqh_first; \ - while (curelm->field.stqe_next != (elm)) \ - curelm = curelm->field.stqe_next; \ + struct type *curelm = (head)->cstqh_first; \ + while (curelm->field.cstqe_next != (elm)) \ + curelm = curelm->field.cstqe_next; \ CK_STAILQ_REMOVE_AFTER(head, curelm, field); \ } \ } while (0) #define CK_STAILQ_REMOVE_AFTER(head, elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.stqe_next, \ - (elm)->field.stqe_next->field.stqe_next); \ - if ((elm)->field.stqe_next == NULL) \ - (head)->stqh_last = &(elm)->field.stqe_next; \ + ck_pr_store_ptr(&(elm)->field.cstqe_next, \ + (elm)->field.cstqe_next->field.cstqe_next); \ + if ((elm)->field.cstqe_next == NULL) \ + (head)->cstqh_last = &(elm)->field.cstqe_next; \ } while (0) #define CK_STAILQ_REMOVE_HEAD(head, field) do { \ - ck_pr_store_ptr(&(head)->stqh_first, \ - (head)->stqh_first->field.stqe_next); \ - if ((head)->stqh_first == NULL) \ - (head)->stqh_last = &(head)->stqh_first; \ + ck_pr_store_ptr(&(head)->cstqh_first, \ + (head)->cstqh_first->field.cstqe_next); \ + if ((head)->cstqh_first == NULL) \ + (head)->cstqh_last = &(head)->cstqh_first; \ } while (0) #define CK_STAILQ_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->stqh_first, (head2)->stqh_first); \ - (head1)->stqh_last = (head2)->stqh_last; \ - if ((head2)->stqh_last == &(head2)->stqh_first) \ - (head1)->stqh_last = &(head1)->stqh_first; \ + ck_pr_store_ptr(&(head1)->cstqh_first, (head2)->cstqh_first); \ + (head1)->cstqh_last = (head2)->cstqh_last; \ + if ((head2)->cstqh_last == &(head2)->cstqh_first) \ + (head1)->cstqh_last = &(head1)->cstqh_first; \ } while (0) /* @@ -327,15 +327,15 @@ struct { \ */ #define CK_STAILQ_SWAP(head1, head2, type) do { \ struct type *swap_first = CK_STAILQ_FIRST(head1); \ - struct type **swap_last = (head1)->stqh_last; \ + struct type **swap_last = (head1)->cstqh_last; \ CK_STAILQ_FIRST(head1) = CK_STAILQ_FIRST(head2); \ - (head1)->stqh_last = (head2)->stqh_last; \ + (head1)->cstqh_last = (head2)->cstqh_last; \ CK_STAILQ_FIRST(head2) = swap_first; \ - (head2)->stqh_last = swap_last; \ + (head2)->cstqh_last = swap_last; \ if (CK_STAILQ_EMPTY(head1)) \ - (head1)->stqh_last = &(head1)->stqh_first; \ + (head1)->cstqh_last = &(head1)->cstqh_first; \ if (CK_STAILQ_EMPTY(head2)) \ - (head2)->stqh_last = &(head2)->stqh_first; \ + (head2)->cstqh_last = &(head2)->cstqh_first; \ } while (0) /* @@ -343,7 +343,7 @@ struct { \ */ #define CK_LIST_HEAD(name, type) \ struct name { \ - struct type *lh_first; /* first element */ \ + struct type *clh_first; /* first element */ \ } #define CK_LIST_HEAD_INITIALIZER(head) \ @@ -351,13 +351,13 @@ struct name { \ #define CK_LIST_ENTRY(type) \ struct { \ - struct type *le_next; /* next element */ \ - struct type **le_prev; /* address of previous next element */ \ + struct type *cle_next; /* next element */ \ + struct type **cle_prev; /* address of previous next element */ \ } -#define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->lh_first) +#define CK_LIST_FIRST(head) ck_pr_load_ptr(&(head)->clh_first) #define CK_LIST_EMPTY(head) (CK_LIST_FIRST(head) == NULL) -#define CK_LIST_NEXT(elm, field) ck_pr_load_ptr(&(elm)->field.le_next) +#define CK_LIST_NEXT(elm, field) ck_pr_load_ptr(&(elm)->field.cle_next) #define CK_LIST_FOREACH(var, head, field) \ for ((var) = CK_LIST_FIRST((head)); \ @@ -370,59 +370,59 @@ struct { \ (var) = (tvar)) #define CK_LIST_INIT(head) do { \ - ck_pr_store_ptr(&(head)->lh_first, NULL); \ + ck_pr_store_ptr(&(head)->clh_first, NULL); \ ck_pr_fence_store(); \ } while (0) #define CK_LIST_INSERT_AFTER(listelm, elm, field) do { \ - (elm)->field.le_next = (listelm)->field.le_next; \ - (elm)->field.le_prev = &(listelm)->field.le_next; \ + (elm)->field.cle_next = (listelm)->field.cle_next; \ + (elm)->field.cle_prev = &(listelm)->field.cle_next; \ ck_pr_fence_store(); \ - if ((listelm)->field.le_next != NULL) \ - (listelm)->field.le_next->field.le_prev = &(elm)->field.le_next;\ - ck_pr_store_ptr(&(listelm)->field.le_next, elm); \ + if ((listelm)->field.cle_next != NULL) \ + (listelm)->field.cle_next->field.cle_prev = &(elm)->field.cle_next;\ + ck_pr_store_ptr(&(listelm)->field.cle_next, elm); \ } while (0) #define CK_LIST_INSERT_BEFORE(listelm, elm, field) do { \ - (elm)->field.le_prev = (listelm)->field.le_prev; \ - (elm)->field.le_next = (listelm); \ + (elm)->field.cle_prev = (listelm)->field.cle_prev; \ + (elm)->field.cle_next = (listelm); \ ck_pr_fence_store(); \ - ck_pr_store_ptr((listelm)->field.le_prev, (elm)); \ - (listelm)->field.le_prev = &(elm)->field.le_next; \ + ck_pr_store_ptr((listelm)->field.cle_prev, (elm)); \ + (listelm)->field.cle_prev = &(elm)->field.cle_next; \ } while (0) #define CK_LIST_INSERT_HEAD(head, elm, field) do { \ - (elm)->field.le_next = (head)->lh_first; \ + (elm)->field.cle_next = (head)->clh_first; \ ck_pr_fence_store(); \ - if ((elm)->field.le_next != NULL) \ - (head)->lh_first->field.le_prev = &(elm)->field.le_next; \ - ck_pr_store_ptr(&(head)->lh_first, elm); \ - (elm)->field.le_prev = &(head)->lh_first; \ + if ((elm)->field.cle_next != NULL) \ + (head)->clh_first->field.cle_prev = &(elm)->field.cle_next; \ + ck_pr_store_ptr(&(head)->clh_first, elm); \ + (elm)->field.cle_prev = &(head)->clh_first; \ } while (0) #define CK_LIST_REMOVE(elm, field) do { \ - ck_pr_store_ptr((elm)->field.le_prev, (elm)->field.le_next); \ - if ((elm)->field.le_next != NULL) \ - (elm)->field.le_next->field.le_prev = (elm)->field.le_prev; \ + ck_pr_store_ptr((elm)->field.cle_prev, (elm)->field.cle_next); \ + if ((elm)->field.cle_next != NULL) \ + (elm)->field.cle_next->field.cle_prev = (elm)->field.cle_prev; \ } while (0) #define CK_LIST_MOVE(head1, head2, field) do { \ - ck_pr_store_ptr(&(head1)->lh_first, (head2)->lh_first); \ - if ((head1)->lh_first != NULL) \ - (head1)->lh_first->field.le_prev = &(head1)->lh_first; \ + ck_pr_store_ptr(&(head1)->clh_first, (head2)->clh_first); \ + if ((head1)->clh_first != NULL) \ + (head1)->clh_first->field.cle_prev = &(head1)->clh_first; \ } while (0) /* * This operation is not applied atomically. */ #define CK_LIST_SWAP(head1, head2, type, field) do { \ - struct type *swap_tmp = (head1)->lh_first; \ - (head1)->lh_first = (head2)->lh_first; \ - (head2)->lh_first = swap_tmp; \ - if ((swap_tmp = (head1)->lh_first) != NULL) \ - swap_tmp->field.le_prev = &(head1)->lh_first; \ - if ((swap_tmp = (head2)->lh_first) != NULL) \ - swap_tmp->field.le_prev = &(head2)->lh_first; \ + struct type *swap_tmp = (head1)->clh_first; \ + (head1)->clh_first = (head2)->clh_first; \ + (head2)->clh_first = swap_tmp; \ + if ((swap_tmp = (head1)->clh_first) != NULL) \ + swap_tmp->field.cle_prev = &(head1)->clh_first; \ + if ((swap_tmp = (head2)->clh_first) != NULL) \ + swap_tmp->field.cle_prev = &(head2)->clh_first; \ } while (0) #endif /* CK_QUEUE_H */ From owner-svn-src-stable@freebsd.org Mon Oct 22 17:27:37 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16B49104D97D; Mon, 22 Oct 2018 17:27:37 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDDF786F42; Mon, 22 Oct 2018 17:27:36 +0000 (UTC) (envelope-from eugen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B84F71F5B4; Mon, 22 Oct 2018 17:27:36 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9MHRanJ001795; Mon, 22 Oct 2018 17:27:36 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9MHRaKO001794; Mon, 22 Oct 2018 17:27:36 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201810221727.w9MHRaKO001794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 22 Oct 2018 17:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339604 - stable/12/libexec/rc X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/libexec/rc X-SVN-Commit-Revision: 339604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 17:27:37 -0000 Author: eugen Date: Mon Oct 22 17:27:36 2018 New Revision: 339604 URL: https://svnweb.freebsd.org/changeset/base/339604 Log: MFC r339462: make upgrade from previous FreeBSD versions less painful and make previously working configuration like this work again: gif_interfaces="gif0" gifconfig_gif0="1.1.1.1 2.2.2.2" ifconfig_gif0="inet 192.168.1.1 192.168.1.2 netmask 255.255.255.252" PR: 204700 Approved by: re (gjb) Modified: stable/12/libexec/rc/network.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/network.subr ============================================================================== --- stable/12/libexec/rc/network.subr Mon Oct 22 17:19:48 2018 (r339603) +++ stable/12/libexec/rc/network.subr Mon Oct 22 17:27:36 2018 (r339604) @@ -1393,7 +1393,7 @@ clone_up() _list="$_list $ifn" fi tmpargs=$(get_if_var $ifn gifconfig_IF) - eval ifconfig_${ifn}=\"tunnel \$tmpargs\" + eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" done if [ -n "${_list# }" ]; then echo "Created clone interfaces: ${_list# }." From owner-svn-src-stable@freebsd.org Mon Oct 22 21:26:38 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63ADCFD7675; Mon, 22 Oct 2018 21:26:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1991974ED2; Mon, 22 Oct 2018 21:26:38 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFE8425E92; Mon, 22 Oct 2018 21:26:37 +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 w9MLQbeo029137; Mon, 22 Oct 2018 21:26:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9MLQbSt029136; Mon, 22 Oct 2018 21:26:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201810222126.w9MLQbSt029136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 22 Oct 2018 21:26: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: r339621 - stable/11/usr.bin/vmstat X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/11/usr.bin/vmstat X-SVN-Commit-Revision: 339621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2018 21:26:38 -0000 Author: jhb Date: Mon Oct 22 21:26:37 2018 New Revision: 339621 URL: https://svnweb.freebsd.org/changeset/base/339621 Log: MFC 338094: Fully retire the unimplemented -t option from vmstat(8). It was #ifdef'd out in the 4.4BSD import and hasn't been re-enabled since then. Modified: stable/11/usr.bin/vmstat/vmstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/11/usr.bin/vmstat/vmstat.c Mon Oct 22 21:25:28 2018 (r339620) +++ stable/11/usr.bin/vmstat/vmstat.c Mon Oct 22 21:26:37 2018 (r339621) @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); static char da[] = "da"; enum x_stats { X_SUM, X_HZ, X_STATHZ, X_NCHSTATS, X_INTRNAMES, X_SINTRNAMES, - X_INTRCNT, X_SINTRCNT, X_DEFICIT, X_REC, X_PGIN, X_XSTATS }; + X_INTRCNT, X_SINTRCNT }; static struct nlist namelist[] = { [X_SUM] = { .n_name = "_vm_cnt", }, @@ -94,12 +94,6 @@ static struct nlist namelist[] = { [X_SINTRNAMES] = { .n_name = "_sintrnames", }, [X_INTRCNT] = { .n_name = "_intrcnt", }, [X_SINTRCNT] = { .n_name = "_sintrcnt", }, -#ifdef notyet - [X_DEFICIT] = { .n_name = "_deficit", }, - [X_REC] = { .n_name = "_rectime", }, - [X_PGIN] = { .n_name = "_pgintime", }, - [X_XSTATS] = { .n_name = "_xstats", }, -#endif { .n_name = NULL, }, }; @@ -178,7 +172,7 @@ main(int argc, char *argv[]) if (argc < 0) return (argc); - while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:stw:z")) != -1) { + while ((c = getopt(argc, argv, "ac:fhHiM:mN:n:oPp:sw:z")) != -1) { switch (c) { case 'a': aflag++; @@ -228,14 +222,6 @@ main(int argc, char *argv[]) case 's': todo |= SUMSTAT; break; - case 't': -#ifdef notyet - todo |= TIMESTAT; -#else - xo_errx(EX_USAGE, - "sorry, -t is not (re)implemented yet"); -#endif - break; case 'w': /* Convert to milliseconds. */ f = atof(optarg); @@ -339,10 +325,6 @@ retry_nlist: dosum(); if (todo & OBJSTAT) doobjstat(); -#ifdef notyet - if (todo & TIMESTAT) - dotimes(); -#endif if (todo & INTRSTAT) dointr(interval, reps); if (todo & VMSTAT) @@ -954,29 +936,6 @@ doresize(void) */ wresized = 0; } - -#ifdef notyet -static void -dotimes(void) -{ - unsigned int pgintime, rectime; - - kread(X_REC, &rectime, sizeof(rectime)); - kread(X_PGIN, &pgintime, sizeof(pgintime)); - kread(X_SUM, &sum, sizeof(sum)); - xo_emit("{:page-reclaims/%u} {N:reclaims}, " - "{:reclaim-time/%u} {N:total time (usec)}\n", - sum.v_pgrec, rectime); - xo_emit("{L:average}: {:reclaim-average/%u} {N:usec \\/ reclaim}\n", - rectime / sum.v_pgrec); - xo_emit("\n"); - xo_emit("{:page-ins/%u} {N:page ins}, " - "{:page-in-time/%u} {N:total time (msec)}\n", - sum.v_pgin, pgintime / 10); - xo_emit("{L:average}: {:average/%8.1f} {N:msec \\/ page in}\n", - pgintime / (sum.v_pgin * 10.0)); -} -#endif static long pct(long top, long bot) From owner-svn-src-stable@freebsd.org Tue Oct 23 01:39:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2015FF05C1; Tue, 23 Oct 2018 01:39:27 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A71C980047; Tue, 23 Oct 2018 01:39:27 +0000 (UTC) (envelope-from philip@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87CA7B90; Tue, 23 Oct 2018 01:39:27 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9N1dRIq058764; Tue, 23 Oct 2018 01:39:27 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9N1dRKN058760; Tue, 23 Oct 2018 01:39:27 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201810230139.w9N1dRKN058760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 23 Oct 2018 01:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339629 - stable/12/contrib/tzdata X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/contrib/tzdata X-SVN-Commit-Revision: 339629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 01:39:28 -0000 Author: philip Date: Tue Oct 23 01:39:26 2018 New Revision: 339629 URL: https://svnweb.freebsd.org/changeset/base/339629 Log: MFC r339503: Import tzdata 2018f Approved by: re (kib) Modified: stable/12/contrib/tzdata/CONTRIBUTING stable/12/contrib/tzdata/Makefile stable/12/contrib/tzdata/NEWS stable/12/contrib/tzdata/README stable/12/contrib/tzdata/africa stable/12/contrib/tzdata/antarctica stable/12/contrib/tzdata/asia stable/12/contrib/tzdata/australasia stable/12/contrib/tzdata/backward stable/12/contrib/tzdata/backzone stable/12/contrib/tzdata/etcetera stable/12/contrib/tzdata/europe stable/12/contrib/tzdata/factory stable/12/contrib/tzdata/leap-seconds.list stable/12/contrib/tzdata/leapseconds stable/12/contrib/tzdata/leapseconds.awk stable/12/contrib/tzdata/northamerica stable/12/contrib/tzdata/pacificnew stable/12/contrib/tzdata/southamerica stable/12/contrib/tzdata/systemv stable/12/contrib/tzdata/theory.html stable/12/contrib/tzdata/version stable/12/contrib/tzdata/yearistype.sh stable/12/contrib/tzdata/zishrink.awk stable/12/contrib/tzdata/zone.tab stable/12/contrib/tzdata/zone1970.tab stable/12/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/tzdata/CONTRIBUTING ============================================================================== --- stable/12/contrib/tzdata/CONTRIBUTING Mon Oct 22 23:57:59 2018 (r339628) +++ stable/12/contrib/tzdata/CONTRIBUTING Tue Oct 23 01:39:26 2018 (r339629) @@ -17,11 +17,14 @@ To email small changes, please run a POSIX shell comma 'diff -u old/europe new/europe >myfix.patch', and attach myfix.patch to the email. -For more-elaborate changes, please read the theory.html file and browse -the mailing list archives for -examples of patches that tend to work well. Additions to -data should contain commentary citing reliable sources as -justification. Citations should use https: URLs if available. +For more-elaborate or possibly-controversial changes, +such as renaming, adding or removing zones, please read + or the file +theory.html. It is also good to browse the mailing list archives + for examples of patches that tend +to work well. Additions to data should contain commentary citing +reliable sources as justification. Citations should use https: URLs +if available. Please submit changes against either the latest release in or the master branch of the development Modified: stable/12/contrib/tzdata/Makefile ============================================================================== --- stable/12/contrib/tzdata/Makefile Mon Oct 22 23:57:59 2018 (r339628) +++ stable/12/contrib/tzdata/Makefile Tue Oct 23 01:39:26 2018 (r339629) @@ -1,3 +1,5 @@ +# Make and install tzdb code and data. + # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -19,9 +21,9 @@ BUGEMAIL= tz@iana.org # DATAFORM= rearguard DATAFORM= main -# Change the line below for your time zone (after finding the zone you want in -# the time zone files, or adding it to a time zone file). -# Alternatively, if you discover you've got the wrong time zone, you can just +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -l rightzone # to correct things. # Use the command @@ -31,14 +33,14 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style time zone environment variables, -# change the line below (after finding the zone you want in the -# time zone files, or adding it to a time zone file). +# for handling POSIX-style timezone environment variables, +# change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). # When a POSIX-style environment variable is handled, the rules in the # template file are used to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. -# Alternatively, if you discover you've got the wrong time zone, you can just +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -p rightzone # to correct things. # Use the command @@ -75,7 +77,7 @@ DESTDIR = # TOPDIR should be empty or an absolute name unless you're just testing. TOPDIR = -# The default local time zone is taken from the file TZDEFAULT. +# The default local timezone is taken from the file TZDEFAULT. TZDEFAULT = $(TOPDIR)/etc/localtime # The subdirectory containing installed program and data files, and @@ -84,7 +86,7 @@ TZDEFAULT = $(TOPDIR)/etc/localtime USRDIR = usr USRSHAREDIR = $(USRDIR)/share -# "Compiled" time zone information is placed in the "TZDIR" directory +# "Compiled" timezone information is placed in the "TZDIR" directory # (and subdirectories). # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. TZDIR_BASENAME= zoneinfo @@ -106,9 +108,13 @@ MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man LIBDIR = $(TOPDIR)/$(USRDIR)/lib -# Types to try, as an alternative to time_t. int64_t should be first. -TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int64_t +TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t +# What kind of TZif data files to generate. +# (TZif is the binary time zone data format that zic generates.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -129,7 +135,7 @@ TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_ REDO= posix_right -# To install data in text form that has all the information of the binary data, +# To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds # To install text data without leap second information (e.g., because @@ -171,7 +177,6 @@ LDLIBS= # Add the following to the end of the "CFLAGS=" line as needed to override # defaults specified in the source code. "-DFOO" is equivalent to "-DFOO=1". -# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) # -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime # formats that generate only the last two digits of year numbers # -DEPOCH_LOCAL if the 'time' function returns local time not UT @@ -295,7 +300,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. # "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the time specified in the TZ environment variable) +# time (rather than the timezone specified in the TZ environment variable) # to be used. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. @@ -318,7 +323,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "posix2time_z" and "time2posix_z" are added as well. # The functions ending in "_z" (or "_rz") are like their unsuffixed # (or suffixed-by-"_r") counterparts, except with an extra first -# argument of opaque type timezone_t that specifies the time zone. +# argument of opaque type timezone_t that specifies the timezone. # "tzalloc" allocates a timezone_t value, and "tzfree" frees it. # # If you want to allocate state structures in localtime, add @@ -357,11 +362,14 @@ ZIC= $(zic) $(ZFLAGS) ZFLAGS= -# How to use zic to install tz binary files. +# How to use zic to install TZif files. ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) # The name of a Posix-compliant 'awk' on your system. +# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core; +# on Ubuntu you can work around this with +# AWK= gawk AWK= awk # The full path name of a Posix-compliant shell, preferably one that supports @@ -410,10 +418,16 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' +# These characters are Latin-1, and so are likely to be displayable +# even in editors with limited character sets. +UNUSUAL_OK_LATIN_1 = «°±»½¾× +# This IPA symbol is represented in Unicode as the composition of +# U+0075 and U+032F, and U+032F is not considered alphabetic by some +# grep implementations that do not grok composition. +UNUSUAL_OK_IPA = u̯ # Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. XEmacs 21.5.34 displays them correctly, -# presumably because they are Latin-1. -UNUSUAL_OK_CHARSET= °±½¾× +# useful in commentary. +UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA) # OK_CHAR matches any character allowed in the distributed files. # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and @@ -492,11 +506,14 @@ AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.a ziguard.awk zishrink.awk MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) TZS= to$(TZS_YEAR).tzs TZS_NEW= to$(TZS_YEAR)new.tzs TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c -ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) # Consult these files when deciding whether to rebuild the 'version' file. # This list is not the same as the output of 'git ls-files', since @@ -560,14 +577,21 @@ version: $(VERSION_DEPS) printf '%s\n' "$$V" >$@.out mv $@.out $@ -# These files can be tailored by setting BACKWARD, PACKRATDATA, etc. +# These files can be tailored by setting BACKWARD and PACKRATDATA. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \ $(TDATA) $(PACKRATDATA) >$@.out mv $@.out $@ -tzdata.zi: $(DATAFORM).zi version +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk version=`sed 1q version` && \ - LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ + LC_ALL=C $(AWK) \ + -v dataform='$(DATAFORM)' \ + -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ + -v redo='$(REDO)' \ + -v version="$$version" \ + -f zishrink.awk \ $(DATAFORM).zi >$@.out mv $@.out $@ @@ -605,14 +629,16 @@ INSTALLARGS = \ YEARISTYPE='$(YEARISTYPE)' \ ZIC='$(ZIC)' -# 'make install_data' installs one set of tz binary files. -install_data: zic leapseconds yearistype tzdata.zi +INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi + +# 'make install_data' installs one set of TZif files. +install_data: $(INSTALL_DATA_DEPS) $(ZIC_INSTALL) tzdata.zi -posix_only: +posix_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data -right_only: +right_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ install_data @@ -639,7 +665,7 @@ posix_right: posix_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually. -posix_packrat: +posix_packrat: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only zones: $(REDO) @@ -650,29 +676,33 @@ ZDS = dummy.zd # Rule used only by submakes invoked by the $(TZS_NEW) rule. # It is separate so that GNU 'make -j' can run instances in parallel. $(ZDS): zdump - ./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@ + ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ + >$@ -$(TZS_NEW): tzdata.zi zdump zic - rm -fr tzs.dir - mkdir tzs.dir - $(zic) -d tzs.dir tzdata.zi +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out wd=`pwd` && \ - set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \ + x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ | LC_ALL=C sort -t . -k 2,2` && \ + set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \ - sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out - rm -fr tzs.dir + $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) does not already exist (e.g., old-format tarballs), create it. -# If it exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): - $(MAKE) force_tzs + touch $@ force_tzs: $(TZS_NEW) cp $(TZS_NEW) $(TZS) @@ -711,18 +741,21 @@ check_character_set: $(ENCHILADA) $(MISC) $(SOURCES) $(WEB_PAGES) \ CONTRIBUTING LICENSE README \ version tzdata.zi && \ - ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \ + ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ leapseconds yearistype.sh zone.tab && \ ! grep -Env $(OK_LINE) $(ENCHILADA); \ } + touch $@ check_white_space: $(ENCHILADA) patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ - ! grep -En "$$pat" $(ENCHILADA) + ! grep -En "$$pat" \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) ! grep -n '[[:space:]]$$' \ $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ FILE_NAME_COMPONENT_TOO_LONG = \ @@ -731,6 +764,7 @@ FILE_NAME_COMPONENT_TOO_LONG = \ check_name_lengths: $(TDATA_TO_CHECK) backzone ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone + touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } @@ -743,52 +777,61 @@ check_sorted: backward backzone iso3166.tab zone.tab z LC_ALL=C sort -c $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ LC_ALL=C sort -cu + touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk tzdata.zi + touch $@ check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) for tab in $(ZONETABLES); do \ $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ || exit; \ done + touch $@ check_tzs: $(TZS) $(TZS_NEW) - diff -u $(TZS) $(TZS_NEW) + if test -s $(TZS); then \ + diff -u $(TZS) $(TZS_NEW); \ + else \ + cp $(TZS_NEW) $(TZS); \ + fi + touch $@ # This checks only the HTML 4.01 strict page. # To check the the other pages, use . check_web: tz-how-to.html $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html + touch $@ # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \ - $(DATAFORM).zi tzdata.zi - for type in posix right; do \ - mkdir -p time_t.dir/$$type time_t.dir/$$type-t \ - time_t.dir/$$type-shrunk && \ - case $$type in \ - right) leap='-L leapseconds';; \ - *) leap=;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \ +check_zishrink: check_zishrink_posix check_zishrink_right +check_zishrink_posix check_zishrink_right: \ + zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi + rm -fr $@.dir $@-t.dir $@-shrunk.dir + mkdir $@.dir $@-t.dir $@-shrunk.dir + case $@ in \ + *_right) leap='-L leapseconds';; \ + *) leap=;; \ + esac && \ + $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ + $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ case $(DATAFORM) in \ main) \ - $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \ + $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d time_t.dir/$$type-t - \ - $(PACKRATDATA) && \ - diff -r time_t.dir/$$type time_t.dir/$$type-t;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \ - diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \ - done - rm -fr time_t.dir + $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ + diff -r $@.dir $@-t.dir;; \ + esac + diff -r $@.dir $@-shrunk.dir + rm -fr $@.dir $@-t.dir $@-shrunk.dir + touch $@ clean_misc: - rm -f core *.o *.out \ + rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ + check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) @@ -818,17 +861,17 @@ $(MANTXTS): workman.sh LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out mv $@.out $@ -# Set the time stamps to those of the git repository, if available, +# Set the timestamps to those of the git repository, if available, # and if the files have not changed since then. # This uses GNU 'touch' syntax 'touch -d@N FILE', # where N is the number of seconds since 1970. # If git or GNU 'touch' is absent, don't bother to sync with git timestamps. # Also, set the timestamp of each prebuilt file like 'leapseconds' # to be the maximum of the files it depends on. -set-timestamps.out: $(ENCHILADA) +set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(ENCHILADA)` && \ + files=`git ls-files $(EIGHT_YARDS)` && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ @@ -846,83 +889,100 @@ set-timestamps.out: $(ENCHILADA) exit; \ done touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi - touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version touch $@ +set-tzs-timestamp.out: $(TZS) + touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) + touch $@ # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: - $(MAKE) maintainer-clean - $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - mkdir -p public.dir - for i in $(TDATA_TO_CHECK) tzdata.zi; do \ - $(zic) -v -d public.dir $$i 2>&1 || exit; \ +check_public: $(VERSION_DEPS) + rm -fr public.dir + mkdir public.dir + ln $(VERSION_DEPS) public.dir + cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done - $(zic) -v -d public.dir $(TDATA_TO_CHECK) + public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) rm -fr public.dir + touch $@ # Check that the code works under various alternative # implementations of time_t. -check_time_t_alternatives: - if diff -q Makefile Makefile 2>/dev/null; then \ - quiet_option='-q'; \ - else \ - quiet_option=''; \ - fi && \ +check_time_t_alternatives: $(TIME_T_ALTERNATIVES) +$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) +$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + case $@ in \ + int32_t) range=-2147483648,2147483648;; \ + u*) range=0,4294967296;; \ + *) range=-4294967296,4294967296;; \ + esac && \ wd=`pwd` && \ zones=`$(AWK) '/^[^#]/ { print $$3 }' time_t.dir/int64_t.out && \ - time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \ - >time_t.dir/$$type.out && \ - diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ - || exit; \ - done - rm -fr time_t.dir + D=$$wd/$@.dir \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + install $$range_target) && \ + test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ + (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \ + $(MAKE) TOPDIR="$$wd/$@.dir" \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + D=$$wd/$@.dir \ + to$$range.tzs) && \ + diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \ + $@.dir/to$$range.tzs && \ + if diff -q Makefile Makefile 2>/dev/null; then \ + quiet_option='-q'; \ + else \ + quiet_option=''; \ + fi && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ + $@.dir/etc && \ + diff $$quiet_option -r \ + $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ + $@.dir/usr/share; \ + } + touch $@ TRADITIONAL_ASC = \ tzcode$(VERSION).tar.gz.asc \ tzdata$(VERSION).tar.gz.asc -ALL_ASC = $(TRADITIONAL_ASC) \ - tzdata$(VERSION)-rearguard.tar.gz.asc \ +REARGUARD_ASC = \ + tzdata$(VERSION)-rearguard.tar.gz.asc +ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tzdb-$(VERSION).tar.lz.asc -tarballs traditional_tarballs signatures traditional_signatures: version +tarballs rearguard_tarballs traditional_tarballs \ +signatures rearguard_signatures traditional_signatures: \ + version set-timestamps.out rearguard.zi VERSION=`cat version` && \ $(MAKE) VERSION="$$VERSION" $@_version # These *_version rules are intended for use if VERSION is set by some # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. -tarballs_version: traditional_tarballs_version \ - tzdata$(VERSION)-rearguard.tar.gz \ +tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ tzdb-$(VERSION).tar.lz +rearguard_tarballs_version: \ + tzdata$(VERSION)-rearguard.tar.gz traditional_tarballs_version: \ tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz signatures_version: $(ALL_ASC) +rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) tzcode$(VERSION).tar.gz: set-timestamps.out @@ -958,7 +1018,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-ti gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out +tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) @@ -972,16 +1032,26 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg --armor --detach-sign $? + gpg2 --armor --detach-sign $? -typecheck: - $(MAKE) clean - for i in "long long" unsigned; \ - do \ - $(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \ - ./zdump -v Europe/Rome ; \ - $(MAKE) clean ; \ - done +TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T +typecheck: typecheck_long_long typecheck_unsigned +typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + cd $@.dir && \ + case $@ in \ + *_long_long) i="long long";; \ + *_unsigned ) i="unsigned" ;; \ + esac && \ + typecheck_cflags='' && \ + $(MAKE) \ + CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ + TOPDIR="`pwd`" \ + install + $@.dir/zdump -i -c 1970,1971 Europe/Rome + touch $@ zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -997,14 +1067,14 @@ zic.o: private.h tzfile.h version.h .KEEP_STATE: .PHONY: ALL INSTALL all -.PHONY: check check_character_set check_links check_name_lengths -.PHONY: check_public check_sorted check_tables -.PHONY: check_time_t_alternatives check_tzs check_web check_white_space +.PHONY: check check_time_t_alternatives .PHONY: check_zishrink .PHONY: clean clean_misc dummy.zd force_tzs .PHONY: install install_data maintainer-clean names -.PHONY: posix_only posix_packrat posix_right -.PHONY: public right_only right_posix signatures signatures_version +.PHONY: posix_only posix_packrat posix_right public +.PHONY: rearguard_signatures rearguard_signatures_version +.PHONY: rearguard_tarballs rearguard_tarballs_version +.PHONY: right_only right_posix signatures signatures_version .PHONY: tarballs tarballs_version .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version Modified: stable/12/contrib/tzdata/NEWS ============================================================================== --- stable/12/contrib/tzdata/NEWS Mon Oct 22 23:57:59 2018 (r339628) +++ stable/12/contrib/tzdata/NEWS Tue Oct 23 01:39:26 2018 (r339629) @@ -1,5 +1,136 @@ News for the tz database +Release 2018f - 2018-10-18 00:14:18 -0700 + + Briefly: + Volgograd moves from +03 to +04 on 2018-10-28. + Fiji ends DST 2019-01-13, not 2019-01-20. + Most of Chile changes DST dates, effective 2019-04-06. + + Changes to future timestamps + + Volgograd moves from +03 to +04 on 2018-10-28 at 02:00. + (Thanks to Alexander Fetisov and Stepan Golosunov.) + + Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously + predicted. (Thanks to Raymond Kumar.) Adjust future predictions + accordingly. + + Most of Chile will end DST on the first Saturday in April at 24:00 mainland + time, and resume DST on the first Saturday in September at 24:00 mainland + time. The changes are effective from 2019-04-06, and do not affect the + Magallanes region modeled by America/Punta_Arenas. (Thanks to Juan Correa + and Tim Parenti.) Adjust future predictions accordingly. + + Changes to past timestamps + + The 2018-05-05 North Korea 30-minute time zone change took place + at 23:30 the previous day, not at 00:00 that day. + + China's 1988 spring-forward transition was on April 17, not + April 10. Its DST transitions in 1986/91 were at 02:00, not 00:00. + (Thanks to P Chan.) + + Fix several issues for Macau before 1992. Macau's pre-1904 LMT + was off by 10 s. Macau switched to +08 in 1904 not 1912, and + temporarily switched to +09/+10 during World War II. Macau + observed DST in 1942/79, not 1961/80, and there were several + errors for transition times and dates. (Thanks to P Chan.) + + The 1948-1951 fallback transitions in Japan were at 25:00 on + September's second Saturday, not at 24:00. (Thanks to Phake Nick.) + zic turns this into 01:00 on the day after September's second + Saturday, which is the best that POSIX or C platforms can do. + + Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014 + paper by Li Yu, replacing more-questionable data from Shanks. + + Changes to time zone abbreviations + + Use "PST" and "PDT" for Philippine time. (Thanks to Paul Goyette.) + + Changes to code + + zic now always generates TZif files where time type 0 is used for + timestamps before the first transition. This simplifies the + reading of TZif files and should not affect behavior of existing + TZif readers because the same set of time types is used; only + their internal indexes may have changed. This affects only the + legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and + EET, which previously used nonzero types for these timestamps. + + Because of the type 0 change, zic no longer outputs a dummy + transition at time -2**59 (before the Big Bang), as clients should + no longer need this to handle historical timestamps correctly. + This reverts a change introduced in 2013d and shrinks most TZif + files by a few bytes. + + zic now supports negative time-of-day in Rule and Leap lines, e.g., + "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition + occurs at 18:00 on the Saturday before the last Sunday in April. + This behavior was documented in 2018a but the code did not + entirely match the documentation. + + localtime.c no longer requires at least one time type in TZif + files that lack transitions or have a POSIX-style TZ string. This + future-proofs the code against possible future extensions to the + format that would allow TZif files with POSIX-style TZ strings and + without transitions or time types. + + A read-access subscript error in localtime.c has been fixed. + It could occur only in TZif files with timecnt == 0, something that + does not happen in practice now but could happen in future versions. + + localtime.c no longer ignores TZif POSIX-style TZ strings that + specify only standard time. Instead, these TZ strings now + override the default time type for timestamps after the last + transition (or for all time stamps if there are no transitions), + just as DST strings specifying DST have always done. + + leapseconds.awk now outputs "#updated" and "#expires" comments, + and supports leap seconds at the ends of months other than June + and December. (Inspired by suggestions from Chris Woodbury.) + + Changes to documentation + + New restrictions: A Rule name must start with a character that + is neither an ASCII digit nor "-" nor "+", and an unquoted name + should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~". + The latter restriction makes room for future extensions (a + possibility noted by Tom Lane). + + tzfile.5 now documents what time types apply before the first and + after the last transition, if any. + + Documentation now uses the spelling "timezone" for a TZ setting + that determines timestamp history, and "time zone" for a + geographic region currently sharing the same standard time. + + The name "TZif" is now used for the tz binary data format. + + tz-link.htm now mentions the A0 TimeZone Migration utilities. + (Thanks to Aldrin Martoq for the link.) + + Changes to build procedure + + New 'make' target 'rearguard_tarballs' to build the rearguard + tarball only. This is a convenience on platforms that lack lzip + if you want to build the rearguard tarball. (Problem reported by + Deborah Goldsmith.) + + tzdata.zi is now more stable from release to release. (Problem + noted by Tom Lane.) It is also a bit shorter. + + tzdata.zi now can contain comment lines documenting configuration + information, such as which data format was selected, which input + files were used, and how leap seconds are treated. (Problems + noted by Lester Caine and Brian Inglis.) If the Makefile defaults + are used these comment lines are absent, for backward + compatibility. A redistributor intending to alter its copy of the + files should also append "-LABEL" to the 'version' file's first + line, where "LABEL" identifies the redistributor's change. + + Release 2018e - 2018-05-01 23:42:51 -0700 Briefly: @@ -9,7 +140,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 'make tarballs' now also builds a rearguard tarball. New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines. - Changes to past and future time stamps + Changes to past and future timestamps North Korea switches back from +0830 to +09 on 2018-05-05. (Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon, @@ -17,9 +148,9 @@ Release 2018e - 2018-05-01 23:42:51 -0700 Bring back the negative-DST changes of 2018a, except be more compatible with data parsers that do not support negative DST. - Also, this now affects historical time stamps in Namibia and the + Also, this now affects historical timestamps in Namibia and the former Czechoslovakia, not just Ireland. The main format now uses - negative DST to model time stamps in Europe/Dublin (from 1971 on), + negative DST to model timestamps in Europe/Dublin (from 1971 on), Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This does not affect UT offsets, only time zone abbreviations and the tm_isdst flag. Also, this does not affect rearguard or vanguard @@ -44,7 +175,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 in tzdata, it could be used to specify the legal time in Namibia 1994-2017, as opposed to the popular time (see below). - Changes to past time stamps + Changes to past timestamps From 1994 through 2017 Namibia observed DST in winter, not summer. That is, it used negative DST, as Ireland still does. This change @@ -54,12 +185,12 @@ Release 2018e - 2018-05-01 23:42:51 -0700 both simply called "standard time" in Namibian law, in common practice winter time was considered to be DST (as noted by Stephen Colebourne). The full effect of this change is only in vanguard - format; in rearguard and main format, the tm_isdst flag is still + and main format; in rearguard format, the tm_isdst flag is still zero in winter and nonzero in summer. In 1946/7 Czechoslovakia also observed negative DST in winter. - The full effect of this change is only in vanguard format; in - rearguard and main formats, it is modeled as plain GMT without + The full effect of this change is only in vanguard and main + formats; in rearguard format, it is modeled as plain GMT without daylight saving. Also, the dates of some 1944/5 DST transitions in Czechoslovakia have been changed. @@ -72,17 +203,17 @@ Release 2018d - 2018-03-22 07:05:46 -0700 Add support for vanguard and rearguard data consumers. Add subsecond precision to source data format, though not to data. - Changes to future time stamps + Changes to future timestamps In 2018, Palestine starts DST on March 24, not March 31. Adjust future predictions accordingly. (Thanks to Sharef Mustafa.) - Changes to past and future time stamps + Changes to past and future timestamps Casey Station in Antarctica changed from +11 to +08 on 2018-03-11 at 04:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Historical transitions for Uruguay, represented by America/Montevideo, have been updated per official legal documents, @@ -224,7 +355,7 @@ Release 2018c - 2018-01-22 23:00:44 -0800 change is reapplied. (Problems reported by Deborah Goldsmith and Stephen Colebourne.) - Changes to past time stamps + Changes to past timestamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) @@ -256,18 +387,18 @@ Release 2018a - 2018-01-12 22:29:21 -0800 Use Debian-style installation locations, instead of 4.3BSD-style. New zic option -t. - Changes to past and future time stamps + Changes to past and future timestamps São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) - Changes to future time stamps + Changes to future timestamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree @@ -355,7 +486,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 A new file tzdata.zi now holds a small text copy of all data. The zic input format has been regularized slightly. - Changes to future time stamps + Changes to future timestamps Northern Cyprus has decided to resume EU rules starting 2017-10-29, thus reinstituting winter time. @@ -381,7 +512,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 2018-03-11 at 03:00. This affects UT offsets starting 2018-11-04 at 02:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03. (Thanks to Arthur David Olson.) @@ -511,11 +642,11 @@ Release 2017b - 2017-03-17 07:30:38 -0700 Briefly: Haiti has resumed DST. - Changes to past and future time stamps + Changes to past and future timestamps Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. @@ -527,7 +658,7 @@ Release 2017b - 2017-03-17 07:30:38 -0700 The reference localtime implementation now falls back on the current US daylight-saving transition rules rather than the 1987-2006 rules. This fallback occurs only when (1) the TZ - environment variable's value has a name like "AST4ADT" that asks + environment variable has a value like "AST4ADT" that asks for daylight saving time but does not specify the rules, (2) there is no file by that name, and (3) the TZDEFRULES file cannot be loaded. (Thanks to Tom Lane.) @@ -538,7 +669,7 @@ Release 2017a - 2017-02-28 00:05:36 -0800 Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia discontinues DST. - Changes to future time stamps + Changes to future timestamps Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) @@ -549,12 +680,12 @@ Release 2017a - 2017-02-28 00:05:36 -0800 assume it's permanent. (Thanks to Juan Correa and Deborah Goldsmith.) This also affects Antarctica/Palmer. - Changes to past time stamps + Changes to past timestamps - Fix many entries for historical time stamps for Europe/Madrid + Fix many entries for historical timestamps for Europe/Madrid before 1979, to agree with tables compiled by Pere Planesas of the National Astronomical Observatory of Spain. As a side effect, - this changes some time stamps for Africa/Ceuta before 1929, which + this changes some timestamps for Africa/Ceuta before 1929, which are probably guesswork anyway. (Thanks to Steve Allen and Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for correcting the 1901 transition.) @@ -645,13 +776,13 @@ Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. - Changes to future time stamps + Changes to future timestamps Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00. This hives off a new zone Europe/Saratov from Europe/Volgograd. (Thanks to Yuri Konotopov and Stepan Golosunov.) - Changes to past time stamps + Changes to past timestamps The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring @@ -687,7 +818,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga reintroduces DST on 2016-11-06. - Changes to future time stamps + Changes to future timestamps Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on 2017-01-15 at 03:00. Assume future observances in Tonga will be @@ -695,7 +826,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 January, like Fiji. (Thanks to Pulu ʻAnau.) Switch to numeric time zone abbreviations for this zone. - Changes to past and future time stamps + Changes to past and future timestamps Northern Cyprus is now +03 year round, causing a split in Cyprus time zones starting 2016-10-30 at 04:00. This creates a zone @@ -704,9 +835,9 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Antarctica/Casey switched from +08 to +11 on 2016-10-22. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps - Several corrections were made for pre-1975 time stamps in Italy. + Several corrections were made for pre-1975 timestamps in Italy. These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and Europe/Vatican. @@ -744,7 +875,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Release 2016h - 2016-10-19 23:17:57 -0700 - Changes to future time stamps + Changes to future timestamps Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not 2016-10-21 at 00:00. (Thanks to Sharef Mustafa.) Predict that @@ -752,7 +883,7 @@ Release 2016h - 2016-10-19 23:17:57 -0700 at 01:00, which is consistent with predicted spring transitions on the last Saturday of March. (Thanks to Tim Parenti.) - Changes to past time stamps + Changes to past timestamps In Turkey, transitions in 1986-1990 were at 01:00 standard time not at 02:00, and the spring 1994 transition was on March 20, not *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Oct 23 01:41:08 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74D8BFF0875; Tue, 23 Oct 2018 01:41:08 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1179D80452; Tue, 23 Oct 2018 01:41:08 +0000 (UTC) (envelope-from philip@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6555BCD; Tue, 23 Oct 2018 01:41:07 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9N1f7FT059607; Tue, 23 Oct 2018 01:41:07 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9N1f7gq059604; Tue, 23 Oct 2018 01:41:07 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201810230141.w9N1f7gq059604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 23 Oct 2018 01:41: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: r339630 - stable/11/contrib/tzdata X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/contrib/tzdata X-SVN-Commit-Revision: 339630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 01:41:08 -0000 Author: philip Date: Tue Oct 23 01:41:07 2018 New Revision: 339630 URL: https://svnweb.freebsd.org/changeset/base/339630 Log: MFC r339503: Import tzdata 2018f Modified: stable/11/contrib/tzdata/CONTRIBUTING stable/11/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS stable/11/contrib/tzdata/README stable/11/contrib/tzdata/africa stable/11/contrib/tzdata/antarctica stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/australasia stable/11/contrib/tzdata/backward stable/11/contrib/tzdata/backzone stable/11/contrib/tzdata/etcetera stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/factory stable/11/contrib/tzdata/leap-seconds.list stable/11/contrib/tzdata/leapseconds stable/11/contrib/tzdata/leapseconds.awk stable/11/contrib/tzdata/northamerica stable/11/contrib/tzdata/pacificnew stable/11/contrib/tzdata/southamerica stable/11/contrib/tzdata/systemv stable/11/contrib/tzdata/theory.html stable/11/contrib/tzdata/version stable/11/contrib/tzdata/yearistype.sh stable/11/contrib/tzdata/zishrink.awk stable/11/contrib/tzdata/zone.tab stable/11/contrib/tzdata/zone1970.tab stable/11/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/tzdata/CONTRIBUTING ============================================================================== --- stable/11/contrib/tzdata/CONTRIBUTING Tue Oct 23 01:39:26 2018 (r339629) +++ stable/11/contrib/tzdata/CONTRIBUTING Tue Oct 23 01:41:07 2018 (r339630) @@ -17,11 +17,14 @@ To email small changes, please run a POSIX shell comma 'diff -u old/europe new/europe >myfix.patch', and attach myfix.patch to the email. -For more-elaborate changes, please read the theory.html file and browse -the mailing list archives for -examples of patches that tend to work well. Additions to -data should contain commentary citing reliable sources as -justification. Citations should use https: URLs if available. +For more-elaborate or possibly-controversial changes, +such as renaming, adding or removing zones, please read + or the file +theory.html. It is also good to browse the mailing list archives + for examples of patches that tend +to work well. Additions to data should contain commentary citing +reliable sources as justification. Citations should use https: URLs +if available. Please submit changes against either the latest release in or the master branch of the development Modified: stable/11/contrib/tzdata/Makefile ============================================================================== --- stable/11/contrib/tzdata/Makefile Tue Oct 23 01:39:26 2018 (r339629) +++ stable/11/contrib/tzdata/Makefile Tue Oct 23 01:41:07 2018 (r339630) @@ -1,3 +1,5 @@ +# Make and install tzdb code and data. + # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -19,9 +21,9 @@ BUGEMAIL= tz@iana.org # DATAFORM= rearguard DATAFORM= main -# Change the line below for your time zone (after finding the zone you want in -# the time zone files, or adding it to a time zone file). -# Alternatively, if you discover you've got the wrong time zone, you can just +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -l rightzone # to correct things. # Use the command @@ -31,14 +33,14 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style time zone environment variables, -# change the line below (after finding the zone you want in the -# time zone files, or adding it to a time zone file). +# for handling POSIX-style timezone environment variables, +# change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). # When a POSIX-style environment variable is handled, the rules in the # template file are used to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. -# Alternatively, if you discover you've got the wrong time zone, you can just +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -p rightzone # to correct things. # Use the command @@ -75,7 +77,7 @@ DESTDIR = # TOPDIR should be empty or an absolute name unless you're just testing. TOPDIR = -# The default local time zone is taken from the file TZDEFAULT. +# The default local timezone is taken from the file TZDEFAULT. TZDEFAULT = $(TOPDIR)/etc/localtime # The subdirectory containing installed program and data files, and @@ -84,7 +86,7 @@ TZDEFAULT = $(TOPDIR)/etc/localtime USRDIR = usr USRSHAREDIR = $(USRDIR)/share -# "Compiled" time zone information is placed in the "TZDIR" directory +# "Compiled" timezone information is placed in the "TZDIR" directory # (and subdirectories). # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. TZDIR_BASENAME= zoneinfo @@ -106,9 +108,13 @@ MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man LIBDIR = $(TOPDIR)/$(USRDIR)/lib -# Types to try, as an alternative to time_t. int64_t should be first. -TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int64_t +TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t +# What kind of TZif data files to generate. +# (TZif is the binary time zone data format that zic generates.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -129,7 +135,7 @@ TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_ REDO= posix_right -# To install data in text form that has all the information of the binary data, +# To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds # To install text data without leap second information (e.g., because @@ -171,7 +177,6 @@ LDLIBS= # Add the following to the end of the "CFLAGS=" line as needed to override # defaults specified in the source code. "-DFOO" is equivalent to "-DFOO=1". -# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) # -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime # formats that generate only the last two digits of year numbers # -DEPOCH_LOCAL if the 'time' function returns local time not UT @@ -295,7 +300,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. # "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the time specified in the TZ environment variable) +# time (rather than the timezone specified in the TZ environment variable) # to be used. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. @@ -318,7 +323,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "posix2time_z" and "time2posix_z" are added as well. # The functions ending in "_z" (or "_rz") are like their unsuffixed # (or suffixed-by-"_r") counterparts, except with an extra first -# argument of opaque type timezone_t that specifies the time zone. +# argument of opaque type timezone_t that specifies the timezone. # "tzalloc" allocates a timezone_t value, and "tzfree" frees it. # # If you want to allocate state structures in localtime, add @@ -357,11 +362,14 @@ ZIC= $(zic) $(ZFLAGS) ZFLAGS= -# How to use zic to install tz binary files. +# How to use zic to install TZif files. ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) # The name of a Posix-compliant 'awk' on your system. +# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core; +# on Ubuntu you can work around this with +# AWK= gawk AWK= awk # The full path name of a Posix-compliant shell, preferably one that supports @@ -410,10 +418,16 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' +# These characters are Latin-1, and so are likely to be displayable +# even in editors with limited character sets. +UNUSUAL_OK_LATIN_1 = «°±»½¾× +# This IPA symbol is represented in Unicode as the composition of +# U+0075 and U+032F, and U+032F is not considered alphabetic by some +# grep implementations that do not grok composition. +UNUSUAL_OK_IPA = u̯ # Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. XEmacs 21.5.34 displays them correctly, -# presumably because they are Latin-1. -UNUSUAL_OK_CHARSET= °±½¾× +# useful in commentary. +UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA) # OK_CHAR matches any character allowed in the distributed files. # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and @@ -492,11 +506,14 @@ AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.a ziguard.awk zishrink.awk MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) TZS= to$(TZS_YEAR).tzs TZS_NEW= to$(TZS_YEAR)new.tzs TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c -ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) # Consult these files when deciding whether to rebuild the 'version' file. # This list is not the same as the output of 'git ls-files', since @@ -560,14 +577,21 @@ version: $(VERSION_DEPS) printf '%s\n' "$$V" >$@.out mv $@.out $@ -# These files can be tailored by setting BACKWARD, PACKRATDATA, etc. +# These files can be tailored by setting BACKWARD and PACKRATDATA. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \ $(TDATA) $(PACKRATDATA) >$@.out mv $@.out $@ -tzdata.zi: $(DATAFORM).zi version +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk version=`sed 1q version` && \ - LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ + LC_ALL=C $(AWK) \ + -v dataform='$(DATAFORM)' \ + -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ + -v redo='$(REDO)' \ + -v version="$$version" \ + -f zishrink.awk \ $(DATAFORM).zi >$@.out mv $@.out $@ @@ -605,14 +629,16 @@ INSTALLARGS = \ YEARISTYPE='$(YEARISTYPE)' \ ZIC='$(ZIC)' -# 'make install_data' installs one set of tz binary files. -install_data: zic leapseconds yearistype tzdata.zi +INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi + +# 'make install_data' installs one set of TZif files. +install_data: $(INSTALL_DATA_DEPS) $(ZIC_INSTALL) tzdata.zi -posix_only: +posix_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data -right_only: +right_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ install_data @@ -639,7 +665,7 @@ posix_right: posix_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually. -posix_packrat: +posix_packrat: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only zones: $(REDO) @@ -650,29 +676,33 @@ ZDS = dummy.zd # Rule used only by submakes invoked by the $(TZS_NEW) rule. # It is separate so that GNU 'make -j' can run instances in parallel. $(ZDS): zdump - ./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@ + ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ + >$@ -$(TZS_NEW): tzdata.zi zdump zic - rm -fr tzs.dir - mkdir tzs.dir - $(zic) -d tzs.dir tzdata.zi +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out wd=`pwd` && \ - set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \ + x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ | LC_ALL=C sort -t . -k 2,2` && \ + set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \ - sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out - rm -fr tzs.dir + $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) does not already exist (e.g., old-format tarballs), create it. -# If it exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): - $(MAKE) force_tzs + touch $@ force_tzs: $(TZS_NEW) cp $(TZS_NEW) $(TZS) @@ -711,18 +741,21 @@ check_character_set: $(ENCHILADA) $(MISC) $(SOURCES) $(WEB_PAGES) \ CONTRIBUTING LICENSE README \ version tzdata.zi && \ - ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \ + ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ leapseconds yearistype.sh zone.tab && \ ! grep -Env $(OK_LINE) $(ENCHILADA); \ } + touch $@ check_white_space: $(ENCHILADA) patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ - ! grep -En "$$pat" $(ENCHILADA) + ! grep -En "$$pat" \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) ! grep -n '[[:space:]]$$' \ $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ FILE_NAME_COMPONENT_TOO_LONG = \ @@ -731,6 +764,7 @@ FILE_NAME_COMPONENT_TOO_LONG = \ check_name_lengths: $(TDATA_TO_CHECK) backzone ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone + touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } @@ -743,52 +777,61 @@ check_sorted: backward backzone iso3166.tab zone.tab z LC_ALL=C sort -c $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ LC_ALL=C sort -cu + touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk tzdata.zi + touch $@ check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) for tab in $(ZONETABLES); do \ $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ || exit; \ done + touch $@ check_tzs: $(TZS) $(TZS_NEW) - diff -u $(TZS) $(TZS_NEW) + if test -s $(TZS); then \ + diff -u $(TZS) $(TZS_NEW); \ + else \ + cp $(TZS_NEW) $(TZS); \ + fi + touch $@ # This checks only the HTML 4.01 strict page. # To check the the other pages, use . check_web: tz-how-to.html $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html + touch $@ # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \ - $(DATAFORM).zi tzdata.zi - for type in posix right; do \ - mkdir -p time_t.dir/$$type time_t.dir/$$type-t \ - time_t.dir/$$type-shrunk && \ - case $$type in \ - right) leap='-L leapseconds';; \ - *) leap=;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \ +check_zishrink: check_zishrink_posix check_zishrink_right +check_zishrink_posix check_zishrink_right: \ + zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi + rm -fr $@.dir $@-t.dir $@-shrunk.dir + mkdir $@.dir $@-t.dir $@-shrunk.dir + case $@ in \ + *_right) leap='-L leapseconds';; \ + *) leap=;; \ + esac && \ + $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ + $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ case $(DATAFORM) in \ main) \ - $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \ + $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d time_t.dir/$$type-t - \ - $(PACKRATDATA) && \ - diff -r time_t.dir/$$type time_t.dir/$$type-t;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \ - diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \ - done - rm -fr time_t.dir + $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ + diff -r $@.dir $@-t.dir;; \ + esac + diff -r $@.dir $@-shrunk.dir + rm -fr $@.dir $@-t.dir $@-shrunk.dir + touch $@ clean_misc: - rm -f core *.o *.out \ + rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ + check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) @@ -818,17 +861,17 @@ $(MANTXTS): workman.sh LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out mv $@.out $@ -# Set the time stamps to those of the git repository, if available, +# Set the timestamps to those of the git repository, if available, # and if the files have not changed since then. # This uses GNU 'touch' syntax 'touch -d@N FILE', # where N is the number of seconds since 1970. # If git or GNU 'touch' is absent, don't bother to sync with git timestamps. # Also, set the timestamp of each prebuilt file like 'leapseconds' # to be the maximum of the files it depends on. -set-timestamps.out: $(ENCHILADA) +set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(ENCHILADA)` && \ + files=`git ls-files $(EIGHT_YARDS)` && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ @@ -846,83 +889,100 @@ set-timestamps.out: $(ENCHILADA) exit; \ done touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi - touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version touch $@ +set-tzs-timestamp.out: $(TZS) + touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) + touch $@ # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: - $(MAKE) maintainer-clean - $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - mkdir -p public.dir - for i in $(TDATA_TO_CHECK) tzdata.zi; do \ - $(zic) -v -d public.dir $$i 2>&1 || exit; \ +check_public: $(VERSION_DEPS) + rm -fr public.dir + mkdir public.dir + ln $(VERSION_DEPS) public.dir + cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done - $(zic) -v -d public.dir $(TDATA_TO_CHECK) + public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) rm -fr public.dir + touch $@ # Check that the code works under various alternative # implementations of time_t. -check_time_t_alternatives: - if diff -q Makefile Makefile 2>/dev/null; then \ - quiet_option='-q'; \ - else \ - quiet_option=''; \ - fi && \ +check_time_t_alternatives: $(TIME_T_ALTERNATIVES) +$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) +$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + case $@ in \ + int32_t) range=-2147483648,2147483648;; \ + u*) range=0,4294967296;; \ + *) range=-4294967296,4294967296;; \ + esac && \ wd=`pwd` && \ zones=`$(AWK) '/^[^#]/ { print $$3 }' time_t.dir/int64_t.out && \ - time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \ - >time_t.dir/$$type.out && \ - diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ - || exit; \ - done - rm -fr time_t.dir + D=$$wd/$@.dir \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + install $$range_target) && \ + test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ + (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \ + $(MAKE) TOPDIR="$$wd/$@.dir" \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + D=$$wd/$@.dir \ + to$$range.tzs) && \ + diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \ + $@.dir/to$$range.tzs && \ + if diff -q Makefile Makefile 2>/dev/null; then \ + quiet_option='-q'; \ + else \ + quiet_option=''; \ + fi && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ + $@.dir/etc && \ + diff $$quiet_option -r \ + $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ + $@.dir/usr/share; \ + } + touch $@ TRADITIONAL_ASC = \ tzcode$(VERSION).tar.gz.asc \ tzdata$(VERSION).tar.gz.asc -ALL_ASC = $(TRADITIONAL_ASC) \ - tzdata$(VERSION)-rearguard.tar.gz.asc \ +REARGUARD_ASC = \ + tzdata$(VERSION)-rearguard.tar.gz.asc +ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tzdb-$(VERSION).tar.lz.asc -tarballs traditional_tarballs signatures traditional_signatures: version +tarballs rearguard_tarballs traditional_tarballs \ +signatures rearguard_signatures traditional_signatures: \ + version set-timestamps.out rearguard.zi VERSION=`cat version` && \ $(MAKE) VERSION="$$VERSION" $@_version # These *_version rules are intended for use if VERSION is set by some # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. -tarballs_version: traditional_tarballs_version \ - tzdata$(VERSION)-rearguard.tar.gz \ +tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ tzdb-$(VERSION).tar.lz +rearguard_tarballs_version: \ + tzdata$(VERSION)-rearguard.tar.gz traditional_tarballs_version: \ tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz signatures_version: $(ALL_ASC) +rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) tzcode$(VERSION).tar.gz: set-timestamps.out @@ -958,7 +1018,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-ti gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out +tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) @@ -972,16 +1032,26 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg --armor --detach-sign $? + gpg2 --armor --detach-sign $? -typecheck: - $(MAKE) clean - for i in "long long" unsigned; \ - do \ - $(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \ - ./zdump -v Europe/Rome ; \ - $(MAKE) clean ; \ - done +TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T +typecheck: typecheck_long_long typecheck_unsigned +typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + cd $@.dir && \ + case $@ in \ + *_long_long) i="long long";; \ + *_unsigned ) i="unsigned" ;; \ + esac && \ + typecheck_cflags='' && \ + $(MAKE) \ + CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ + TOPDIR="`pwd`" \ + install + $@.dir/zdump -i -c 1970,1971 Europe/Rome + touch $@ zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -997,14 +1067,14 @@ zic.o: private.h tzfile.h version.h .KEEP_STATE: .PHONY: ALL INSTALL all -.PHONY: check check_character_set check_links check_name_lengths -.PHONY: check_public check_sorted check_tables -.PHONY: check_time_t_alternatives check_tzs check_web check_white_space +.PHONY: check check_time_t_alternatives .PHONY: check_zishrink .PHONY: clean clean_misc dummy.zd force_tzs .PHONY: install install_data maintainer-clean names -.PHONY: posix_only posix_packrat posix_right -.PHONY: public right_only right_posix signatures signatures_version +.PHONY: posix_only posix_packrat posix_right public +.PHONY: rearguard_signatures rearguard_signatures_version +.PHONY: rearguard_tarballs rearguard_tarballs_version +.PHONY: right_only right_posix signatures signatures_version .PHONY: tarballs tarballs_version .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version Modified: stable/11/contrib/tzdata/NEWS ============================================================================== --- stable/11/contrib/tzdata/NEWS Tue Oct 23 01:39:26 2018 (r339629) +++ stable/11/contrib/tzdata/NEWS Tue Oct 23 01:41:07 2018 (r339630) @@ -1,5 +1,136 @@ News for the tz database +Release 2018f - 2018-10-18 00:14:18 -0700 + + Briefly: + Volgograd moves from +03 to +04 on 2018-10-28. + Fiji ends DST 2019-01-13, not 2019-01-20. + Most of Chile changes DST dates, effective 2019-04-06. + + Changes to future timestamps + + Volgograd moves from +03 to +04 on 2018-10-28 at 02:00. + (Thanks to Alexander Fetisov and Stepan Golosunov.) + + Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously + predicted. (Thanks to Raymond Kumar.) Adjust future predictions + accordingly. + + Most of Chile will end DST on the first Saturday in April at 24:00 mainland + time, and resume DST on the first Saturday in September at 24:00 mainland + time. The changes are effective from 2019-04-06, and do not affect the + Magallanes region modeled by America/Punta_Arenas. (Thanks to Juan Correa + and Tim Parenti.) Adjust future predictions accordingly. + + Changes to past timestamps + + The 2018-05-05 North Korea 30-minute time zone change took place + at 23:30 the previous day, not at 00:00 that day. + + China's 1988 spring-forward transition was on April 17, not + April 10. Its DST transitions in 1986/91 were at 02:00, not 00:00. + (Thanks to P Chan.) + + Fix several issues for Macau before 1992. Macau's pre-1904 LMT + was off by 10 s. Macau switched to +08 in 1904 not 1912, and + temporarily switched to +09/+10 during World War II. Macau + observed DST in 1942/79, not 1961/80, and there were several + errors for transition times and dates. (Thanks to P Chan.) + + The 1948-1951 fallback transitions in Japan were at 25:00 on + September's second Saturday, not at 24:00. (Thanks to Phake Nick.) + zic turns this into 01:00 on the day after September's second + Saturday, which is the best that POSIX or C platforms can do. + + Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014 + paper by Li Yu, replacing more-questionable data from Shanks. + + Changes to time zone abbreviations + + Use "PST" and "PDT" for Philippine time. (Thanks to Paul Goyette.) + + Changes to code + + zic now always generates TZif files where time type 0 is used for + timestamps before the first transition. This simplifies the + reading of TZif files and should not affect behavior of existing + TZif readers because the same set of time types is used; only + their internal indexes may have changed. This affects only the + legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and + EET, which previously used nonzero types for these timestamps. + + Because of the type 0 change, zic no longer outputs a dummy + transition at time -2**59 (before the Big Bang), as clients should + no longer need this to handle historical timestamps correctly. + This reverts a change introduced in 2013d and shrinks most TZif + files by a few bytes. + + zic now supports negative time-of-day in Rule and Leap lines, e.g., + "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition + occurs at 18:00 on the Saturday before the last Sunday in April. + This behavior was documented in 2018a but the code did not + entirely match the documentation. + + localtime.c no longer requires at least one time type in TZif + files that lack transitions or have a POSIX-style TZ string. This + future-proofs the code against possible future extensions to the + format that would allow TZif files with POSIX-style TZ strings and + without transitions or time types. + + A read-access subscript error in localtime.c has been fixed. + It could occur only in TZif files with timecnt == 0, something that + does not happen in practice now but could happen in future versions. + + localtime.c no longer ignores TZif POSIX-style TZ strings that + specify only standard time. Instead, these TZ strings now + override the default time type for timestamps after the last + transition (or for all time stamps if there are no transitions), + just as DST strings specifying DST have always done. + + leapseconds.awk now outputs "#updated" and "#expires" comments, + and supports leap seconds at the ends of months other than June + and December. (Inspired by suggestions from Chris Woodbury.) + + Changes to documentation + + New restrictions: A Rule name must start with a character that + is neither an ASCII digit nor "-" nor "+", and an unquoted name + should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~". + The latter restriction makes room for future extensions (a + possibility noted by Tom Lane). + + tzfile.5 now documents what time types apply before the first and + after the last transition, if any. + + Documentation now uses the spelling "timezone" for a TZ setting + that determines timestamp history, and "time zone" for a + geographic region currently sharing the same standard time. + + The name "TZif" is now used for the tz binary data format. + + tz-link.htm now mentions the A0 TimeZone Migration utilities. + (Thanks to Aldrin Martoq for the link.) + + Changes to build procedure + + New 'make' target 'rearguard_tarballs' to build the rearguard + tarball only. This is a convenience on platforms that lack lzip + if you want to build the rearguard tarball. (Problem reported by + Deborah Goldsmith.) + + tzdata.zi is now more stable from release to release. (Problem + noted by Tom Lane.) It is also a bit shorter. + + tzdata.zi now can contain comment lines documenting configuration + information, such as which data format was selected, which input + files were used, and how leap seconds are treated. (Problems + noted by Lester Caine and Brian Inglis.) If the Makefile defaults + are used these comment lines are absent, for backward + compatibility. A redistributor intending to alter its copy of the + files should also append "-LABEL" to the 'version' file's first + line, where "LABEL" identifies the redistributor's change. + + Release 2018e - 2018-05-01 23:42:51 -0700 Briefly: @@ -9,7 +140,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 'make tarballs' now also builds a rearguard tarball. New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines. - Changes to past and future time stamps + Changes to past and future timestamps North Korea switches back from +0830 to +09 on 2018-05-05. (Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon, @@ -17,9 +148,9 @@ Release 2018e - 2018-05-01 23:42:51 -0700 Bring back the negative-DST changes of 2018a, except be more compatible with data parsers that do not support negative DST. - Also, this now affects historical time stamps in Namibia and the + Also, this now affects historical timestamps in Namibia and the former Czechoslovakia, not just Ireland. The main format now uses - negative DST to model time stamps in Europe/Dublin (from 1971 on), + negative DST to model timestamps in Europe/Dublin (from 1971 on), Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This does not affect UT offsets, only time zone abbreviations and the tm_isdst flag. Also, this does not affect rearguard or vanguard @@ -44,7 +175,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 in tzdata, it could be used to specify the legal time in Namibia 1994-2017, as opposed to the popular time (see below). - Changes to past time stamps + Changes to past timestamps From 1994 through 2017 Namibia observed DST in winter, not summer. That is, it used negative DST, as Ireland still does. This change @@ -54,12 +185,12 @@ Release 2018e - 2018-05-01 23:42:51 -0700 both simply called "standard time" in Namibian law, in common practice winter time was considered to be DST (as noted by Stephen Colebourne). The full effect of this change is only in vanguard - format; in rearguard and main format, the tm_isdst flag is still + and main format; in rearguard format, the tm_isdst flag is still zero in winter and nonzero in summer. In 1946/7 Czechoslovakia also observed negative DST in winter. - The full effect of this change is only in vanguard format; in - rearguard and main formats, it is modeled as plain GMT without + The full effect of this change is only in vanguard and main + formats; in rearguard format, it is modeled as plain GMT without daylight saving. Also, the dates of some 1944/5 DST transitions in Czechoslovakia have been changed. @@ -72,17 +203,17 @@ Release 2018d - 2018-03-22 07:05:46 -0700 Add support for vanguard and rearguard data consumers. Add subsecond precision to source data format, though not to data. - Changes to future time stamps + Changes to future timestamps In 2018, Palestine starts DST on March 24, not March 31. Adjust future predictions accordingly. (Thanks to Sharef Mustafa.) - Changes to past and future time stamps + Changes to past and future timestamps Casey Station in Antarctica changed from +11 to +08 on 2018-03-11 at 04:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Historical transitions for Uruguay, represented by America/Montevideo, have been updated per official legal documents, @@ -224,7 +355,7 @@ Release 2018c - 2018-01-22 23:00:44 -0800 change is reapplied. (Problems reported by Deborah Goldsmith and Stephen Colebourne.) - Changes to past time stamps + Changes to past timestamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) @@ -256,18 +387,18 @@ Release 2018a - 2018-01-12 22:29:21 -0800 Use Debian-style installation locations, instead of 4.3BSD-style. New zic option -t. - Changes to past and future time stamps + Changes to past and future timestamps São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) - Changes to future time stamps + Changes to future timestamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree @@ -355,7 +486,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 A new file tzdata.zi now holds a small text copy of all data. The zic input format has been regularized slightly. - Changes to future time stamps + Changes to future timestamps Northern Cyprus has decided to resume EU rules starting 2017-10-29, thus reinstituting winter time. @@ -381,7 +512,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 2018-03-11 at 03:00. This affects UT offsets starting 2018-11-04 at 02:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03. (Thanks to Arthur David Olson.) @@ -511,11 +642,11 @@ Release 2017b - 2017-03-17 07:30:38 -0700 Briefly: Haiti has resumed DST. - Changes to past and future time stamps + Changes to past and future timestamps Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. @@ -527,7 +658,7 @@ Release 2017b - 2017-03-17 07:30:38 -0700 The reference localtime implementation now falls back on the current US daylight-saving transition rules rather than the 1987-2006 rules. This fallback occurs only when (1) the TZ - environment variable's value has a name like "AST4ADT" that asks + environment variable has a value like "AST4ADT" that asks for daylight saving time but does not specify the rules, (2) there is no file by that name, and (3) the TZDEFRULES file cannot be loaded. (Thanks to Tom Lane.) @@ -538,7 +669,7 @@ Release 2017a - 2017-02-28 00:05:36 -0800 Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia discontinues DST. - Changes to future time stamps + Changes to future timestamps Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) @@ -549,12 +680,12 @@ Release 2017a - 2017-02-28 00:05:36 -0800 assume it's permanent. (Thanks to Juan Correa and Deborah Goldsmith.) This also affects Antarctica/Palmer. - Changes to past time stamps + Changes to past timestamps - Fix many entries for historical time stamps for Europe/Madrid + Fix many entries for historical timestamps for Europe/Madrid before 1979, to agree with tables compiled by Pere Planesas of the National Astronomical Observatory of Spain. As a side effect, - this changes some time stamps for Africa/Ceuta before 1929, which + this changes some timestamps for Africa/Ceuta before 1929, which are probably guesswork anyway. (Thanks to Steve Allen and Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for correcting the 1901 transition.) @@ -645,13 +776,13 @@ Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. - Changes to future time stamps + Changes to future timestamps Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00. This hives off a new zone Europe/Saratov from Europe/Volgograd. (Thanks to Yuri Konotopov and Stepan Golosunov.) - Changes to past time stamps + Changes to past timestamps The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring @@ -687,7 +818,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga reintroduces DST on 2016-11-06. - Changes to future time stamps + Changes to future timestamps Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on 2017-01-15 at 03:00. Assume future observances in Tonga will be @@ -695,7 +826,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 January, like Fiji. (Thanks to Pulu ʻAnau.) Switch to numeric time zone abbreviations for this zone. - Changes to past and future time stamps + Changes to past and future timestamps Northern Cyprus is now +03 year round, causing a split in Cyprus time zones starting 2016-10-30 at 04:00. This creates a zone @@ -704,9 +835,9 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Antarctica/Casey switched from +08 to +11 on 2016-10-22. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps - Several corrections were made for pre-1975 time stamps in Italy. + Several corrections were made for pre-1975 timestamps in Italy. These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and Europe/Vatican. @@ -744,7 +875,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Release 2016h - 2016-10-19 23:17:57 -0700 - Changes to future time stamps + Changes to future timestamps Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not 2016-10-21 at 00:00. (Thanks to Sharef Mustafa.) Predict that @@ -752,7 +883,7 @@ Release 2016h - 2016-10-19 23:17:57 -0700 at 01:00, which is consistent with predicted spring transitions on the last Saturday of March. (Thanks to Tim Parenti.) - Changes to past time stamps + Changes to past timestamps In Turkey, transitions in 1986-1990 were at 01:00 standard time not at 02:00, and the spring 1994 transition was on March 20, not *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Oct 23 01:42:45 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAF59FF0CB2; Tue, 23 Oct 2018 01:42:44 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F83080790; Tue, 23 Oct 2018 01:42:44 +0000 (UTC) (envelope-from philip@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E89AD3F; Tue, 23 Oct 2018 01:42:44 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9N1giPk063626; Tue, 23 Oct 2018 01:42:44 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9N1ghoQ063622; Tue, 23 Oct 2018 01:42:43 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201810230142.w9N1ghoQ063622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Tue, 23 Oct 2018 01:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339631 - stable/10/contrib/tzdata X-SVN-Group: stable-10 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/10/contrib/tzdata X-SVN-Commit-Revision: 339631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 01:42:45 -0000 Author: philip Date: Tue Oct 23 01:42:43 2018 New Revision: 339631 URL: https://svnweb.freebsd.org/changeset/base/339631 Log: MFC r339503: Import tzdata 2018f Modified: stable/10/contrib/tzdata/CONTRIBUTING stable/10/contrib/tzdata/Makefile stable/10/contrib/tzdata/NEWS stable/10/contrib/tzdata/README stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/backward stable/10/contrib/tzdata/backzone stable/10/contrib/tzdata/etcetera stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/factory stable/10/contrib/tzdata/leap-seconds.list stable/10/contrib/tzdata/leapseconds stable/10/contrib/tzdata/leapseconds.awk stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/pacificnew stable/10/contrib/tzdata/southamerica stable/10/contrib/tzdata/systemv stable/10/contrib/tzdata/theory.html stable/10/contrib/tzdata/version stable/10/contrib/tzdata/yearistype.sh stable/10/contrib/tzdata/zishrink.awk stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab stable/10/contrib/tzdata/zoneinfo2tdf.pl Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/CONTRIBUTING ============================================================================== --- stable/10/contrib/tzdata/CONTRIBUTING Tue Oct 23 01:41:07 2018 (r339630) +++ stable/10/contrib/tzdata/CONTRIBUTING Tue Oct 23 01:42:43 2018 (r339631) @@ -17,11 +17,14 @@ To email small changes, please run a POSIX shell comma 'diff -u old/europe new/europe >myfix.patch', and attach myfix.patch to the email. -For more-elaborate changes, please read the theory.html file and browse -the mailing list archives for -examples of patches that tend to work well. Additions to -data should contain commentary citing reliable sources as -justification. Citations should use https: URLs if available. +For more-elaborate or possibly-controversial changes, +such as renaming, adding or removing zones, please read + or the file +theory.html. It is also good to browse the mailing list archives + for examples of patches that tend +to work well. Additions to data should contain commentary citing +reliable sources as justification. Citations should use https: URLs +if available. Please submit changes against either the latest release in or the master branch of the development Modified: stable/10/contrib/tzdata/Makefile ============================================================================== --- stable/10/contrib/tzdata/Makefile Tue Oct 23 01:41:07 2018 (r339630) +++ stable/10/contrib/tzdata/Makefile Tue Oct 23 01:42:43 2018 (r339631) @@ -1,3 +1,5 @@ +# Make and install tzdb code and data. + # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -19,9 +21,9 @@ BUGEMAIL= tz@iana.org # DATAFORM= rearguard DATAFORM= main -# Change the line below for your time zone (after finding the zone you want in -# the time zone files, or adding it to a time zone file). -# Alternatively, if you discover you've got the wrong time zone, you can just +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -l rightzone # to correct things. # Use the command @@ -31,14 +33,14 @@ DATAFORM= main LOCALTIME= GMT # If you want something other than Eastern United States time as a template -# for handling POSIX-style time zone environment variables, -# change the line below (after finding the zone you want in the -# time zone files, or adding it to a time zone file). +# for handling POSIX-style timezone environment variables, +# change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). # When a POSIX-style environment variable is handled, the rules in the # template file are used to determine "spring forward" and "fall back" days and # times; the environment variable itself specifies UT offsets of standard and # daylight saving time. -# Alternatively, if you discover you've got the wrong time zone, you can just +# Alternatively, if you discover you've got the wrong timezone, you can just # zic -p rightzone # to correct things. # Use the command @@ -75,7 +77,7 @@ DESTDIR = # TOPDIR should be empty or an absolute name unless you're just testing. TOPDIR = -# The default local time zone is taken from the file TZDEFAULT. +# The default local timezone is taken from the file TZDEFAULT. TZDEFAULT = $(TOPDIR)/etc/localtime # The subdirectory containing installed program and data files, and @@ -84,7 +86,7 @@ TZDEFAULT = $(TOPDIR)/etc/localtime USRDIR = usr USRSHAREDIR = $(USRDIR)/share -# "Compiled" time zone information is placed in the "TZDIR" directory +# "Compiled" timezone information is placed in the "TZDIR" directory # (and subdirectories). # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. TZDIR_BASENAME= zoneinfo @@ -106,9 +108,13 @@ MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man LIBDIR = $(TOPDIR)/$(USRDIR)/lib -# Types to try, as an alternative to time_t. int64_t should be first. -TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_t +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int64_t +TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t +# What kind of TZif data files to generate. +# (TZif is the binary time zone data format that zic generates.) # If you want only POSIX time, with time values interpreted as # seconds since the epoch (not counting leap seconds), use # REDO= posix_only @@ -129,7 +135,7 @@ TIME_T_ALTERNATIVES = int64_t int32_t uint32_t uint64_ REDO= posix_right -# To install data in text form that has all the information of the binary data, +# To install data in text form that has all the information of the TZif data, # (optionally incorporating leap second information), use # TZDATA_TEXT= tzdata.zi leapseconds # To install text data without leap second information (e.g., because @@ -171,7 +177,6 @@ LDLIBS= # Add the following to the end of the "CFLAGS=" line as needed to override # defaults specified in the source code. "-DFOO" is equivalent to "-DFOO=1". -# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c) # -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime # formats that generate only the last two digits of year numbers # -DEPOCH_LOCAL if the 'time' function returns local time not UT @@ -295,7 +300,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", # "posix2time", and "time2posix" to be added to the time conversion library. # "tzsetwall" is like "tzset" except that it arranges for local wall clock -# time (rather than the time specified in the TZ environment variable) +# time (rather than the timezone specified in the TZ environment variable) # to be used. # "offtime" is like "gmtime" except that it accepts a second (long) argument # that gives an offset to add to the time_t when converting it. @@ -318,7 +323,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ # "posix2time_z" and "time2posix_z" are added as well. # The functions ending in "_z" (or "_rz") are like their unsuffixed # (or suffixed-by-"_r") counterparts, except with an extra first -# argument of opaque type timezone_t that specifies the time zone. +# argument of opaque type timezone_t that specifies the timezone. # "tzalloc" allocates a timezone_t value, and "tzfree" frees it. # # If you want to allocate state structures in localtime, add @@ -357,11 +362,14 @@ ZIC= $(zic) $(ZFLAGS) ZFLAGS= -# How to use zic to install tz binary files. +# How to use zic to install TZif files. ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS) # The name of a Posix-compliant 'awk' on your system. +# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core; +# on Ubuntu you can work around this with +# AWK= gawk AWK= awk # The full path name of a Posix-compliant shell, preferably one that supports @@ -410,10 +418,16 @@ SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' +# These characters are Latin-1, and so are likely to be displayable +# even in editors with limited character sets. +UNUSUAL_OK_LATIN_1 = «°±»½¾× +# This IPA symbol is represented in Unicode as the composition of +# U+0075 and U+032F, and U+032F is not considered alphabetic by some +# grep implementations that do not grok composition. +UNUSUAL_OK_IPA = u̯ # Non-ASCII non-letters that OK_CHAR allows, as these characters are -# useful in commentary. XEmacs 21.5.34 displays them correctly, -# presumably because they are Latin-1. -UNUSUAL_OK_CHARSET= °±½¾× +# useful in commentary. +UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1)$(UNUSUAL_OK_IPA) # OK_CHAR matches any character allowed in the distributed files. # This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and @@ -492,11 +506,14 @@ AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.a ziguard.awk zishrink.awk MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) TZS= to$(TZS_YEAR).tzs TZS_NEW= to$(TZS_YEAR)new.tzs TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c -ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) # Consult these files when deciding whether to rebuild the 'version' file. # This list is not the same as the output of 'git ls-files', since @@ -560,14 +577,21 @@ version: $(VERSION_DEPS) printf '%s\n' "$$V" >$@.out mv $@.out $@ -# These files can be tailored by setting BACKWARD, PACKRATDATA, etc. +# These files can be tailored by setting BACKWARD and PACKRATDATA. vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) $(AWK) -v DATAFORM=`expr $@ : '\(.*\).zi'` -f ziguard.awk \ $(TDATA) $(PACKRATDATA) >$@.out mv $@.out $@ -tzdata.zi: $(DATAFORM).zi version +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk version=`sed 1q version` && \ - LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \ + LC_ALL=C $(AWK) \ + -v dataform='$(DATAFORM)' \ + -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \ + -v redo='$(REDO)' \ + -v version="$$version" \ + -f zishrink.awk \ $(DATAFORM).zi >$@.out mv $@.out $@ @@ -605,14 +629,16 @@ INSTALLARGS = \ YEARISTYPE='$(YEARISTYPE)' \ ZIC='$(ZIC)' -# 'make install_data' installs one set of tz binary files. -install_data: zic leapseconds yearistype tzdata.zi +INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi + +# 'make install_data' installs one set of TZif files. +install_data: $(INSTALL_DATA_DEPS) $(ZIC_INSTALL) tzdata.zi -posix_only: +posix_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data -right_only: +right_only: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \ install_data @@ -639,7 +665,7 @@ posix_right: posix_only # This obsolescent rule is present for backwards compatibility with # tz releases 2014g through 2015g. It should go away eventually. -posix_packrat: +posix_packrat: $(INSTALL_DATA_DEPS) $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only zones: $(REDO) @@ -650,29 +676,33 @@ ZDS = dummy.zd # Rule used only by submakes invoked by the $(TZS_NEW) rule. # It is separate so that GNU 'make -j' can run instances in parallel. $(ZDS): zdump - ./zdump -i -c $(TZS_YEAR) '$(wd)/'$$(expr $@ : '\(.*\).zd') >$@ + ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') \ + >$@ -$(TZS_NEW): tzdata.zi zdump zic - rm -fr tzs.dir - mkdir tzs.dir - $(zic) -d tzs.dir tzdata.zi +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ tzdata.zi | LC_ALL=C sort >$@.out wd=`pwd` && \ - set x `$(AWK) '/^Z/{print "tzs.dir/" $$2 ".zd"}' tzdata.zi \ + x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ | LC_ALL=C sort -t . -k 2,2` && \ + set x $$x && \ shift && \ ZDS=$$* && \ - $(MAKE) wd="$$wd" TZS_YEAR=$(TZS_YEAR) ZDS="$$ZDS" $$ZDS && \ - sed 's,^TZ=".*tzs\.dir/,TZ=",' $$ZDS >>$@.out - rm -fr tzs.dir + $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir mv $@.out $@ -# If $(TZS) does not already exist (e.g., old-format tarballs), create it. -# If it exists but 'make check_tzs' fails, a maintainer should inspect the +# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the # failed output and fix the inconsistency, perhaps by running 'make force_tzs'. $(TZS): - $(MAKE) force_tzs + touch $@ force_tzs: $(TZS_NEW) cp $(TZS_NEW) $(TZS) @@ -711,18 +741,21 @@ check_character_set: $(ENCHILADA) $(MISC) $(SOURCES) $(WEB_PAGES) \ CONTRIBUTING LICENSE README \ version tzdata.zi && \ - ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_CHARSET='$(OK_CHAR)'*$$' \ + ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \ leapseconds yearistype.sh zone.tab && \ ! grep -Env $(OK_LINE) $(ENCHILADA); \ } + touch $@ check_white_space: $(ENCHILADA) patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \ - ! grep -En "$$pat" $(ENCHILADA) + ! grep -En "$$pat" \ + $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) ! grep -n '[[:space:]]$$' \ $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list) + touch $@ PRECEDES_FILE_NAME = ^(Zone|Link[[:space:]]+[^[:space:]]+)[[:space:]]+ FILE_NAME_COMPONENT_TOO_LONG = \ @@ -731,6 +764,7 @@ FILE_NAME_COMPONENT_TOO_LONG = \ check_name_lengths: $(TDATA_TO_CHECK) backzone ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \ $(TDATA_TO_CHECK) backzone + touch $@ CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; } @@ -743,52 +777,61 @@ check_sorted: backward backzone iso3166.tab zone.tab z LC_ALL=C sort -c $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \ LC_ALL=C sort -cu + touch $@ check_links: checklinks.awk $(TDATA_TO_CHECK) tzdata.zi $(AWK) -f checklinks.awk $(TDATA_TO_CHECK) $(AWK) -f checklinks.awk tzdata.zi + touch $@ check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) for tab in $(ZONETABLES); do \ $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ || exit; \ done + touch $@ check_tzs: $(TZS) $(TZS_NEW) - diff -u $(TZS) $(TZS_NEW) + if test -s $(TZS); then \ + diff -u $(TZS) $(TZS_NEW); \ + else \ + cp $(TZS_NEW) $(TZS); \ + fi + touch $@ # This checks only the HTML 4.01 strict page. # To check the the other pages, use . check_web: tz-how-to.html $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html + touch $@ # Check that zishrink.awk does not alter the data, and that ziguard.awk # preserves main-format data. -check_zishrink: zic leapseconds $(PACKRATDATA) $(TDATA) \ - $(DATAFORM).zi tzdata.zi - for type in posix right; do \ - mkdir -p time_t.dir/$$type time_t.dir/$$type-t \ - time_t.dir/$$type-shrunk && \ - case $$type in \ - right) leap='-L leapseconds';; \ - *) leap=;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type $(DATAFORM).zi && \ +check_zishrink: check_zishrink_posix check_zishrink_right +check_zishrink_posix check_zishrink_right: \ + zic leapseconds $(PACKRATDATA) $(TDATA) $(DATAFORM).zi tzdata.zi + rm -fr $@.dir $@-t.dir $@-shrunk.dir + mkdir $@.dir $@-t.dir $@-shrunk.dir + case $@ in \ + *_right) leap='-L leapseconds';; \ + *) leap=;; \ + esac && \ + $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \ + $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \ case $(DATAFORM) in \ main) \ - $(ZIC) $$leap -d time_t.dir/$$type-t $(TDATA) && \ + $(ZIC) $$leap -d $@-t.dir $(TDATA) && \ $(AWK) '/^Rule/' $(TDATA) | \ - $(ZIC) $$leap -d time_t.dir/$$type-t - \ - $(PACKRATDATA) && \ - diff -r time_t.dir/$$type time_t.dir/$$type-t;; \ - esac && \ - $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \ - diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \ - done - rm -fr time_t.dir + $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \ + diff -r $@.dir $@-t.dir;; \ + esac + diff -r $@.dir $@-shrunk.dir + rm -fr $@.dir $@-t.dir $@-shrunk.dir + touch $@ clean_misc: - rm -f core *.o *.out \ + rm -f *.o *.out $(TIME_T_ALTERNATIVES) \ + check_* core typecheck_* \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc rm -fr *.dir *.zi tzdb-*/ $(TZS_NEW) @@ -818,17 +861,17 @@ $(MANTXTS): workman.sh LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out mv $@.out $@ -# Set the time stamps to those of the git repository, if available, +# Set the timestamps to those of the git repository, if available, # and if the files have not changed since then. # This uses GNU 'touch' syntax 'touch -d@N FILE', # where N is the number of seconds since 1970. # If git or GNU 'touch' is absent, don't bother to sync with git timestamps. # Also, set the timestamp of each prebuilt file like 'leapseconds' # to be the maximum of the files it depends on. -set-timestamps.out: $(ENCHILADA) +set-timestamps.out: $(EIGHT_YARDS) rm -f $@ if (type git) >/dev/null 2>&1 && \ - files=`git ls-files $(ENCHILADA)` && \ + files=`git ls-files $(EIGHT_YARDS)` && \ touch -md @1 test.out; then \ rm -f test.out && \ for file in $$files; do \ @@ -846,83 +889,100 @@ set-timestamps.out: $(ENCHILADA) exit; \ done touch -cmr `ls -t $(TZDATA_ZI_DEPS) | sed 1q` tzdata.zi - touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version touch $@ +set-tzs-timestamp.out: $(TZS) + touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS) + touch $@ # The zics below ensure that each data file can stand on its own. # We also do an all-files run to catch links to links. -check_public: - $(MAKE) maintainer-clean - $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - mkdir -p public.dir - for i in $(TDATA_TO_CHECK) tzdata.zi; do \ - $(zic) -v -d public.dir $$i 2>&1 || exit; \ +check_public: $(VERSION_DEPS) + rm -fr public.dir + mkdir public.dir + ln $(VERSION_DEPS) public.dir + cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done - $(zic) -v -d public.dir $(TDATA_TO_CHECK) + public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) rm -fr public.dir + touch $@ # Check that the code works under various alternative # implementations of time_t. -check_time_t_alternatives: - if diff -q Makefile Makefile 2>/dev/null; then \ - quiet_option='-q'; \ - else \ - quiet_option=''; \ - fi && \ +check_time_t_alternatives: $(TIME_T_ALTERNATIVES) +$(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD) +$(TIME_T_ALTERNATIVES): $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + case $@ in \ + int32_t) range=-2147483648,2147483648;; \ + u*) range=0,4294967296;; \ + *) range=-4294967296,4294967296;; \ + esac && \ wd=`pwd` && \ zones=`$(AWK) '/^[^#]/ { print $$3 }' time_t.dir/int64_t.out && \ - time_t.dir/$$type/usr/bin/zdump -V -t $$range $$zones \ - >time_t.dir/$$type.out && \ - diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \ - || exit; \ - done - rm -fr time_t.dir + D=$$wd/$@.dir \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + install $$range_target) && \ + test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \ + (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \ + $(MAKE) TOPDIR="$$wd/$@.dir" \ + TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \ + D=$$wd/$@.dir \ + to$$range.tzs) && \ + diff -u $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \ + $@.dir/to$$range.tzs && \ + if diff -q Makefile Makefile 2>/dev/null; then \ + quiet_option='-q'; \ + else \ + quiet_option=''; \ + fi && \ + diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \ + $@.dir/etc && \ + diff $$quiet_option -r \ + $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \ + $@.dir/usr/share; \ + } + touch $@ TRADITIONAL_ASC = \ tzcode$(VERSION).tar.gz.asc \ tzdata$(VERSION).tar.gz.asc -ALL_ASC = $(TRADITIONAL_ASC) \ - tzdata$(VERSION)-rearguard.tar.gz.asc \ +REARGUARD_ASC = \ + tzdata$(VERSION)-rearguard.tar.gz.asc +ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \ tzdb-$(VERSION).tar.lz.asc -tarballs traditional_tarballs signatures traditional_signatures: version +tarballs rearguard_tarballs traditional_tarballs \ +signatures rearguard_signatures traditional_signatures: \ + version set-timestamps.out rearguard.zi VERSION=`cat version` && \ $(MAKE) VERSION="$$VERSION" $@_version # These *_version rules are intended for use if VERSION is set by some # other means. Ordinarily these rules are used only by the above # non-_version rules, which set VERSION on the 'make' command line. -tarballs_version: traditional_tarballs_version \ - tzdata$(VERSION)-rearguard.tar.gz \ +tarballs_version: traditional_tarballs_version rearguard_tarballs_version \ tzdb-$(VERSION).tar.lz +rearguard_tarballs_version: \ + tzdata$(VERSION)-rearguard.tar.gz traditional_tarballs_version: \ tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz signatures_version: $(ALL_ASC) +rearguard_signatures_version: $(REARGUARD_ASC) traditional_signatures_version: $(TRADITIONAL_ASC) tzcode$(VERSION).tar.gz: set-timestamps.out @@ -958,7 +1018,7 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-ti gzip $(GZIPFLAGS)) >$@.out mv $@.out $@ -tzdb-$(VERSION).tar.lz: set-timestamps.out +tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) ln $(ENCHILADA) tzdb-$(VERSION) @@ -972,16 +1032,26 @@ tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz $(ALL_ASC): - gpg --armor --detach-sign $? + gpg2 --armor --detach-sign $? -typecheck: - $(MAKE) clean - for i in "long long" unsigned; \ - do \ - $(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \ - ./zdump -v Europe/Rome ; \ - $(MAKE) clean ; \ - done +TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T +typecheck: typecheck_long_long typecheck_unsigned +typecheck_long_long typecheck_unsigned: $(VERSION_DEPS) + rm -fr $@.dir + mkdir $@.dir + ln $(VERSION_DEPS) $@.dir + cd $@.dir && \ + case $@ in \ + *_long_long) i="long long";; \ + *_unsigned ) i="unsigned" ;; \ + esac && \ + typecheck_cflags='' && \ + $(MAKE) \ + CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \ + TOPDIR="`pwd`" \ + install + $@.dir/zdump -i -c 1970,1971 Europe/Rome + touch $@ zonenames: tzdata.zi @$(AWK) '/^Z/ { print $$2 } /^L/ { print $$3 }' tzdata.zi @@ -997,14 +1067,14 @@ zic.o: private.h tzfile.h version.h .KEEP_STATE: .PHONY: ALL INSTALL all -.PHONY: check check_character_set check_links check_name_lengths -.PHONY: check_public check_sorted check_tables -.PHONY: check_time_t_alternatives check_tzs check_web check_white_space +.PHONY: check check_time_t_alternatives .PHONY: check_zishrink .PHONY: clean clean_misc dummy.zd force_tzs .PHONY: install install_data maintainer-clean names -.PHONY: posix_only posix_packrat posix_right -.PHONY: public right_only right_posix signatures signatures_version +.PHONY: posix_only posix_packrat posix_right public +.PHONY: rearguard_signatures rearguard_signatures_version +.PHONY: rearguard_tarballs rearguard_tarballs_version +.PHONY: right_only right_posix signatures signatures_version .PHONY: tarballs tarballs_version .PHONY: traditional_signatures traditional_signatures_version .PHONY: traditional_tarballs traditional_tarballs_version Modified: stable/10/contrib/tzdata/NEWS ============================================================================== --- stable/10/contrib/tzdata/NEWS Tue Oct 23 01:41:07 2018 (r339630) +++ stable/10/contrib/tzdata/NEWS Tue Oct 23 01:42:43 2018 (r339631) @@ -1,5 +1,136 @@ News for the tz database +Release 2018f - 2018-10-18 00:14:18 -0700 + + Briefly: + Volgograd moves from +03 to +04 on 2018-10-28. + Fiji ends DST 2019-01-13, not 2019-01-20. + Most of Chile changes DST dates, effective 2019-04-06. + + Changes to future timestamps + + Volgograd moves from +03 to +04 on 2018-10-28 at 02:00. + (Thanks to Alexander Fetisov and Stepan Golosunov.) + + Fiji ends DST 2019-01-13 instead of the 2019-01-20 previously + predicted. (Thanks to Raymond Kumar.) Adjust future predictions + accordingly. + + Most of Chile will end DST on the first Saturday in April at 24:00 mainland + time, and resume DST on the first Saturday in September at 24:00 mainland + time. The changes are effective from 2019-04-06, and do not affect the + Magallanes region modeled by America/Punta_Arenas. (Thanks to Juan Correa + and Tim Parenti.) Adjust future predictions accordingly. + + Changes to past timestamps + + The 2018-05-05 North Korea 30-minute time zone change took place + at 23:30 the previous day, not at 00:00 that day. + + China's 1988 spring-forward transition was on April 17, not + April 10. Its DST transitions in 1986/91 were at 02:00, not 00:00. + (Thanks to P Chan.) + + Fix several issues for Macau before 1992. Macau's pre-1904 LMT + was off by 10 s. Macau switched to +08 in 1904 not 1912, and + temporarily switched to +09/+10 during World War II. Macau + observed DST in 1942/79, not 1961/80, and there were several + errors for transition times and dates. (Thanks to P Chan.) + + The 1948-1951 fallback transitions in Japan were at 25:00 on + September's second Saturday, not at 24:00. (Thanks to Phake Nick.) + zic turns this into 01:00 on the day after September's second + Saturday, which is the best that POSIX or C platforms can do. + + Incorporate 1940-1949 Asia/Shanghai DST transitions from a 2014 + paper by Li Yu, replacing more-questionable data from Shanks. + + Changes to time zone abbreviations + + Use "PST" and "PDT" for Philippine time. (Thanks to Paul Goyette.) + + Changes to code + + zic now always generates TZif files where time type 0 is used for + timestamps before the first transition. This simplifies the + reading of TZif files and should not affect behavior of existing + TZif readers because the same set of time types is used; only + their internal indexes may have changed. This affects only the + legacy zones EST5EDT, CST6CDT, MST7MDT, PST8PDT, CET, MET, and + EET, which previously used nonzero types for these timestamps. + + Because of the type 0 change, zic no longer outputs a dummy + transition at time -2**59 (before the Big Bang), as clients should + no longer need this to handle historical timestamps correctly. + This reverts a change introduced in 2013d and shrinks most TZif + files by a few bytes. + + zic now supports negative time-of-day in Rule and Leap lines, e.g., + "Rule X min max - Apr lastSun -6:00 1:00 -" means the transition + occurs at 18:00 on the Saturday before the last Sunday in April. + This behavior was documented in 2018a but the code did not + entirely match the documentation. + + localtime.c no longer requires at least one time type in TZif + files that lack transitions or have a POSIX-style TZ string. This + future-proofs the code against possible future extensions to the + format that would allow TZif files with POSIX-style TZ strings and + without transitions or time types. + + A read-access subscript error in localtime.c has been fixed. + It could occur only in TZif files with timecnt == 0, something that + does not happen in practice now but could happen in future versions. + + localtime.c no longer ignores TZif POSIX-style TZ strings that + specify only standard time. Instead, these TZ strings now + override the default time type for timestamps after the last + transition (or for all time stamps if there are no transitions), + just as DST strings specifying DST have always done. + + leapseconds.awk now outputs "#updated" and "#expires" comments, + and supports leap seconds at the ends of months other than June + and December. (Inspired by suggestions from Chris Woodbury.) + + Changes to documentation + + New restrictions: A Rule name must start with a character that + is neither an ASCII digit nor "-" nor "+", and an unquoted name + should not use characters in the set "!$%&'()*,/:;<=>?@[\]^`{|}~". + The latter restriction makes room for future extensions (a + possibility noted by Tom Lane). + + tzfile.5 now documents what time types apply before the first and + after the last transition, if any. + + Documentation now uses the spelling "timezone" for a TZ setting + that determines timestamp history, and "time zone" for a + geographic region currently sharing the same standard time. + + The name "TZif" is now used for the tz binary data format. + + tz-link.htm now mentions the A0 TimeZone Migration utilities. + (Thanks to Aldrin Martoq for the link.) + + Changes to build procedure + + New 'make' target 'rearguard_tarballs' to build the rearguard + tarball only. This is a convenience on platforms that lack lzip + if you want to build the rearguard tarball. (Problem reported by + Deborah Goldsmith.) + + tzdata.zi is now more stable from release to release. (Problem + noted by Tom Lane.) It is also a bit shorter. + + tzdata.zi now can contain comment lines documenting configuration + information, such as which data format was selected, which input + files were used, and how leap seconds are treated. (Problems + noted by Lester Caine and Brian Inglis.) If the Makefile defaults + are used these comment lines are absent, for backward + compatibility. A redistributor intending to alter its copy of the + files should also append "-LABEL" to the 'version' file's first + line, where "LABEL" identifies the redistributor's change. + + Release 2018e - 2018-05-01 23:42:51 -0700 Briefly: @@ -9,7 +140,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 'make tarballs' now also builds a rearguard tarball. New 's' and 'd' suffixes in SAVE columns of Rule and Zone lines. - Changes to past and future time stamps + Changes to past and future timestamps North Korea switches back from +0830 to +09 on 2018-05-05. (Thanks to Kang Seonghoon, Arthur David Olson, Seo Sanghyeon, @@ -17,9 +148,9 @@ Release 2018e - 2018-05-01 23:42:51 -0700 Bring back the negative-DST changes of 2018a, except be more compatible with data parsers that do not support negative DST. - Also, this now affects historical time stamps in Namibia and the + Also, this now affects historical timestamps in Namibia and the former Czechoslovakia, not just Ireland. The main format now uses - negative DST to model time stamps in Europe/Dublin (from 1971 on), + negative DST to model timestamps in Europe/Dublin (from 1971 on), Europe/Prague (1946/7), and Africa/Windhoek (1994/2017). This does not affect UT offsets, only time zone abbreviations and the tm_isdst flag. Also, this does not affect rearguard or vanguard @@ -44,7 +175,7 @@ Release 2018e - 2018-05-01 23:42:51 -0700 in tzdata, it could be used to specify the legal time in Namibia 1994-2017, as opposed to the popular time (see below). - Changes to past time stamps + Changes to past timestamps From 1994 through 2017 Namibia observed DST in winter, not summer. That is, it used negative DST, as Ireland still does. This change @@ -54,12 +185,12 @@ Release 2018e - 2018-05-01 23:42:51 -0700 both simply called "standard time" in Namibian law, in common practice winter time was considered to be DST (as noted by Stephen Colebourne). The full effect of this change is only in vanguard - format; in rearguard and main format, the tm_isdst flag is still + and main format; in rearguard format, the tm_isdst flag is still zero in winter and nonzero in summer. In 1946/7 Czechoslovakia also observed negative DST in winter. - The full effect of this change is only in vanguard format; in - rearguard and main formats, it is modeled as plain GMT without + The full effect of this change is only in vanguard and main + formats; in rearguard format, it is modeled as plain GMT without daylight saving. Also, the dates of some 1944/5 DST transitions in Czechoslovakia have been changed. @@ -72,17 +203,17 @@ Release 2018d - 2018-03-22 07:05:46 -0700 Add support for vanguard and rearguard data consumers. Add subsecond precision to source data format, though not to data. - Changes to future time stamps + Changes to future timestamps In 2018, Palestine starts DST on March 24, not March 31. Adjust future predictions accordingly. (Thanks to Sharef Mustafa.) - Changes to past and future time stamps + Changes to past and future timestamps Casey Station in Antarctica changed from +11 to +08 on 2018-03-11 at 04:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Historical transitions for Uruguay, represented by America/Montevideo, have been updated per official legal documents, @@ -224,7 +355,7 @@ Release 2018c - 2018-01-22 23:00:44 -0800 change is reapplied. (Problems reported by Deborah Goldsmith and Stephen Colebourne.) - Changes to past time stamps + Changes to past timestamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) @@ -256,18 +387,18 @@ Release 2018a - 2018-01-12 22:29:21 -0800 Use Debian-style installation locations, instead of 4.3BSD-style. New zic option -t. - Changes to past and future time stamps + Changes to past and future timestamps São Tomé and Príncipe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) - Changes to future time stamps + Changes to future timestamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree @@ -355,7 +486,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 A new file tzdata.zi now holds a small text copy of all data. The zic input format has been regularized slightly. - Changes to future time stamps + Changes to future timestamps Northern Cyprus has decided to resume EU rules starting 2017-10-29, thus reinstituting winter time. @@ -381,7 +512,7 @@ Release 2017c - 2017-10-20 14:49:34 -0700 2018-03-11 at 03:00. This affects UT offsets starting 2018-11-04 at 02:00. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Namibia switched from +02 to +01 on 1994-03-21, not 1994-04-03. (Thanks to Arthur David Olson.) @@ -511,11 +642,11 @@ Release 2017b - 2017-03-17 07:30:38 -0700 Briefly: Haiti has resumed DST. - Changes to past and future time stamps + Changes to past and future timestamps Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. @@ -527,7 +658,7 @@ Release 2017b - 2017-03-17 07:30:38 -0700 The reference localtime implementation now falls back on the current US daylight-saving transition rules rather than the 1987-2006 rules. This fallback occurs only when (1) the TZ - environment variable's value has a name like "AST4ADT" that asks + environment variable has a value like "AST4ADT" that asks for daylight saving time but does not specify the rules, (2) there is no file by that name, and (3) the TZDEFRULES file cannot be loaded. (Thanks to Tom Lane.) @@ -538,7 +669,7 @@ Release 2017a - 2017-02-28 00:05:36 -0800 Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia discontinues DST. - Changes to future time stamps + Changes to future timestamps Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) @@ -549,12 +680,12 @@ Release 2017a - 2017-02-28 00:05:36 -0800 assume it's permanent. (Thanks to Juan Correa and Deborah Goldsmith.) This also affects Antarctica/Palmer. - Changes to past time stamps + Changes to past timestamps - Fix many entries for historical time stamps for Europe/Madrid + Fix many entries for historical timestamps for Europe/Madrid before 1979, to agree with tables compiled by Pere Planesas of the National Astronomical Observatory of Spain. As a side effect, - this changes some time stamps for Africa/Ceuta before 1929, which + this changes some timestamps for Africa/Ceuta before 1929, which are probably guesswork anyway. (Thanks to Steve Allen and Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for correcting the 1901 transition.) @@ -645,13 +776,13 @@ Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. - Changes to future time stamps + Changes to future timestamps Saratov, Russia switches from +03 to +04 on 2016-12-04 at 02:00. This hives off a new zone Europe/Saratov from Europe/Volgograd. (Thanks to Yuri Konotopov and Stepan Golosunov.) - Changes to past time stamps + Changes to past timestamps The new zone Asia/Atyrau for Atyraū Region, Kazakhstan, is like Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring @@ -687,7 +818,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga reintroduces DST on 2016-11-06. - Changes to future time stamps + Changes to future timestamps Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on 2017-01-15 at 03:00. Assume future observances in Tonga will be @@ -695,7 +826,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 January, like Fiji. (Thanks to Pulu ʻAnau.) Switch to numeric time zone abbreviations for this zone. - Changes to past and future time stamps + Changes to past and future timestamps Northern Cyprus is now +03 year round, causing a split in Cyprus time zones starting 2016-10-30 at 04:00. This creates a zone @@ -704,9 +835,9 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Antarctica/Casey switched from +08 to +11 on 2016-10-22. (Thanks to Steffen Thorsen.) - Changes to past time stamps + Changes to past timestamps - Several corrections were made for pre-1975 time stamps in Italy. + Several corrections were made for pre-1975 timestamps in Italy. These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and Europe/Vatican. @@ -744,7 +875,7 @@ Release 2016i - 2016-11-01 23:19:52 -0700 Release 2016h - 2016-10-19 23:17:57 -0700 - Changes to future time stamps + Changes to future timestamps Asia/Gaza and Asia/Hebron end DST on 2016-10-29 at 01:00, not 2016-10-21 at 00:00. (Thanks to Sharef Mustafa.) Predict that @@ -752,7 +883,7 @@ Release 2016h - 2016-10-19 23:17:57 -0700 at 01:00, which is consistent with predicted spring transitions on the last Saturday of March. (Thanks to Tim Parenti.) - Changes to past time stamps + Changes to past timestamps In Turkey, transitions in 1986-1990 were at 01:00 standard time not at 02:00, and the spring 1994 transition was on March 20, not *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Oct 23 03:30:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C8D4FFDE6C; Tue, 23 Oct 2018 03:30:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E17A485C18; Tue, 23 Oct 2018 03:30:14 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C261C1FB9; Tue, 23 Oct 2018 03:30:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9N3UEOg015741; Tue, 23 Oct 2018 03:30:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9N3UEVg015739; Tue, 23 Oct 2018 03:30:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201810230330.w9N3UEVg015739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 23 Oct 2018 03:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339633 - in stable/12: . sys/dev/drm2 X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in stable/12: . sys/dev/drm2 X-SVN-Commit-Revision: 339633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 03:30:15 -0000 Author: imp Date: Tue Oct 23 03:30:14 2018 New Revision: 339633 URL: https://svnweb.freebsd.org/changeset/base/339633 Log: MFC 339475: improve drm messaging in driver and UPDATING Approved by: re@ (rgrimes) Modified: stable/12/UPDATING stable/12/sys/dev/drm2/drm_os_freebsd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/UPDATING ============================================================================== --- stable/12/UPDATING Tue Oct 23 01:56:52 2018 (r339632) +++ stable/12/UPDATING Tue Oct 23 03:30:14 2018 (r339633) @@ -20,6 +20,31 @@ from older version of current across the gcc/clang cut The stable/12 branch has been created in subversion from head revision r339432. +20181015: + Ports for the DRM modules have been simplified. Now, amd64 users should + just install the drm-kmod port. All others should install + drm-legacy-kmod. + + Graphics hardware that's newer than about 2010 usually works with + drm-kmod. For hardware older than 2013, however, some users will need + to use drm-legacy-kmod if drm-kmod doesn't work for them. Hardware older + than 2008 usually only works in drm-legacy-kmod. The graphics team can + only commit to hardware made since 2013 due to the complexity of the + market and difficulty to test all the older cards effectively. If you + have hardware supported by drm-kmod, you are strongly encouraged to use + that as you will get better support. + + Other than KPI chasing, drm-legacy-kmod will not be updated. As outlined + elsewhere, the drm and drm2 modules will be eliminated from the src base + soon (with a limited exception for arm). Please update to the package asap + and report any issues to x11@freebsd.org. + + Generally, anybody using the drm*-kmod packages should add + WITHOUT_DRM_MODULE=t and WITHOUT_DRM2_MODULE=t to avoid nasty + cross-threading surprises, especially with automatic driver + loading from X11 startup. These will become the defaults in 13-current + shortly. + 20181009: OpenSSL has been updated to version 1.1.1. This update included additional various API changes througout the base system. It is Modified: stable/12/sys/dev/drm2/drm_os_freebsd.h ============================================================================== --- stable/12/sys/dev/drm2/drm_os_freebsd.h Tue Oct 23 01:56:52 2018 (r339632) +++ stable/12/sys/dev/drm2/drm_os_freebsd.h Tue Oct 23 03:30:14 2018 (r339633) @@ -154,8 +154,8 @@ typedef void irqreturn_t; *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ (vm_offset_t)(offset)) = htole64(val) -#ifdef __LP64__ -#define DRM_PORT "graphics/drm-stable-kmod" +#ifdef amd64 +#define DRM_PORT "graphics/drm-kmod" #else #define DRM_PORT "graphics/drm-legacy-kmod" #endif From owner-svn-src-stable@freebsd.org Tue Oct 23 07:24:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 907B4106EC9C; Tue, 23 Oct 2018 07:24:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 462108E73B; Tue, 23 Oct 2018 07:24:04 +0000 (UTC) (envelope-from kp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FE714C50; Tue, 23 Oct 2018 07:24:04 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9N7O4Nw037109; Tue, 23 Oct 2018 07:24:04 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9N7O4NX037108; Tue, 23 Oct 2018 07:24:04 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201810230724.w9N7O4NX037108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 23 Oct 2018 07:24:04 +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: r339638 - stable/11/sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/netpfil/pf X-SVN-Commit-Revision: 339638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 07:24:04 -0000 Author: kp Date: Tue Oct 23 07:24:03 2018 New Revision: 339638 URL: https://svnweb.freebsd.org/changeset/base/339638 Log: MFC r338698: Significantly improve pf purge cpu usage by only taking locks when there is work to do. This reduces CPU consumption to one third on systems. This will help keep the thread CPU usage under control now that the default hash size has increased. Modified: stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Tue Oct 23 06:31:31 2018 (r339637) +++ stable/11/sys/netpfil/pf/pf.c Tue Oct 23 07:24:03 2018 (r339638) @@ -1707,24 +1707,28 @@ pf_purge_expired_states(u_int i, int maxcheck) while (maxcheck > 0) { ih = &V_pf_idhash[i]; + + /* only take the lock if we expect to do work */ + if (!LIST_EMPTY(&ih->states)) { relock: - PF_HASHROW_LOCK(ih); - LIST_FOREACH(s, &ih->states, entry) { - if (pf_state_expires(s) <= time_uptime) { - V_pf_status.states -= - pf_unlink_state(s, PF_ENTER_LOCKED); - goto relock; + PF_HASHROW_LOCK(ih); + LIST_FOREACH(s, &ih->states, entry) { + if (pf_state_expires(s) <= time_uptime) { + V_pf_status.states -= + pf_unlink_state(s, PF_ENTER_LOCKED); + goto relock; + } + s->rule.ptr->rule_flag |= PFRULE_REFS; + if (s->nat_rule.ptr != NULL) + s->nat_rule.ptr->rule_flag |= PFRULE_REFS; + if (s->anchor.ptr != NULL) + s->anchor.ptr->rule_flag |= PFRULE_REFS; + s->kif->pfik_flags |= PFI_IFLAG_REFS; + if (s->rt_kif) + s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; } - s->rule.ptr->rule_flag |= PFRULE_REFS; - if (s->nat_rule.ptr != NULL) - s->nat_rule.ptr->rule_flag |= PFRULE_REFS; - if (s->anchor.ptr != NULL) - s->anchor.ptr->rule_flag |= PFRULE_REFS; - s->kif->pfik_flags |= PFI_IFLAG_REFS; - if (s->rt_kif) - s->rt_kif->pfik_flags |= PFI_IFLAG_REFS; + PF_HASHROW_UNLOCK(ih); } - PF_HASHROW_UNLOCK(ih); /* Return when we hit end of hash. */ if (++i > pf_hashmask) { From owner-svn-src-stable@freebsd.org Tue Oct 23 13:12:43 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78A74FD79DE; Tue, 23 Oct 2018 13:12:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2CDBB7BD4A; Tue, 23 Oct 2018 13:12:43 +0000 (UTC) (envelope-from avg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27D141061F; Tue, 23 Oct 2018 13:12:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9NDCh7Y021548; Tue, 23 Oct 2018 13:12:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9NDCgrv021544; Tue, 23 Oct 2018 13:12:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201810231312.w9NDCgrv021544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 23 Oct 2018 13:12:42 +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: r339650 - in stable/11/sys/contrib/ck/include: . gcc/x86 gcc/x86_64 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys/contrib/ck/include: . gcc/x86 gcc/x86_64 X-SVN-Commit-Revision: 339650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 13:12:43 -0000 Author: avg Date: Tue Oct 23 13:12:42 2018 New Revision: 339650 URL: https://svnweb.freebsd.org/changeset/base/339650 Log: MFC r336634: MFV CK@r336629: Import CK as of commit 1c1f9901c2dea7a883342cd03d3906a1bc482583 This adds CK_SLIST_INSERT_PREVPTR and CK_SLIST_REMOVE_PREVPTR macros as well as ck_pr_dec_is_zero family of functions. Modified: stable/11/sys/contrib/ck/include/ck_pr.h stable/11/sys/contrib/ck/include/ck_queue.h stable/11/sys/contrib/ck/include/gcc/x86/ck_pr.h stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/ck/include/ck_pr.h ============================================================================== --- stable/11/sys/contrib/ck/include/ck_pr.h Tue Oct 23 13:11:45 2018 (r339649) +++ stable/11/sys/contrib/ck/include/ck_pr.h Tue Oct 23 13:12:42 2018 (r339650) @@ -619,8 +619,8 @@ CK_PR_BTX_S(bts, 16, uint16_t, |,) } #define CK_PR_UNARY_Z(K, S, M, T, P, C, Z) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(M *target, bool *zero) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(M *target) \ { \ T previous; \ C punt; \ @@ -631,12 +631,21 @@ CK_PR_BTX_S(bts, 16, uint16_t, |,) (C)(previous P 1), \ &previous) == false) \ ck_pr_stall(); \ - *zero = previous == (T)Z; \ + return previous == (T)Z; \ + } + +#define CK_PR_UNARY_Z_STUB(K, S, M) \ + CK_CC_INLINE static void \ + ck_pr_##K##_##S##_zero(M *target, bool *zero) \ + { \ + *zero = ck_pr_##K##_##S##_is_zero(target); \ return; \ } #define CK_PR_UNARY_S(K, X, S, M) CK_PR_UNARY(K, X, S, M, M) -#define CK_PR_UNARY_Z_S(K, S, M, P, Z) CK_PR_UNARY_Z(K, S, M, M, P, M, Z) +#define CK_PR_UNARY_Z_S(K, S, M, P, Z) \ + CK_PR_UNARY_Z(K, S, M, M, P, M, Z) \ + CK_PR_UNARY_Z_STUB(K, S, M) #if defined(CK_F_PR_LOAD_CHAR) && defined(CK_F_PR_CAS_CHAR_VALUE) @@ -648,6 +657,8 @@ CK_PR_UNARY_S(inc, add, char, char) #ifndef CK_F_PR_INC_CHAR_ZERO #define CK_F_PR_INC_CHAR_ZERO CK_PR_UNARY_Z_S(inc, char, char, +, -1) +#else +CK_PR_UNARY_Z_STUB(inc, char, char) #endif /* CK_F_PR_INC_CHAR_ZERO */ #ifndef CK_F_PR_DEC_CHAR @@ -658,6 +669,8 @@ CK_PR_UNARY_S(dec, sub, char, char) #ifndef CK_F_PR_DEC_CHAR_ZERO #define CK_F_PR_DEC_CHAR_ZERO CK_PR_UNARY_Z_S(dec, char, char, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, char, char) #endif /* CK_F_PR_DEC_CHAR_ZERO */ #endif /* CK_F_PR_LOAD_CHAR && CK_F_PR_CAS_CHAR_VALUE */ @@ -672,6 +685,8 @@ CK_PR_UNARY_S(inc, add, int, int) #ifndef CK_F_PR_INC_INT_ZERO #define CK_F_PR_INC_INT_ZERO CK_PR_UNARY_Z_S(inc, int, int, +, -1) +#else +CK_PR_UNARY_Z_STUB(inc, int, int) #endif /* CK_F_PR_INC_INT_ZERO */ #ifndef CK_F_PR_DEC_INT @@ -682,6 +697,8 @@ CK_PR_UNARY_S(dec, sub, int, int) #ifndef CK_F_PR_DEC_INT_ZERO #define CK_F_PR_DEC_INT_ZERO CK_PR_UNARY_Z_S(dec, int, int, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, int, int) #endif /* CK_F_PR_DEC_INT_ZERO */ #endif /* CK_F_PR_LOAD_INT && CK_F_PR_CAS_INT_VALUE */ @@ -711,6 +728,8 @@ CK_PR_UNARY_S(inc, add, uint, unsigned int) #ifndef CK_F_PR_INC_UINT_ZERO #define CK_F_PR_INC_UINT_ZERO CK_PR_UNARY_Z_S(inc, uint, unsigned int, +, UINT_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, uint, unsigned int) #endif /* CK_F_PR_INC_UINT_ZERO */ #ifndef CK_F_PR_DEC_UINT @@ -721,6 +740,8 @@ CK_PR_UNARY_S(dec, sub, uint, unsigned int) #ifndef CK_F_PR_DEC_UINT_ZERO #define CK_F_PR_DEC_UINT_ZERO CK_PR_UNARY_Z_S(dec, uint, unsigned int, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, uint, unsigned int) #endif /* CK_F_PR_DEC_UINT_ZERO */ #endif /* CK_F_PR_LOAD_UINT && CK_F_PR_CAS_UINT_VALUE */ @@ -735,6 +756,8 @@ CK_PR_UNARY(inc, add, ptr, void, uintptr_t) #ifndef CK_F_PR_INC_PTR_ZERO #define CK_F_PR_INC_PTR_ZERO CK_PR_UNARY_Z(inc, ptr, void, uintptr_t, +, void *, UINT_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, ptr, void) #endif /* CK_F_PR_INC_PTR_ZERO */ #ifndef CK_F_PR_DEC_PTR @@ -745,6 +768,8 @@ CK_PR_UNARY(dec, sub, ptr, void, uintptr_t) #ifndef CK_F_PR_DEC_PTR_ZERO #define CK_F_PR_DEC_PTR_ZERO CK_PR_UNARY_Z(dec, ptr, void, uintptr_t, -, void *, 1) +#else +CK_PR_UNARY_Z_STUB(dec, ptr, void) #endif /* CK_F_PR_DEC_PTR_ZERO */ #endif /* CK_F_PR_LOAD_PTR && CK_F_PR_CAS_PTR_VALUE */ @@ -759,6 +784,8 @@ CK_PR_UNARY_S(inc, add, 64, uint64_t) #ifndef CK_F_PR_INC_64_ZERO #define CK_F_PR_INC_64_ZERO CK_PR_UNARY_Z_S(inc, 64, uint64_t, +, UINT64_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 64, uint64_t) #endif /* CK_F_PR_INC_64_ZERO */ #ifndef CK_F_PR_DEC_64 @@ -769,6 +796,8 @@ CK_PR_UNARY_S(dec, sub, 64, uint64_t) #ifndef CK_F_PR_DEC_64_ZERO #define CK_F_PR_DEC_64_ZERO CK_PR_UNARY_Z_S(dec, 64, uint64_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 64, uint64_t) #endif /* CK_F_PR_DEC_64_ZERO */ #endif /* CK_F_PR_LOAD_64 && CK_F_PR_CAS_64_VALUE */ @@ -783,6 +812,8 @@ CK_PR_UNARY_S(inc, add, 32, uint32_t) #ifndef CK_F_PR_INC_32_ZERO #define CK_F_PR_INC_32_ZERO CK_PR_UNARY_Z_S(inc, 32, uint32_t, +, UINT32_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 32, uint32_t) #endif /* CK_F_PR_INC_32_ZERO */ #ifndef CK_F_PR_DEC_32 @@ -793,6 +824,8 @@ CK_PR_UNARY_S(dec, sub, 32, uint32_t) #ifndef CK_F_PR_DEC_32_ZERO #define CK_F_PR_DEC_32_ZERO CK_PR_UNARY_Z_S(dec, 32, uint32_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 32, uint32_t) #endif /* CK_F_PR_DEC_32_ZERO */ #endif /* CK_F_PR_LOAD_32 && CK_F_PR_CAS_32_VALUE */ @@ -807,6 +840,8 @@ CK_PR_UNARY_S(inc, add, 16, uint16_t) #ifndef CK_F_PR_INC_16_ZERO #define CK_F_PR_INC_16_ZERO CK_PR_UNARY_Z_S(inc, 16, uint16_t, +, UINT16_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 16, uint16_t) #endif /* CK_F_PR_INC_16_ZERO */ #ifndef CK_F_PR_DEC_16 @@ -817,6 +852,8 @@ CK_PR_UNARY_S(dec, sub, 16, uint16_t) #ifndef CK_F_PR_DEC_16_ZERO #define CK_F_PR_DEC_16_ZERO CK_PR_UNARY_Z_S(dec, 16, uint16_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 16, uint16_t) #endif /* CK_F_PR_DEC_16_ZERO */ #endif /* CK_F_PR_LOAD_16 && CK_F_PR_CAS_16_VALUE */ @@ -831,6 +868,8 @@ CK_PR_UNARY_S(inc, add, 8, uint8_t) #ifndef CK_F_PR_INC_8_ZERO #define CK_F_PR_INC_8_ZERO CK_PR_UNARY_Z_S(inc, 8, uint8_t, +, UINT8_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 8, uint8_t) #endif /* CK_F_PR_INC_8_ZERO */ #ifndef CK_F_PR_DEC_8 @@ -841,6 +880,8 @@ CK_PR_UNARY_S(dec, sub, 8, uint8_t) #ifndef CK_F_PR_DEC_8_ZERO #define CK_F_PR_DEC_8_ZERO CK_PR_UNARY_Z_S(dec, 8, uint8_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 8, uint8_t) #endif /* CK_F_PR_DEC_8_ZERO */ #endif /* CK_F_PR_LOAD_8 && CK_F_PR_CAS_8_VALUE */ Modified: stable/11/sys/contrib/ck/include/ck_queue.h ============================================================================== --- stable/11/sys/contrib/ck/include/ck_queue.h Tue Oct 23 13:11:45 2018 (r339649) +++ stable/11/sys/contrib/ck/include/ck_queue.h Tue Oct 23 13:12:42 2018 (r339650) @@ -180,8 +180,14 @@ struct { \ ck_pr_store_ptr(&(head)->cslh_first, elm); \ } while (0) +#define CK_SLIST_INSERT_PREVPTR(prevp, slistelm, elm, field) do { \ + (elm)->field.csle_next = (slistelm); \ + ck_pr_fence_store(); \ + ck_pr_store_ptr(prevp, elm); \ +} while (0) + #define CK_SLIST_REMOVE_AFTER(elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.csle_next, \ + ck_pr_store_ptr(&(elm)->field.csle_next, \ (elm)->field.csle_next->field.csle_next); \ } while (0) @@ -190,7 +196,7 @@ struct { \ CK_SLIST_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->cslh_first; \ - while (curelm->field.csle_next != (elm)) \ + while (curelm->field.csle_next != (elm)) \ curelm = curelm->field.csle_next; \ CK_SLIST_REMOVE_AFTER(curelm, field); \ } \ @@ -199,6 +205,10 @@ struct { \ #define CK_SLIST_REMOVE_HEAD(head, field) do { \ ck_pr_store_ptr(&(head)->cslh_first, \ (head)->cslh_first->field.csle_next); \ +} while (0) + +#define CK_SLIST_REMOVE_PREVPTR(prevp, elm, field) do { \ + ck_pr_store_ptr(prevptr, (elm)->field.csle_next); \ } while (0) #define CK_SLIST_MOVE(head1, head2, field) do { \ Modified: stable/11/sys/contrib/ck/include/gcc/x86/ck_pr.h ============================================================================== --- stable/11/sys/contrib/ck/include/gcc/x86/ck_pr.h Tue Oct 23 13:11:45 2018 (r339649) +++ stable/11/sys/contrib/ck/include/gcc/x86/ck_pr.h Tue Oct 23 13:12:42 2018 (r339650) @@ -233,17 +233,17 @@ CK_PR_FAA_S(8, uint8_t, "xaddb") } #define CK_PR_UNARY_V(K, S, T, C, I) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(T *target, bool *r) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(T *target) \ { \ + bool ret; \ __asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1" \ : "+m" (*(C *)target), \ - "=m" (*r) \ + "=rm" (ret) \ : \ : "memory", "cc"); \ - return; \ + return ret; \ } - #define CK_PR_UNARY_S(K, S, T, I) CK_PR_UNARY(K, S, T, T, I) Modified: stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h ============================================================================== --- stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Tue Oct 23 13:11:45 2018 (r339649) +++ stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Tue Oct 23 13:12:42 2018 (r339650) @@ -332,17 +332,17 @@ CK_PR_FAA_S(8, uint8_t, "xaddb") } #define CK_PR_UNARY_V(K, S, T, C, I) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(T *target, bool *r) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(T *target) \ { \ + bool ret; \ __asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1" \ : "+m" (*(C *)target), \ - "=m" (*r) \ + "=rm" (ret) \ : \ : "memory", "cc"); \ - return; \ + return ret; \ } - #define CK_PR_UNARY_S(K, S, T, I) CK_PR_UNARY(K, S, T, T, I) From owner-svn-src-stable@freebsd.org Tue Oct 23 13:44:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10178FD89AD; Tue, 23 Oct 2018 13:44:34 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B773D7D1FB; Tue, 23 Oct 2018 13:44:33 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B254310AFD; Tue, 23 Oct 2018 13:44:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9NDiXh9037083; Tue, 23 Oct 2018 13:44:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9NDiXj3037082; Tue, 23 Oct 2018 13:44:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201810231344.w9NDiXj3037082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 23 Oct 2018 13:44:33 +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: r339652 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 339652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 13:44:34 -0000 Author: markj Date: Tue Oct 23 13:44:33 2018 New Revision: 339652 URL: https://svnweb.freebsd.org/changeset/base/339652 Log: MFC r339365: Typo. Modified: stable/11/share/man/man4/dtrace_ip.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/dtrace_ip.4 ============================================================================== --- stable/11/share/man/man4/dtrace_ip.4 Tue Oct 23 13:38:39 2018 (r339651) +++ stable/11/share/man/man4/dtrace_ip.4 Tue Oct 23 13:44:33 2018 (r339652) @@ -235,7 +235,7 @@ This script will print some details of each IP packet by the kernel: .Bd -literal -offset indent #pragma D option quiet -#pramga D option switchrate=10Hz +#pragma D option switchrate=10Hz dtrace:::BEGIN { From owner-svn-src-stable@freebsd.org Tue Oct 23 16:24:27 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 921DBFEB7BB; Tue, 23 Oct 2018 16:24:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37DE2842EE; Tue, 23 Oct 2018 16:24:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D338125E6; Tue, 23 Oct 2018 16:24:27 +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 w9NGOR94019596; Tue, 23 Oct 2018 16:24:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9NGOR96019595; Tue, 23 Oct 2018 16:24:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810231624.w9NGOR96019595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 23 Oct 2018 16:24:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339660 - stable/12/release X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/release X-SVN-Commit-Revision: 339660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 16:24:27 -0000 Author: gjb Date: Tue Oct 23 16:24:26 2018 New Revision: 339660 URL: https://svnweb.freebsd.org/changeset/base/339660 Log: Remove debug.witness.trace=0 from the installer sysctl.conf(5), which should have been removed from stable/12 post-branch. This is a direct commit to stable/12. Reported by: bdrewery Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/release/Makefile Modified: stable/12/release/Makefile ============================================================================== --- stable/12/release/Makefile Tue Oct 23 15:34:43 2018 (r339659) +++ stable/12/release/Makefile Tue Oct 23 16:24:26 2018 (r339660) @@ -210,7 +210,6 @@ disc1: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc @@ -238,7 +237,6 @@ bootonly: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc @@ -263,7 +261,6 @@ dvd: packagesystem ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf - echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf echo kernels_autodetect=\"NO\" >> ${.TARGET}/boot/loader.conf cp ${.CURDIR}/rc.local ${.TARGET}/etc From owner-svn-src-stable@freebsd.org Wed Oct 24 05:14:03 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D2551073F9F; Wed, 24 Oct 2018 05:14:03 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F1C4816EA; Wed, 24 Oct 2018 05:14:03 +0000 (UTC) (envelope-from eugen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 145101A4C2; Wed, 24 Oct 2018 05:14:03 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9O5E2kE017341; Wed, 24 Oct 2018 05:14:02 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9O5E2eK017340; Wed, 24 Oct 2018 05:14:02 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201810240514.w9O5E2eK017340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 24 Oct 2018 05:14: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: r339679 - stable/11/etc X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/etc X-SVN-Commit-Revision: 339679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 05:14:03 -0000 Author: eugen Date: Wed Oct 24 05:14:02 2018 New Revision: 339679 URL: https://svnweb.freebsd.org/changeset/base/339679 Log: MFC r339462: make upgrade from previous FreeBSD versions less painful and make previously working configuration like this work again: gif_interfaces="gif0" gifconfig_gif0="1.1.1.1 2.2.2.2" ifconfig_gif0="inet 192.168.1.1 192.168.1.2 netmask 255.255.255.252" PR: 204700 Modified: stable/11/etc/network.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/network.subr ============================================================================== --- stable/11/etc/network.subr Wed Oct 24 03:14:10 2018 (r339678) +++ stable/11/etc/network.subr Wed Oct 24 05:14:02 2018 (r339679) @@ -1408,7 +1408,7 @@ clone_up() _list="$_list $ifn" fi tmpargs=$(get_if_var $ifn gifconfig_IF) - eval ifconfig_${ifn}=\"tunnel \$tmpargs\" + eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" done if [ -n "${_list# }" ]; then echo "Created clone interfaces: ${_list# }." From owner-svn-src-stable@freebsd.org Wed Oct 24 05:15:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A38107402C; Wed, 24 Oct 2018 05:15:47 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C128981837; Wed, 24 Oct 2018 05:15:46 +0000 (UTC) (envelope-from eugen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B14B61A4C4; Wed, 24 Oct 2018 05:15:46 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9O5Fk8D017482; Wed, 24 Oct 2018 05:15:46 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9O5FkfO017481; Wed, 24 Oct 2018 05:15:46 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201810240515.w9O5FkfO017481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Wed, 24 Oct 2018 05:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339680 - stable/10/etc X-SVN-Group: stable-10 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/10/etc X-SVN-Commit-Revision: 339680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 05:15:47 -0000 Author: eugen Date: Wed Oct 24 05:15:46 2018 New Revision: 339680 URL: https://svnweb.freebsd.org/changeset/base/339680 Log: MFC r339462: make upgrade from previous FreeBSD versions less painful and make previously working configuration like this work again: gif_interfaces="gif0" gifconfig_gif0="1.1.1.1 2.2.2.2" ifconfig_gif0="inet 192.168.1.1 192.168.1.2 netmask 255.255.255.252" PR: 204700 Modified: stable/10/etc/network.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Wed Oct 24 05:14:02 2018 (r339679) +++ stable/10/etc/network.subr Wed Oct 24 05:15:46 2018 (r339680) @@ -1335,7 +1335,7 @@ clone_up() _list="$_list $ifn" fi tmpargs=$(get_if_var $ifn gifconfig_IF) - eval ifconfig_${ifn}=\"tunnel \$tmpargs\" + eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\" done if [ -n "${_list# }" ]; then echo "Created clone interfaces: ${_list# }." From owner-svn-src-stable@freebsd.org Wed Oct 24 17:32:32 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 412B0FFE64B; Wed, 24 Oct 2018 17:32:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB56470746; Wed, 24 Oct 2018 17:32:31 +0000 (UTC) (envelope-from kp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E61482D7DD; Wed, 24 Oct 2018 17:32:31 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9OHWVxT097592; Wed, 24 Oct 2018 17:32:31 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9OHWVbH097591; Wed, 24 Oct 2018 17:32:31 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201810241732.w9OHWVbH097591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 24 Oct 2018 17:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339690 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 339690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 17:32:32 -0000 Author: kp Date: Wed Oct 24 17:32:31 2018 New Revision: 339690 URL: https://svnweb.freebsd.org/changeset/base/339690 Log: MFC r339547: vlan: Fix panic with lagg and vlan vlan_lladdr_fn() is called from taskqueue, which means there's no vnet context set. We can end up trying to send ARP messages (through the iflladdr_event event), which requires a vnet context. PR: 227654 Approved by: re (kib) Modified: stable/12/sys/net/if_vlan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_vlan.c ============================================================================== --- stable/12/sys/net/if_vlan.c Wed Oct 24 17:09:20 2018 (r339689) +++ stable/12/sys/net/if_vlan.c Wed Oct 24 17:32:31 2018 (r339690) @@ -1302,8 +1302,13 @@ vlan_lladdr_fn(void *arg, int pending __unused) ifv = (struct ifvlan *)arg; ifp = ifv->ifv_ifp; + + CURVNET_SET(ifp->if_vnet); + /* The ifv_ifp already has the lladdr copied in. */ if_setlladdr(ifp, IF_LLADDR(ifp), ifp->if_addrlen); + + CURVNET_RESTORE(); } static int From owner-svn-src-stable@freebsd.org Wed Oct 24 18:19:33 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5781910085F4; Wed, 24 Oct 2018 18:19:33 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 068CD73636; Wed, 24 Oct 2018 18:19:33 +0000 (UTC) (envelope-from kp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3E702DE75; Wed, 24 Oct 2018 18:19:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9OIJWY6020405; Wed, 24 Oct 2018 18:19:32 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9OIJWhB020404; Wed, 24 Oct 2018 18:19:32 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201810241819.w9OIJWhB020404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 24 Oct 2018 18:19:32 +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: r339691 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 339691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 18:19:33 -0000 Author: kp Date: Wed Oct 24 18:19:32 2018 New Revision: 339691 URL: https://svnweb.freebsd.org/changeset/base/339691 Log: MFC r339547: vlan: Fix panic with lagg and vlan vlan_lladdr_fn() is called from taskqueue, which means there's no vnet context set. We can end up trying to send ARP messages (through the iflladdr_event event), which requires a vnet context. PR: 227654 Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Wed Oct 24 17:32:31 2018 (r339690) +++ stable/11/sys/net/if_vlan.c Wed Oct 24 18:19:32 2018 (r339691) @@ -1318,8 +1318,13 @@ vlan_lladdr_fn(void *arg, int pending __unused) ifv = (struct ifvlan *)arg; ifp = ifv->ifv_ifp; + + CURVNET_SET(ifp->if_vnet); + /* The ifv_ifp already has the lladdr copied in. */ if_setlladdr(ifp, IF_LLADDR(ifp), ifp->if_addrlen); + + CURVNET_RESTORE(); } static int From owner-svn-src-stable@freebsd.org Wed Oct 24 23:13:54 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DC831073392; Wed, 24 Oct 2018 23:13:54 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C10887E268; Wed, 24 Oct 2018 23:13:53 +0000 (UTC) (envelope-from dteske@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA554FE8; Wed, 24 Oct 2018 23:13:53 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9ONDrpb074940; Wed, 24 Oct 2018 23:13:53 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9ONDrUR074939; Wed, 24 Oct 2018 23:13:53 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201810242313.w9ONDrUR074939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 24 Oct 2018 23:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339696 - stable/12/stand/forth X-SVN-Group: stable-12 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/12/stand/forth X-SVN-Commit-Revision: 339696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 23:13:54 -0000 Author: dteske Date: Wed Oct 24 23:13:53 2018 New Revision: 339696 URL: https://svnweb.freebsd.org/changeset/base/339696 Log: MFC r339509: Fix loader.conf(5) "password" feature Restore the ability to prevent the user from interrupting the boot process without first entering the password stored in loader.conf(5). PR: kern/207069 Reported by: david@dcrosstech.com Approved by: re (rgrimes) Sponsored by: Smule, Inc. Modified: stable/12/stand/forth/check-password.4th Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/forth/check-password.4th ============================================================================== --- stable/12/stand/forth/check-password.4th Wed Oct 24 20:49:51 2018 (r339695) +++ stable/12/stand/forth/check-password.4th Wed Oct 24 23:13:53 2018 (r339696) @@ -129,7 +129,7 @@ variable readlen \ input length again \ Enter was not pressed; repeat ; -only forth definitions also password-processing +only forth definitions also password-processing also support-functions : check-password ( -- ) @@ -161,6 +161,7 @@ only forth definitions also password-processing \ We should prevent the user from visiting the menu or dropping to the \ interactive loader(8) prompt, but still allow the machine to boot... + any_conf_read? if load_kernel load_modules then 0 autoboot \ Only reached if autoboot fails for any reason (including if/when From owner-svn-src-stable@freebsd.org Wed Oct 24 23:17:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8AF0107344C; Wed, 24 Oct 2018 23:17:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C6D07E3D6; Wed, 24 Oct 2018 23:17:18 +0000 (UTC) (envelope-from dteske@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58A7CFEA; Wed, 24 Oct 2018 23:17:18 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9ONHItK075151; Wed, 24 Oct 2018 23:17:18 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9ONHIY8075150; Wed, 24 Oct 2018 23:17:18 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201810242317.w9ONHIY8075150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 24 Oct 2018 23:17: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: r339697 - stable/11/stand/forth X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/stand/forth X-SVN-Commit-Revision: 339697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 23:17:18 -0000 Author: dteske Date: Wed Oct 24 23:17:17 2018 New Revision: 339697 URL: https://svnweb.freebsd.org/changeset/base/339697 Log: MFC r339509: Fix loader.conf(5) "password" feature Restore the ability to prevent the user from interrupting the boot process without first entering the password stored in loader.conf(5). PR: kern/207069 Reported by: david@dcrosstech.com Sponsored by: Smule, Inc. Modified: stable/11/stand/forth/check-password.4th Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/forth/check-password.4th ============================================================================== --- stable/11/stand/forth/check-password.4th Wed Oct 24 23:13:53 2018 (r339696) +++ stable/11/stand/forth/check-password.4th Wed Oct 24 23:17:17 2018 (r339697) @@ -129,7 +129,7 @@ variable readlen \ input length again \ Enter was not pressed; repeat ; -only forth definitions also password-processing +only forth definitions also password-processing also support-functions : check-password ( -- ) @@ -161,6 +161,7 @@ only forth definitions also password-processing \ We should prevent the user from visiting the menu or dropping to the \ interactive loader(8) prompt, but still allow the machine to boot... + any_conf_read? if load_kernel load_modules then 0 autoboot \ Only reached if autoboot fails for any reason (including if/when From owner-svn-src-stable@freebsd.org Wed Oct 24 23:21:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A665107352B; Wed, 24 Oct 2018 23:21:13 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C44347E5B8; Wed, 24 Oct 2018 23:21:12 +0000 (UTC) (envelope-from dteske@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BEC03101C; Wed, 24 Oct 2018 23:21:12 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9ONLC7T079225; Wed, 24 Oct 2018 23:21:12 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9ONLCnT079224; Wed, 24 Oct 2018 23:21:12 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201810242321.w9ONLCnT079224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 24 Oct 2018 23:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339698 - stable/10/sys/boot/forth X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10/sys/boot/forth X-SVN-Commit-Revision: 339698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 23:21:13 -0000 Author: dteske Date: Wed Oct 24 23:21:12 2018 New Revision: 339698 URL: https://svnweb.freebsd.org/changeset/base/339698 Log: MFC r339509: Fix loader.conf(5) "password" feature Restore the ability to prevent the user from interrupting the boot process without first entering the password stored in loader.conf(5). PR: kern/207069 Reported by: david@dcrosstech.com Sponsored by: Smule, Inc. Modified: stable/10/sys/boot/forth/check-password.4th Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/check-password.4th ============================================================================== --- stable/10/sys/boot/forth/check-password.4th Wed Oct 24 23:17:17 2018 (r339697) +++ stable/10/sys/boot/forth/check-password.4th Wed Oct 24 23:21:12 2018 (r339698) @@ -129,7 +129,7 @@ variable readlen \ input length again \ Enter was not pressed; repeat ; -only forth definitions also password-processing +only forth definitions also password-processing also support-functions : check-password ( -- ) @@ -161,6 +161,7 @@ only forth definitions also password-processing \ We should prevent the user from visiting the menu or dropping to the \ interactive loader(8) prompt, but still allow the machine to boot... + any_conf_read? if load_kernel load_modules then 0 autoboot \ Only reached if autoboot fails for any reason (including if/when From owner-svn-src-stable@freebsd.org Wed Oct 24 23:31:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B04F1073A4C; Wed, 24 Oct 2018 23:31:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF227F04D; Wed, 24 Oct 2018 23:31:34 +0000 (UTC) (envelope-from dteske@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3AEA211D8; Wed, 24 Oct 2018 23:31:34 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9ONVYx1081263; Wed, 24 Oct 2018 23:31:34 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9ONVYIs081262; Wed, 24 Oct 2018 23:31:34 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201810242331.w9ONVYIs081262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 24 Oct 2018 23:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r339699 - stable/9/sys/boot/forth X-SVN-Group: stable-9 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/9/sys/boot/forth X-SVN-Commit-Revision: 339699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 23:31:34 -0000 Author: dteske Date: Wed Oct 24 23:31:33 2018 New Revision: 339699 URL: https://svnweb.freebsd.org/changeset/base/339699 Log: MFC r339509: Fix loader.conf(5) "password" feature Restore the ability to prevent the user from interrupting the boot process without first entering the password stored in loader.conf(5). PR: kern/207069 Reported by: david@dcrosstech.com Sponsored by: Smule, Inc. Modified: stable/9/sys/boot/forth/check-password.4th Directory Properties: stable/9/ (props changed) Modified: stable/9/sys/boot/forth/check-password.4th ============================================================================== --- stable/9/sys/boot/forth/check-password.4th Wed Oct 24 23:21:12 2018 (r339698) +++ stable/9/sys/boot/forth/check-password.4th Wed Oct 24 23:31:33 2018 (r339699) @@ -154,6 +154,7 @@ variable readlen \ input length \ We should prevent the user from visiting the menu or dropping to the \ interactive loader(8) prompt, but still allow the machine to boot... + any_conf_read? if load_kernel load_modules then 0 autoboot \ Only reached if autoboot fails for any reason (including if/when From owner-svn-src-stable@freebsd.org Thu Oct 25 05:18:26 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84045FEA89E; Thu, 25 Oct 2018 05:18:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36C477059D; Thu, 25 Oct 2018 05:18:26 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30F8F5510; Thu, 25 Oct 2018 05:18:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9P5IQUr060856; Thu, 25 Oct 2018 05:18:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9P5IPOQ060854; Thu, 25 Oct 2018 05:18:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201810250518.w9P5IPOQ060854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 25 Oct 2018 05:18:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339704 - in stable/12/sys: amd64/conf i386/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in stable/12/sys: amd64/conf i386/conf X-SVN-Commit-Revision: 339704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 05:18:26 -0000 Author: imp Date: Thu Oct 25 05:18:25 2018 New Revision: 339704 URL: https://svnweb.freebsd.org/changeset/base/339704 Log: MFC: r339562 (remove obsolete drivers from GENERIC) Remove the drivers we'd planned on removing from 12.x from GENERIC. Approved by: re@ (rgrimes@) Modified: stable/12/sys/amd64/conf/GENERIC stable/12/sys/i386/conf/GENERIC Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/conf/GENERIC ============================================================================== --- stable/12/sys/amd64/conf/GENERIC Thu Oct 25 04:10:41 2018 (r339703) +++ stable/12/sys/amd64/conf/GENERIC Thu Oct 25 05:18:25 2018 (r339704) @@ -131,11 +131,6 @@ device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters device isci # Intel C600 SAS controller device ocs_fc # Emulex FC adapters Modified: stable/12/sys/i386/conf/GENERIC ============================================================================== --- stable/12/sys/i386/conf/GENERIC Thu Oct 25 04:10:41 2018 (r339703) +++ stable/12/sys/i386/conf/GENERIC Thu Oct 25 05:18:25 2018 (r339704) @@ -126,16 +126,6 @@ device mpr # LSI-Logic MPT-Fusion 3 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters - -device adv # Advansys SCSI adapters -device adw # Advansys wide SCSI adapters -device aha # Adaptec 154x SCSI adapters -device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. -device bt # Buslogic/Mylex MultiMaster SCSI adapters - -device ncv # NCR 53C500 -device nsp # Workbit Ninja SCSI-3 -device stg # TMC 18C30/18C50 device isci # Intel C600 SAS controller # ATA/SCSI peripherals From owner-svn-src-stable@freebsd.org Thu Oct 25 11:12:17 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40BBD106F2ED; Thu, 25 Oct 2018 11:12:17 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA6D7C713; Thu, 25 Oct 2018 11:12:16 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w9PBCFIO034151; Thu, 25 Oct 2018 04:12:15 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w9PBCFid034150; Thu, 25 Oct 2018 04:12:15 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201810251112.w9PBCFid034150@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r339704 - in stable/12/sys: amd64/conf i386/conf In-Reply-To: <201810250518.w9P5IPOQ060854@repo.freebsd.org> To: Warner Losh Date: Thu, 25 Oct 2018 04:12:15 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 11:12:17 -0000 > Author: imp > Date: Thu Oct 25 05:18:25 2018 > New Revision: 339704 > URL: https://svnweb.freebsd.org/changeset/base/339704 > > Log: > MFC: r339562 (remove obsolete drivers from GENERIC) > > Remove the drivers we'd planned on removing from 12.x from GENERIC. > > Approved by: re@ (rgrimes@) There has just been a report of one of the NON-PNP devices that are marked gonein(12) by a person on BETA1, I am asking for specific details. I had that it was in this list of devices, but it appears there is yet more to be removed as these are just the old scsi cards, and iirc these are all PnP. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Thu Oct 25 12:27:18 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1F7C10744DC; Thu, 25 Oct 2018 12:27:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8BD7FDA8; Thu, 25 Oct 2018 12:27:17 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69D5911C61; Thu, 25 Oct 2018 12:27:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PCRHvk080420; Thu, 25 Oct 2018 12:27:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PCRHel080419; Thu, 25 Oct 2018 12:27:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251227.w9PCRHel080419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 12:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339708 - stable/12/sys/dev/sound/midi X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/sound/midi X-SVN-Commit-Revision: 339708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 12:27:18 -0000 Author: hselasky Date: Thu Oct 25 12:27:16 2018 New Revision: 339708 URL: https://svnweb.freebsd.org/changeset/base/339708 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Approved by: re (kib) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/midi/sequencer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 12:13:13 2018 (r339707) +++ stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 12:27:16 2018 (r339708) @@ -730,7 +730,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; From owner-svn-src-stable@freebsd.org Thu Oct 25 13:26:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD5B910761AB for ; Thu, 25 Oct 2018 13:26:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 737F782514 for ; Thu, 25 Oct 2018 13:26:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vk1-xa2a.google.com with SMTP id j20so2165452vke.5 for ; Thu, 25 Oct 2018 06:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d4bQDPIIQP4qOMPXO/X1uZomvAQMPeyJZkx9V42PRX4=; b=DeVpWOkA2a5/d3taWG/l6vOjBDFIuH+69Vxzl/RiGusEDLyERHFXi3+Ekk2MHLZBuK 5croxqTV/HzsPdg5CI4ftXGwzoyuGvupvjyeAzolAsMg2O9yTZVJ4ljq29HBI3Wl6elh M2SxmMH6YO9bGLdcaUqlW7G53phF6f+tu8ufwrYADhIshgUZn2iQ1GdC+eKlhJ+AqVra C3dzFTUo/XuZAP04SpYN75MpdfByEONtlL5uS32t0VyF1X1Qm3um3LbWwNBb10NZF2xx +3FbF6nJjWFcS4G5ufUu6FajFPYHv70AMt7Q3zOVsxBJ0t5gLp3FtYsZ/RWb279CK/pq /71Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d4bQDPIIQP4qOMPXO/X1uZomvAQMPeyJZkx9V42PRX4=; b=PC/KaY/3NCJx+Wra1TiY1b8c4cfAT3zM1o9AfMKsPMeRdPUt/tjSmLcjSffe0gK4wp +UOlZLvDBagbFeaeQ4bVKRKYtS6divoDJcgzEe5TKDGxDKUA4SeCIyk+t/jkDhbhB3xT baBdmf1G8gaYp3jcQYPPOAaDJEy2+4+zZ55GDIaPcZbn5ihjfYFQzDTxowzXYAnNZmzI F/jmu8KdPCn2R4aMCsdLZi83r2CM1otSYjpwxK2qllwv5d6H5dYuHZOExNbNcJ3Wxy55 aGZvbwJH77Wnx7vlcNRPQxoo95UL1haYbsq5TTEDv5T8Wu9io9uAnC13DHLjjO78ouJm 30fw== X-Gm-Message-State: AGRZ1gIRDWCMPZDPcTMPwhzsZCfl75q6yXy2drNZ+smRfh7h3Q27aFHI AAzTeEO1047TpNAisKFxoQ1u9qZVYOdw2zw3SpniLg== X-Google-Smtp-Source: AJdET5ctY5ZezMBjankqND0Snp3iuUMdpoIw8PnxBbJXnrZy4MmzzHZVCp+bYZ8GkWlcYq8LAJgT1MPph0y8cJqvHC4= X-Received: by 2002:a1f:8f05:: with SMTP id r5-v6mr705348vkd.40.1540473962378; Thu, 25 Oct 2018 06:26:02 -0700 (PDT) MIME-Version: 1.0 References: <201810250518.w9P5IPOQ060854@repo.freebsd.org> <201810251112.w9PBCFid034150@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201810251112.w9PBCFid034150@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 25 Oct 2018 07:25:48 -0600 Message-ID: Subject: Re: svn commit: r339704 - in stable/12/sys: amd64/conf i386/conf To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 13:26:04 -0000 On Thu, Oct 25, 2018, 5:12 AM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > Author: imp > > Date: Thu Oct 25 05:18:25 2018 > > New Revision: 339704 > > URL: https://svnweb.freebsd.org/changeset/base/339704 > > > > Log: > > MFC: r339562 (remove obsolete drivers from GENERIC) > > > > Remove the drivers we'd planned on removing from 12.x from GENERIC. > > > > Approved by: re@ (rgrimes@) > > There has just been a report of one of the NON-PNP devices that > are marked gonein(12) by a person on BETA1, I am asking for > specific details. > > I had that it was in this list of devices, but it appears there > is yet more to be removed as these are just the old scsi cards, > and iirc these > That's unrelated to this change. I'd gotten some reports of them for something weird and thought they were resolved months ago. I'll check into it, but it is harmless for now I think. Thanks for forwarding it my way. Warner > From owner-svn-src-stable@freebsd.org Thu Oct 25 13:46:29 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21B521076DCF; Thu, 25 Oct 2018 13:46:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8B7A8318D; Thu, 25 Oct 2018 13:46:28 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A98AB129B3; Thu, 25 Oct 2018 13:46:28 +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 w9PDkSsB021537; Thu, 25 Oct 2018 13:46:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PDkSgf021536; Thu, 25 Oct 2018 13:46:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201810251346.w9PDkSgf021536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 Oct 2018 13:46: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: r339710 - stable/11/contrib/elftoolchain/elfcopy X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 339710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 13:46:29 -0000 Author: emaste Date: Thu Oct 25 13:46:28 2018 New Revision: 339710 URL: https://svnweb.freebsd.org/changeset/base/339710 Log: elfcopy: avoid stripping relocations from static binaries MFC r339350: elfcopy: delete filter_reloc, it is broken and unnecessary elfcopy contained logic to filter individual relocations in STRIP_ALL mode. However, this is not valid; relocations emitted by the linker are required, unless they apply to an entire section being removed (which is handled by other logic in elfcopy). Note that filter_reloc was also buggy: for RELA relocation sections it operated on uninitialized rel.r_info resulting in invalid operation. The logic most likely needs to be inverted: instead of removing relocations because their associated symbols are being removed, we must keep symbols referenced by relocations. That said, in practice we do not encounter this code path today: objects being stripped are either dynamically linked binaries which retain .dynsym, or static binaries with no relocations. Just remove filter_reloc. This fixes certain cases including statically linked binaries containing ifuncs. Stripping binaries with relocations referencing removed symbols was already broken, and after this change may still be broken in a different way. MFC r339451: objcopy: restore behaviour required by GCC's build In r339350 filter_reloc() was removed, to fix the case of stripping statically linked binaries with relocations (which may come from ifunc use, for example). As a side effect this changed the behaviour when stripping object files - the output was broken both before and after r339350, in different ways. Unfortunately GCC's build process relies on the previous behaviour, so: - Revert r339350, restoring filter_reloc(). - Fix an unitialized variable use (commited as r3638 in ELF Tool Chain). - Change filter_reloc() to omit relocations referencing removed symbols, while retaining relocations with no symbol reference. - Retain the entire relocation section if it references the dynamic symbol table (fix from kaiw in D17596). PR: 232176 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 13:37:57 2018 (r339709) +++ stable/11/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 13:46:28 2018 (r339710) @@ -689,7 +689,7 @@ filter_reloc(struct elfcopy *ecp, struct section *s) Elf32_Rela *rela32; Elf64_Rela *rela64; Elf_Data *id; - uint64_t cap, n, nrels; + uint64_t cap, n, nrels, sym; int elferr, i; if (gelf_getshdr(s->is, &ish) == NULL) @@ -698,15 +698,13 @@ filter_reloc(struct elfcopy *ecp, struct section *s) /* We don't want to touch relocation info for dynamic symbols. */ if ((ecp->flags & SYMTAB_EXIST) == 0) { - if (ish.sh_link == 0 || ecp->secndx[ish.sh_link] == 0) { - /* - * This reloc section applies to the symbol table - * that was stripped, so discard whole section. - */ - s->nocopy = 1; - s->sz = 0; - } - return; + /* + * No symbol table in output. If sh_link points to a section + * that exists in the output object, this relocation section + * is for dynamic symbols. Don't touch it. + */ + if (ish.sh_link != 0 && ecp->secndx[ish.sh_link] != 0) + return; } else { /* Symbol table exist, check if index equals. */ if (ish.sh_link != elf_ndxscn(ecp->symtab->is)) @@ -747,28 +745,45 @@ filter_reloc(struct elfcopy *ecp, struct section *s) if (gelf_getrel(id, i, &rel) != &rel) errx(EXIT_FAILURE, "gelf_getrel failed: %s", elf_errmsg(-1)); + sym = GELF_R_SYM(rel.r_info); } else { if (gelf_getrela(id, i, &rela) != &rela) errx(EXIT_FAILURE, "gelf_getrel failed: %s", elf_errmsg(-1)); + sym = GELF_R_SYM(rela.r_info); } - name = elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is), - GELF_R_SYM(rel.r_info)); - if (name == NULL) - errx(EXIT_FAILURE, "elf_strptr failed: %s", - elf_errmsg(-1)); - if (lookup_symop_list(ecp, name, SYMOP_KEEP) != NULL) { - if (ecp->oec == ELFCLASS32) { - if (s->type == SHT_REL) - COPYREL(rel, 32); - else - COPYREL(rela, 32); - } else { - if (s->type == SHT_REL) - COPYREL(rel, 64); - else - COPYREL(rela, 64); - } + /* + * If a relocation references a symbol and we are omitting + * either that symbol or the entire symbol table we cannot + * produce valid output, and so just omit the relocation. + * Broken output like this is generally not useful, but some + * uses of elfcopy/strip rely on it - for example, GCC's build + * process uses it to check for build reproducibility by + * stripping objects and comparing them. + * + * Relocations that do not reference a symbol are retained. + */ + if (sym != 0) { + if (ish.sh_link == 0 || ecp->secndx[ish.sh_link] == 0) + continue; + name = elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is), + sym); + if (name == NULL) + errx(EXIT_FAILURE, "elf_strptr failed: %s", + elf_errmsg(-1)); + if (lookup_symop_list(ecp, name, SYMOP_KEEP) == NULL) + continue; + } + if (ecp->oec == ELFCLASS32) { + if (s->type == SHT_REL) + COPYREL(rel, 32); + else + COPYREL(rela, 32); + } else { + if (s->type == SHT_REL) + COPYREL(rel, 64); + else + COPYREL(rela, 64); } } elferr = elf_errno(); From owner-svn-src-stable@freebsd.org Thu Oct 25 14:07:30 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E87981077A77; Thu, 25 Oct 2018 14:07:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 963FE8423C; Thu, 25 Oct 2018 14:07:29 +0000 (UTC) (envelope-from slavash@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71A4A12D5D; Thu, 25 Oct 2018 14:07:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PE7TCn031951; Thu, 25 Oct 2018 14:07:29 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PE7Tdp031950; Thu, 25 Oct 2018 14:07:29 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201810251407.w9PE7Tdp031950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Thu, 25 Oct 2018 14:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339711 - in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-12 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: in stable/12/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 339711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:07:30 -0000 Author: slavash Date: Thu Oct 25 14:07:28 2018 New Revision: 339711 URL: https://svnweb.freebsd.org/changeset/base/339711 Log: MFC r339584: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by: re(rgrimes), hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx5/device.h stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx5/device.h ============================================================================== --- stable/12/sys/dev/mlx5/device.h Thu Oct 25 13:46:28 2018 (r339710) +++ stable/12/sys/dev/mlx5/device.h Thu Oct 25 14:07:28 2018 (r339711) @@ -549,6 +549,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 13:46:28 2018 (r339710) +++ stable/12/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:07:28 2018 (r339711) @@ -615,6 +615,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:10:30 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E54941077C98; Thu, 25 Oct 2018 14:10:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98BD18449C; Thu, 25 Oct 2018 14:10:29 +0000 (UTC) (envelope-from slavash@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A1FA12D83; Thu, 25 Oct 2018 14:10:29 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEATXK032167; Thu, 25 Oct 2018 14:10:29 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEAT7v032165; Thu, 25 Oct 2018 14:10:29 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201810251410.w9PEAT7v032165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Thu, 25 Oct 2018 14:10: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: r339712 - in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-11 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: in stable/11/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 339712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:10:30 -0000 Author: slavash Date: Thu Oct 25 14:10:28 2018 New Revision: 339712 URL: https://svnweb.freebsd.org/changeset/base/339712 Log: MFC r339584 : mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/device.h stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/device.h ============================================================================== --- stable/11/sys/dev/mlx5/device.h Thu Oct 25 14:07:28 2018 (r339711) +++ stable/11/sys/dev/mlx5/device.h Thu Oct 25 14:10:28 2018 (r339712) @@ -549,6 +549,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNSUPPORTED_CABLE = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:07:28 2018 (r339711) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:10:28 2018 (r339712) @@ -615,6 +615,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:12:49 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C9F81077FE1; Thu, 25 Oct 2018 14:12:49 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4095984A87; Thu, 25 Oct 2018 14:12:49 +0000 (UTC) (envelope-from slavash@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0825F12F11; Thu, 25 Oct 2018 14:12:49 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PECmgs037173; Thu, 25 Oct 2018 14:12:48 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PECmBj037171; Thu, 25 Oct 2018 14:12:48 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201810251412.w9PECmBj037171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Thu, 25 Oct 2018 14:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339713 - in stable/10/sys/dev/mlx5: . mlx5_core X-SVN-Group: stable-10 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: in stable/10/sys/dev/mlx5: . mlx5_core X-SVN-Commit-Revision: 339713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:12:49 -0000 Author: slavash Date: Thu Oct 25 14:12:48 2018 New Revision: 339713 URL: https://svnweb.freebsd.org/changeset/base/339713 Log: MFC r339584: mlx5: Notify user that the ConnectX-6 shutdown its port due to power limitation If power exceed the slot limit, or slot limit is unknown the ConnectX-6 firmware will shutdown its port. Inform the user via debug message. Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/mlx5/device.h stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mlx5/device.h ============================================================================== --- stable/10/sys/dev/mlx5/device.h Thu Oct 25 14:10:28 2018 (r339712) +++ stable/10/sys/dev/mlx5/device.h Thu Oct 25 14:12:48 2018 (r339713) @@ -475,6 +475,7 @@ enum { MLX5_MODULE_EVENT_ERROR_UNKNOWN_IDENTIFIER = 0x5, MLX5_MODULE_EVENT_ERROR_HIGH_TEMPERATURE = 0x6, MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED = 0x7, + MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED = 0xc, }; struct mlx5_eqe_port_module_event { Modified: stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:10:28 2018 (r339712) +++ stable/10/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Oct 25 14:12:48 2018 (r339713) @@ -618,6 +618,12 @@ static const char *mlx5_port_module_event_error_type_t return "High Temperature"; case MLX5_MODULE_EVENT_ERROR_CABLE_IS_SHORTED: return "Cable is shorted"; + case MLX5_MODULE_EVENT_ERROR_PCIE_SYSTEM_POWER_SLOT_EXCEEDED: + return "One or more network ports have been powered " + "down due to insufficient/unadvertised power on " + "the PCIe slot. Please refer to the card's user " + "manual for power specifications or contact " + "Mellanox support."; default: return "Unknown error type"; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:34:39 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10DF71078BCA; Thu, 25 Oct 2018 14:34:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA29085C2B; Thu, 25 Oct 2018 14:34:38 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B2F01325A; Thu, 25 Oct 2018 14:34:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEYcPk047313; Thu, 25 Oct 2018 14:34:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEYcrb047312; Thu, 25 Oct 2018 14:34:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251434.w9PEYcrb047312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:34:38 +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: r339714 - stable/11/sys/dev/sound/midi X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/sound/midi X-SVN-Commit-Revision: 339714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:34:39 -0000 Author: hselasky Date: Thu Oct 25 14:34:38 2018 New Revision: 339714 URL: https://svnweb.freebsd.org/changeset/base/339714 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/midi/sequencer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/11/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:12:48 2018 (r339713) +++ stable/11/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:34:38 2018 (r339714) @@ -728,7 +728,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:35:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2CFB1078D14; Thu, 25 Oct 2018 14:35:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8832585E00; Thu, 25 Oct 2018 14:35:53 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A59E1325F; Thu, 25 Oct 2018 14:35:53 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEZrvp047430; Thu, 25 Oct 2018 14:35:53 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEZrXc047429; Thu, 25 Oct 2018 14:35:53 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251435.w9PEZrXc047429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339715 - stable/10/sys/dev/sound/midi X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/sound/midi X-SVN-Commit-Revision: 339715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:35:54 -0000 Author: hselasky Date: Thu Oct 25 14:35:52 2018 New Revision: 339715 URL: https://svnweb.freebsd.org/changeset/base/339715 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/midi/sequencer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/10/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:34:38 2018 (r339714) +++ stable/10/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:35:52 2018 (r339715) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:36:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 777F01078E44; Thu, 25 Oct 2018 14:36:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D28486001; Thu, 25 Oct 2018 14:36:57 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E7EA13262; Thu, 25 Oct 2018 14:36:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEauBO047531; Thu, 25 Oct 2018 14:36:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEauEq047530; Thu, 25 Oct 2018 14:36:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251436.w9PEauEq047530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r339716 - stable/9/sys/dev/sound/midi X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/dev/sound/midi X-SVN-Commit-Revision: 339716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:36:57 -0000 Author: hselasky Date: Thu Oct 25 14:36:56 2018 New Revision: 339716 URL: https://svnweb.freebsd.org/changeset/base/339716 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/sound/midi/sequencer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:35:52 2018 (r339715) +++ stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:36:56 2018 (r339716) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:38:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0216E1078FA7; Thu, 25 Oct 2018 14:38:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC630862DE; Thu, 25 Oct 2018 14:38:03 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DA8C13266; Thu, 25 Oct 2018 14:38:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEc3mk047688; Thu, 25 Oct 2018 14:38:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEc3s9047687; Thu, 25 Oct 2018 14:38:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251438.w9PEc3s9047687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r339718 - stable/8/sys/dev/sound/midi X-SVN-Group: stable-8 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/8/sys/dev/sound/midi X-SVN-Commit-Revision: 339718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:38:04 -0000 Author: hselasky Date: Thu Oct 25 14:38:03 2018 New Revision: 339718 URL: https://svnweb.freebsd.org/changeset/base/339718 Log: MFC r339581: Fix off-by-one which can lead to panics. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/8/sys/dev/sound/midi/sequencer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) Modified: stable/8/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:37:26 2018 (r339717) +++ stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:38:03 2018 (r339718) @@ -737,7 +737,7 @@ static int seq_fetch_mid(struct seq_softc *scp, int unit, kobj_t *md) { - if (unit > scp->midi_number || unit < 0) + if (unit >= scp->midi_number || unit < 0) return EINVAL; *md = scp->midis[unit]; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:53:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4578C1079904; Thu, 25 Oct 2018 14:53:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF52D86C64; Thu, 25 Oct 2018 14:53:24 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBBAA13590; Thu, 25 Oct 2018 14:53:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PErO9G057661; Thu, 25 Oct 2018 14:53:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PErOdU057660; Thu, 25 Oct 2018 14:53:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251453.w9PErOdU057660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339719 - stable/12/sys/dev/sound/midi X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/sound/midi X-SVN-Commit-Revision: 339719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:53:25 -0000 Author: hselasky Date: Thu Oct 25 14:53:24 2018 New Revision: 339719 URL: https://svnweb.freebsd.org/changeset/base/339719 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Approved by: re (rgrimes) Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/sound/midi/sequencer.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:38:03 2018 (r339718) +++ stable/12/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:53:24 2018 (r339719) @@ -921,7 +921,9 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -996,7 +998,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1034,7 +1038,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1045,6 +1051,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1054,7 +1061,13 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:55:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DEB010799FD; Thu, 25 Oct 2018 14:55:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0464F86DE5; Thu, 25 Oct 2018 14:55:05 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9BC913598; Thu, 25 Oct 2018 14:55:04 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEt4ie057824; Thu, 25 Oct 2018 14:55:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEt4HD057823; Thu, 25 Oct 2018 14:55:04 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251455.w9PEt4HD057823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:55:04 +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: r339720 - stable/11/sys/dev/sound/midi X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/sound/midi X-SVN-Commit-Revision: 339720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:55:05 -0000 Author: hselasky Date: Thu Oct 25 14:55:04 2018 New Revision: 339720 URL: https://svnweb.freebsd.org/changeset/base/339720 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/midi/sequencer.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/11/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:53:24 2018 (r339719) +++ stable/11/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:55:04 2018 (r339720) @@ -919,7 +919,9 @@ mseq_read(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -994,7 +996,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1032,7 +1036,9 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1043,6 +1049,7 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1052,7 +1059,13 @@ mseq_write(struct cdev *i_dev, struct uio *uio, int io SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:56:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 633AA1079ACB; Thu, 25 Oct 2018 14:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05BAD86F4E; Thu, 25 Oct 2018 14:56:20 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D56531359A; Thu, 25 Oct 2018 14:56:19 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEuJhq057934; Thu, 25 Oct 2018 14:56:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEuJlX057933; Thu, 25 Oct 2018 14:56:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251456.w9PEuJlX057933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r339721 - stable/10/sys/dev/sound/midi X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/sound/midi X-SVN-Commit-Revision: 339721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:56:20 -0000 Author: hselasky Date: Thu Oct 25 14:56:19 2018 New Revision: 339721 URL: https://svnweb.freebsd.org/changeset/base/339721 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/sound/midi/sequencer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/10/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:55:04 2018 (r339720) +++ stable/10/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:56:19 2018 (r339721) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; From owner-svn-src-stable@freebsd.org Thu Oct 25 14:57:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48F7A1079BE0; Thu, 25 Oct 2018 14:57:34 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E12D5870B3; Thu, 25 Oct 2018 14:57:33 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC76E1359B; Thu, 25 Oct 2018 14:57:33 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PEvXFY058062; Thu, 25 Oct 2018 14:57:33 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PEvXh8058061; Thu, 25 Oct 2018 14:57:33 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251457.w9PEvXh8058061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 14:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r339722 - stable/9/sys/dev/sound/midi X-SVN-Group: stable-9 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/9/sys/dev/sound/midi X-SVN-Commit-Revision: 339722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 14:57:34 -0000 Author: hselasky Date: Thu Oct 25 14:57:33 2018 New Revision: 339722 URL: https://svnweb.freebsd.org/changeset/base/339722 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/9/sys/dev/sound/midi/sequencer.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:56:19 2018 (r339721) +++ stable/9/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:57:33 2018 (r339722) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; From owner-svn-src-stable@freebsd.org Thu Oct 25 15:02:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABC071079F19; Thu, 25 Oct 2018 15:02:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5EABA87503; Thu, 25 Oct 2018 15:02:07 +0000 (UTC) (envelope-from hselasky@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F8A113618; Thu, 25 Oct 2018 15:02:07 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PF27nE062991; Thu, 25 Oct 2018 15:02:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PF27ZW062990; Thu, 25 Oct 2018 15:02:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201810251502.w9PF27ZW062990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 25 Oct 2018 15:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r339723 - stable/8/sys/dev/sound/midi X-SVN-Group: stable-8 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/8/sys/dev/sound/midi X-SVN-Commit-Revision: 339723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:02:08 -0000 Author: hselasky Date: Thu Oct 25 15:02:06 2018 New Revision: 339723 URL: https://svnweb.freebsd.org/changeset/base/339723 Log: MFC r339582: Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm Sponsored by: Mellanox Technologies Modified: stable/8/sys/dev/sound/midi/sequencer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/midi/ (props changed) Modified: stable/8/sys/dev/sound/midi/sequencer.c ============================================================================== --- stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 14:57:33 2018 (r339722) +++ stable/8/sys/dev/sound/midi/sequencer.c Thu Oct 25 15:02:06 2018 (r339723) @@ -928,7 +928,9 @@ seq_read(struct cdev *i_dev, struct uio *uio, int iofl SEQ_DEBUG(8, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(scp->in_q, buf, used); + mtx_unlock(&scp->seq_lock); retval = uiomove(buf, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err1; } @@ -1003,7 +1005,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof retval = ENXIO; goto err0; } + mtx_unlock(&scp->seq_lock); retval = uiomove(event, used, uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1041,7 +1045,9 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: SEQ_FULLSIZE flusing buffer.\n")); while (uio->uio_resid > 0) { - retval = uiomove(event, EV_SZ, uio); + mtx_unlock(&scp->seq_lock); + retval = uiomove(event, MIN(EV_SZ, uio->uio_resid), uio); + mtx_lock(&scp->seq_lock); if (retval) goto err0; @@ -1052,6 +1058,7 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof } retval = EINVAL; if (ev_code >= 128) { + int error; /* * Some sort of an extended event. The size is eight @@ -1061,7 +1068,13 @@ seq_write(struct cdev *i_dev, struct uio *uio, int iof SEQ_DEBUG(2, printf("seq_write: invalid level two event %x.\n", ev_code)); goto err0; } - if (uiomove((caddr_t)&event[4], 4, uio)) { + mtx_unlock(&scp->seq_lock); + if (uio->uio_resid < 4) + error = EINVAL; + else + error = uiomove((caddr_t)&event[4], 4, uio); + mtx_lock(&scp->seq_lock); + if (error) { SEQ_DEBUG(2, printf("seq_write: user memory mangled?\n")); goto err0; From owner-svn-src-stable@freebsd.org Thu Oct 25 15:11:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF02A107A482; Thu, 25 Oct 2018 15:11:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75FAC88387; Thu, 25 Oct 2018 15:11:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 575F013789; Thu, 25 Oct 2018 15:11:19 +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 w9PFBJcL063461; Thu, 25 Oct 2018 15:11:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PFBJg5063460; Thu, 25 Oct 2018 15:11:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810251511.w9PFBJg5063460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 Oct 2018 15:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339724 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 339724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:11:19 -0000 Author: gjb Date: Thu Oct 25 15:11:18 2018 New Revision: 339724 URL: https://svnweb.freebsd.org/changeset/base/339724 Log: MFC r339684: Reduce the GCE image size to 27G to be lower than the free quota limit. PR: 232313 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/release/tools/gce.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/gce.conf ============================================================================== --- stable/12/release/tools/gce.conf Thu Oct 25 15:02:06 2018 (r339723) +++ stable/12/release/tools/gce.conf Thu Oct 25 15:11:18 2018 (r339724) @@ -3,6 +3,9 @@ # $FreeBSD$ # +# Reduce VMSIZE to be below the free quota limit. +export VMSIZE=27G + # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ From owner-svn-src-stable@freebsd.org Thu Oct 25 15:14:17 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06CFB107A6CF; Thu, 25 Oct 2018 15:14:17 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7E89887E1; Thu, 25 Oct 2018 15:14:16 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86902138EA; Thu, 25 Oct 2018 15:14:16 +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 w9PFEGeC068141; Thu, 25 Oct 2018 15:14:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PFEG6g068140; Thu, 25 Oct 2018 15:14:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810251514.w9PFEG6g068140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 Oct 2018 15:14:16 +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: r339725 - stable/11/release/tools X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/tools X-SVN-Commit-Revision: 339725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:14:17 -0000 Author: gjb Date: Thu Oct 25 15:14:16 2018 New Revision: 339725 URL: https://svnweb.freebsd.org/changeset/base/339725 Log: MFC r339684: Reduce the GCE image size to 27G to be lower than the free quota limit. PR: 232313 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/tools/gce.conf Directory Properties: stable/11/ (props changed) Modified: stable/11/release/tools/gce.conf ============================================================================== --- stable/11/release/tools/gce.conf Thu Oct 25 15:11:18 2018 (r339724) +++ stable/11/release/tools/gce.conf Thu Oct 25 15:14:16 2018 (r339725) @@ -3,6 +3,9 @@ # $FreeBSD$ # +# Reduce VMSIZE to be below the free quota limit. +export VMSIZE=27G + # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ google-cloud-sdk panicmail sudo sysutils/py-google-compute-engine \ From owner-svn-src-stable@freebsd.org Thu Oct 25 15:18:55 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E8DF107AAE0; Thu, 25 Oct 2018 15:18:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B819F88C92; Thu, 25 Oct 2018 15:18:54 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A30F138F9; Thu, 25 Oct 2018 15:18:54 +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 w9PFIsv7068403; Thu, 25 Oct 2018 15:18:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PFIsjA068402; Thu, 25 Oct 2018 15:18:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201810251518.w9PFIsjA068402@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 25 Oct 2018 15:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339726 - stable/12/contrib/elftoolchain/elfcopy X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 339726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:18:55 -0000 Author: emaste Date: Thu Oct 25 15:18:54 2018 New Revision: 339726 URL: https://svnweb.freebsd.org/changeset/base/339726 Log: MFC r339451: objcopy: restore behaviour required by GCC's build In r339350 filter_reloc() was removed, to fix the case of stripping statically linked binaries with relocations (which may come from ifunc use, for example). As a side effect this changed the behaviour when stripping object files - the output was broken both before and after r339350, in different ways. Unfortunately GCC's build process relies on the previous behaviour, so: - Revert r339350, restoring filter_reloc(). - Fix an unitialized variable use (commited as r3638 in ELF Tool Chain). - Change filter_reloc() to omit relocations referencing removed symbols, while retaining relocations with no symbol reference. - Retain the entire relocation section if it references the dynamic symbol table (fix from kaiw in D17596). PR: 232176 Approved by: re (gjb, kib) Sponsored by: The FreeBSD Foundation Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- stable/12/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 15:14:16 2018 (r339725) +++ stable/12/contrib/elftoolchain/elfcopy/sections.c Thu Oct 25 15:18:54 2018 (r339726) @@ -39,6 +39,7 @@ ELFTC_VCSID("$Id: sections.c 3443 2016-04-15 18:57:54Z static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); static void check_section_rename(struct elfcopy *ecp, struct section *s); +static void filter_reloc(struct elfcopy *ecp, struct section *s); static int get_section_flags(struct elfcopy *ecp, const char *name); static void insert_sections(struct elfcopy *ecp); static void insert_to_strtab(struct section *t, const char *s); @@ -573,6 +574,14 @@ copy_content(struct elfcopy *ecp) continue; /* + * If strip action is STRIP_ALL, relocation info need + * to be stripped. Skip filtering otherwisw. + */ + if (ecp->strip == STRIP_ALL && + (s->type == SHT_REL || s->type == SHT_RELA)) + filter_reloc(ecp, s); + + /* * The section indices in the SHT_GROUP section needs * to be updated since we might have stripped some * sections and changed section numbering. @@ -661,6 +670,140 @@ update_section_group(struct elfcopy *ecp, struct secti s->sz -= 4; } + s->nocopy = 1; +} + +/* + * Filter relocation entries, only keep those entries whose + * symbol is in the keep list. + */ +static void +filter_reloc(struct elfcopy *ecp, struct section *s) +{ + const char *name; + GElf_Shdr ish; + GElf_Rel rel; + GElf_Rela rela; + Elf32_Rel *rel32; + Elf64_Rel *rel64; + Elf32_Rela *rela32; + Elf64_Rela *rela64; + Elf_Data *id; + uint64_t cap, n, nrels, sym; + int elferr, i; + + if (gelf_getshdr(s->is, &ish) == NULL) + errx(EXIT_FAILURE, "gelf_getehdr() failed: %s", + elf_errmsg(-1)); + + /* We don't want to touch relocation info for dynamic symbols. */ + if ((ecp->flags & SYMTAB_EXIST) == 0) { + /* + * No symbol table in output. If sh_link points to a section + * that exists in the output object, this relocation section + * is for dynamic symbols. Don't touch it. + */ + if (ish.sh_link != 0 && ecp->secndx[ish.sh_link] != 0) + return; + } else { + /* Symbol table exist, check if index equals. */ + if (ish.sh_link != elf_ndxscn(ecp->symtab->is)) + return; + } + +#define COPYREL(REL, SZ) do { \ + if (nrels == 0) { \ + if ((REL##SZ = malloc(cap * \ + sizeof(*REL##SZ))) == NULL) \ + err(EXIT_FAILURE, "malloc failed"); \ + } \ + if (nrels >= cap) { \ + cap *= 2; \ + if ((REL##SZ = realloc(REL##SZ, cap * \ + sizeof(*REL##SZ))) == NULL) \ + err(EXIT_FAILURE, "realloc failed"); \ + } \ + REL##SZ[nrels].r_offset = REL.r_offset; \ + REL##SZ[nrels].r_info = REL.r_info; \ + if (s->type == SHT_RELA) \ + rela##SZ[nrels].r_addend = rela.r_addend; \ + nrels++; \ +} while (0) + + nrels = 0; + cap = 4; /* keep list is usually small. */ + rel32 = NULL; + rel64 = NULL; + rela32 = NULL; + rela64 = NULL; + if ((id = elf_getdata(s->is, NULL)) == NULL) + errx(EXIT_FAILURE, "elf_getdata() failed: %s", + elf_errmsg(-1)); + n = ish.sh_size / ish.sh_entsize; + for(i = 0; (uint64_t)i < n; i++) { + if (s->type == SHT_REL) { + if (gelf_getrel(id, i, &rel) != &rel) + errx(EXIT_FAILURE, "gelf_getrel failed: %s", + elf_errmsg(-1)); + sym = GELF_R_SYM(rel.r_info); + } else { + if (gelf_getrela(id, i, &rela) != &rela) + errx(EXIT_FAILURE, "gelf_getrel failed: %s", + elf_errmsg(-1)); + sym = GELF_R_SYM(rela.r_info); + } + /* + * If a relocation references a symbol and we are omitting + * either that symbol or the entire symbol table we cannot + * produce valid output, and so just omit the relocation. + * Broken output like this is generally not useful, but some + * uses of elfcopy/strip rely on it - for example, GCC's build + * process uses it to check for build reproducibility by + * stripping objects and comparing them. + * + * Relocations that do not reference a symbol are retained. + */ + if (sym != 0) { + if (ish.sh_link == 0 || ecp->secndx[ish.sh_link] == 0) + continue; + name = elf_strptr(ecp->ein, elf_ndxscn(ecp->strtab->is), + sym); + if (name == NULL) + errx(EXIT_FAILURE, "elf_strptr failed: %s", + elf_errmsg(-1)); + if (lookup_symop_list(ecp, name, SYMOP_KEEP) == NULL) + continue; + } + if (ecp->oec == ELFCLASS32) { + if (s->type == SHT_REL) + COPYREL(rel, 32); + else + COPYREL(rela, 32); + } else { + if (s->type == SHT_REL) + COPYREL(rel, 64); + else + COPYREL(rela, 64); + } + } + elferr = elf_errno(); + if (elferr != 0) + errx(EXIT_FAILURE, "elf_getdata() failed: %s", + elf_errmsg(elferr)); + + if (ecp->oec == ELFCLASS32) { + if (s->type == SHT_REL) + s->buf = rel32; + else + s->buf = rela32; + } else { + if (s->type == SHT_REL) + s->buf = rel64; + else + s->buf = rela64; + } + s->sz = gelf_fsize(ecp->eout, (s->type == SHT_REL ? ELF_T_REL : + ELF_T_RELA), nrels, EV_CURRENT); s->nocopy = 1; } From owner-svn-src-stable@freebsd.org Thu Oct 25 15:35:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4560F107B6BA; Thu, 25 Oct 2018 15:35:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE6AA89A1E; Thu, 25 Oct 2018 15:35:12 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CED4113C3C; Thu, 25 Oct 2018 15:35:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PFZCOI078706; Thu, 25 Oct 2018 15:35:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PFZCNB078705; Thu, 25 Oct 2018 15:35:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201810251535.w9PFZCNB078705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 25 Oct 2018 15:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339727 - stable/12/sbin/nvmecontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sbin/nvmecontrol X-SVN-Commit-Revision: 339727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:35:13 -0000 Author: imp Date: Thu Oct 25 15:35:12 2018 New Revision: 339727 URL: https://svnweb.freebsd.org/changeset/base/339727 Log: MFC r339493: add wdc as an alias for wds wdc is the preferred name for Western Digital. wds should never have been committed in the first place. Add wdc as an alias for 12 and in 13 we'll retire the undocumented wds. Approved by: re@ (kib) Modified: stable/12/sbin/nvmecontrol/logpage.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/logpage.c ============================================================================== --- stable/12/sbin/nvmecontrol/logpage.c Thu Oct 25 15:18:54 2018 (r339726) +++ stable/12/sbin/nvmecontrol/logpage.c Thu Oct 25 15:35:12 2018 (r339727) @@ -865,6 +865,8 @@ static struct logpage_function { print_log_firmware, sizeof(struct nvme_firmware_page)}, {HGST_INFO_LOG, "hgst", "Detailed Health/SMART", print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wdc", "Detailed Health/SMART", + print_hgst_info_log, DEFAULT_SIZE}, {HGST_INFO_LOG, "wds", "Detailed Health/SMART", print_hgst_info_log, DEFAULT_SIZE}, {INTEL_LOG_TEMP_STATS, "intel", "Temperature Stats", From owner-svn-src-stable@freebsd.org Thu Oct 25 15:50:01 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45C6A107C1A3; Thu, 25 Oct 2018 15:50:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9D948AA9D; Thu, 25 Oct 2018 15:50: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1C7213E20; Thu, 25 Oct 2018 15:50: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 w9PFo0cq084289; Thu, 25 Oct 2018 15:50:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PFnxle084251; Thu, 25 Oct 2018 15:49:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201810251549.w9PFnxle084251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Oct 2018 15:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339732 - in stable/12: . secure/lib/libcrypto secure/lib/libssl sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: . secure/lib/libcrypto secure/lib/libssl sys/sys X-SVN-Commit-Revision: 339732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 15:50:01 -0000 Author: kib Date: Thu Oct 25 15:49:59 2018 New Revision: 339732 URL: https://svnweb.freebsd.org/changeset/base/339732 Log: MFC r339709: Bump base OpenSSL libraries versions to avoid conflict with port's libraries. Approved by: re (gjb) Modified: stable/12/ObsoleteFiles.inc stable/12/secure/lib/libcrypto/Makefile stable/12/secure/lib/libssl/Makefile stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/12/ObsoleteFiles.inc ============================================================================== --- stable/12/ObsoleteFiles.inc Thu Oct 25 15:43:21 2018 (r339731) +++ stable/12/ObsoleteFiles.inc Thu Oct 25 15:49:59 2018 (r339732) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20181025: OpenSSL libraries version bump to avoid conflict with ports +OLD_LIBS+=lib/libcrypto.so.9 +OLD_LIBS+=usr/lib/libssl.so.9 +OLD_LIBS+=usr/lib32/libcrypto.so.9 +OLD_LIBS+=usr/lib32/libssl.so.9 # 20181015: Stale libcasper(3) files following r329452 OLD_LIBS+=lib/casper/libcap_sysctl.so.0 OLD_LIBS+=lib/casper/libcap_grp.so.0 Modified: stable/12/secure/lib/libcrypto/Makefile ============================================================================== --- stable/12/secure/lib/libcrypto/Makefile Thu Oct 25 15:43:21 2018 (r339731) +++ stable/12/secure/lib/libcrypto/Makefile Thu Oct 25 15:49:59 2018 (r339732) @@ -6,7 +6,7 @@ SUBDIR= engines .include LIB= crypto -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= Modified: stable/12/secure/lib/libssl/Makefile ============================================================================== --- stable/12/secure/lib/libssl/Makefile Thu Oct 25 15:43:21 2018 (r339731) +++ stable/12/secure/lib/libssl/Makefile Thu Oct 25 15:49:59 2018 (r339732) @@ -1,7 +1,7 @@ # $FreeBSD$ LIB= ssl -SHLIB_MAJOR= 9 +SHLIB_MAJOR= 111 VERSION_MAP= ${.CURDIR}/Version.map NO_LINT= Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Thu Oct 25 15:43:21 2018 (r339731) +++ stable/12/sys/sys/param.h Thu Oct 25 15:49:59 2018 (r339732) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200085 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200086 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@freebsd.org Thu Oct 25 16:01:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C402107CEDF; Thu, 25 Oct 2018 16:01:11 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E289C8B6DD; Thu, 25 Oct 2018 16:01:10 +0000 (UTC) (envelope-from tijl@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C38DE14106; Thu, 25 Oct 2018 16:01:10 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PG1Ad6093454; Thu, 25 Oct 2018 16:01:10 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PG1A5V093453; Thu, 25 Oct 2018 16:01:10 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201810251601.w9PG1A5V093453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 25 Oct 2018 16:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339733 - stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 339733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 16:01:11 -0000 Author: tijl Date: Thu Oct 25 16:01:10 2018 New Revision: 339733 URL: https://svnweb.freebsd.org/changeset/base/339733 Log: MFC r339618: Define linuxkpi readq for 64-bit architectures. It is used by drm-kmod. Currently the compiler picks up the definition in machine/cpufunc.h. Add compiler memory barriers to read* and write*. The Linux x86 implementation of these functions uses inline asm with "memory" clobber. The Linux x86 implementation of read_relaxed* and write_relaxed* uses the same inline asm without "memory" clobber. Implement ioread* and iowrite* in terms of read* and write* so they also have memory barriers. Qualify the addr parameter in write* as volatile. Like Linux, define macros with the same name as the inline functions. Only define 64-bit versions on 64-bit architectures because generally 32-bit architectures can't do atomic 64-bit loads and stores. Regroup the functions a bit and add brief comments explaining what they do: - __raw_read*, __raw_write*: atomic, no barriers, no byte swapping - read_relaxed*, write_relaxed*: atomic, no barriers, little-endian - read*, write*: atomic, with barriers, little-endian Add a comment that says our implementation of ioread* and iowrite* only handles MMIO and does not support port IO. Reviewed by: hselasky Approved by: re (gjb) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 15:49:59 2018 (r339732) +++ stable/12/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:10 2018 (r339733) @@ -38,153 +38,309 @@ #include #include +/* + * XXX This is all x86 specific. It should be bus space access. + */ + +/* Access MMIO registers atomically without barriers and byte swapping. */ + +static inline uint8_t +__raw_readb(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define __raw_readb(addr) __raw_readb(addr) + +static inline void +__raw_writeb(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} +#define __raw_writeb(v, addr) __raw_writeb(v, addr) + +static inline uint16_t +__raw_readw(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define __raw_readw(addr) __raw_readw(addr) + +static inline void +__raw_writew(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} +#define __raw_writew(v, addr) __raw_writew(v, addr) + static inline uint32_t __raw_readl(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (*(const volatile uint32_t *)addr); } +#define __raw_readl(addr) __raw_readl(addr) static inline void -__raw_writel(uint32_t b, volatile void *addr) +__raw_writel(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = v; } +#define __raw_writel(v, addr) __raw_writel(v, addr) +#ifdef __LP64__ static inline uint64_t __raw_readq(const volatile void *addr) { - return *(const volatile uint64_t *)addr; + return (*(const volatile uint64_t *)addr); } +#define __raw_readq(addr) __raw_readq(addr) static inline void -__raw_writeq(uint64_t b, volatile void *addr) +__raw_writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = v; } +#define __raw_writeq(v, addr) __raw_writeq(v, addr) +#endif -/* - * XXX This is all x86 specific. It should be bus space access. - */ #define mmiowb() barrier() -#undef writel +/* Access little-endian MMIO registers atomically with memory barriers. */ + +#undef readb +static inline uint8_t +readb(const volatile void *addr) +{ + uint8_t v; + + __compiler_membar(); + v = *(const volatile uint8_t *)addr; + __compiler_membar(); + return (v); +} +#define readb(addr) readb(addr) + +#undef writeb static inline void -writel(uint32_t b, void *addr) +writeb(uint8_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint8_t *)addr = v; + __compiler_membar(); } +#define writeb(v, addr) writeb(v, addr) -#undef writel_relaxed +#undef readw +static inline uint16_t +readw(const volatile void *addr) +{ + uint16_t v; + + __compiler_membar(); + v = *(const volatile uint16_t *)addr; + __compiler_membar(); + return (v); +} +#define readw(addr) readw(addr) + +#undef writew static inline void -writel_relaxed(uint32_t b, void *addr) +writew(uint16_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint16_t *)addr = v; + __compiler_membar(); } +#define writew(v, addr) writew(v, addr) +#undef readl +static inline uint32_t +readl(const volatile void *addr) +{ + uint32_t v; + + __compiler_membar(); + v = *(const volatile uint32_t *)addr; + __compiler_membar(); + return (v); +} +#define readl(addr) readl(addr) + +#undef writel +static inline void +writel(uint32_t v, volatile void *addr) +{ + __compiler_membar(); + *(volatile uint32_t *)addr = v; + __compiler_membar(); +} +#define writel(v, addr) writel(v, addr) + +#undef readq #undef writeq +#ifdef __LP64__ +static inline uint64_t +readq(const volatile void *addr) +{ + uint64_t v; + + __compiler_membar(); + v = *(const volatile uint64_t *)addr; + __compiler_membar(); + return (v); +} +#define readq(addr) readq(addr) + static inline void -writeq(uint64_t b, void *addr) +writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + __compiler_membar(); + *(volatile uint64_t *)addr = v; + __compiler_membar(); } +#define writeq(v, addr) writeq(v, addr) +#endif -#undef writeb +/* Access little-endian MMIO registers atomically without memory barriers. */ + +#undef readb_relaxed +static inline uint8_t +readb_relaxed(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define readb_relaxed(addr) readb_relaxed(addr) + +#undef writeb_relaxed static inline void -writeb(uint8_t b, void *addr) +writeb_relaxed(uint8_t v, volatile void *addr) { - *(volatile uint8_t *)addr = b; + *(volatile uint8_t *)addr = v; } +#define writeb_relaxed(v, addr) writeb_relaxed(v, addr) -#undef writew +#undef readw_relaxed +static inline uint16_t +readw_relaxed(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define readw_relaxed(addr) readw_relaxed(addr) + +#undef writew_relaxed static inline void -writew(uint16_t b, void *addr) +writew_relaxed(uint16_t v, volatile void *addr) { - *(volatile uint16_t *)addr = b; + *(volatile uint16_t *)addr = v; } +#define writew_relaxed(v, addr) writew_relaxed(v, addr) +#undef readl_relaxed +static inline uint32_t +readl_relaxed(const volatile void *addr) +{ + return (*(const volatile uint32_t *)addr); +} +#define readl_relaxed(addr) readl_relaxed(addr) + +#undef writel_relaxed +static inline void +writel_relaxed(uint32_t v, volatile void *addr) +{ + *(volatile uint32_t *)addr = v; +} +#define writel_relaxed(v, addr) writel_relaxed(v, addr) + +#undef readq_relaxed +#undef writeq_relaxed +#ifdef __LP64__ +static inline uint64_t +readq_relaxed(const volatile void *addr) +{ + return (*(const volatile uint64_t *)addr); +} +#define readq_relaxed(addr) readq_relaxed(addr) + +static inline void +writeq_relaxed(uint64_t v, volatile void *addr) +{ + *(volatile uint64_t *)addr = v; +} +#define writeq_relaxed(v, addr) writeq_relaxed(v, addr) +#endif + +/* XXX On Linux ioread and iowrite handle both MMIO and port IO. */ + #undef ioread8 static inline uint8_t ioread8(const volatile void *addr) { - return *(const volatile uint8_t *)addr; + return (readb(addr)); } +#define ioread8(addr) ioread8(addr) #undef ioread16 static inline uint16_t ioread16(const volatile void *addr) { - return *(const volatile uint16_t *)addr; + return (readw(addr)); } +#define ioread16(addr) ioread16(addr) #undef ioread16be static inline uint16_t ioread16be(const volatile void *addr) { - return be16toh(*(const volatile uint16_t *)addr); + return (bswap16(readw(addr))); } +#define ioread16be(addr) ioread16be(addr) #undef ioread32 static inline uint32_t ioread32(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (readl(addr)); } +#define ioread32(addr) ioread32(addr) #undef ioread32be static inline uint32_t ioread32be(const volatile void *addr) { - return be32toh(*(const volatile uint32_t *)addr); + return (bswap32(readl(addr))); } +#define ioread32be(addr) ioread32be(addr) #undef iowrite8 static inline void iowrite8(uint8_t v, volatile void *addr) { - *(volatile uint8_t *)addr = v; + writeb(v, addr); } +#define iowrite8(v, addr) iowrite8(v, addr) #undef iowrite16 static inline void iowrite16(uint16_t v, volatile void *addr) { - *(volatile uint16_t *)addr = v; + writew(v, addr); } +#define iowrite16 iowrite16 #undef iowrite32 static inline void iowrite32(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = v; + writel(v, addr); } +#define iowrite32(v, addr) iowrite32(v, addr) #undef iowrite32be static inline void iowrite32be(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = htobe32(v); + writel(bswap32(v), addr); } - -#undef readb -static inline uint8_t -readb(const volatile void *addr) -{ - return *(const volatile uint8_t *)addr; -} - -#undef readw -static inline uint16_t -readw(const volatile void *addr) -{ - return *(const volatile uint16_t *)addr; -} - -#undef readl -static inline uint32_t -readl(const volatile void *addr) -{ - return *(const volatile uint32_t *)addr; -} +#define iowrite32be(v, addr) iowrite32be(v, addr) #if defined(__i386__) || defined(__amd64__) static inline void From owner-svn-src-stable@freebsd.org Thu Oct 25 16:01:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D3FE107CF0E; Thu, 25 Oct 2018 16:01:23 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 039D88B7BD; Thu, 25 Oct 2018 16:01:23 +0000 (UTC) (envelope-from tijl@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47A1B1410F; Thu, 25 Oct 2018 16:01:20 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PG1KcL093504; Thu, 25 Oct 2018 16:01:20 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PG1Kra093503; Thu, 25 Oct 2018 16:01:20 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201810251601.w9PG1Kra093503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 25 Oct 2018 16:01:20 +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: r339734 - stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: stable/11/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 339734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 16:01:23 -0000 Author: tijl Date: Thu Oct 25 16:01:19 2018 New Revision: 339734 URL: https://svnweb.freebsd.org/changeset/base/339734 Log: MFC r339618: Define linuxkpi readq for 64-bit architectures. It is used by drm-kmod. Currently the compiler picks up the definition in machine/cpufunc.h. Add compiler memory barriers to read* and write*. The Linux x86 implementation of these functions uses inline asm with "memory" clobber. The Linux x86 implementation of read_relaxed* and write_relaxed* uses the same inline asm without "memory" clobber. Implement ioread* and iowrite* in terms of read* and write* so they also have memory barriers. Qualify the addr parameter in write* as volatile. Like Linux, define macros with the same name as the inline functions. Only define 64-bit versions on 64-bit architectures because generally 32-bit architectures can't do atomic 64-bit loads and stores. Regroup the functions a bit and add brief comments explaining what they do: - __raw_read*, __raw_write*: atomic, no barriers, no byte swapping - read_relaxed*, write_relaxed*: atomic, no barriers, little-endian - read*, write*: atomic, with barriers, little-endian Add a comment that says our implementation of ioread* and iowrite* only handles MMIO and does not support port IO. Reviewed by: hselasky Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/io.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:10 2018 (r339733) +++ stable/11/sys/compat/linuxkpi/common/include/linux/io.h Thu Oct 25 16:01:19 2018 (r339734) @@ -38,153 +38,309 @@ #include #include +/* + * XXX This is all x86 specific. It should be bus space access. + */ + +/* Access MMIO registers atomically without barriers and byte swapping. */ + +static inline uint8_t +__raw_readb(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define __raw_readb(addr) __raw_readb(addr) + +static inline void +__raw_writeb(uint8_t v, volatile void *addr) +{ + *(volatile uint8_t *)addr = v; +} +#define __raw_writeb(v, addr) __raw_writeb(v, addr) + +static inline uint16_t +__raw_readw(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define __raw_readw(addr) __raw_readw(addr) + +static inline void +__raw_writew(uint16_t v, volatile void *addr) +{ + *(volatile uint16_t *)addr = v; +} +#define __raw_writew(v, addr) __raw_writew(v, addr) + static inline uint32_t __raw_readl(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (*(const volatile uint32_t *)addr); } +#define __raw_readl(addr) __raw_readl(addr) static inline void -__raw_writel(uint32_t b, volatile void *addr) +__raw_writel(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + *(volatile uint32_t *)addr = v; } +#define __raw_writel(v, addr) __raw_writel(v, addr) +#ifdef __LP64__ static inline uint64_t __raw_readq(const volatile void *addr) { - return *(const volatile uint64_t *)addr; + return (*(const volatile uint64_t *)addr); } +#define __raw_readq(addr) __raw_readq(addr) static inline void -__raw_writeq(uint64_t b, volatile void *addr) +__raw_writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + *(volatile uint64_t *)addr = v; } +#define __raw_writeq(v, addr) __raw_writeq(v, addr) +#endif -/* - * XXX This is all x86 specific. It should be bus space access. - */ #define mmiowb() barrier() -#undef writel +/* Access little-endian MMIO registers atomically with memory barriers. */ + +#undef readb +static inline uint8_t +readb(const volatile void *addr) +{ + uint8_t v; + + __compiler_membar(); + v = *(const volatile uint8_t *)addr; + __compiler_membar(); + return (v); +} +#define readb(addr) readb(addr) + +#undef writeb static inline void -writel(uint32_t b, void *addr) +writeb(uint8_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint8_t *)addr = v; + __compiler_membar(); } +#define writeb(v, addr) writeb(v, addr) -#undef writel_relaxed +#undef readw +static inline uint16_t +readw(const volatile void *addr) +{ + uint16_t v; + + __compiler_membar(); + v = *(const volatile uint16_t *)addr; + __compiler_membar(); + return (v); +} +#define readw(addr) readw(addr) + +#undef writew static inline void -writel_relaxed(uint32_t b, void *addr) +writew(uint16_t v, volatile void *addr) { - *(volatile uint32_t *)addr = b; + __compiler_membar(); + *(volatile uint16_t *)addr = v; + __compiler_membar(); } +#define writew(v, addr) writew(v, addr) +#undef readl +static inline uint32_t +readl(const volatile void *addr) +{ + uint32_t v; + + __compiler_membar(); + v = *(const volatile uint32_t *)addr; + __compiler_membar(); + return (v); +} +#define readl(addr) readl(addr) + +#undef writel +static inline void +writel(uint32_t v, volatile void *addr) +{ + __compiler_membar(); + *(volatile uint32_t *)addr = v; + __compiler_membar(); +} +#define writel(v, addr) writel(v, addr) + +#undef readq #undef writeq +#ifdef __LP64__ +static inline uint64_t +readq(const volatile void *addr) +{ + uint64_t v; + + __compiler_membar(); + v = *(const volatile uint64_t *)addr; + __compiler_membar(); + return (v); +} +#define readq(addr) readq(addr) + static inline void -writeq(uint64_t b, void *addr) +writeq(uint64_t v, volatile void *addr) { - *(volatile uint64_t *)addr = b; + __compiler_membar(); + *(volatile uint64_t *)addr = v; + __compiler_membar(); } +#define writeq(v, addr) writeq(v, addr) +#endif -#undef writeb +/* Access little-endian MMIO registers atomically without memory barriers. */ + +#undef readb_relaxed +static inline uint8_t +readb_relaxed(const volatile void *addr) +{ + return (*(const volatile uint8_t *)addr); +} +#define readb_relaxed(addr) readb_relaxed(addr) + +#undef writeb_relaxed static inline void -writeb(uint8_t b, void *addr) +writeb_relaxed(uint8_t v, volatile void *addr) { - *(volatile uint8_t *)addr = b; + *(volatile uint8_t *)addr = v; } +#define writeb_relaxed(v, addr) writeb_relaxed(v, addr) -#undef writew +#undef readw_relaxed +static inline uint16_t +readw_relaxed(const volatile void *addr) +{ + return (*(const volatile uint16_t *)addr); +} +#define readw_relaxed(addr) readw_relaxed(addr) + +#undef writew_relaxed static inline void -writew(uint16_t b, void *addr) +writew_relaxed(uint16_t v, volatile void *addr) { - *(volatile uint16_t *)addr = b; + *(volatile uint16_t *)addr = v; } +#define writew_relaxed(v, addr) writew_relaxed(v, addr) +#undef readl_relaxed +static inline uint32_t +readl_relaxed(const volatile void *addr) +{ + return (*(const volatile uint32_t *)addr); +} +#define readl_relaxed(addr) readl_relaxed(addr) + +#undef writel_relaxed +static inline void +writel_relaxed(uint32_t v, volatile void *addr) +{ + *(volatile uint32_t *)addr = v; +} +#define writel_relaxed(v, addr) writel_relaxed(v, addr) + +#undef readq_relaxed +#undef writeq_relaxed +#ifdef __LP64__ +static inline uint64_t +readq_relaxed(const volatile void *addr) +{ + return (*(const volatile uint64_t *)addr); +} +#define readq_relaxed(addr) readq_relaxed(addr) + +static inline void +writeq_relaxed(uint64_t v, volatile void *addr) +{ + *(volatile uint64_t *)addr = v; +} +#define writeq_relaxed(v, addr) writeq_relaxed(v, addr) +#endif + +/* XXX On Linux ioread and iowrite handle both MMIO and port IO. */ + #undef ioread8 static inline uint8_t ioread8(const volatile void *addr) { - return *(const volatile uint8_t *)addr; + return (readb(addr)); } +#define ioread8(addr) ioread8(addr) #undef ioread16 static inline uint16_t ioread16(const volatile void *addr) { - return *(const volatile uint16_t *)addr; + return (readw(addr)); } +#define ioread16(addr) ioread16(addr) #undef ioread16be static inline uint16_t ioread16be(const volatile void *addr) { - return be16toh(*(const volatile uint16_t *)addr); + return (bswap16(readw(addr))); } +#define ioread16be(addr) ioread16be(addr) #undef ioread32 static inline uint32_t ioread32(const volatile void *addr) { - return *(const volatile uint32_t *)addr; + return (readl(addr)); } +#define ioread32(addr) ioread32(addr) #undef ioread32be static inline uint32_t ioread32be(const volatile void *addr) { - return be32toh(*(const volatile uint32_t *)addr); + return (bswap32(readl(addr))); } +#define ioread32be(addr) ioread32be(addr) #undef iowrite8 static inline void iowrite8(uint8_t v, volatile void *addr) { - *(volatile uint8_t *)addr = v; + writeb(v, addr); } +#define iowrite8(v, addr) iowrite8(v, addr) #undef iowrite16 static inline void iowrite16(uint16_t v, volatile void *addr) { - *(volatile uint16_t *)addr = v; + writew(v, addr); } +#define iowrite16 iowrite16 #undef iowrite32 static inline void iowrite32(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = v; + writel(v, addr); } +#define iowrite32(v, addr) iowrite32(v, addr) #undef iowrite32be static inline void iowrite32be(uint32_t v, volatile void *addr) { - *(volatile uint32_t *)addr = htobe32(v); + writel(bswap32(v), addr); } - -#undef readb -static inline uint8_t -readb(const volatile void *addr) -{ - return *(const volatile uint8_t *)addr; -} - -#undef readw -static inline uint16_t -readw(const volatile void *addr) -{ - return *(const volatile uint16_t *)addr; -} - -#undef readl -static inline uint32_t -readl(const volatile void *addr) -{ - return *(const volatile uint32_t *)addr; -} +#define iowrite32be(v, addr) iowrite32be(v, addr) #if defined(__i386__) || defined(__amd64__) static inline void From owner-svn-src-stable@freebsd.org Thu Oct 25 17:00:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85F9E1085B79; Thu, 25 Oct 2018 17:00:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3858F214; Thu, 25 Oct 2018 17:00:47 +0000 (UTC) (envelope-from brooks@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B0A614A4D; Thu, 25 Oct 2018 17:00:47 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9PH0lql020939; Thu, 25 Oct 2018 17:00:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PH0eFG020899; Thu, 25 Oct 2018 17:00:40 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201810251700.w9PH0eFG020899@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 25 Oct 2018 17:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339735 - in stable/12: share/man/man4 share/man/man4/man4.i386 share/man/man4/man4.powerpc sys/dev/ae sys/dev/bm sys/dev/cs sys/dev/de sys/dev/dme sys/dev/ed sys/dev/ep sys/dev/ex sys/... X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in stable/12: share/man/man4 share/man/man4/man4.i386 share/man/man4/man4.powerpc sys/dev/ae sys/dev/bm sys/dev/cs sys/dev/de sys/dev/dme sys/dev/ed sys/dev/ep sys/dev/ex sys/dev/fe sys/dev/pcn sys/de... X-SVN-Commit-Revision: 339735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 17:00:48 -0000 Author: brooks Date: Thu Oct 25 17:00:39 2018 New Revision: 339735 URL: https://svnweb.freebsd.org/changeset/base/339735 Log: MFC r339703: Deprecate a number of less used 10 and 10/100 Ethernet devices. The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe, pcn, sf, sn, tl, tx, txp, vx, wb, xe The list was defined as part of FCP-0101. Per the FCP, devices may be removed from the deprecation list if enough users are found or they are converted to iflib. FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Approved by: re (gjb) Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D17654 Modified: stable/12/share/man/man4/ae.4 stable/12/share/man/man4/de.4 stable/12/share/man/man4/ed.4 stable/12/share/man/man4/man4.i386/cs.4 stable/12/share/man/man4/man4.i386/ep.4 stable/12/share/man/man4/man4.i386/ex.4 stable/12/share/man/man4/man4.i386/fe.4 stable/12/share/man/man4/man4.i386/vx.4 stable/12/share/man/man4/man4.powerpc/bm.4 stable/12/share/man/man4/pcn.4 stable/12/share/man/man4/sf.4 stable/12/share/man/man4/sn.4 stable/12/share/man/man4/tl.4 stable/12/share/man/man4/tx.4 stable/12/share/man/man4/txp.4 stable/12/share/man/man4/wb.4 stable/12/share/man/man4/xe.4 stable/12/sys/dev/ae/if_ae.c stable/12/sys/dev/bm/if_bm.c stable/12/sys/dev/cs/if_cs.c stable/12/sys/dev/de/if_de.c stable/12/sys/dev/dme/if_dme.c stable/12/sys/dev/ed/if_ed.c stable/12/sys/dev/ep/if_ep.c stable/12/sys/dev/ex/if_ex.c stable/12/sys/dev/fe/if_fe.c stable/12/sys/dev/pcn/if_pcn.c stable/12/sys/dev/sf/if_sf.c stable/12/sys/dev/sn/if_sn.c stable/12/sys/dev/tl/if_tl.c stable/12/sys/dev/tx/if_tx.c stable/12/sys/dev/txp/if_txp.c stable/12/sys/dev/vx/if_vx.c stable/12/sys/dev/wb/if_wb.c stable/12/sys/dev/xe/if_xe.c stable/12/sys/sys/systm.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ae.4 ============================================================================== --- stable/12/share/man/man4/ae.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/ae.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2008 +.Dd October 24, 2018 .Dt AE 4 .Os .Sh NAME @@ -44,6 +44,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ae_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/de.4 ============================================================================== --- stable/12/share/man/man4/de.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/de.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt DE 4 .Os .Sh NAME @@ -45,6 +45,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_de_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/ed.4 ============================================================================== --- stable/12/share/man/man4/ed.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/ed.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd October 24, 2018 .Dt ED 4 .Os .Sh NAME @@ -51,6 +51,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ed_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/cs.4 ============================================================================== --- stable/12/share/man/man4/man4.i386/cs.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/cs.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24 2018 .Dt CS 4 i386 .Os .Sh NAME @@ -52,6 +52,14 @@ In .Cd hint.cs.0.port="0x300" .Cd hint.cs.0.irq="10" .Cd hint.cs.0.maddr="0xd000" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/ep.4 ============================================================================== --- stable/12/share/man/man4/man4.i386/ep.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/ep.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 1, 2011 +.Dd October 24, 2018 .Dt EP 4 i386 .Os .Sh NAME @@ -49,6 +49,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ep_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/ex.4 ============================================================================== --- stable/12/share/man/man4/man4.i386/ex.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/ex.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt EX 4 i386 .Os .Sh NAME @@ -45,6 +45,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_ex_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/fe.4 ============================================================================== --- stable/12/share/man/man4/man4.i386/fe.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/fe.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -22,7 +22,7 @@ .\" for fe driver. .\" .\" $FreeBSD$ -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt FE 4 i386 .Os .Sh NAME @@ -48,6 +48,14 @@ In .Cd hint.fe.0.at="isa" .Cd hint.fe.0.port="0x300" .Cd hint.fe.0.flags="0x0" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.i386/vx.4 ============================================================================== --- stable/12/share/man/man4/man4.i386/vx.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.i386/vx.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2017 +.Dd October 24, 2018 .Dt VX 4 i386 .Os .Sh NAME @@ -50,6 +50,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_vx_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/man4.powerpc/bm.4 ============================================================================== --- stable/12/share/man/man4/man4.powerpc/bm.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/man4.powerpc/bm.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2008 +.Dd October 24, 2018 .Dt BM 4 .Os .Sh NAME @@ -46,6 +46,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_bm_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/pcn.4 ============================================================================== --- stable/12/share/man/man4/pcn.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/pcn.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2006 +.Dd October 24, 2018 .Dt PCN 4 .Os .Sh NAME @@ -52,6 +52,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_pcn_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/sf.4 ============================================================================== --- stable/12/share/man/man4/sf.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/sf.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2008 +.Dd October 24, 2018 .Dt SF 4 .Os .Sh NAME @@ -53,6 +53,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_sf_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/sn.4 ============================================================================== --- stable/12/share/man/man4/sn.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/sn.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt SN 4 .Os .Sh NAME @@ -43,6 +43,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_sn_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/tl.4 ============================================================================== --- stable/12/share/man/man4/tl.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/tl.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt TL 4 .Os .Sh NAME @@ -51,6 +51,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_tl_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/tx.4 ============================================================================== --- stable/12/share/man/man4/tx.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/tx.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt TX 4 .Os .Sh NAME @@ -46,6 +46,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_tx_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/txp.4 ============================================================================== --- stable/12/share/man/man4/txp.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/txp.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2012 +.Dd October 24, 2018 .Dt TXP 4 .Os .Sh NAME @@ -46,6 +46,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_txp_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/wb.4 ============================================================================== --- stable/12/share/man/man4/wb.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/wb.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24, 2018 .Dt WB 4 .Os .Sh NAME @@ -51,6 +51,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_wb_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/share/man/man4/xe.4 ============================================================================== --- stable/12/share/man/man4/xe.4 Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/share/man/man4/xe.4 Thu Oct 25 17:00:39 2018 (r339735) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd October 24 2018 .Dt XE 4 .Os .Sh NAME @@ -45,6 +45,14 @@ module at boot time, place the following line in .Bd -literal -offset indent if_xe_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. +See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more +information. .Sh DESCRIPTION The .Nm Modified: stable/12/sys/dev/ae/if_ae.c ============================================================================== --- stable/12/sys/dev/ae/if_ae.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/ae/if_ae.c Thu Oct 25 17:00:39 2018 (r339735) @@ -396,6 +396,8 @@ ae_attach(device_t dev) goto fail; } + gone_by_fcp101_dev(dev); + fail: if (error != 0) ae_detach(dev); Modified: stable/12/sys/dev/bm/if_bm.c ============================================================================== --- stable/12/sys/dev/bm/if_bm.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/bm/if_bm.c Thu Oct 25 17:00:39 2018 (r339735) @@ -483,6 +483,8 @@ bm_attach(device_t dev) ether_ifattach(ifp, sc->sc_enaddr); ifp->if_hwassist = 0; + gone_by_fcp101_dev(dev); + return (0); } Modified: stable/12/sys/dev/cs/if_cs.c ============================================================================== --- stable/12/sys/dev/cs/if_cs.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/cs/if_cs.c Thu Oct 25 17:00:39 2018 (r339735) @@ -574,6 +574,8 @@ cs_attach(device_t dev) return (error); } + gone_by_fcp101_dev(dev); + return (0); } Modified: stable/12/sys/dev/de/if_de.c ============================================================================== --- stable/12/sys/dev/de/if_de.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/de/if_de.c Thu Oct 25 17:00:39 2018 (r339735) @@ -4432,6 +4432,8 @@ tulip_attach(tulip_softc_t * const sc) TULIP_LOCK(sc); sc->tulip_flags &= ~TULIP_DEVICEPROBE; TULIP_UNLOCK(sc); + + gone_by_fcp101_dev(sc->tulip_dev); } /* Release memory for a single descriptor ring. */ Modified: stable/12/sys/dev/dme/if_dme.c ============================================================================== --- stable/12/sys/dev/dme/if_dme.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/dme/if_dme.c Thu Oct 25 17:00:39 2018 (r339735) @@ -915,6 +915,9 @@ dme_attach(device_t dev) ether_ifdetach(ifp); goto fail; } + + gone_by_fcp101_dev(dev); + fail: if (error != 0) dme_detach(dev); Modified: stable/12/sys/dev/ed/if_ed.c ============================================================================== --- stable/12/sys/dev/ed/if_ed.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/ed/if_ed.c Thu Oct 25 17:00:39 2018 (r339735) @@ -365,6 +365,9 @@ ed_attach(device_t dev) #endif printf("\n"); } + + gone_by_fcp101_dev(dev); + return (0); } Modified: stable/12/sys/dev/ep/if_ep.c ============================================================================== --- stable/12/sys/dev/ep/if_ep.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/ep/if_ep.c Thu Oct 25 17:00:39 2018 (r339735) @@ -350,6 +350,8 @@ ep_attach(struct ep_softc *sc) epstop(sc); EP_UNLOCK(sc); + gone_by_fcp101_dev(sc->dev); + return (0); } Modified: stable/12/sys/dev/ex/if_ex.c ============================================================================== --- stable/12/sys/dev/ex/if_ex.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/ex/if_ex.c Thu Oct 25 17:00:39 2018 (r339735) @@ -276,6 +276,8 @@ ex_attach(device_t dev) return (error); } + gone_by_fcp101_dev(dev); + return(0); } Modified: stable/12/sys/dev/fe/if_fe.c ============================================================================== --- stable/12/sys/dev/fe/if_fe.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/fe/if_fe.c Thu Oct 25 17:00:39 2018 (r339735) @@ -861,6 +861,8 @@ fe_attach (device_t dev) if (sc->stability & UNSTABLE_TYPE) device_printf(dev, "warning: hardware type was not validated\n"); + gone_by_fcp101_dev(dev); + return 0; } Modified: stable/12/sys/dev/pcn/if_pcn.c ============================================================================== --- stable/12/sys/dev/pcn/if_pcn.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/pcn/if_pcn.c Thu Oct 25 17:00:39 2018 (r339735) @@ -684,6 +684,8 @@ fail: if (error) pcn_detach(dev); + gone_by_fcp101_dev(dev); + return(error); } Modified: stable/12/sys/dev/sf/if_sf.c ============================================================================== --- stable/12/sys/dev/sf/if_sf.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/sf/if_sf.c Thu Oct 25 17:00:39 2018 (r339735) @@ -917,6 +917,8 @@ sf_attach(device_t dev) goto fail; } + gone_by_fcp101_dev(dev); + fail: if (error) sf_detach(dev); Modified: stable/12/sys/dev/sn/if_sn.c ============================================================================== --- stable/12/sys/dev/sn/if_sn.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/sn/if_sn.c Thu Oct 25 17:00:39 2018 (r339735) @@ -227,6 +227,9 @@ sn_attach(device_t dev) sn_detach(dev); return err; } + + gone_by_fcp101_dev(dev); + return 0; } Modified: stable/12/sys/dev/tl/if_tl.c ============================================================================== --- stable/12/sys/dev/tl/if_tl.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/tl/if_tl.c Thu Oct 25 17:00:39 2018 (r339735) @@ -1242,6 +1242,8 @@ tl_attach(dev) goto fail; } + gone_by_fcp101_dev(dev); + fail: if (error) tl_detach(dev); Modified: stable/12/sys/dev/tx/if_tx.c ============================================================================== --- stable/12/sys/dev/tx/if_tx.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/tx/if_tx.c Thu Oct 25 17:00:39 2018 (r339735) @@ -428,6 +428,8 @@ epic_attach(device_t dev) goto fail; } + gone_by_fcp101_dev(dev); + return (0); fail: epic_release(sc); Modified: stable/12/sys/dev/txp/if_txp.c ============================================================================== --- stable/12/sys/dev/txp/if_txp.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/txp/if_txp.c Thu Oct 25 17:00:39 2018 (r339735) @@ -472,6 +472,8 @@ txp_attach(device_t dev) goto fail; } + gone_by_fcp101_dev(dev); + return (0); fail: Modified: stable/12/sys/dev/vx/if_vx.c ============================================================================== --- stable/12/sys/dev/vx/if_vx.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/vx/if_vx.c Thu Oct 25 17:00:39 2018 (r339735) @@ -206,6 +206,8 @@ vx_attach(device_t dev) vx_stop(sc); VX_UNLOCK(sc); + gone_by_fcp101_dev(dev); + return 1; } Modified: stable/12/sys/dev/wb/if_wb.c ============================================================================== --- stable/12/sys/dev/wb/if_wb.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/wb/if_wb.c Thu Oct 25 17:00:39 2018 (r339735) @@ -694,6 +694,8 @@ wb_attach(dev) goto fail; } + gone_by_fcp101_dev(dev); + fail: if (error) wb_detach(dev); Modified: stable/12/sys/dev/xe/if_xe.c ============================================================================== --- stable/12/sys/dev/xe/if_xe.c Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/dev/xe/if_xe.c Thu Oct 25 17:00:39 2018 (r339735) @@ -317,6 +317,8 @@ xe_attach(device_t dev) return (err); } + gone_by_fcp101_dev(dev); + /* Done */ return (0); } Modified: stable/12/sys/sys/systm.h ============================================================================== --- stable/12/sys/sys/systm.h Thu Oct 25 16:01:19 2018 (r339734) +++ stable/12/sys/sys/systm.h Thu Oct 25 17:00:39 2018 (r339735) @@ -543,6 +543,9 @@ void _gone_in_dev(struct device *dev, int major, const #endif #define gone_in(major, msg) __gone_ok(major, msg) _gone_in(major, msg) #define gone_in_dev(dev, major, msg) __gone_ok(major, msg) _gone_in_dev(dev, major, msg) +#define gone_by_fcp101_dev(dev) \ + gone_in_dev((dev), 13, \ + "see https://github.com/freebsd/fcp/blob/master/fcp-0101.md") __NULLABILITY_PRAGMA_POP From owner-svn-src-stable@freebsd.org Thu Oct 25 19:57:43 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1514E1086959; Thu, 25 Oct 2018 19:57:43 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF1A770751; Thu, 25 Oct 2018 19:57:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A016C16922; Thu, 25 Oct 2018 19:57:42 +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 w9PJvgNY014374; Thu, 25 Oct 2018 19:57:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9PJvgDl014373; Thu, 25 Oct 2018 19:57:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810251957.w9PJvgDl014373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 25 Oct 2018 19:57:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339742 - stable/12/crypto/openssl/include/openssl X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/crypto/openssl/include/openssl X-SVN-Commit-Revision: 339742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2018 19:57:43 -0000 Author: gjb Date: Thu Oct 25 19:57:42 2018 New Revision: 339742 URL: https://svnweb.freebsd.org/changeset/base/339742 Log: MFC r339741: Update SHLIB_VERSION_NUMBER following the OpenSSL shared library number bump. Approved by: re (bdrewery) Sponsored by: The FreeBSD Foundation Modified: stable/12/crypto/openssl/include/openssl/opensslv.h Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssl/include/openssl/opensslv.h ============================================================================== --- stable/12/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 18:46:45 2018 (r339741) +++ stable/12/crypto/openssl/include/openssl/opensslv.h Thu Oct 25 19:57:42 2018 (r339742) @@ -92,7 +92,7 @@ extern "C" { * should only keep the versions that are binary compatible with the current. */ # define SHLIB_VERSION_HISTORY "" -# define SHLIB_VERSION_NUMBER "9" +# define SHLIB_VERSION_NUMBER "111" #ifdef __cplusplus From owner-svn-src-stable@freebsd.org Fri Oct 26 00:00:14 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A39D610CE5E6; Fri, 26 Oct 2018 00:00:14 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 578907966F; Fri, 26 Oct 2018 00:00:14 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 35C7119194; Fri, 26 Oct 2018 00:00:14 +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 w9Q00Ec6038118; Fri, 26 Oct 2018 00:00:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9Q00Euh038117; Fri, 26 Oct 2018 00:00:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201810260000.w9Q00Euh038117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 26 Oct 2018 00:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339753 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 339753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 00:00:14 -0000 Author: gjb Date: Fri Oct 26 00:00:13 2018 New Revision: 339753 URL: https://svnweb.freebsd.org/changeset/base/339753 Log: Update stable/12 from BETA1 to BETA2 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/conf/newvers.sh Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Oct 25 23:32:32 2018 (r339752) +++ stable/12/sys/conf/newvers.sh Fri Oct 26 00:00:13 2018 (r339753) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="BETA1" +BRANCH="BETA2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@freebsd.org Fri Oct 26 05:12:58 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BD6E10D6ACA; Fri, 26 Oct 2018 05:12:58 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACB11844F1; Fri, 26 Oct 2018 05:12:57 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 736701C6EA; Fri, 26 Oct 2018 05:12:57 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9Q5CvST003031; Fri, 26 Oct 2018 05:12:57 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9Q5CvLn003027; Fri, 26 Oct 2018 05:12:57 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201810260512.w9Q5CvLn003027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 26 Oct 2018 05:12:57 +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: r339767 - in stable/11: lib/libpmc sys/amd64/include sys/dev/hwpmc sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in stable/11: lib/libpmc sys/amd64/include sys/dev/hwpmc sys/sys X-SVN-Commit-Revision: 339767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 05:12:58 -0000 Author: mmacy Date: Fri Oct 26 05:12:56 2018 New Revision: 339767 URL: https://svnweb.freebsd.org/changeset/base/339767 Log: hwpmc: Enable hwpmc support for AMD Family 17H devices Adds new counters and events for family 17H devices. Adds libpmc support for family 17H devices. Direct commit to 11 as this is supported by way of JSON counter descriptions on 12 & HEAD. Submitted by: Girish Nandibasappa Differential Revision: https://reviews.freebsd.org/D17464 Modified: stable/11/lib/libpmc/libpmc.c stable/11/sys/amd64/include/pmc_mdep.h stable/11/sys/dev/hwpmc/hwpmc_amd.c stable/11/sys/dev/hwpmc/hwpmc_amd.h stable/11/sys/dev/hwpmc/pmc_events.h stable/11/sys/sys/pmc.h Modified: stable/11/lib/libpmc/libpmc.c ============================================================================== --- stable/11/lib/libpmc/libpmc.c Fri Oct 26 04:53:29 2018 (r339766) +++ stable/11/lib/libpmc/libpmc.c Fri Oct 26 05:12:56 2018 (r339767) @@ -61,6 +61,8 @@ static int ucp_allocate_pmc(enum pmc_event _pe, char * struct pmc_op_pmcallocate *_pmc_config); static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); +static int f17h_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int p4_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif @@ -157,6 +159,7 @@ struct pmc_class_descr { PMC_CLASSDEP_TABLE(iaf, IAF); PMC_CLASSDEP_TABLE(k7, K7); PMC_CLASSDEP_TABLE(k8, K8); +PMC_CLASSDEP_TABLE(f17h, F17H); PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); @@ -342,6 +345,7 @@ PMC_MDEP_TABLE(westmere, IAP, PMC_CLASS_SOFT, PMC_CLAS PMC_MDEP_TABLE(westmere_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(k7, K7, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); +PMC_MDEP_TABLE(f17h, F17H, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); @@ -408,6 +412,7 @@ PMC_CLASS_TABLE_DESC(k7, K7, k7, k7); #endif #if defined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(k8, K8, k8, k8); +PMC_CLASS_TABLE_DESC(f17h, F17H, f17h, f17h); PMC_CLASS_TABLE_DESC(p4, P4, p4, p4); #endif #if defined(__i386__) @@ -1158,7 +1163,717 @@ ucp_allocate_pmc(enum pmc_event pe, char *ctrspec, return (0); } +/* AMD Fam17H PMCs */ +static struct pmc_event_alias f17h_aliases[] = { + EV_ALIAS("branches", "ex_ret_brn_tkn"), + EV_ALIAS("branch-mispredicts", + "ex_ret_brn_tkn_misp"), + EV_ALIAS("cycles", "tsc"), + EV_ALIAS("dc-access", "ls_dc_access"), + EV_ALIAS("ic-misses", "ic_fw32_miss"), + EV_ALIAS("instructions", "ex_ret_inst"), + EV_ALIAS("unhalted-cycles", "ls_not_halted_cycle"), + EV_ALIAS(NULL, NULL) +}; +#define __F17HMASK(N, V) PMCMASK(N, (1 << (V))) +static const struct pmc_masks f17h_mask_FPU_PIPEASSIGMENT[] = { + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P0, 0), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P1, 1), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P2, 2), + __F17HMASK(FPU_PIPEASSIGMENT_uOP_P3, 3), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P0, 4), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P1, 5), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P2, 6), + __F17HMASK(FPU_PIPEASSIGMENT_MultiuOP_P3, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_SCHED_EMPTY[] = { + __F17HMASK(FP_SCHED_EMPTY, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_X87_FPOPS[] = { + __F17HMASK(FP_RET_X87_ADDSUBOPS, 0), + __F17HMASK(FP_RET_X87_MULOPS, 1), + __F17HMASK(FP_RET_X87_DIVSQRTOPS, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_SSEAVX_OPS[] = { + __F17HMASK(FP_RET_SSEAVX_SPADDSUBOPS, 0), + __F17HMASK(FP_RET_SSEAVX_SPMULOPS, 1), + __F17HMASK(FP_RET_SSEAVX_SPDIVOPS, 2), + __F17HMASK(FP_RET_SSEAVX_SPMULADDOPS, 3), + __F17HMASK(FP_RET_SSEAVX_DPADDSUBOPS, 4), + __F17HMASK(FP_RET_SSEAVX_DPMULOPS, 5), + __F17HMASK(FP_RET_SSEAVX_DPDIVOPS, 6), + __F17HMASK(FP_RET_SSEAVX_DPMULADDOPS, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_NUM_MOVELIM_SCAL_OPT[] = { + __F17HMASK(FP_NUM_SSEMOV_OPS, 0), + __F17HMASK(FP_NUM_SSEMOV_ELIM, 1), + __F17HMASK(FP_NUM_OPS_OPTPOT, 2), + __F17HMASK(FP_NUM_OPS_OPT, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_FP_RET_SEROPS[] = { + __F17HMASK(FP_RET_SSE_BOTEXEC, 0), + __F17HMASK(FP_RET_SSE_CTRL, 1), + __F17HMASK(FP_RET_BOTEXEC, 2), + __F17HMASK(FP_RET_X87_CTRL, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_BAD_STATUS2[] = { + __F17HMASK(LS_BAD_STATUS2_STLI_NOSTATE, 0), + __F17HMASK(LS_BAD_STATUS2_STLI_OTHER, 1), + __F17HMASK(LS_BAD_STATUS2_STLF_NODATA, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_LOCKS[] = { + __F17HMASK(LS_LOCKS_BUSLOCKS, 0), + __F17HMASK(LS_LOCKS_NONSPECLOCK, 1), + __F17HMASK(LS_SPECLOCK, 2), + __F17HMASK(LS_SPECLCOK_MAPCOMMIT, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_RET_CLFLUSH_INST[] = { + __F17HMASK(LS_RET_CLFLUSH_INST, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_RET_CPUID_INST[] = { + __F17HMASK(LS_RET_CPUID_INST, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_DISPATCH[] = { + __F17HMASK(LS_DISPATCH_LD, 0), + __F17HMASK(LS_DISPATCH_STR, 1), + __F17HMASK(LS_DISPATCH_LDSTR, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_SMI_RX[] = { + __F17HMASK(LS_SMI_RX, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_STLF[] = { + __F17HMASK(LS_STLF, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_STLF_COMMITCANCEL[] = { + __F17HMASK(LS_STLF_COMMITCANCEL, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_DC_ACCESS[] = { + __F17HMASK(LS_DC_ACCESS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_MAB_ALLOCPIPE[] = { + __F17HMASK(LS_MAB_ALLOCPIPE_DATAPIPE, 0), + __F17HMASK(LS_MAB_ALLOCPIPE_STPIPE, 1), + __F17HMASK(LS_MAB_ALLOCPIPE_TLBPIPELATE, 2), + __F17HMASK(LS_MAB_ALLOCPIPE_HWPF, 3), + __F17HMASK(LS_MAB_ALLOCPIPE_TLPPIPEEARLY, 4), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_REFFILS_FROM_SYS[] = { + __F17HMASK(LS_MABRESP_LCL_L2, 0), + __F17HMASK(LS_MABRESP_LCL_CACHE, 1), + __F17HMASK(LS_MABRESP_LCL_DRAM, 3), + __F17HMASK(LS_MABRESP_LCL_RMT_CACHE, 4), + __F17HMASK(LS_MABRESP_LCL_RMT_DRAM, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_L1_DTLBMISS[] = { + __F17HMASK(LS_TLBRELOAD_4KL2HIT, 0), + __F17HMASK(LS_TLBRELOAD_32KL2HIT, 1), + __F17HMASK(LS_TLBRELOAD_2ML2HIT, 2), + __F17HMASK(LS_TLBRELOAD_1GL2HIT, 3), + __F17HMASK(LS_TLBRELOAD_4KL2MISS, 4), + __F17HMASK(LS_TLBRELOAD_32KML2MISS, 5), + __F17HMASK(LS_TLBRELOAD_2ML2MISS, 6), + __F17HMASK(LS_TLBRELOAD_1GL2MISS, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_TABLEWALKER[] = { + __F17HMASK(LS_PERFMON_TW_ALLOCDSIDE0, 0), + __F17HMASK(LS_PERFMON_TW_ALLOCDSIDE1, 1), + __F17HMASK(LS_PERFMON_TW_ALLOCISIDE0, 2), + __F17HMASK(LS_PERFMON_TW_ALLOCISIDE1, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_MISAL_ACCESS[] = { + __F17HMASK(LS_MISAL_ACCESS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_PREF_INST_DISPATCH[] = { + __F17HMASK(LS_LOAD_PREF_W, 0), + __F17HMASK(LS_STORE_PREF_W, 1), + __F17HMASK(LS_PREF_PREFETCH_NTA, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_HWPF_ALLOCATED[] = { + __F17HMASK(LS_ALLOC_STREAM_PF, 0), + __F17HMASK(LS_ALLOC_STRIDE_PF, 1), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_HWPF_HIT[] = { + __F17HMASK(LS_HIT_STREAM_PF, 0), + __F17HMASK(LS_HIT_STRIDE_PF, 1), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_TW_INPROG_DSIDE[] = { + __F17HMASK(LS_TW_INPROG_DSIDE0, 0), + __F17HMASK(LS_TW_INPROG_ISIDE0, 1), + __F17HMASK(LS_TW_INPROG_DSIDE1, 2), + __F17HMASK(LS_TW_INPROG_ISIDE1, 3), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_INEF_SW_PREF[] = { + __F17HMASK(LS_INEF_SW_PREF_DATAPIPE_SW_PF_DCHIT, 0), + __F17HMASK(LS_INEF_SW_PREF_MAB_MCH_CNT, 1), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_MAB_MCH_CNT[] = { + __F17HMASK(LS_MAB_MCH_CNT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_HW_PF_MABALLOC[] = { + __F17HMASK(LS_MABALLOC_HW_PFSTREAM, 0), + __F17HMASK(LS_MABALLOC_HW_PFSTRIDE, 1), + __F17HMASK(LS_MABALLOC_PFREGION, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_HW_PF_MATCH[] = { + __F17HMASK(LS_MATCH_HW_PFSTREAM, 0), + __F17HMASK(LS_MATCH_HW_PFSTRIDE, 1), + __F17HMASK(LS_MATCH_HW_PFREGION, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_SW_PF_DCFILLS[] = { + __F17HMASK(LS_SW_PF_MABRESP_LCL_L2, 0), + __F17HMASK(LS_SW_PF_MABRESP_LCL_L2_CACHE, 1), + __F17HMASK(LS_SW_PF_MABRESP_LCL_DRM, 3), + __F17HMASK(LS_SW_PF_MABRESP_RMT_CACHE, 4), + __F17HMASK(LS_SW_PF_MABRESP_RMT_DRAM, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_HW_PF_DCFILLS[] = { + __F17HMASK(LS_HW_PF_MABRESP_LCL_L2, 0), + __F17HMASK(LS_HW_PF_MABRESP_LCL_CACHE, 1), + __F17HMASK(LS_HW_PF_MABRESP_LCL_DRAM, 3), + __F17HMASK(LS_HW_PF_MABRESP_RMT_CACHE, 4), + __F17HMASK(LS_HW_PF_MABRESP_RMT_DRAM, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_TW_DCFILLS[] = { + __F17HMASK(LS_TW_MABRESP_LCL_L2, 0), + __F17HMASK(LS_TW_MABRESP_LCL_CACHE, 1), + __F17HMASK(LS_TW_MABRESP_LCL_DRAM, 3), + __F17HMASK(LS_TW_MABRESP_RMT_CACHE, 4), + __F17HMASK(LS_TW_MABRESP_RMT_DRAM, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_ALLOC_MAB_COUNT[] = { + __F17HMASK(LS_ALLOC_MAB_COUNT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_TW_INITLEVEL[] = { + __F17HMASK(LS_TW_INITLGH_NATIVE_PDPT, 0), + __F17HMASK(LS_TW_INITLGH_NATIVE_PDT, 1), + __F17HMASK(LS_TW_INITLGH_NATIVE_PFT, 2), + __F17HMASK(LS_TW_INITLGH_NATIVE_PG, 3), + __F17HMASK(LS_TW_INITL_NESTED_PDPT, 4), + __F17HMASK(LS_TW_INITL_NESTED_PDT, 5), + __F17HMASK(LS_TW_INITL_NESTED_PFT, 6), + __F17HMASK(LS_TW_INITL_NESTED_PG, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_NOT_HALTED_CYCLE[] = { + __F17HMASK(LS_NOT_HALTED_CYCLE, 0x00), + NULLMASK +}; +static const struct pmc_masks f17h_mask_LS_TW_RETURN_TYPES[] = { + __F17HMASK(LS_TWC_RET_TYPE_SPEC_VALID, 0), + __F17HMASK(LS_TWC_RET_TYPE_SPEC_FAULT_NAB, 2), + __F17HMASK(LS_TWC_RET_TYPE_SPEC_FAULT_AB, 3), + __F17HMASK(LS_TWC_RET_TYPE_NONSPEC_VALID, 6), + __F17HMASK(LS_TWC_RET_TYPE_NONSPEC_FAULT, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_FW32[] = { + __F17HMASK(IC_FW32, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_FW32_MISS[] = { + __F17HMASK(IC_FW32_MISS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_CACHEFILL_L2[] = { + __F17HMASK(IC_CACHEFILL_L2, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_CACHEFILL_SYS[] = { + __F17HMASK(IC_CACHEFILL_SYS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_BP_L1TLBMISS_L2HIT[] = { + __F17HMASK(BP_L1TLBMISS_L2HIT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_BP_L1TLBMISS_L2MISS[] = { + __F17HMASK(BP_L1TLBMISS_L2MISS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_FETCHSTALL[] = { + __F17HMASK(IC_FETCHSTALL_BACKPRESSURE, 0), + __F17HMASK(IC_FETCHSTALL_DQEMPTY, 1), + __F17HMASK(IC_FETCHSTALL_ANY, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_BP_L1_BTBCORRECT[] = { + __F17HMASK(BP_L1_BTBCORRECT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_BP_L2_BTBCORRECT[] = { + __F17HMASK(BP_L2_BTBCORRECT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_IC_CACHEINVAL[] = { + __F17HMASK(IC_CACHEINVAL_FILLINV, 0), + __F17HMASK(IC_CACHEINVAL_L2_INV_PROVBE, 1), + NULLMASK +}; +static const struct pmc_masks f17h_mask_BP_TLB_REL[] = { + __F17HMASK(BP_TLB_REL, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_ICOC_MODE_SWITCH[] = { + __F17HMASK(IC2OC_MODE_SWITCH, 0), + __F17HMASK(OC2IC_MODE_SWITCH, 1), + NULLMASK +}; +static const struct pmc_masks f17h_mask_DE_DISPATCH_TOKEN_STALLS[] = { + __F17HMASK(DE_ALSQ1_TOKEN_STALL, 0), + __F17HMASK(DE_ALSQ2_TOKEN_STALL, 1), + __F17HMASK(DE_ALSQ3_TOKEN_STALL, 2), + __F17HMASK(DE_ALSQ3_0_TOKEN_STALL, 3), + __F17HMASK(DE_ALU_TOKEN_STALL, 4), + __F17HMASK(DE_AGSQ_TOKEN_STALL, 5), + __F17HMASK(DE_RETIRE_TOKEN_STALLS, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_INST[] = { + __F17HMASK(EX_RET_INST, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_COPS[] = { + __F17HMASK(EX_RET_COPS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN[] = { + __F17HMASK(EX_RET_BRN, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_MISP[] = { + __F17HMASK(EX_RET_BRN_MISP, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_TKN[] = { + __F17HMASK(EX_RET_BRN_TKN, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_TKN_MISP[] = { + __F17HMASK(EX_RET_BRN_TKN_MISP, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_FAR[] = { + __F17HMASK(EX_RET_BRN_FAR, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_RESYNC[] = { + __F17HMASK(EX_RET_BRN_RESYNC, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_NEAR_RET[] = { + __F17HMASK(EX_RET_BRN_NEAR_RET, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_NEAR_RET_MISPRED[] = { + __F17HMASK(EX_RET_BRN_NEAR_RET_MISPRED, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_BRN_IND_MISP[] = { + __F17HMASK(EX_RET_BRN_IND_MISP, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_MMX_FP_INSTR[] = { + __F17HMASK(EX_RET_MMX_X87_INST, 0), + __F17HMASK(EX_RET_MMX_INSTR, 1), + __F17HMASK(EX_RET_MMX_SSE_INSTR, 2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_COND_BRN[] = { + __F17HMASK(EX_RET_COND_BRN, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_DIV_BUSY[] = { + __F17HMASK(EX_DIV_BUSY, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_DIV_COUNT[] = { + __F17HMASK(EX_DIV_COUNT, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_REQUEST_G1[] = { + __F17HMASK(L2_REQUEST_G1_OTHERREQ, 0), + __F17HMASK(L2_REQUEST_G1_HWPF, 1), + __F17HMASK(L2_REQUEST_G1_PREFETCHL2, 2), + __F17HMASK(L2_REQUEST_G1_CHANGETOX, 3), + __F17HMASK(L2_REQUEST_G1_CACHEABLEICRD, 4), + __F17HMASK(L2_REQUEST_G1_LSRDBLKC, 5), + __F17HMASK(L2_REQUEST_G1_RDBLKX, 6), + __F17HMASK(L2_REQUEST_G1_RDBLKL, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_REQUEST_G2[] = { + __F17HMASK(L2_REQUEST_G2_BUSLOCKRESP, 0), + __F17HMASK(L2_REQUEST_G2_BUSLOCKORIG, 1), + __F17HMASK(L2_REQUEST_G2_SMCINV, 2), + __F17HMASK(L2_REQUEST_G2_ICRDSIZENC, 3), + __F17HMASK(L2_REQUEST_G2_ICRDSIZE, 4), + __F17HMASK(L2_REQUEST_G2_LSRDSIZENC, 5), + __F17HMASK(L2_REQUEST_G2_LSRDSIZE, 6), + __F17HMASK(L2_REQUEST_G2_GROUP1, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_LATENCY[] = { + __F17HMASK(L2_LATENCY_CYC_WAITINGONFILLS, 0x0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_WBCREQ[] = { + __F17HMASK(L2_WBCREQ_CLZERO, 0), + __F17HMASK(L2_WBCREQ_LOCALICCLR, 1), + __F17HMASK(L2_WBCREQ_ZEROBYTESTORE, 2), + __F17HMASK(L2_WBCREQ_ILINEFLUSH, 3), + __F17HMASK(L2_WBCREQ_CACHELINEFLUSH, 4), + __F17HMASK(L2_WBCREQ_WBCCLOSE, 5), + __F17HMASK(L2_WBCREQ_WCBWRITE, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_CACHEREQSTAT[] = { + __F17HMASK(L2_CACHEREQSTAT_ICFILLMISS, 0), + __F17HMASK(L2_CACHEREQSTAT_ICFILLHITS, 1), + __F17HMASK(L2_CACHEREQSTAT_ICFILLHITX, 2), + __F17HMASK(L2_CACHEREQSTAT_LSRDBLKC, 3), + __F17HMASK(L2_CACHEREQSTAT_LSRDBLKX, 4), + __F17HMASK(L2_CACHEREQSTAT_LSRDBLKLHITS, 5), + __F17HMASK(L2_CACHEREQSTAT_LSRDBLKLHITX, 6), + __F17HMASK(L2_CACHEREQSTAT_LSRDBLKCS, 7), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_SMCEVENTS[] = { + __F17HMASK(L2_SMCEVENTS_ICFILLSTQCAMMATOT, 0), + __F17HMASK(L2_SMCEVENTS_ICFILLSTQCAMMATTT, 1), + __F17HMASK(L2_SMCEVENTS_LSRDBLKLSXCHGTOX, 2), + __F17HMASK(L2_SMCEVENTS_RDBLKXCHGTOX, 3), + __F17HMASK(L2_SMCEVENTS_LSRDBLKLSCHITL2ICVAL, 4), + __F17HMASK(L2_SMCEVENTS_ICFETCHHITL2, 5), + __F17HMASK(L2_SMCEVENTS_ICFETCHHITL2DCVAL, 6), + NULLMASK +}; +static const struct pmc_masks f17h_mask_L2_FILLPENDING[] = { + __F17HMASK(L2_FILLPENDING_L2FILLBUSY, 0), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_TAGGED_IBSOPS[] = { + __F17HMASK(EX_TAGGED_IBSOPS, 0x0), + __F17HMASK(EX_TAGGED_IBSOPS_RET, 0x1), + __F17HMASK(EX_TAGGED_IBSOPS_CNT_RLOVER, 0x2), + NULLMASK +}; +static const struct pmc_masks f17h_mask_EX_RET_FUSED_BRNCH_INST[] = { + __F17HMASK(EX_RET_FUSED_BRNCH_INST, 0x0), + NULLMASK +}; + +#define F17H_KW_COUNT "count" +#define F17H_KW_EDGE "edge" +#define F17H_KW_INV "inv" +#define F17H_KW_MASK "mask" +#define F17H_KW_OS "os" +#define F17H_KW_USR "usr" + +static int +f17h_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + int n; + uint32_t count; + const struct pmc_masks *pmask; + uint64_t evmask = 0; + (void)ctrspec; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + pmc_config->pm_md.pm_amd.pm_amd_config = 0; + + +#define __F17HSETMASK(M) pmask = f17h_mask_##M + switch (pe) { + case PMC_EV_F17H_FPU_PIPEASSIGMENT: + __F17HSETMASK(FPU_PIPEASSIGMENT); + break; + case PMC_EV_F17H_FP_SCHED_EMPTY: + __F17HSETMASK(FP_SCHED_EMPTY); + break; + case PMC_EV_F17H_FP_RET_X87_FPOPS: + __F17HSETMASK(FP_RET_X87_FPOPS); + break; + case PMC_EV_F17H_FP_RET_SSEAVX_OPS: + __F17HSETMASK(FP_RET_SSEAVX_OPS); + break; + case PMC_EV_F17H_FP_NUM_MOVELIM_SCAL_OPT: + __F17HSETMASK(FP_NUM_MOVELIM_SCAL_OPT); + break; + case PMC_EV_F17H_FP_RET_SEROPS: + __F17HSETMASK(FP_RET_SEROPS); + break; + case PMC_EV_F17H_LS_BAD_STATUS2: + __F17HSETMASK(LS_BAD_STATUS2); + break; + case PMC_EV_F17H_LS_LOCKS: + __F17HSETMASK(LS_LOCKS); + break; + case PMC_EV_F17H_LS_RET_CLFLUSH_INST: + __F17HSETMASK(LS_RET_CLFLUSH_INST); + break; + case PMC_EV_F17H_LS_RET_CPUID_INST: + __F17HSETMASK(LS_RET_CPUID_INST); + break; + case PMC_EV_F17H_LS_DISPATCH: + __F17HSETMASK(LS_DISPATCH); + break; + case PMC_EV_F17H_LS_SMI_RX: + __F17HSETMASK(LS_SMI_RX); + break; + case PMC_EV_F17H_LS_STLF: + __F17HSETMASK(LS_STLF); + break; + case PMC_EV_F17H_LS_STLF_COMMITCANCEL: + __F17HSETMASK(LS_STLF_COMMITCANCEL); + break; + case PMC_EV_F17H_LS_DC_ACCESS: + __F17HSETMASK(LS_DC_ACCESS); + break; + case PMC_EV_F17H_LS_MAB_ALLOCPIPE: + __F17HSETMASK(LS_MAB_ALLOCPIPE); + break; + case PMC_EV_F17H_LS_REFFILS_FROM_SYS: + __F17HSETMASK(LS_REFFILS_FROM_SYS); + break; + case PMC_EV_F17H_LS_L1_DTLBMISS: + __F17HSETMASK(LS_L1_DTLBMISS); + break; + case PMC_EV_F17H_LS_TABLEWALKER: + __F17HSETMASK(LS_TABLEWALKER); + break; + case PMC_EV_F17H_LS_MISAL_ACCESS: + __F17HSETMASK(LS_MISAL_ACCESS); + break; + case PMC_EV_F17H_LS_PREF_INST_DISPATCH: + __F17HSETMASK(LS_PREF_INST_DISPATCH); + break; + case PMC_EV_F17H_LS_HWPF_ALLOCATED: + __F17HSETMASK(LS_HWPF_ALLOCATED); + break; + case PMC_EV_F17H_LS_HWPF_HIT: + __F17HSETMASK(LS_HWPF_HIT); + break; + case PMC_EV_F17H_LS_TW_INPROG_DSIDE: + __F17HSETMASK(LS_TW_INPROG_DSIDE); + break; + case PMC_EV_F17H_LS_INEF_SW_PREF: + __F17HSETMASK(LS_INEF_SW_PREF); + break; + case PMC_EV_F17H_LS_MAB_MCH_CNT: + __F17HSETMASK(LS_MAB_MCH_CNT); + break; + case PMC_EV_F17H_LS_HW_PF_MABALLOC: + __F17HSETMASK(LS_HW_PF_MABALLOC); + break; + case PMC_EV_F17H_LS_HW_PF_MATCH: + __F17HSETMASK(LS_HW_PF_MATCH); + break; + case PMC_EV_F17H_LS_SW_PF_DCFILLS: + __F17HSETMASK(LS_SW_PF_DCFILLS); + break; + case PMC_EV_F17H_LS_HW_PF_DCFILLS: + __F17HSETMASK(LS_HW_PF_DCFILLS); + break; + case PMC_EV_F17H_LS_TW_DCFILLS: + __F17HSETMASK(LS_TW_DCFILLS); + break; + case PMC_EV_F17H_LS_ALLOC_MAB_COUNT: + __F17HSETMASK(LS_ALLOC_MAB_COUNT); + break; + case PMC_EV_F17H_LS_TW_INITLEVEL: + __F17HSETMASK(LS_TW_INITLEVEL); + break; + case PMC_EV_F17H_LS_NOT_HALTED_CYCLE: + __F17HSETMASK(LS_NOT_HALTED_CYCLE); + break; + case PMC_EV_F17H_LS_TW_RETURN_TYPES: + __F17HSETMASK(LS_TW_RETURN_TYPES); + break; + case PMC_EV_F17H_IC_FW32: + __F17HSETMASK(IC_FW32); + break; + case PMC_EV_F17H_IC_FW32_MISS: + __F17HSETMASK(IC_FW32_MISS); + break; + case PMC_EV_F17H_IC_CACHEFILL_L2: + __F17HSETMASK(IC_CACHEFILL_L2); + break; + case PMC_EV_F17H_IC_CACHEFILL_SYS: + __F17HSETMASK(IC_CACHEFILL_SYS); + break; + case PMC_EV_F17H_BP_L1TLBMISS_L2HIT: + __F17HSETMASK(BP_L1TLBMISS_L2HIT); + break; + case PMC_EV_F17H_BP_L1TLBMISS_L2MISS: + __F17HSETMASK(BP_L1TLBMISS_L2MISS); + break; + case PMC_EV_F17H_IC_FETCHSTALL: + __F17HSETMASK(IC_FETCHSTALL); + break; + case PMC_EV_F17H_BP_L1_BTBCORRECT: + __F17HSETMASK(BP_L1_BTBCORRECT); + break; + case PMC_EV_F17H_BP_L2_BTBCORRECT: + __F17HSETMASK(BP_L2_BTBCORRECT); + break; + case PMC_EV_F17H_IC_CACHEINVAL: + __F17HSETMASK(IC_CACHEINVAL); + break; + case PMC_EV_F17H_BP_TLB_REL: + __F17HSETMASK(BP_TLB_REL); + break; + case PMC_EV_F17H_ICOC_MODE_SWITCH: + __F17HSETMASK(ICOC_MODE_SWITCH); + break; + case PMC_EV_F17H_DE_DISPATCH_TOKEN_STALLS: + __F17HSETMASK(DE_DISPATCH_TOKEN_STALLS); + break; + case PMC_EV_F17H_EX_RET_INST: + __F17HSETMASK(EX_RET_INST); + break; + case PMC_EV_F17H_EX_RET_COPS: + __F17HSETMASK(EX_RET_COPS); + break; + case PMC_EV_F17H_EX_RET_BRN: + __F17HSETMASK(EX_RET_BRN); + break; + case PMC_EV_F17H_EX_RET_BRN_MISP: + __F17HSETMASK(EX_RET_BRN_MISP); + break; + case PMC_EV_F17H_EX_RET_BRN_TKN: + __F17HSETMASK(EX_RET_BRN_TKN); + break; + case PMC_EV_F17H_EX_RET_BRN_TKN_MISP: + __F17HSETMASK(EX_RET_BRN_TKN_MISP); + break; + case PMC_EV_F17H_EX_RET_BRN_FAR: + __F17HSETMASK(EX_RET_BRN_FAR); + break; + case PMC_EV_F17H_EX_RET_BRN_RESYNC: + __F17HSETMASK(EX_RET_BRN_RESYNC); + break; + case PMC_EV_F17H_EX_RET_BRN_NEAR_RET: + __F17HSETMASK(EX_RET_BRN_NEAR_RET); + break; + case PMC_EV_F17H_EX_RET_BRN_NEAR_RET_MISPRED: + __F17HSETMASK(EX_RET_BRN_NEAR_RET_MISPRED); + break; + case PMC_EV_F17H_EX_RET_BRN_IND_MISP: + __F17HSETMASK(EX_RET_BRN_IND_MISP); + break; + case PMC_EV_F17H_EX_RET_MMX_FP_INSTR: + __F17HSETMASK(EX_RET_MMX_FP_INSTR); + break; + case PMC_EV_F17H_EX_RET_COND_BRN: + __F17HSETMASK(EX_RET_COND_BRN); + break; + case PMC_EV_F17H_EX_DIV_BUSY: + __F17HSETMASK(EX_DIV_BUSY); + break; + case PMC_EV_F17H_EX_DIV_COUNT: + __F17HSETMASK(EX_DIV_COUNT); + break; + case PMC_EV_F17H_L2_REQUEST_G1: + __F17HSETMASK(L2_REQUEST_G1); + break; + case PMC_EV_F17H_L2_REQUEST_G2: + __F17HSETMASK(L2_REQUEST_G2); + break; + case PMC_EV_F17H_L2_LATENCY: + __F17HSETMASK(L2_LATENCY); + break; + case PMC_EV_F17H_L2_WBCREQ: + __F17HSETMASK(L2_WBCREQ); + break; + case PMC_EV_F17H_L2_CACHEREQSTAT: + __F17HSETMASK(L2_CACHEREQSTAT); + break; + case PMC_EV_F17H_L2_SMCEVENTS: + __F17HSETMASK(L2_SMCEVENTS); + break; + case PMC_EV_F17H_L2_FILLPENDING: + __F17HSETMASK(L2_FILLPENDING); + break; + case PMC_EV_F17H_EX_TAGGED_IBSOPS: + __F17HSETMASK(EX_TAGGED_IBSOPS); + break; + case PMC_EV_F17H_EX_RET_FUSED_BRNCH_INST: + __F17HSETMASK(EX_RET_FUSED_BRNCH_INST); + break; + default: + printf(" %s failed, event not supported\n", __FUNCTION__); + return -1; + } + while ((p = strsep(&ctrspec, ",")) != NULL) { + if (KWPREFIXMATCH(p, F17H_KW_COUNT "=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + + count = strtol(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + + pmc_config->pm_caps |= PMC_CAP_THRESHOLD; + pmc_config->pm_md.pm_amd.pm_amd_config |= + AMD_PMC_TO_COUNTER(count); + + } else if (KWMATCH(p, F17H_KW_EDGE)) { + pmc_config->pm_caps |= PMC_CAP_EDGE; + } else if (KWMATCH(p, F17H_KW_INV)) { + pmc_config->pm_caps |= PMC_CAP_INVERT; + } else if (KWPREFIXMATCH(p, F17H_KW_MASK "=")) { + if ((n = pmc_parse_mask(pmask, p, &evmask)) < 0) + return (-1); + pmc_config->pm_caps |= PMC_CAP_QUALIFIER; + } else if (KWMATCH(p, F17H_KW_OS)) { + pmc_config->pm_caps |= PMC_CAP_SYSTEM; + } else if (KWMATCH(p, F17H_KW_USR)) { + pmc_config->pm_caps |= PMC_CAP_USER; + } else + return (-1); +} + if (pmc_config->pm_caps & PMC_CAP_QUALIFIER) { + pmc_config->pm_md.pm_amd.pm_amd_config = + AMD_PMC_TO_UNITMASK(evmask); + } + return 0; +} /* * AMD K8 PMCs. * @@ -3092,6 +3807,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = k8_event_table; count = PMC_EVENT_TABLE_SIZE(k8); break; + case PMC_CLASS_F17H: + ev = f17h_event_table; + count = PMC_EVENT_TABLE_SIZE(f17h); + break; case PMC_CLASS_P4: ev = p4_event_table; count = PMC_EVENT_TABLE_SIZE(p4); @@ -3360,6 +4079,10 @@ pmc_init(void) PMC_MDEP_INIT(k8); pmc_class_table[n] = &k8_class_table_descr; break; + case PMC_CPU_AMD_F17H: + PMC_MDEP_INIT(f17h); + pmc_class_table[n] = &f17h_class_table_descr; + break; case PMC_CPU_INTEL_ATOM: PMC_MDEP_INIT_INTEL_V2(atom); break; @@ -3675,6 +4398,10 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype } else if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { ev = k8_event_table; evfence = k8_event_table + PMC_EVENT_TABLE_SIZE(k8); + } else if ((int)pe >= PMC_EV_F17H_FIRST && + (int)pe <= PMC_EV_F17H_LAST) { + ev = f17h_event_table; + evfence = f17h_event_table + PMC_EVENT_TABLE_SIZE(f17h); } else if (pe >= PMC_EV_P4_FIRST && pe <= PMC_EV_P4_LAST) { ev = p4_event_table; evfence = p4_event_table + PMC_EVENT_TABLE_SIZE(p4); Modified: stable/11/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/11/sys/amd64/include/pmc_mdep.h Fri Oct 26 04:53:29 2018 (r339766) +++ stable/11/sys/amd64/include/pmc_mdep.h Fri Oct 26 05:12:56 2018 (r339767) @@ -52,6 +52,7 @@ struct pmc_mdep; */ #define PMC_MDEP_CLASS_INDEX_TSC 1 #define PMC_MDEP_CLASS_INDEX_K8 2 +#define PMC_MDEP_CLASS_INDEX_F17H 2 #define PMC_MDEP_CLASS_INDEX_P4 2 #define PMC_MDEP_CLASS_INDEX_IAP 2 #define PMC_MDEP_CLASS_INDEX_IAF 3 Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 04:53:29 2018 (r339766) +++ stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 05:12:56 2018 (r339767) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #ifdef HWPMC_DEBUG enum pmc_class amd_pmc_class; #endif - +int AMD_cpufamily = 0, npmc = 0; /* AMD K7 & K8 PMCs */ struct amd_descr { struct pmc_descr pm_descr; /* "base class" */ @@ -103,12 +103,38 @@ static struct amd_descr amd_pmcdesc[AMD_NPMCS] = }, .pm_evsel = AMD_PMC_EVSEL_3, .pm_perfctr = AMD_PMC_PERFCTR_3 - } + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_4, + .pm_perfctr = AMD_PMC_PERFCTR_4 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_5, + .pm_perfctr = AMD_PMC_PERFCTR_5 + }, }; struct amd_event_code_map { enum pmc_event pe_ev; /* enum value */ +#if defined(__i386__) uint8_t pe_code; /* encoded event mask */ +#elif defined(__amd64__) + uint16_t pe_code; /* encoded event mask */ +#endif uint8_t pe_mask; /* bits allowed in unit mask */ }; @@ -237,7 +263,79 @@ const struct amd_event_code_map amd_event_codes[] = { { PMC_EV_K8_NB_PROBE_RESULT, 0xEC, 0x0F }, { PMC_EV_K8_NB_HT_BUS0_BANDWIDTH, 0xF6, 0x0F }, { PMC_EV_K8_NB_HT_BUS1_BANDWIDTH, 0xF7, 0x0F }, - { PMC_EV_K8_NB_HT_BUS2_BANDWIDTH, 0xF8, 0x0F } + { PMC_EV_K8_NB_HT_BUS2_BANDWIDTH, 0xF8, 0x0F }, + { PMC_EV_F17H_FPU_PIPEASSIGMENT, 0x00, 0xFF }, + { PMC_EV_F17H_FP_SCHED_EMPTY, 0x01, 0x00 }, + { PMC_EV_F17H_FP_RET_X87_FPOPS, 0x02, 0x07 }, + { PMC_EV_F17H_FP_RET_SSEAVX_OPS, 0x03, 0xFF }, + { PMC_EV_F17H_FP_NUM_MOVELIM_SCAL_OPT, 0x04, 0x0F }, + { PMC_EV_F17H_FP_RET_SEROPS, 0x05, 0x0F }, + { PMC_EV_F17H_LS_BAD_STATUS2, 0x24, 0x07 }, + { PMC_EV_F17H_LS_LOCKS, 0x25, 0x0F }, + { PMC_EV_F17H_LS_RET_CLFLUSH_INST, 0x26, 0x00 }, + { PMC_EV_F17H_LS_RET_CPUID_INST, 0x27, 0x00 }, + { PMC_EV_F17H_LS_DISPATCH, 0x29, 0x07 }, + { PMC_EV_F17H_LS_SMI_RX, 0x2B, 0x00 }, + { PMC_EV_F17H_LS_STLF, 0x35, 0x00 }, + { PMC_EV_F17H_LS_STLF_COMMITCANCEL, 0x37, 0x00 }, + { PMC_EV_F17H_LS_DC_ACCESS, 0x40, 0x00 }, + { PMC_EV_F17H_LS_MAB_ALLOCPIPE, 0x41, 0x1F }, + { PMC_EV_F17H_LS_REFFILS_FROM_SYS, 0x43, 0x5B }, + { PMC_EV_F17H_LS_L1_DTLBMISS, 0x45, 0xFF }, + { PMC_EV_F17H_LS_TABLEWALKER, 0x46, 0x0F }, + { PMC_EV_F17H_LS_MISAL_ACCESS, 0x47, 0x00 }, + { PMC_EV_F17H_LS_PREF_INST_DISPATCH, 0x4B, 0x07 }, + { PMC_EV_F17H_LS_HWPF_ALLOCATED, 0x4C, 0x03 }, + { PMC_EV_F17H_LS_HWPF_HIT, 0x4D, 0x03 }, + { PMC_EV_F17H_LS_TW_INPROG_DSIDE, 0x4E, 0x0F }, + { PMC_EV_F17H_LS_INEF_SW_PREF, 0x52, 0x03 }, + { PMC_EV_F17H_LS_MAB_MCH_CNT, 0x55, 0x00 }, + { PMC_EV_F17H_LS_HW_PF_MABALLOC, 0x57, 0x07 }, + { PMC_EV_F17H_LS_HW_PF_MATCH, 0x58, 0x07 }, + { PMC_EV_F17H_LS_SW_PF_DCFILLS, 0x59, 0x5B }, + { PMC_EV_F17H_LS_HW_PF_DCFILLS, 0x5A, 0x5B }, + { PMC_EV_F17H_LS_TW_DCFILLS, 0x5B, 0x5B }, + { PMC_EV_F17H_LS_ALLOC_MAB_COUNT, 0x5F, 0x00 }, + { PMC_EV_F17H_LS_TW_INITLEVEL, 0x6E, 0xFF }, + { PMC_EV_F17H_LS_NOT_HALTED_CYCLE, 0x76, 0x00 }, + { PMC_EV_F17H_LS_TW_RETURN_TYPES, 0x170, 0xCD }, + { PMC_EV_F17H_IC_FW32, 0x80, 0x00 }, + { PMC_EV_F17H_IC_FW32_MISS, 0x81, 0x00 }, + { PMC_EV_F17H_IC_CACHEFILL_L2, 0x82, 0x00 }, + { PMC_EV_F17H_IC_CACHEFILL_SYS, 0x83, 0x00 }, + { PMC_EV_F17H_BP_L1TLBMISS_L2HIT, 0x84, 0x00 }, + { PMC_EV_F17H_BP_L1TLBMISS_L2MISS, 0x85, 0x00 }, + { PMC_EV_F17H_IC_FETCHSTALL, 0x87, 0x07 }, + { PMC_EV_F17H_BP_L1_BTBCORRECT, 0x8A, 0x00 }, + { PMC_EV_F17H_BP_L2_BTBCORRECT, 0x8B, 0x00 }, + { PMC_EV_F17H_IC_CACHEINVAL, 0x8C, 0x03 }, + { PMC_EV_F17H_BP_TLB_REL, 0x99, 0x00 }, + { PMC_EV_F17H_ICOC_MODE_SWITCH, 0x28A, 0x03 }, + { PMC_EV_F17H_DE_DISPATCH_TOKEN_STALLS, 0xAF, 0x7F }, + { PMC_EV_F17H_EX_RET_INST, 0xC0, 0x00 }, + { PMC_EV_F17H_EX_RET_COPS, 0xC1, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN, 0xC2, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_MISP, 0xC3, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_TKN, 0xC4, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_TKN_MISP, 0xC5, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_FAR, 0xC6, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_RESYNC, 0xC7, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_NEAR_RET, 0xC8, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_NEAR_RET_MISPRED, 0xC9, 0x00 }, + { PMC_EV_F17H_EX_RET_BRN_IND_MISP, 0xCA, 0x00 }, + { PMC_EV_F17H_EX_RET_MMX_FP_INSTR, 0xCB, 0x07 }, + { PMC_EV_F17H_EX_RET_COND_BRN, 0xD1, 0x00 }, + { PMC_EV_F17H_EX_DIV_BUSY, 0xD3, 0x00 }, + { PMC_EV_F17H_EX_DIV_COUNT, 0xD4, 0x00 }, + { PMC_EV_F17H_L2_REQUEST_G1, 0x60, 0xFF }, + { PMC_EV_F17H_L2_REQUEST_G2, 0x61, 0xFF }, + { PMC_EV_F17H_L2_LATENCY, 0x62, 0x01 }, + { PMC_EV_F17H_L2_WBCREQ, 0x63, 0x7F }, + { PMC_EV_F17H_L2_CACHEREQSTAT, 0x64, 0xFF }, + { PMC_EV_F17H_L2_SMCEVENTS, 0x67, 0x7F }, + { PMC_EV_F17H_L2_FILLPENDING, 0x6D, 0x01 }, + { PMC_EV_F17H_EX_TAGGED_IBSOPS, 0x1CF, 0x07 }, + { PMC_EV_F17H_EX_RET_FUSED_BRNCH_INST, 0x1D0, 0x00 } }; @@ -267,7 +365,7 @@ amd_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < npmc, ("[amd,%d] illegal row-index %d", __LINE__, ri)); KASSERT(amd_pcpu[cpu], ("[amd,%d] null per-cpu, cpu %d", __LINE__, cpu)); @@ -316,7 +414,7 @@ amd_write_pmc(int cpu, int ri, pmc_value_t v) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < npmc, ("[amd,%d] illegal row-index %d", __LINE__, ri)); pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; @@ -359,7 +457,7 @@ amd_config_pmc(int cpu, int ri, struct pmc *pm) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < npmc, ("[amd,%d] illegal row-index %d", __LINE__, ri)); phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; @@ -433,15 +531,21 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { int i; - uint32_t allowed_unitmask, caps, config, unitmask; + uint32_t allowed_unitmask, caps, unitmask; + uint16_t eventval, extevent; enum pmc_event pe; const struct pmc_descr *pd; (void) cpu; +#if defined(__i386__) + uint32_t config; +#elif defined(__amd64__) + uint64_t config; +#endif KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); - KASSERT(ri >= 0 && ri < AMD_NPMCS, + KASSERT(ri >= 0 && ri < npmc, ("[amd,%d] illegal row index %d", __LINE__, ri)); pd = &amd_pmcdesc[ri].pm_descr; @@ -463,8 +567,26 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, config = allowed_unitmask = 0; for (i = 0; i < amd_event_codes_size; i++) if (amd_event_codes[i].pe_ev == pe) { +#if defined(__i386__) config = - AMD_PMC_TO_EVENTMASK(amd_event_codes[i].pe_code); + AMD_PMC_TO_EVENTMASK( + amd_event_codes[i].pe_code); +#elif defined(__amd64__) + eventval = + AMD_PMC_TO_EVENTMASK( + amd_event_codes[i].pe_code); + if (eventval & AMD_PMC_EXTENDEDEVMASK) { + extevent = (eventval & AMD_PMC_EXTENDEDEVMASK); + config = (uint64_t) + extevent << AMD_PMC_EXTENDEDEVBIT; + config |= eventval & AMD_PMC_EVENTMASK_EXT; + } else { + config |= + AMD_PMC_TO_EVENTMASK( *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Fri Oct 26 06:12:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5448910D7FA1; Fri, 26 Oct 2018 06:12:57 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0579286034; Fri, 26 Oct 2018 06:12:57 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D9A011D0C7; Fri, 26 Oct 2018 06:12:56 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9Q6CuCW033692; Fri, 26 Oct 2018 06:12:56 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9Q6CugK033690; Fri, 26 Oct 2018 06:12:56 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201810260612.w9Q6CugK033690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 26 Oct 2018 06:12:56 +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: r339769 - in stable/11/sys: dev/hwpmc i386/include X-SVN-Group: stable-11 X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in stable/11/sys: dev/hwpmc i386/include X-SVN-Commit-Revision: 339769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 06:12:57 -0000 Author: mmacy Date: Fri Oct 26 06:12:56 2018 New Revision: 339769 URL: https://svnweb.freebsd.org/changeset/base/339769 Log: fix i386 breakage caused by r339767 Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c stable/11/sys/i386/include/pmc_mdep.h Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 05:25:22 2018 (r339768) +++ stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 06:12:56 2018 (r339769) @@ -130,11 +130,7 @@ static struct amd_descr amd_pmcdesc[AMD_NPMCS] = struct amd_event_code_map { enum pmc_event pe_ev; /* enum value */ -#if defined(__i386__) - uint8_t pe_code; /* encoded event mask */ -#elif defined(__amd64__) uint16_t pe_code; /* encoded event mask */ -#endif uint8_t pe_mask; /* bits allowed in unit mask */ }; @@ -532,7 +528,6 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, { int i; uint32_t allowed_unitmask, caps, unitmask; - uint16_t eventval, extevent; enum pmc_event pe; const struct pmc_descr *pd; @@ -541,6 +536,7 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, uint32_t config; #elif defined(__amd64__) uint64_t config; + uint16_t eventval, extevent; #endif KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), Modified: stable/11/sys/i386/include/pmc_mdep.h ============================================================================== --- stable/11/sys/i386/include/pmc_mdep.h Fri Oct 26 05:25:22 2018 (r339768) +++ stable/11/sys/i386/include/pmc_mdep.h Fri Oct 26 06:12:56 2018 (r339769) @@ -69,6 +69,7 @@ struct pmc_mdep; #define PMC_MDEP_CLASS_INDEX_TSC 1 #define PMC_MDEP_CLASS_INDEX_K7 2 #define PMC_MDEP_CLASS_INDEX_K8 2 +#define PMC_MDEP_CLASS_INDEX_F17H 2 #define PMC_MDEP_CLASS_INDEX_P4 2 #define PMC_MDEP_CLASS_INDEX_P5 2 #define PMC_MDEP_CLASS_INDEX_P6 2 From owner-svn-src-stable@freebsd.org Fri Oct 26 08:52:23 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD3010DC387; Fri, 26 Oct 2018 08:52:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5177C6D253; Fri, 26 Oct 2018 08:52:23 +0000 (UTC) (envelope-from mmacy@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32AC51EADC; Fri, 26 Oct 2018 08:52:23 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9Q8qNfu015120; Fri, 26 Oct 2018 08:52:23 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9Q8qNFc015119; Fri, 26 Oct 2018 08:52:23 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201810260852.w9Q8qNFc015119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 26 Oct 2018 08:52: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: r339771 - stable/11/sys/dev/hwpmc X-SVN-Group: stable-11 X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: stable/11/sys/dev/hwpmc X-SVN-Commit-Revision: 339771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 08:52:23 -0000 Author: mmacy Date: Fri Oct 26 08:52:22 2018 New Revision: 339771 URL: https://svnweb.freebsd.org/changeset/base/339771 Log: fix up more issues introduced by failing to have run TB before r339767 Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c Modified: stable/11/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 08:12:28 2018 (r339770) +++ stable/11/sys/dev/hwpmc/hwpmc_amd.c Fri Oct 26 08:52:22 2018 (r339771) @@ -816,11 +816,12 @@ amd_intr(int cpu, struct trapframe *tf) v = pm->pm_sc.pm_reloadcount; config = rdmsr(evsel); + KASSERT((config & ~AMD_PMC_ENABLE) == (pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE), - ("[amd,%d] config mismatch reg=0x%x pm=0x%x", __LINE__, - config, pm->pm_md.pm_amd.pm_amd_evsel)); - + ("[amd,%d] config mismatch reg=0x%jx pm=0x%jx", __LINE__, + (uintmax_t)config, (uintmax_t)pm->pm_md.pm_amd.pm_amd_evsel)); + wrmsr(evsel, config & ~AMD_PMC_ENABLE); wrmsr(perfctr, AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(v)); @@ -1195,9 +1196,12 @@ pmc_amd_finalize(struct pmc_mdep *md) } else if (AMD_cpufamily == 0x17) { classindex = PMC_MDEP_CLASS_INDEX_F17H; pmcclass = PMC_CLASS_F17H; - } else + } else { + classindex = PMC_MDEP_CLASS_INDEX_K8; + pmcclass = PMC_CLASS_K8; (void) printf("pmc:AMD CPU family unknown.\n"); - + } + } KASSERT(md->pmd_classdep[classindex].pcd_class == pmcclass, From owner-svn-src-stable@freebsd.org Fri Oct 26 10:20:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EECFA10DE3A6; Fri, 26 Oct 2018 10:20:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2D8E70088; Fri, 26 Oct 2018 10:20:04 +0000 (UTC) (envelope-from ae@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 84C451F87C; Fri, 26 Oct 2018 10:20:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9QAK4WY056195; Fri, 26 Oct 2018 10:20:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9QAK3uQ056193; Fri, 26 Oct 2018 10:20:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201810261020.w9QAK3uQ056193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 26 Oct 2018 10:20:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339772 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 339772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 10:20:05 -0000 Author: ae Date: Fri Oct 26 10:20:03 2018 New Revision: 339772 URL: https://svnweb.freebsd.org/changeset/base/339772 Log: MFC r339532 (by glebius): Fix exiting an epoch(9) we never entered. May happen only with MAC. Approved by: re (kib) Modified: stable/12/sys/net/if_gif.c stable/12/sys/net/if_gre.c stable/12/sys/net/if_me.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_gif.c ============================================================================== --- stable/12/sys/net/if_gif.c Fri Oct 26 08:52:22 2018 (r339771) +++ stable/12/sys/net/if_gif.c Fri Oct 26 10:20:03 2018 (r339772) @@ -272,6 +272,7 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m) uint8_t proto, ecn; int error; + GIF_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { @@ -280,7 +281,6 @@ gif_transmit(struct ifnet *ifp, struct mbuf *m) } #endif error = ENETDOWN; - GIF_RLOCK(); sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || Modified: stable/12/sys/net/if_gre.c ============================================================================== --- stable/12/sys/net/if_gre.c Fri Oct 26 08:52:22 2018 (r339771) +++ stable/12/sys/net/if_gre.c Fri Oct 26 10:20:03 2018 (r339772) @@ -550,6 +550,7 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) uint16_t proto; len = 0; + GRE_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) { @@ -558,7 +559,6 @@ gre_transmit(struct ifnet *ifp, struct mbuf *m) } #endif error = ENETDOWN; - GRE_RLOCK(); sc = ifp->if_softc; if ((ifp->if_flags & IFF_MONITOR) != 0 || (ifp->if_flags & IFF_UP) == 0 || Modified: stable/12/sys/net/if_me.c ============================================================================== --- stable/12/sys/net/if_me.c Fri Oct 26 08:52:22 2018 (r339771) +++ stable/12/sys/net/if_me.c Fri Oct 26 10:20:03 2018 (r339772) @@ -479,13 +479,13 @@ me_transmit(struct ifnet *ifp, struct mbuf *m) uint32_t af; int error, hlen, plen; + ME_RLOCK(); #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error != 0) goto drop; #endif error = ENETDOWN; - ME_RLOCK(); sc = ifp->if_softc; if (sc == NULL || !ME_READY(sc) || (ifp->if_flags & IFF_MONITOR) != 0 || From owner-svn-src-stable@freebsd.org Sat Oct 27 03:16:34 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 454AA10D4E4E; Sat, 27 Oct 2018 03:16:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DD8E179975; Sat, 27 Oct 2018 03:16:33 +0000 (UTC) (envelope-from jhibbits@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8B222634; Sat, 27 Oct 2018 03:16:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9R3GX3e088782; Sat, 27 Oct 2018 03:16:33 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9R3GWIb088776; Sat, 27 Oct 2018 03:16:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201810270316.w9R3GWIb088776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 27 Oct 2018 03:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339803 - in stable/12/sys/powerpc: booke include powerpc X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable/12/sys/powerpc: booke include powerpc X-SVN-Commit-Revision: 339803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 03:16:34 -0000 Author: jhibbits Date: Sat Oct 27 03:16:32 2018 New Revision: 339803 URL: https://svnweb.freebsd.org/changeset/base/339803 Log: MFC r339514: powerpcspe: Implement SPE exception handling The Signal Processing Engine (SPE) found in Freescale e500 cores (and others) offloads IEEE-754 compliance (NaN, Inf handling, overflow, underflow) to software, most likely as a means of simplifying the APU silicon. Some software, like AbiWord, needs full IEEE-754 compliance, including NaN handling. Implement the necessary bits to enable it. Approved by: re(kib) Modified: stable/12/sys/powerpc/booke/booke_machdep.c stable/12/sys/powerpc/booke/spe.c stable/12/sys/powerpc/booke/trap_subr.S stable/12/sys/powerpc/include/spr.h stable/12/sys/powerpc/include/trap.h stable/12/sys/powerpc/powerpc/exec_machdep.c stable/12/sys/powerpc/powerpc/swtch32.S Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/powerpc/booke/booke_machdep.c ============================================================================== --- stable/12/sys/powerpc/booke/booke_machdep.c Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/booke/booke_machdep.c Sat Oct 27 03:16:32 2018 (r339803) @@ -189,6 +189,10 @@ extern void *int_debug; extern void *int_debug_ed; extern void *int_vec; extern void *int_vecast; +#ifdef __SPE__ +extern void *int_spe_fpdata; +extern void *int_spe_fpround; +#endif #ifdef HWPMC_HOOKS extern void *int_performance_counter; #endif @@ -258,6 +262,10 @@ ivor_setup(void) case FSL_E500v1: case FSL_E500v2: SET_TRAP(SPR_IVOR32, int_vec); +#ifdef __SPE__ + SET_TRAP(SPR_IVOR33, int_spe_fpdata); + SET_TRAP(SPR_IVOR34, int_spe_fpround); +#endif break; } Modified: stable/12/sys/powerpc/booke/spe.c ============================================================================== --- stable/12/sys/powerpc/booke/spe.c Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/booke/spe.c Sat Oct 27 03:16:32 2018 (r339803) @@ -40,9 +40,19 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include +#include +#include +#include + +void spe_handle_fpdata(struct trapframe *); +void spe_handle_fpround(struct trapframe *); +static int spe_emu_instr(uint32_t, struct fpemu *, struct fpn **, uint32_t *); + static void save_vec_int(struct thread *td) { @@ -75,7 +85,7 @@ save_vec_int(struct thread *td) __asm ( "evxor 0,0,0\n" "evaddumiaaw 0,0\n" - "evstdd 0,0(%0)" :: "b"(&pcb->pcb_vec.vr[17][0])); + "evstdd 0,0(%0)" :: "b"(&pcb->pcb_vec.spare[0])); pcb->pcb_vec.vscr = mfspr(SPR_SPEFSCR); /* @@ -113,6 +123,7 @@ enable_vec(struct thread *td) if (!(pcb->pcb_flags & PCB_VEC)) { memset(&pcb->pcb_vec, 0, sizeof pcb->pcb_vec); pcb->pcb_flags |= PCB_VEC; + pcb->pcb_vec.vscr = mfspr(SPR_SPEFSCR); } /* @@ -121,12 +132,11 @@ enable_vec(struct thread *td) */ msr = mfmsr(); mtmsr(msr | PSL_VEC); - isync(); /* Restore SPEFSCR and ACC. Use %r0 as the scratch for ACC. */ mtspr(SPR_SPEFSCR, pcb->pcb_vec.vscr); __asm __volatile("evldd 0, 0(%0); evmra 0,0\n" - :: "b"(&pcb->pcb_vec.vr[17][0])); + :: "b"(&pcb->pcb_vec.spare[0])); /* * The lower half of each register will be restored on trap return. Use @@ -180,4 +190,445 @@ save_vec_nodrop(struct thread *td) } save_vec_int(td); +} + + +#define SPE_INST_MASK 0x31f +#define EADD 0x200 +#define ESUB 0x201 +#define EABS 0x204 +#define ENABS 0x205 +#define ENEG 0x206 +#define EMUL 0x208 +#define EDIV 0x209 +#define ECMPGT 0x20c +#define ECMPLT 0x20d +#define ECMPEQ 0x20e +#define ECFUI 0x210 +#define ECFSI 0x211 +#define ECTUI 0x214 +#define ECTSI 0x215 +#define ECTUF 0x216 +#define ECTSF 0x217 +#define ECTUIZ 0x218 +#define ECTSIZ 0x21a + +#define SPE 0x4 +#define SPFP 0x6 +#define DPFP 0x7 + +#define SPE_OPC 4 +#define OPC_SHIFT 26 + +#define EVFSADD 0x280 +#define EVFSSUB 0x281 +#define EVFSABS 0x284 +#define EVFSNABS 0x285 +#define EVFSNEG 0x286 +#define EVFSMUL 0x288 +#define EVFSDIV 0x289 +#define EVFSCMPGT 0x28c +#define EVFSCMPLT 0x28d +#define EVFSCMPEQ 0x28e +#define EVFSCFUI 0x290 +#define EVFSCFSI 0x291 +#define EVFSCTUI 0x294 +#define EVFSCTSI 0x295 +#define EVFSCTUF 0x296 +#define EVFSCTSF 0x297 +#define EVFSCTUIZ 0x298 +#define EVFSCTSIZ 0x29a + +#define EFSADD 0x2c0 +#define EFSSUB 0x2c1 +#define EFSABS 0x2c4 +#define EFSNABS 0x2c5 +#define EFSNEG 0x2c6 +#define EFSMUL 0x2c8 +#define EFSDIV 0x2c9 +#define EFSCMPGT 0x2cc +#define EFSCMPLT 0x2cd +#define EFSCMPEQ 0x2ce +#define EFSCFD 0x2cf +#define EFSCFUI 0x2d0 +#define EFSCFSI 0x2d1 +#define EFSCTUI 0x2d4 +#define EFSCTSI 0x2d5 +#define EFSCTUF 0x2d6 +#define EFSCTSF 0x2d7 +#define EFSCTUIZ 0x2d8 +#define EFSCTSIZ 0x2da + +#define EFDADD 0x2e0 +#define EFDSUB 0x2e1 +#define EFDABS 0x2e4 +#define EFDNABS 0x2e5 +#define EFDNEG 0x2e6 +#define EFDMUL 0x2e8 +#define EFDDIV 0x2e9 +#define EFDCMPGT 0x2ec +#define EFDCMPLT 0x2ed +#define EFDCMPEQ 0x2ee +#define EFDCFS 0x2ef +#define EFDCFUI 0x2f0 +#define EFDCFSI 0x2f1 +#define EFDCTUI 0x2f4 +#define EFDCTSI 0x2f5 +#define EFDCTUF 0x2f6 +#define EFDCTSF 0x2f7 +#define EFDCTUIZ 0x2f8 +#define EFDCTSIZ 0x2fa + +enum { + NONE, + SINGLE, + DOUBLE, + VECTOR, +}; + +static uint32_t fpscr_to_spefscr(uint32_t fpscr) +{ + uint32_t spefscr; + + spefscr = 0; + + if (fpscr & FPSCR_VX) + spefscr |= SPEFSCR_FINV; + if (fpscr & FPSCR_OX) + spefscr |= SPEFSCR_FOVF; + if (fpscr & FPSCR_UX) + spefscr |= SPEFSCR_FUNF; + if (fpscr & FPSCR_ZX) + spefscr |= SPEFSCR_FDBZ; + if (fpscr & FPSCR_XX) + spefscr |= SPEFSCR_FX; + + return (spefscr); +} + +/* Sign is 0 for unsigned, 1 for signed. */ +static int +spe_to_int(struct fpemu *fpemu, struct fpn *fpn, uint32_t *val, int sign) +{ + uint32_t res[2]; + + res[0] = fpu_ftox(fpemu, fpn, res); + if (res[0] != UINT_MAX && res[0] != 0) + fpemu->fe_cx |= FPSCR_OX; + else if (sign == 0 && res[0] != 0) + fpemu->fe_cx |= FPSCR_UX; + else + *val = res[1]; + + return (0); +} + +/* Masked instruction */ +/* + * For compare instructions, returns 1 if success, 0 if not. For all others, + * returns -1, or -2 if no result needs recorded. + */ +static int +spe_emu_instr(uint32_t instr, struct fpemu *fpemu, + struct fpn **result, uint32_t *iresult) +{ + switch (instr & SPE_INST_MASK) { + case EABS: + case ENABS: + case ENEG: + /* Taken care of elsewhere. */ + break; + case ECTUIZ: + fpemu->fe_cx &= ~FPSCR_RN; + fpemu->fe_cx |= FP_RZ; + case ECTUI: + spe_to_int(fpemu, &fpemu->fe_f2, iresult, 0); + return (-1); + case ECTSIZ: + fpemu->fe_cx &= ~FPSCR_RN; + fpemu->fe_cx |= FP_RZ; + case ECTSI: + spe_to_int(fpemu, &fpemu->fe_f2, iresult, 1); + return (-1); + case EADD: + *result = fpu_add(fpemu); + break; + case ESUB: + *result = fpu_sub(fpemu); + break; + case EMUL: + *result = fpu_mul(fpemu); + break; + case EDIV: + *result = fpu_div(fpemu); + break; + case ECMPGT: + fpu_compare(fpemu, 0); + if (fpemu->fe_cx & FPSCR_FG) + return (1); + return (0); + case ECMPLT: + fpu_compare(fpemu, 0); + if (fpemu->fe_cx & FPSCR_FL) + return (1); + return (0); + case ECMPEQ: + fpu_compare(fpemu, 0); + if (fpemu->fe_cx & FPSCR_FE) + return (1); + return (0); + default: + printf("Unknown instruction %x\n", instr); + } + + return (-1); +} + +static int +spe_explode(struct fpemu *fe, struct fpn *fp, uint32_t type, + uint32_t hi, uint32_t lo) +{ + uint32_t s; + + fp->fp_sign = hi >> 31; + fp->fp_sticky = 0; + switch (type) { + case SINGLE: + s = fpu_stof(fp, hi); + break; + + case DOUBLE: + s = fpu_dtof(fp, hi, lo); + break; + } + + if (s == FPC_QNAN && (fp->fp_mant[0] & FP_QUIETBIT) == 0) { + /* + * Input is a signalling NaN. All operations that return + * an input NaN operand put it through a ``NaN conversion'', + * which basically just means ``turn on the quiet bit''. + * We do this here so that all NaNs internally look quiet + * (we can tell signalling ones by their class). + */ + fp->fp_mant[0] |= FP_QUIETBIT; + fe->fe_cx = FPSCR_VXSNAN; /* assert invalid operand */ + s = FPC_SNAN; + } + fp->fp_class = s; + + return (0); +} + +void +spe_handle_fpdata(struct trapframe *frame) +{ + struct fpemu fpemu; + struct fpn *result; + uint32_t instr, instr_sec_op; + uint32_t cr_shift, ra, rb, rd, src; + uint32_t high, low, res; /* For vector operations. */ + uint32_t spefscr = 0; + uint32_t ftod_res[2]; + int width; /* Single, Double, Vector, Integer */ + int err; + + err = fueword32((void *)frame->srr0, &instr); + + if (err != 0) + return; + /* Fault. */; + + if ((instr >> OPC_SHIFT) != SPE_OPC) + return; + + /* + * 'cr' field is the upper 3 bits of rd. Magically, since a) rd is 5 + * bits, b) each 'cr' field is 4 bits, and c) Only the 'GT' bit is + * modified for most compare operations, the full value of rd can be + * used as a shift value. + */ + rd = (instr >> 21) & 0x1f; + ra = (instr >> 16) & 0x1f; + rb = (instr >> 11) & 0x1f; + src = (instr >> 5) & 0x7; + cr_shift = 28 - (rd & 0x1f); + + instr_sec_op = (instr & 0x7ff); + + memset(&fpemu, 0, sizeof(fpemu)); + + width = NONE; + switch (src) { + case SPE: + save_vec_nodrop(curthread); + switch (instr_sec_op) { + case EVFSABS: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); + break; + case EVFSNABS: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); + break; + case EVFSNEG: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); + break; + default: + /* High word */ + spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, + curthread->td_pcb->pcb_vec.vr[ra][0], 0); + spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, + curthread->td_pcb->pcb_vec.vr[rb][0], 0); + high = spe_emu_instr(instr_sec_op, &fpemu, &result, + &curthread->td_pcb->pcb_vec.vr[rd][0]); + + spefscr = fpscr_to_spefscr(fpemu.fe_cx) << 16; + /* Clear the fpemu to start over on the lower bits. */ + memset(&fpemu, 0, sizeof(fpemu)); + + /* Now low word */ + spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, + frame->fixreg[ra], 0); + spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, + frame->fixreg[rb], 0); + spefscr |= fpscr_to_spefscr(fpemu.fe_cx); + low = spe_emu_instr(instr_sec_op, &fpemu, &result, + &frame->fixreg[rd]); + if (instr_sec_op == EVFSCMPEQ || + instr_sec_op == EVFSCMPGT || + instr_sec_op == EVFSCMPLT) { + res = (high << 3) | (low << 2) | + ((high | low) << 1) | (high & low); + width = NONE; + } else + width = VECTOR; + break; + } + enable_vec(curthread); + goto end; + + case SPFP: + switch (instr_sec_op) { + case EFSABS: + frame->fixreg[rd] = frame->fixreg[ra] & ~(1U << 31); + break; + case EFSNABS: + frame->fixreg[rd] = frame->fixreg[ra] | (1U << 31); + break; + case EFSNEG: + frame->fixreg[rd] = frame->fixreg[ra] ^ (1U << 31); + break; + case EFSCFD: + spe_explode(&fpemu, &fpemu.fe_f3, DOUBLE, + curthread->td_pcb->pcb_vec.vr[rb][0], + frame->fixreg[rb]); + result = &fpemu.fe_f3; + width = SINGLE; + break; + default: + spe_explode(&fpemu, &fpemu.fe_f1, SINGLE, + frame->fixreg[ra], 0); + spe_explode(&fpemu, &fpemu.fe_f2, SINGLE, + frame->fixreg[rb], 0); + width = SINGLE; + } + break; + case DPFP: + save_vec_nodrop(curthread); + switch (instr_sec_op) { + case EFDABS: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] & ~(1U << 31); + break; + case EFDNABS: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] | (1U << 31); + break; + case EFDNEG: + curthread->td_pcb->pcb_vec.vr[rd][0] = + curthread->td_pcb->pcb_vec.vr[ra][0] ^ (1U << 31); + break; + case EFDCFS: + spe_explode(&fpemu, &fpemu.fe_f3, SINGLE, + frame->fixreg[rb], 0); + result = &fpemu.fe_f3; + width = DOUBLE; + break; + default: + spe_explode(&fpemu, &fpemu.fe_f1, DOUBLE, + curthread->td_pcb->pcb_vec.vr[ra][0], + frame->fixreg[ra]); + spe_explode(&fpemu, &fpemu.fe_f2, DOUBLE, + curthread->td_pcb->pcb_vec.vr[rb][0], + frame->fixreg[rb]); + width = DOUBLE; + } + break; + } + switch (instr_sec_op) { + case EFDCFS: + case EFSCFD: + /* Already handled. */ + break; + default: + res = spe_emu_instr(instr_sec_op, &fpemu, &result, + &frame->fixreg[rd]); + if (res != -1) + res <<= 2; + break; + } + + switch (instr_sec_op & SPE_INST_MASK) { + case ECMPEQ: + case ECMPGT: + case ECMPLT: + frame->cr &= ~(0xf << cr_shift); + frame->cr |= (res << cr_shift); + break; + case ECTUI: + case ECTUIZ: + case ECTSI: + case ECTSIZ: + break; + default: + switch (width) { + case NONE: + case VECTOR: + break; + case SINGLE: + frame->fixreg[rd] = fpu_ftos(&fpemu, result); + break; + case DOUBLE: + curthread->td_pcb->pcb_vec.vr[rd][0] = + fpu_ftod(&fpemu, result, ftod_res); + frame->fixreg[rd] = ftod_res[1]; + enable_vec(curthread); + break; + default: + panic("Unknown storage width %d", width); + break; + } + } + +end: + spefscr |= (mfspr(SPR_SPEFSCR) & ~SPEFSCR_FINVS); + mtspr(SPR_SPEFSCR, spefscr); + frame->srr0 += 4; + + return; +} + +void +spe_handle_fpround(struct trapframe *frame) +{ + + /* + * Punt fpround exceptions for now. This leaves the truncated result in + * the register. We'll deal with overflow/underflow later. + */ + return; } Modified: stable/12/sys/powerpc/booke/trap_subr.S ============================================================================== --- stable/12/sys/powerpc/booke/trap_subr.S Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/booke/trap_subr.S Sat Oct 27 03:16:32 2018 (r339803) @@ -638,6 +638,28 @@ INTERRUPT(int_vecast) b trap_common +#ifdef __SPE__ +/***************************************************************************** + * Floating point Assist interrupt + ****************************************************************************/ +INTERRUPT(int_spe_fpdata) + STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) + FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_SPFPD) + addi %r3, %r1, CALLSIZE + bl spe_handle_fpdata + FRAME_LEAVE(SPR_SRR0, SPR_SRR1) + rfi + +INTERRUPT(int_spe_fpround) + STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1) + FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_SPFPR) + addi %r3, %r1, CALLSIZE + bl spe_handle_fpround + FRAME_LEAVE(SPR_SRR0, SPR_SRR1) + rfi +#endif + + #ifdef HWPMC_HOOKS /***************************************************************************** * PMC Interrupt Modified: stable/12/sys/powerpc/include/spr.h ============================================================================== --- stable/12/sys/powerpc/include/spr.h Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/include/spr.h Sat Oct 27 03:16:32 2018 (r339803) @@ -245,6 +245,33 @@ #define SPR_PTCR 0x1d0 /* Partition Table Control Register */ #define SPR_SPEFSCR 0x200 /* ..8 Signal Processing Engine FSCR. */ +#define SPEFSCR_SOVH 0x80000000 +#define SPEFSCR_OVH 0x40000000 +#define SPEFSCR_FGH 0x20000000 +#define SPEFSCR_FXH 0x10000000 +#define SPEFSCR_FINVH 0x08000000 +#define SPEFSCR_FDBZH 0x04000000 +#define SPEFSCR_FUNFH 0x02000000 +#define SPEFSCR_FOVFH 0x01000000 +#define SPEFSCR_FINXS 0x00200000 +#define SPEFSCR_FINVS 0x00100000 +#define SPEFSCR_FDBZS 0x00080000 +#define SPEFSCR_FUNFS 0x00040000 +#define SPEFSCR_FOVFS 0x00020000 +#define SPEFSCR_SOV 0x00008000 +#define SPEFSCR_OV 0x00004000 +#define SPEFSCR_FG 0x00002000 +#define SPEFSCR_FX 0x00001000 +#define SPEFSCR_FINV 0x00000800 +#define SPEFSCR_FDBZ 0x00000400 +#define SPEFSCR_FUNF 0x00000200 +#define SPEFSCR_FOVF 0x00000100 +#define SPEFSCR_FINXE 0x00000040 +#define SPEFSCR_FINVE 0x00000020 +#define SPEFSCR_FDBZE 0x00000010 +#define SPEFSCR_FUNFE 0x00000008 +#define SPEFSCR_FOVFE 0x00000004 +#define SPEFSCR_FRMC_M 0x00000003 #define SPR_IBAT0U 0x210 /* .6. Instruction BAT Reg 0 Upper */ #define SPR_IBAT0L 0x211 /* .6. Instruction BAT Reg 0 Lower */ #define SPR_IBAT1U 0x212 /* .6. Instruction BAT Reg 1 Upper */ Modified: stable/12/sys/powerpc/include/trap.h ============================================================================== --- stable/12/sys/powerpc/include/trap.h Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/include/trap.h Sat Oct 27 03:16:32 2018 (r339803) @@ -100,6 +100,8 @@ #define EXC_APU 0x1300 /* Auxiliary Processing Unit */ #define EXC_DEBUG 0x2f10 /* Debug trap */ #define EXC_VECAST_E 0x2f20 /* Altivec Assist (Book-E) */ +#define EXC_SPFPD 0x2f30 /* SPE Floating-point Data */ +#define EXC_SPFPR 0x2f40 /* SPE Floating-point Round */ #define EXC_LAST 0x2f00 /* Last possible exception vector */ Modified: stable/12/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/12/sys/powerpc/powerpc/exec_machdep.c Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/powerpc/exec_machdep.c Sat Oct 27 03:16:32 2018 (r339803) @@ -971,6 +971,10 @@ cpu_copy_thread(struct thread *td, struct thread *td0) pcb2->pcb_context[0] = pcb2->pcb_lr; #endif pcb2->pcb_cpu.aim.usr_vsid = 0; +#ifdef __SPE__ + pcb2->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE | + SPEFSCR_FUNFE | SPEFSCR_FOVFE; +#endif /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; @@ -1016,6 +1020,10 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * } td->td_pcb->pcb_flags = 0; +#ifdef __SPE__ + td->td_pcb->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE | + SPEFSCR_FUNFE | SPEFSCR_FOVFE; +#endif td->td_retval[0] = (register_t)entry; td->td_retval[1] = 0; Modified: stable/12/sys/powerpc/powerpc/swtch32.S ============================================================================== --- stable/12/sys/powerpc/powerpc/swtch32.S Fri Oct 26 23:44:50 2018 (r339802) +++ stable/12/sys/powerpc/powerpc/swtch32.S Sat Oct 27 03:16:32 2018 (r339803) @@ -212,4 +212,8 @@ ENTRY(fork_trampoline) trapframe to simulate FRAME_SETUP does when allocating space for a frame pointer/saved LR */ +#ifdef __SPE__ + li %r3,SPEFSCR_FINVE|SPEFSCR_FDBZE|SPEFSCR_FUNFE|SPEFSCR_FOVFE + mtspr SPR_SPEFSCR, %r3 +#endif b trapexit From owner-svn-src-stable@freebsd.org Sat Oct 27 19:08:07 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BAD010D0BAA; Sat, 27 Oct 2018 19:08:07 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51988778B1; Sat, 27 Oct 2018 19:08:07 +0000 (UTC) (envelope-from des@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 329DD14618; Sat, 27 Oct 2018 19:08:07 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9RJ86Mb082940; Sat, 27 Oct 2018 19:08:06 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9RJ86sk082939; Sat, 27 Oct 2018 19:08:06 GMT (envelope-from des@FreeBSD.org) Message-Id: <201810271908.w9RJ86sk082939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sat, 27 Oct 2018 19:08:06 +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: r339821 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: des X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 339821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 19:08:07 -0000 Author: des Date: Sat Oct 27 19:08:06 2018 New Revision: 339821 URL: https://svnweb.freebsd.org/changeset/base/339821 Log: MFH (r305124): fix case where fd_lastfile is -1. Modified: stable/11/sys/sys/filedesc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/filedesc.h ============================================================================== --- stable/11/sys/sys/filedesc.h Sat Oct 27 18:48:49 2018 (r339820) +++ stable/11/sys/sys/filedesc.h Sat Oct 27 19:08:06 2018 (r339821) @@ -219,7 +219,7 @@ fdeget_locked(struct filedesc *fdp, int fd) FILEDESC_LOCK_ASSERT(fdp); - if ((u_int)fd > fdp->fd_lastfile) + if (fd < 0 || fd > fdp->fd_lastfile) return (NULL); fde = &fdp->fd_ofiles[fd]; From owner-svn-src-stable@freebsd.org Sat Oct 27 21:17:04 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3D3610D3A0D; Sat, 27 Oct 2018 21:17:04 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4962B7B5FF; Sat, 27 Oct 2018 21:17:04 +0000 (UTC) (envelope-from yuripv@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 243D515B1C; Sat, 27 Oct 2018 21:17:04 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9RLH4L1049331; Sat, 27 Oct 2018 21:17:04 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9RLH1Am049318; Sat, 27 Oct 2018 21:17:01 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201810272117.w9RLH1Am049318@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Sat, 27 Oct 2018 21:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r339825 - in stable/12: lib/libc/locale share/colldef share/ctypedef share/mk targets/pseudo/userland tools/tools/locale/tools usr.bin/localedef X-SVN-Group: stable-12 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: in stable/12: lib/libc/locale share/colldef share/ctypedef share/mk targets/pseudo/userland tools/tools/locale/tools usr.bin/localedef X-SVN-Commit-Revision: 339825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 21:17:05 -0000 Author: yuripv Date: Sat Oct 27 21:17:01 2018 New Revision: 339825 URL: https://svnweb.freebsd.org/changeset/base/339825 Log: MFC r339489: Add -b/-l options to localedef(1) to specify output endianness and use it appropriately when building share/ctypedef and share/colldef. This makes the resulting locale data in EL->EB (amd64->powerpc64) cross build and in the native EB build match. Revert the changes done to libc in r308170 as they are no longer needed. PR: 231965 Reviewed by: bapt, emaste, sbruno, 0mp Approved by: re (gjb), kib (mentor) Differential Revision: https://reviews.freebsd.org/D17603 Deleted: stable/12/lib/libc/locale/endian.h Modified: stable/12/lib/libc/locale/collate.c stable/12/lib/libc/locale/rune.c stable/12/share/colldef/Makefile stable/12/share/ctypedef/Makefile stable/12/share/mk/bsd.endian.mk stable/12/targets/pseudo/userland/Makefile.depend stable/12/tools/tools/locale/tools/cldr2def.pl stable/12/usr.bin/localedef/collate.c stable/12/usr.bin/localedef/ctype.c stable/12/usr.bin/localedef/localedef.1 stable/12/usr.bin/localedef/localedef.c stable/12/usr.bin/localedef/localedef.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/locale/collate.c ============================================================================== --- stable/12/lib/libc/locale/collate.c Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/lib/libc/locale/collate.c Sat Oct 27 21:17:01 2018 (r339825) @@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -#include "endian.h" #include "collate.h" #include "setlocale.h" #include "ldpart.h" @@ -162,7 +161,7 @@ __collate_load_tables_l(const char *encoding, struct x if ((info->directive_count < 1) || (info->directive_count >= COLL_WEIGHTS_MAX) || - ((chains = BSWAP(info->chain_count)) < 0)) { + ((chains = info->chain_count) < 0)) { (void) munmap(map, sbuf.st_size); errno = EINVAL; return (_LDP_ERROR); @@ -170,9 +169,9 @@ __collate_load_tables_l(const char *encoding, struct x i = (sizeof (collate_char_t) * (UCHAR_MAX + 1)) + (sizeof (collate_chain_t) * chains) + - (sizeof (collate_large_t) * BSWAP(info->large_count)); + (sizeof (collate_large_t) * info->large_count); for (z = 0; z < info->directive_count; z++) { - i += sizeof (collate_subst_t) * BSWAP(info->subst_count[z]); + i += sizeof (collate_subst_t) * info->subst_count[z]; } if (i != (sbuf.st_size - (TMP - map))) { (void) munmap(map, sbuf.st_size); @@ -185,9 +184,9 @@ __collate_load_tables_l(const char *encoding, struct x TMP += sizeof (collate_char_t) * (UCHAR_MAX + 1); for (z = 0; z < info->directive_count; z++) { - if (BSWAP(info->subst_count[z]) > 0) { + if (info->subst_count[z] > 0) { table->subst_table[z] = (void *)TMP; - TMP += BSWAP(info->subst_count[z]) * sizeof (collate_subst_t); + TMP += info->subst_count[z] * sizeof (collate_subst_t); } else { table->subst_table[z] = NULL; } @@ -198,7 +197,7 @@ __collate_load_tables_l(const char *encoding, struct x TMP += chains * sizeof (collate_chain_t); } else table->chain_pri_table = NULL; - if (BSWAP(info->large_count) > 0) + if (info->large_count > 0) table->large_pri_table = (void *)TMP; else table->large_pri_table = NULL; @@ -211,7 +210,7 @@ static const int32_t * substsearch(struct xlocale_collate *table, const wchar_t key, int pass) { const collate_subst_t *p; - int n = BSWAP(table->info->subst_count[pass]); + int n = table->info->subst_count[pass]; if (n == 0) return (NULL); @@ -223,7 +222,7 @@ substsearch(struct xlocale_collate *table, const wchar return (NULL); p = table->subst_table[pass] + (key & ~COLLATE_SUBST_PRIORITY); - assert(BSWAP(p->key) == key); + assert(p->key == key); return (p->pri); } @@ -232,7 +231,7 @@ static collate_chain_t * chainsearch(struct xlocale_collate *table, const wchar_t *key, int *len) { int low = 0; - int high = BSWAP(table->info->chain_count) - 1; + int high = table->info->chain_count - 1; int next, compar, l; collate_chain_t *p; collate_chain_t *tab = table->chain_pri_table; @@ -243,7 +242,7 @@ chainsearch(struct xlocale_collate *table, const wchar while (low <= high) { next = (low + high) / 2; p = tab + next; - compar = *key - le16toh(*p->str); + compar = *key - *p->str; if (compar == 0) { l = wcsnlen(p->str, COLLATE_STR_LEN); compar = wcsncmp(key, p->str, l); @@ -264,7 +263,7 @@ static collate_large_t * largesearch(struct xlocale_collate *table, const wchar_t key) { int low = 0; - int high = BSWAP(table->info->large_count) - 1; + int high = table->info->large_count - 1; int next, compar; collate_large_t *p; collate_large_t *tab = table->large_pri_table; @@ -275,7 +274,7 @@ largesearch(struct xlocale_collate *table, const wchar while (low <= high) { next = (low + high) / 2; p = tab + next; - compar = key - BSWAP(p->val); + compar = key - p->val; if (compar == 0) return (p); if (compar > 0) @@ -340,15 +339,15 @@ _collate_lookup(struct xlocale_collate *table, const w * Character is a small (8-bit) character. * We just look these up directly for speed. */ - *pri = BSWAP(table->char_pri_table[*t].pri[which]); + *pri = table->char_pri_table[*t].pri[which]; - } else if ((BSWAP(table->info->large_count) > 0) && + } else if ((table->info->large_count > 0) && ((match = largesearch(table, *t)) != NULL)) { /* * Character was found in the extended table. */ - *pri = BSWAP(match->pri.pri[which]); + *pri = match->pri.pri[which]; } else { /* @@ -358,7 +357,7 @@ _collate_lookup(struct xlocale_collate *table, const w /* Mask off sign bit to prevent ordering confusion. */ *pri = (*t & COLLATE_MAX_PRIORITY); } else { - *pri = BSWAP(table->info->undef_pri[which]); + *pri = table->info->undef_pri[which]; } /* No substitutions for undefined characters! */ return; @@ -377,9 +376,9 @@ _collate_lookup(struct xlocale_collate *table, const w * code ensures this for us. */ if ((sptr = substsearch(table, *pri, which)) != NULL) { - if ((*pri = BSWAP(*sptr)) > 0) { + if ((*pri = *sptr) > 0) { sptr++; - *state = BSWAP(*sptr) ? sptr : NULL; + *state = *sptr ? sptr : NULL; } } @@ -521,7 +520,7 @@ static int xfrm(struct xlocale_collate *table, unsigned char *p, int pri, int pass) { /* we use unsigned to ensure zero fill on right shift */ - uint32_t val = BSWAP((uint32_t)table->info->pri_count[pass]); + uint32_t val = (uint32_t)table->info->pri_count[pass]; int nc = 0; while (val) { @@ -681,7 +680,7 @@ __collate_equiv_value(locale_t locale, const wchar_t * e = -1; if (*str <= UCHAR_MAX) e = table->char_pri_table[*str].pri[0]; - else if (BSWAP(table->info->large_count) > 0) { + else if (table->info->large_count > 0) { collate_large_t *match_large; match_large = largesearch(table, *str); if (match_large) @@ -691,7 +690,7 @@ __collate_equiv_value(locale_t locale, const wchar_t * return (1); return (e > 0 ? e : 0); } - if (BSWAP(table->info->chain_count) > 0) { + if (table->info->chain_count > 0) { wchar_t name[COLLATE_STR_LEN]; collate_chain_t *match_chain; int clen; Modified: stable/12/lib/libc/locale/rune.c ============================================================================== --- stable/12/lib/libc/locale/rune.c Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/lib/libc/locale/rune.c Sat Oct 27 21:17:01 2018 (r339825) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" -#include "endian.h" #include "runefile.h" _RuneLocale * @@ -110,29 +109,29 @@ _Read_RuneMagi(const char *fname) } runetype_ext_ranges = (_FileRuneEntry *)variable; - variable = runetype_ext_ranges + BSWAP(frl->runetype_ext_nranges); + variable = runetype_ext_ranges + frl->runetype_ext_nranges; if (variable > lastp) { goto invalid; } maplower_ext_ranges = (_FileRuneEntry *)variable; - variable = maplower_ext_ranges + BSWAP(frl->maplower_ext_nranges); + variable = maplower_ext_ranges + frl->maplower_ext_nranges; if (variable > lastp) { goto invalid; } mapupper_ext_ranges = (_FileRuneEntry *)variable; - variable = mapupper_ext_ranges + BSWAP(frl->mapupper_ext_nranges); + variable = mapupper_ext_ranges + frl->mapupper_ext_nranges; if (variable > lastp) { goto invalid; } frr = runetype_ext_ranges; - for (x = 0; x < BSWAP(frl->runetype_ext_nranges); ++x) { + for (x = 0; x < frl->runetype_ext_nranges; ++x) { uint32_t *types; - if (BSWAP(frr[x].map) == 0) { - int len = BSWAP(frr[x].max) - BSWAP(frr[x].min) + 1; + if (frr[x].map == 0) { + int len = frr[x].max - frr[x].min + 1; types = variable; variable = types + len; runetype_ext_len += len; @@ -142,7 +141,7 @@ _Read_RuneMagi(const char *fname) } } - if ((char *)variable + BSWAP(frl->variable_len) > (char *)lastp) { + if ((char *)variable + frl->variable_len > (char *)lastp) { goto invalid; } @@ -150,10 +149,9 @@ _Read_RuneMagi(const char *fname) * Convert from disk format to host format. */ data = malloc(sizeof(_RuneLocale) + - (BSWAP(frl->runetype_ext_nranges) + BSWAP(frl->maplower_ext_nranges) + - BSWAP(frl->mapupper_ext_nranges)) * sizeof(_RuneEntry) + - runetype_ext_len * sizeof(*rr->__types) + - BSWAP(frl->variable_len)); + (frl->runetype_ext_nranges + frl->maplower_ext_nranges + + frl->mapupper_ext_nranges) * sizeof(_RuneEntry) + + runetype_ext_len * sizeof(*rr->__types) + frl->variable_len); if (data == NULL) { saverr = errno; munmap(fdata, sb.st_size); @@ -167,15 +165,15 @@ _Read_RuneMagi(const char *fname) memcpy(rl->__magic, _RUNE_MAGIC_1, sizeof(rl->__magic)); memcpy(rl->__encoding, frl->encoding, sizeof(rl->__encoding)); - rl->__variable_len = BSWAP(frl->variable_len); - rl->__runetype_ext.__nranges = BSWAP(frl->runetype_ext_nranges); - rl->__maplower_ext.__nranges = BSWAP(frl->maplower_ext_nranges); - rl->__mapupper_ext.__nranges = BSWAP(frl->mapupper_ext_nranges); + rl->__variable_len = frl->variable_len; + rl->__runetype_ext.__nranges = frl->runetype_ext_nranges; + rl->__maplower_ext.__nranges = frl->maplower_ext_nranges; + rl->__mapupper_ext.__nranges = frl->mapupper_ext_nranges; for (x = 0; x < _CACHED_RUNES; ++x) { - rl->__runetype[x] = BSWAP(frl->runetype[x]); - rl->__maplower[x] = BSWAP(frl->maplower[x]); - rl->__mapupper[x] = BSWAP(frl->mapupper[x]); + rl->__runetype[x] = frl->runetype[x]; + rl->__maplower[x] = frl->maplower[x]; + rl->__mapupper[x] = frl->mapupper[x]; } rl->__runetype_ext.__ranges = (_RuneEntry *)rl->__variable; @@ -190,15 +188,15 @@ _Read_RuneMagi(const char *fname) rl->__variable = rl->__mapupper_ext.__ranges + rl->__mapupper_ext.__nranges; - variable = mapupper_ext_ranges + BSWAP(frl->mapupper_ext_nranges); + variable = mapupper_ext_ranges + frl->mapupper_ext_nranges; frr = runetype_ext_ranges; rr = rl->__runetype_ext.__ranges; for (x = 0; x < rl->__runetype_ext.__nranges; ++x) { uint32_t *types; - rr[x].__min = BSWAP(frr[x].min); - rr[x].__max = BSWAP(frr[x].max); - rr[x].__map = BSWAP(frr[x].map); + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; if (rr[x].__map == 0) { int len = rr[x].__max - rr[x].__min + 1; types = variable; @@ -214,17 +212,17 @@ _Read_RuneMagi(const char *fname) frr = maplower_ext_ranges; rr = rl->__maplower_ext.__ranges; for (x = 0; x < rl->__maplower_ext.__nranges; ++x) { - rr[x].__min = BSWAP(frr[x].min); - rr[x].__max = BSWAP(frr[x].max); - rr[x].__map = BSWAP(frr[x].map); + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; } frr = mapupper_ext_ranges; rr = rl->__mapupper_ext.__ranges; for (x = 0; x < rl->__mapupper_ext.__nranges; ++x) { - rr[x].__min = BSWAP(frr[x].min); - rr[x].__max = BSWAP(frr[x].max); - rr[x].__map = BSWAP(frr[x].map); + rr[x].__min = frr[x].min; + rr[x].__max = frr[x].max; + rr[x].__map = frr[x].map; } memcpy(rl->__variable, variable, rl->__variable_len); Modified: stable/12/share/colldef/Makefile ============================================================================== --- stable/12/share/colldef/Makefile Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/share/colldef/Makefile Sat Oct 27 21:17:01 2018 (r339825) @@ -7,8 +7,10 @@ FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps +.include + .src.LC_COLLATE: - localedef -D -U -i ${.IMPSRC} \ + localedef ${LOCALEDEF_ENDIAN} -D -U -i ${.IMPSRC} \ -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} ${.OBJDIR}/${.IMPSRC:T:R} LOCALES+= af_ZA.UTF-8 @@ -223,7 +225,7 @@ FILESDIR_${f}.LC_COLLATE= ${LOCALEDIR}/${f} FILES+= $t.LC_COLLATE FILESDIR_$t.LC_COLLATE= ${LOCALEDIR}/$t $t.LC_COLLATE: ${.CURDIR}/$f.src - localedef -D -U -i ${.ALLSRC} \ + localedef ${LOCALEDEF_ENDIAN} -D -U -i ${.ALLSRC} \ -f ${MAPLOC}/map.${.TARGET:T:R:E:C/@.*//} \ ${.OBJDIR}/${.TARGET:T:R} .endfor Modified: stable/12/share/ctypedef/Makefile ============================================================================== --- stable/12/share/ctypedef/Makefile Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/share/ctypedef/Makefile Sat Oct 27 21:17:01 2018 (r339825) @@ -7,8 +7,10 @@ FILESNAME= LC_CTYPE .SUFFIXES: .src .LC_CTYPE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps +.include + .src.LC_CTYPE: - localedef -D -U -c -w ${MAPLOC}/widths.txt \ + localedef ${LOCALEDEF_ENDIAN} -D -U -c -w ${MAPLOC}/widths.txt \ -f ${MAPLOC}/map.${.IMPSRC:T:R:E} \ -i ${.IMPSRC} ${.OBJDIR}/${.IMPSRC:T:R} || true @@ -238,7 +240,7 @@ SYMPAIRS+= be_BY.CP1131.src ru_RU.KOI8-R.src .for s t in ${SYMPAIRS} ${t:S/src$/LC_CTYPE/}: $s - localedef -D -U -c -w ${MAPLOC}/widths.txt \ + localedef ${LOCALEDEF_ENDIAN} -D -U -c -w ${MAPLOC}/widths.txt \ -f ${MAPLOC}/map.${.TARGET:T:R:C/^.*\.//} \ -i ${.ALLSRC} ${.OBJDIR}/${.TARGET:T:R} || true .endfor Modified: stable/12/share/mk/bsd.endian.mk ============================================================================== --- stable/12/share/mk/bsd.endian.mk Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/share/mk/bsd.endian.mk Sat Oct 27 21:17:01 2018 (r339825) @@ -8,6 +8,7 @@ ${MACHINE_ARCH:Mmips*el*} != "" TARGET_ENDIANNESS= 1234 CAP_MKDB_ENDIAN= -l +LOCALEDEF_ENDIAN= -l .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "powerpcspe" || \ @@ -16,4 +17,5 @@ CAP_MKDB_ENDIAN= -l ${MACHINE_ARCH:Mmips*} != "" TARGET_ENDIANNESS= 4321 CAP_MKDB_ENDIAN= -b +LOCALEDEF_ENDIAN= -b .endif Modified: stable/12/targets/pseudo/userland/Makefile.depend ============================================================================== --- stable/12/targets/pseudo/userland/Makefile.depend Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/targets/pseudo/userland/Makefile.depend Sat Oct 27 21:17:01 2018 (r339825) @@ -246,6 +246,7 @@ DIRDEPS+= \ usr.bin/lex/lib \ usr.bin/limits \ usr.bin/locale \ + usr.bin/localedef \ usr.bin/locate/bigram \ usr.bin/locate/code \ usr.bin/locate/locate \ Modified: stable/12/tools/tools/locale/tools/cldr2def.pl ============================================================================== --- stable/12/tools/tools/locale/tools/cldr2def.pl Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/tools/tools/locale/tools/cldr2def.pl Sat Oct 27 21:17:01 2018 (r339825) @@ -857,7 +857,8 @@ sub make_makefile { my $SRCOUT4 = ""; my $MAPLOC; if ($TYPE eq "colldef") { - $SRCOUT = "localedef -D -U -i \${.IMPSRC} \\\n" . + $SRCOUT = "localedef \${LOCALEDEF_ENDIAN} -D -U " . + "-i \${.IMPSRC} \\\n" . "\t-f \${MAPLOC}/map.\${.TARGET:T:R:E:C/@.*//} " . "\${.OBJDIR}/\${.IMPSRC:T:R}"; $MAPLOC = "MAPLOC=\t\t\${.CURDIR}/../../tools/tools/" . @@ -868,14 +869,16 @@ sub make_makefile { "FILES+=\t\$t.LC_COLLATE\n" . "FILESDIR_\$t.LC_COLLATE=\t\${LOCALEDIR}/\$t\n" . "\$t.LC_COLLATE: \${.CURDIR}/\$f.src\n" . - "\tlocaledef -D -U -i \${.ALLSRC} \\\n" . + "\tlocaledef \${LOCALEDEF_ENDIAN} -D -U " . + "-i \${.ALLSRC} \\\n" . "\t\t-f \${MAPLOC}/map.\${.TARGET:T:R:E:C/@.*//} \\\n" . "\t\t\${.OBJDIR}/\${.TARGET:T:R}\n" . ".endfor\n\n"; $SRCOUT4 = "## LOCALES_MAPPED\n"; } elsif ($TYPE eq "ctypedef") { - $SRCOUT = "localedef -D -U -c -w \${MAPLOC}/widths.txt \\\n" . + $SRCOUT = "localedef \${LOCALEDEF_ENDIAN} -D -U -c " . + "-w \${MAPLOC}/widths.txt \\\n" . "\t-f \${MAPLOC}/map.\${.IMPSRC:T:R:E} " . "\\\n\t-i \${.IMPSRC} \${.OBJDIR}/\${.IMPSRC:T:R} " . " || true"; @@ -886,7 +889,8 @@ sub make_makefile { ".for s t in \${SYMPAIRS}\n" . "\${t:S/src\$/LC_CTYPE/}: " . "\$s\n" . - "\tlocaledef -D -U -c -w \${MAPLOC}/widths.txt \\\n" . + "\tlocaledef \${LOCALEDEF_ENDIAN} -D -U -c " . + "-w \${MAPLOC}/widths.txt \\\n" . "\t-f \${MAPLOC}/map.\${.TARGET:T:R:C/^.*\\.//} " . "\\\n\t-i \${.ALLSRC} \${.OBJDIR}/\${.TARGET:T:R} " . " || true\n" . @@ -907,6 +911,8 @@ LOCALEDIR= \${SHAREDIR}/locale FILESNAME= $FILESNAMES{$TYPE} .SUFFIXES: .src .${SRCOUT2} ${MAPLOC} +.include + .src.${SRCOUT2}: $SRCOUT Modified: stable/12/usr.bin/localedef/collate.c ============================================================================== --- stable/12/usr.bin/localedef/collate.c Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/usr.bin/localedef/collate.c Sat Oct 27 21:17:01 2018 (r339825) @@ -1,5 +1,5 @@ /*- - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. * Copyright 2015 John Marino * * This source code is derived from the illumos localedef command, and @@ -253,6 +253,9 @@ static int32_t pri_undefined[COLL_WEIGHTS_MAX]; static int32_t pri_ignore; static collate_info_t collinfo; +static int32_t subst_count[COLL_WEIGHTS_MAX]; +static int32_t chain_count; +static int32_t large_count; static collpri_t *prilist = NULL; static int numpri = 0; @@ -1080,7 +1083,7 @@ wsncpy(wchar_t *s1, const wchar_t *s2, size_t n) wchar_t *os1 = s1; n++; - while (--n > 0 && (*s1++ = *s2++) != 0) + while (--n > 0 && (*s1++ = htote(*s2++)) != 0) continue; if (n > 0) while (--n > 0) @@ -1165,13 +1168,13 @@ dump_collate(void) if (resolve_pri(pri_undefined[i]) == -1) { set_pri(pri_undefined[i], -1, RESOLVED); /* they collate at the end of everything else */ - collinfo.undef_pri[i] = COLLATE_MAX_PRIORITY; + collinfo.undef_pri[i] = htote(COLLATE_MAX_PRIORITY); } - collinfo.pri_count[i] = nweight[i]; + collinfo.pri_count[i] = htote(nweight[i]); } - collinfo.pri_count[NUM_WT] = max_wide(); - collinfo.undef_pri[NUM_WT] = COLLATE_MAX_PRIORITY; + collinfo.pri_count[NUM_WT] = htote(max_wide()); + collinfo.undef_pri[NUM_WT] = htote(COLLATE_MAX_PRIORITY); collinfo.directive[NUM_WT] = DIRECTIVE_UNDEFINED; /* @@ -1180,19 +1183,20 @@ dump_collate(void) for (i = 0; i <= UCHAR_MAX; i++) { if ((cc = get_collchar(i, 0)) != NULL) { for (j = 0; j < NUM_WT; j++) { - chars[i].pri[j] = get_weight(cc->ref[j], j); + chars[i].pri[j] = + htote(get_weight(cc->ref[j], j)); } } else { for (j = 0; j < NUM_WT; j++) { chars[i].pri[j] = - get_weight(pri_undefined[j], j); + htote(get_weight(pri_undefined[j], j)); } /* * Per POSIX, for undefined characters, we * also have to add a last item, which is the * character code. */ - chars[i].pri[NUM_WT] = i; + chars[i].pri[NUM_WT] = htote(i); } } @@ -1203,7 +1207,7 @@ dump_collate(void) collate_subst_t *st = NULL; subst_t *temp; RB_COUNT(temp, substs, &substs[i], n); - collinfo.subst_count[i] = n; + subst_count[i] = n; if ((st = calloc(n, sizeof(collate_subst_t))) == NULL) { fprintf(stderr, "out of memory"); return; @@ -1217,12 +1221,14 @@ dump_collate(void) if (st[n].key != (n | COLLATE_SUBST_PRIORITY)) { INTERR; } + st[n].key = htote(st[n].key); for (j = 0; sb->ref[j]; j++) { - st[n].pri[j] = get_weight(sb->ref[j], i); + st[n].pri[j] = htote(get_weight(sb->ref[j], + i)); } n++; } - if (n != collinfo.subst_count[i]) + if (n != subst_count[i]) INTERR; subst[i] = st; } @@ -1231,9 +1237,8 @@ dump_collate(void) /* * Chains, i.e. collating elements */ - RB_NUMNODES(collelem_t, elem_by_expand, &elem_by_expand, - collinfo.chain_count); - chain = calloc(collinfo.chain_count, sizeof(collate_chain_t)); + RB_NUMNODES(collelem_t, elem_by_expand, &elem_by_expand, chain_count); + chain = calloc(chain_count, sizeof(collate_chain_t)); if (chain == NULL) { fprintf(stderr, "out of memory"); return; @@ -1242,11 +1247,11 @@ dump_collate(void) RB_FOREACH(ce, elem_by_expand, &elem_by_expand) { (void) wsncpy(chain[n].str, ce->expand, COLLATE_STR_LEN); for (i = 0; i < NUM_WT; i++) { - chain[n].pri[i] = get_weight(ce->ref[i], i); + chain[n].pri[i] = htote(get_weight(ce->ref[i], i)); } n++; } - if (n != collinfo.chain_count) + if (n != chain_count) INTERR; /* @@ -1273,12 +1278,12 @@ dump_collate(void) /* if undefined, then all priorities are */ INTERR; } else { - large[i].pri.pri[j] = pri; + large[i].pri.pri[j] = htote(pri); } } if (!undef) { - large[i].val = cc->wc; - collinfo.large_count = i++; + large[i].val = htote(cc->wc); + large_count = i++; } } @@ -1288,6 +1293,11 @@ dump_collate(void) /* Time to write the entire data set out */ + for (i = 0; i < NUM_WT; i++) + collinfo.subst_count[i] = htote(subst_count[i]); + collinfo.chain_count = htote(chain_count); + collinfo.large_count = htote(large_count); + if ((wr_category(vers, COLLATE_STR_LEN, f) < 0) || (wr_category(&collinfo, sizeof (collinfo), f) < 0) || (wr_category(&chars, sizeof (chars), f) < 0)) { @@ -1295,16 +1305,16 @@ dump_collate(void) } for (i = 0; i < NUM_WT; i++) { - sz = sizeof (collate_subst_t) * collinfo.subst_count[i]; + sz = sizeof (collate_subst_t) * subst_count[i]; if (wr_category(subst[i], sz, f) < 0) { return; } } - sz = sizeof (collate_chain_t) * collinfo.chain_count; + sz = sizeof (collate_chain_t) * chain_count; if (wr_category(chain, sz, f) < 0) { return; } - sz = sizeof (collate_large_t) * collinfo.large_count; + sz = sizeof (collate_large_t) * large_count; if (wr_category(large, sz, f) < 0) { return; } Modified: stable/12/usr.bin/localedef/ctype.c ============================================================================== --- stable/12/usr.bin/localedef/ctype.c Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/usr.bin/localedef/ctype.c Sat Oct 27 21:17:01 2018 (r339825) @@ -1,5 +1,5 @@ /*- - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. * Copyright 2012 Garrett D'Amore All rights reserved. * Copyright 2015 John Marino * @@ -296,10 +296,16 @@ dump_ctype(void) _FileRuneEntry *lo = NULL; _FileRuneEntry *up = NULL; wchar_t wc; + uint32_t runetype_ext_nranges; + uint32_t maplower_ext_nranges; + uint32_t mapupper_ext_nranges; (void) memset(&rl, 0, sizeof (rl)); + runetype_ext_nranges = 0; last_ct = NULL; + maplower_ext_nranges = 0; last_lo = NULL; + mapupper_ext_nranges = 0; last_up = NULL; if ((f = open_category()) == NULL) @@ -312,8 +318,8 @@ dump_ctype(void) * Initialize the identity map. */ for (wc = 0; (unsigned)wc < _CACHED_RUNES; wc++) { - rl.maplower[wc] = wc; - rl.mapupper[wc] = wc; + rl.maplower[wc] = htote(wc); + rl.mapupper[wc] = htote(wc); } RB_FOREACH(ctn, ctypes, &ctypes) { @@ -399,39 +405,39 @@ dump_ctype(void) * upper/lower case, then we identity map it. */ if ((unsigned)wc < _CACHED_RUNES) { - rl.runetype[wc] = ctn->ctype; + rl.runetype[wc] = htote(ctn->ctype); if (ctn->tolower) - rl.maplower[wc] = ctn->tolower; + rl.maplower[wc] = htote(ctn->tolower); if (ctn->toupper) - rl.mapupper[wc] = ctn->toupper; + rl.mapupper[wc] = htote(ctn->toupper); continue; } if ((last_ct != NULL) && (last_ct->ctype == ctn->ctype) && (last_ct->wc + 1 == wc)) { - ct[rl.runetype_ext_nranges-1].max = wc; + ct[runetype_ext_nranges - 1].max = htote(wc); } else { - rl.runetype_ext_nranges++; - ct = realloc(ct, - sizeof (*ct) * rl.runetype_ext_nranges); - ct[rl.runetype_ext_nranges - 1].min = wc; - ct[rl.runetype_ext_nranges - 1].max = wc; - ct[rl.runetype_ext_nranges - 1].map = ctn->ctype; + runetype_ext_nranges++; + ct = realloc(ct, sizeof (*ct) * runetype_ext_nranges); + ct[runetype_ext_nranges - 1].min = htote(wc); + ct[runetype_ext_nranges - 1].max = htote(wc); + ct[runetype_ext_nranges - 1].map = + htote(ctn->ctype); } last_ct = ctn; if (ctn->tolower == 0) { last_lo = NULL; } else if ((last_lo != NULL) && (last_lo->tolower + 1 == ctn->tolower)) { - lo[rl.maplower_ext_nranges-1].max = wc; + lo[maplower_ext_nranges - 1].max = htote(wc); last_lo = ctn; } else { - rl.maplower_ext_nranges++; - lo = realloc(lo, - sizeof (*lo) * rl.maplower_ext_nranges); - lo[rl.maplower_ext_nranges - 1].min = wc; - lo[rl.maplower_ext_nranges - 1].max = wc; - lo[rl.maplower_ext_nranges - 1].map = ctn->tolower; + maplower_ext_nranges++; + lo = realloc(lo, sizeof (*lo) * maplower_ext_nranges); + lo[maplower_ext_nranges - 1].min = htote(wc); + lo[maplower_ext_nranges - 1].max = htote(wc); + lo[maplower_ext_nranges - 1].map = + htote(ctn->tolower); last_lo = ctn; } @@ -439,23 +445,26 @@ dump_ctype(void) last_up = NULL; } else if ((last_up != NULL) && (last_up->toupper + 1 == ctn->toupper)) { - up[rl.mapupper_ext_nranges-1].max = wc; + up[mapupper_ext_nranges-1].max = htote(wc); last_up = ctn; } else { - rl.mapupper_ext_nranges++; - up = realloc(up, - sizeof (*up) * rl.mapupper_ext_nranges); - up[rl.mapupper_ext_nranges - 1].min = wc; - up[rl.mapupper_ext_nranges - 1].max = wc; - up[rl.mapupper_ext_nranges - 1].map = ctn->toupper; + mapupper_ext_nranges++; + up = realloc(up, sizeof (*up) * mapupper_ext_nranges); + up[mapupper_ext_nranges - 1].min = htote(wc); + up[mapupper_ext_nranges - 1].max = htote(wc); + up[mapupper_ext_nranges - 1].map = + htote(ctn->toupper); last_up = ctn; } } + rl.runetype_ext_nranges = htote(runetype_ext_nranges); + rl.maplower_ext_nranges = htote(maplower_ext_nranges); + rl.mapupper_ext_nranges = htote(mapupper_ext_nranges); if ((wr_category(&rl, sizeof (rl), f) < 0) || - (wr_category(ct, sizeof (*ct) * rl.runetype_ext_nranges, f) < 0) || - (wr_category(lo, sizeof (*lo) * rl.maplower_ext_nranges, f) < 0) || - (wr_category(up, sizeof (*up) * rl.mapupper_ext_nranges, f) < 0)) { + (wr_category(ct, sizeof (*ct) * runetype_ext_nranges, f) < 0) || + (wr_category(lo, sizeof (*lo) * maplower_ext_nranges, f) < 0) || + (wr_category(up, sizeof (*up) * mapupper_ext_nranges, f) < 0)) { return; } Modified: stable/12/usr.bin/localedef/localedef.1 ============================================================================== --- stable/12/usr.bin/localedef/localedef.1 Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/usr.bin/localedef/localedef.1 Sat Oct 27 21:17:01 2018 (r339825) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2015 +.Dd October 18, 2018 .Dt LOCALEDEF 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Nd define locale environment .Sh SYNOPSIS .Nm -.Op Fl cDUv +.Op Fl bcDlUv .Op Fl f Ar charmap .Op Fl i Ar sourcefile .Op Fl u Ar codeset @@ -84,6 +84,8 @@ Defines the format and values of affirmative and negat .Pp The following options are supported: .Bl -tag -width indent +.It Fl b +Use big-endian byte order for output. .It Fl c Creates permanent output even if warning messages have been issued. .It Fl D @@ -112,6 +114,8 @@ option is not present, the default character mapping w The path name of a file containing the source definitions. If this option is not present, source definitions will be read from standard input. +.It Fl l +Use little-endian byte order for output. .It Fl u Ar codeset Specifies the name of a codeset used as the target mapping of character symbols and collating element symbols whose encoding values are defined in terms of the Modified: stable/12/usr.bin/localedef/localedef.c ============================================================================== --- stable/12/usr.bin/localedef/localedef.c Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/usr.bin/localedef/localedef.c Sat Oct 27 21:17:01 2018 (r339825) @@ -1,5 +1,5 @@ /*- - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. * Copyright 2015 John Marino * * This source code is derived from the illumos localedef command, and @@ -34,11 +34,13 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include + #include #include #include -#include -#include #include #include #include @@ -54,6 +56,7 @@ __FBSDID("$FreeBSD$"); #endif static int bsd = 0; +static int byteorder = 0; int verbose = 0; int undefok = 0; int warnok = 0; @@ -221,6 +224,18 @@ wr_category(void *buf, size_t sz, FILE *f) return (0); } +uint32_t +htote(uint32_t arg) +{ + + if (byteorder == 4321) + return (htobe32(arg)); + else if (byteorder == 1234) + return (htole32(arg)); + else + return (arg); +} + int yyparse(void); static void @@ -229,7 +244,9 @@ usage(void) (void) fprintf(stderr, "Usage: localedef [options] localename\n"); (void) fprintf(stderr, "[options] are:\n"); (void) fprintf(stderr, " -D : BSD-style output\n"); + (void) fprintf(stderr, " -b : big-endian output\n"); (void) fprintf(stderr, " -c : ignore warnings\n"); + (void) fprintf(stderr, " -l : little-endian output\n"); (void) fprintf(stderr, " -v : verbose output\n"); (void) fprintf(stderr, " -U : ignore undefined symbols\n"); (void) fprintf(stderr, " -f charmap : use given charmap file\n"); @@ -260,10 +277,16 @@ main(int argc, char **argv) (void) setlocale(LC_ALL, ""); - while ((c = getopt(argc, argv, "w:i:cf:u:vUD")) != -1) { + while ((c = getopt(argc, argv, "blw:i:cf:u:vUD")) != -1) { switch (c) { case 'D': bsd = 1; + break; + case 'b': + case 'l': + if (byteorder != 0) + usage(); + byteorder = c == 'b' ? 4321 : 1234; break; case 'v': verbose++; Modified: stable/12/usr.bin/localedef/localedef.h ============================================================================== --- stable/12/usr.bin/localedef/localedef.h Sat Oct 27 21:04:34 2018 (r339824) +++ stable/12/usr.bin/localedef/localedef.h Sat Oct 27 21:17:01 2018 (r339825) @@ -1,5 +1,5 @@ /*- - * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. * Copyright 2015 John Marino * * This source code is derived from the illumos localedef command, and @@ -74,6 +74,8 @@ void scan_to_eol(void); void add_wcs(wchar_t); void add_tok(int); wchar_t *get_wcs(void); + +uint32_t htote(uint32_t); /* charmap.c - CHARMAP handling */ void init_charmap(void);