From owner-svn-src-stable-12@freebsd.org Sun Oct 21 17:38:53 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Mon Oct 22 17:27:37 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Tue Oct 23 01:39:28 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Tue Oct 23 03:30:15 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Tue Oct 23 16:24:27 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Wed Oct 24 17:32:32 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Wed Oct 24 23:13:54 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 05:18:26 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 11:12:17 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 12:27:18 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 13:26:04 2018 Return-Path: Delivered-To: svn-src-stable-12@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 5274B10761AF for ; Thu, 25 Oct 2018 13:26:04 +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 736BF82512 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 o10-v6so465685vki.6 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=uGSZphJ4qkj7pXyLbZhZ2qtJKpy62MleR/X3zQF01JzhySZA3H1ZChYnIKriwR5A5h DkhwugGiGt8yBTlX2Qq4EA8IcnfCnxgFOeDOESe2gSjT8POFr7gvVsL5iTKowsKuhdWi YXLb4zH4CNnsiCNUNYL2koPcCcZGm6N6mVQJ05iMRglIhVgAd/5+jbY3SmPSRaJt6zAY LLi2rKlyTIHRbzgYLLhlz2zwzTrybVlAQNwHRoMaSUiN2EQYnJ4htTMJPy51hbxTQeKA r/wffcT+M3wE8Ds718WPx3IFd3loYGBUtVP32jCIXZPluG6TYctVotJPiH9F3F4TouO+ 5mzA== X-Gm-Message-State: AGRZ1gLGW5xXjgoytTdXK+9pdSK+9xOwAHsNw3mdO3HgegUFT45K19qm PBfQvoWbuEP+CoDWwlx+lJ865kZ6erAJi1s3ecHHNg== 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 14:07:30 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 14:53:25 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 15:11:19 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 15:18:55 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 15:35:13 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 15:50:01 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 16:01:11 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 17:00:47 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Thu Oct 25 19:57:43 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Fri Oct 26 00:00:14 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Fri Oct 26 10:20:05 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Sat Oct 27 03:16:34 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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-12@freebsd.org Sat Oct 27 21:17:04 2018 Return-Path: Delivered-To: svn-src-stable-12@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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable 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);