svn commit: r348098 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:21:05 2019
New Revision: 348098
URL: https://svnweb.freebsd.org/changeset/base/348098

Log:
  pkgbase: Move rc.firewall to libexec/rc
  
  Put it with all the other rc files
  
  Reviewed by:  bapt

Modified:
  head/etc/Makefile
  head/libexec/rc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed May 22 06:02:51 2019(r348097)
+++ head/etc/Makefile   Wed May 22 07:21:05 2019(r348098)
@@ -17,7 +17,6 @@ SUBDIR+=sendmail
 BIN1=  \
login.access \
rc.bsdextended \
-   rc.firewall \
termcap.small
 
 # NB: keep these sorted by MK_* knobs

Modified: head/libexec/rc/Makefile
==
--- head/libexec/rc/MakefileWed May 22 06:02:51 2019(r348097)
+++ head/libexec/rc/MakefileWed May 22 07:21:05 2019(r348098)
@@ -1,8 +1,13 @@
 # $FreeBSD$
 
+.include 
+
 CONFGROUPS=CONFETC CONFETCEXEC CONFETCDEFAULTS
 CONFETCDIR=/etc
 CONFETC=   network.subr rc rc.initdiskless rc.subr rc.shutdown
+.if ${MK_IPFW} != "no"
+CONFETC+=  rc.firewall
+.endif
 CONFETCMODE=   644
 CONFETCEXEC=   netstart pccard_ether rc.resume rc.suspend
 CONFETCEXECDIR=/etc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348099 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:21:39 2019
New Revision: 348099
URL: https://svnweb.freebsd.org/changeset/base/348099

Log:
  pkgbase: Move rc.bsdextended to libexec/rc
  
  Reviewed by:  bapt

Modified:
  head/etc/Makefile
  head/libexec/rc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed May 22 07:21:05 2019(r348098)
+++ head/etc/Makefile   Wed May 22 07:21:39 2019(r348099)
@@ -16,7 +16,6 @@ SUBDIR+=sendmail
 
 BIN1=  \
login.access \
-   rc.bsdextended \
termcap.small
 
 # NB: keep these sorted by MK_* knobs

Modified: head/libexec/rc/Makefile
==
--- head/libexec/rc/MakefileWed May 22 07:21:05 2019(r348098)
+++ head/libexec/rc/MakefileWed May 22 07:21:39 2019(r348099)
@@ -4,7 +4,7 @@
 
 CONFGROUPS=CONFETC CONFETCEXEC CONFETCDEFAULTS
 CONFETCDIR=/etc
-CONFETC=   network.subr rc rc.initdiskless rc.subr rc.shutdown
+CONFETC=   network.subr rc rc.initdiskless rc.subr rc.shutdown 
rc.bsdextended
 .if ${MK_IPFW} != "no"
 CONFETC+=  rc.firewall
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348100 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:22:08 2019
New Revision: 348100
URL: https://svnweb.freebsd.org/changeset/base/348100

Log:
  pkgbase: Move rc.sendmail to libexec/rc
  
  Reviewed by:  bapt

Modified:
  head/etc/Makefile
  head/libexec/rc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed May 22 07:21:39 2019(r348099)
+++ head/etc/Makefile   Wed May 22 07:22:08 2019(r348100)
@@ -20,10 +20,6 @@ BIN1=\
 
 # NB: keep these sorted by MK_* knobs
 
-.if ${MK_SENDMAIL} != "no"
-BIN1+= rc.sendmail
-.endif
-
 .if ${MK_SENDMAIL} == "no"
 ETCMAIL=mailer.conf aliases
 .else

Modified: head/libexec/rc/Makefile
==
--- head/libexec/rc/MakefileWed May 22 07:21:39 2019(r348099)
+++ head/libexec/rc/MakefileWed May 22 07:22:08 2019(r348100)
@@ -8,6 +8,9 @@ CONFETC=network.subr rc rc.initdiskless rc.subr rc.sh
 .if ${MK_IPFW} != "no"
 CONFETC+=  rc.firewall
 .endif
+.if ${MK_SENDMAIL} != "no"
+CONFETC+=  rc.sendmail
+.endif
 CONFETCMODE=   644
 CONFETCEXEC=   netstart pccard_ether rc.resume rc.suspend
 CONFETCEXECDIR=/etc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348101 - in head: etc share/termcap

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:22:34 2019
New Revision: 348101
URL: https://svnweb.freebsd.org/changeset/base/348101

Log:
  pkgbase: Move termcap.small to share/termcap
  
  Reviewed by:  bapt

Modified:
  head/etc/Makefile
  head/share/termcap/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed May 22 07:22:08 2019(r348100)
+++ head/etc/Makefile   Wed May 22 07:22:34 2019(r348101)
@@ -16,7 +16,7 @@ SUBDIR+=sendmail
 
 BIN1=  \
login.access \
-   termcap.small
+   login.access
 
 # NB: keep these sorted by MK_* knobs
 

Modified: head/share/termcap/Makefile
==
--- head/share/termcap/Makefile Wed May 22 07:22:08 2019(r348100)
+++ head/share/termcap/Makefile Wed May 22 07:22:34 2019(r348101)
@@ -10,6 +10,7 @@ MAN=  termcap.5
 FILES= termcap termcap.db
 FILESDIR=  ${BINDIR}/misc
 CLEANFILES+=   termcap.db
+CONFS= termcap.small
 
 .include 
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348102 - in head: etc share/examples usr.bin/login

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:23:03 2019
New Revision: 348102
URL: https://svnweb.freebsd.org/changeset/base/348102

Log:
  pkgbase: Move login.access to usb.bin/login
  
  Also remove the etc-examples target as we don't have any files
  to handle here.
  
  Reviewed by:  bapt

Modified:
  head/etc/Makefile
  head/share/examples/Makefile
  head/usr.bin/login/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed May 22 07:22:34 2019(r348101)
+++ head/etc/Makefile   Wed May 22 07:23:03 2019(r348102)
@@ -14,10 +14,6 @@ UPDATE_DEPENDFILE=   no
 SUBDIR+=sendmail
 .endif
 
-BIN1=  \
-   login.access \
-   login.access
-
 # NB: keep these sorted by MK_* knobs
 
 .if ${MK_SENDMAIL} == "no"
@@ -56,9 +52,6 @@ distribution:
@echo "set DESTDIR before running \"make ${.TARGET}\""
@false
 .endif
-   cd ${.CURDIR}; \
-   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-   ${BIN1} ${DESTDIR}/etc
${_+_}cd ${.CURDIR}/gss; ${MAKE} install
${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap
@@ -167,11 +160,6 @@ distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY
${INSTALL_SYMLINK} "${nls}" "${DESTDIR}${SHAREDIR}/nls/${alias}"
 .endfor
 .endif
-
-etc-examples: ${META_DEPS}
-   cd ${.CURDIR}; ${INSTALL} ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 \
-   ${BIN1} ${BIN2} \
-   ${DESTDIR}${SHAREDIR}/examples/etc
 
 .include 
 

Modified: head/share/examples/Makefile
==
--- head/share/examples/MakefileWed May 22 07:22:34 2019
(r348101)
+++ head/share/examples/MakefileWed May 22 07:23:03 2019
(r348102)
@@ -381,9 +381,8 @@ SER_${d:tu:C/\//_/g}DIR+=   ${SHAREDIR}/examples/${d}
 
 BINDIR= ${SHAREDIR}/examples
 
-beforeinstall: copies etc-examples
+beforeinstall: copies
 META_TARGETS+= copies
-.ORDER: etc-examples
 
 copies:
 .for i in ${LDIRS}
@@ -391,9 +390,6 @@ copies:
rm -f ${DESTDIR}${BINDIR}/$i; \
fi
 .endfor
-
-etc-examples:
-   ${_+_}(cd ${SRCTOP}/etc; ${MAKE} etc-examples)
 
 SUBDIR+=   smbfs
 

Modified: head/usr.bin/login/Makefile
==
--- head/usr.bin/login/Makefile Wed May 22 07:22:34 2019(r348101)
+++ head/usr.bin/login/Makefile Wed May 22 07:23:03 2019(r348102)
@@ -3,7 +3,7 @@
 
 .include 
 
-CONFS= fbtab login.conf motd
+CONFS= fbtab login.conf motd login.access
 PROG=  login
 SRCS=  login.c login_fbtab.c
 CFLAGS+=-DLOGALL
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348103 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:38:54 2019
New Revision: 348103
URL: https://svnweb.freebsd.org/changeset/base/348103

Log:
  pkgbase: Really move rc.firewall
  
  Messed up with git->svn in r348098

Added:
  head/libexec/rc/rc.firewall
 - copied unchanged from r348102, head/etc/rc.firewall
Deleted:
  head/etc/rc.firewall

Copied: head/libexec/rc/rc.firewall (from r348102, head/etc/rc.firewall)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/rc/rc.firewall Wed May 22 07:38:54 2019(r348103, copy 
of r348102, head/etc/rc.firewall)
@@ -0,0 +1,557 @@
+#!/bin/sh -
+# Copyright (c) 1996  Poul-Henning Kamp
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+#
+# Setup system for ipfw(4) firewall service.
+#
+
+# Suck in the configuration variables.
+if [ -z "${source_rc_confs_defined}" ]; then
+   if [ -r /etc/defaults/rc.conf ]; then
+   . /etc/defaults/rc.conf
+   source_rc_confs
+   elif [ -r /etc/rc.conf ]; then
+   . /etc/rc.conf
+   fi
+fi
+
+
+# Define the firewall type in /etc/rc.conf.  Valid values are:
+#   open- will allow anyone in
+#   client  - will try to protect just this machine
+#   simple  - will try to protect a whole network
+#   closed  - totally disables IP services except via lo0 interface
+#   workstation - will try to protect just this machine using stateful
+#firewalling. See below for rc.conf variables used
+#   UNKNOWN - disables the loading of firewall rules.
+#   filename- will load the rules in the given filename (full path 
required)
+#
+# For ``client'' and ``simple'' the entries below should be customized
+# appropriately.
+
+
+#
+# If you don't know enough about packet filtering, we suggest that you
+# take time to read this book:
+#
+#  Building Internet Firewalls, 2nd Edition
+#  Brent Chapman and Elizabeth Zwicky
+#
+#  O'Reilly & Associates, Inc
+#  ISBN 1-56592-871-7
+#  http://www.ora.com/
+#  http://www.oreilly.com/catalog/fire2/
+#
+# For a more advanced treatment of Internet Security read:
+#
+#  Firewalls and Internet Security: Repelling the Wily Hacker, 2nd Edition
+#  William R. Cheswick, Steven M. Bellowin, Aviel D. Rubin
+#
+#  Addison-Wesley / Prentice Hall
+#  ISBN 0-201-63466-X
+#  http://www.pearsonhighered.com/
+#  
http://www.pearsonhighered.com/educator/academic/product/0,3110,020163466X,00.html
+#
+
+setup_loopback() {
+   
+   # Only in rare cases do you want to change these rules
+   #
+   ${fwcmd} add 100 pass all from any to any via lo0
+   ${fwcmd} add 200 deny all from any to 127.0.0.0/8
+   ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
+   if [ $ipv6_available -eq 0 ]; then
+   ${fwcmd} add 400 deny all from any to ::1
+   ${fwcmd} add 500 deny all from ::1 to any
+   fi
+}
+
+setup_ipv6_mandatory() {
+   [ $ipv6_available -eq 0 ] || return 0
+
+   
+   # Only in rare cases do you want to change these rules
+   #
+   # ND
+   #
+   # DAD
+   ${fwcmd} add pass ipv6-icmp from :: to ff02::/16
+   # RS, RA, NS, NA, redirect...
+   ${fwcmd} add pass ipv6-icmp from fe80::/10 to fe80::/10
+   ${fwcmd} add pass ipv6-icmp from fe80::/10 to ff02::/16
+
+   # Allow ICMPv6 destination unreachable
+   ${fwcmd} add pass ipv6-icmp from any to any icmp6types 1
+
+   # Allow NS/NA/toobig (don't filter it out)
+   ${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136
+}
+

svn commit: r348104 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:39:59 2019
New Revision: 348104
URL: https://svnweb.freebsd.org/changeset/base/348104

Log:
  pkgbase: Really move rc.bsdextended
  
  Messed up with git->svn in r348099

Added:
  head/libexec/rc/rc.bsdextended
 - copied unchanged from r348103, head/etc/rc.bsdextended
Deleted:
  head/etc/rc.bsdextended

Copied: head/libexec/rc/rc.bsdextended (from r348103, head/etc/rc.bsdextended)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/rc/rc.bsdextended  Wed May 22 07:39:59 2019
(r348104, copy of r348103, head/etc/rc.bsdextended)
@@ -0,0 +1,138 @@
+#!/bin/sh
+#
+# Copyright (c) 2004  Tom Rhodes
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+
+# Sample startup policy for the mac_bsdextended(4) security module.
+#
+# Suck in the system configuration variables.
+
+if [ -z "${source_rc_confs_defined}" ]; then
+if [ -r /etc/defaults/rc.conf ]; then
+. /etc/defaults/rc.conf
+source_rc_confs
+elif [ -r /etc/rc.conf ]; then
+. /etc/rc.conf
+fi
+fi
+
+
+# Set ugidfw(8) to CMD:
+
+CMD=/usr/sbin/ugidfw
+
+
+# WARNING: recommended reading is the handbook's MAC
+# chapter and the ugidfw(8) manual page.  You can
+# lock yourself out of the system very quickly by setting
+# incorrect values here.  These are only examples.
+
+
+
+# Build a generic list of rules here, these should be
+# modified before using this script.
+#
+# For apache to read user files, the ruleadd must give
+# it permissions by default.
+
+#${CMD} add subject uid 80 object not uid 80 mode rxws;
+#${CMD} add subject gid 80 object not gid 80 mode rxws;
+
+
+# majordomo compat:
+#${CMD} add subject uid 54 object not uid 54 mode rxws;
+#${CMD} add subject gid 26 object gid 54 mode rxws;
+
+
+# This is for root:
+${CMD} add subject uid 0 object not uid 0 mode arxws;
+${CMD} add subject gid 0 object not gid 0 mode arxws;
+
+
+# And for majordomo:
+#${CMD} add subject uid 54 object not uid 54 mode rxws;
+#${CMD} add subject gid 54 object not gid 54 mode rxws;
+
+
+# And for bin:
+${CMD} add subject uid 3 object not uid 3 mode rxws;
+${CMD} add subject gid 7 object not gid 7 mode rxws;
+
+
+# And for mail/pop:
+#${CMD} add subject uid 68 object not uid 68 mode rxws;
+#${CMD} add subject gid 6 object not gid 6 mode arxws;
+
+
+# And for smmsp:
+${CMD} add subject uid 25 object not uid 25 mode rxws;
+${CMD} add subject gid 25 object not gid 25 mode rxws;
+
+
+# And for mailnull:
+${CMD} add subject uid 26 object not uid 26 mode rxws;
+${CMD} add subject gid 26 object not gid 26 mode rxws;
+
+
+# For cyrus:
+#${CMD} add subject uid 60 object not uid 60 mode rxws;
+#${CMD} add subject gid 60 object not gid 60 mode rxws;
+
+
+# For stunnel:
+#${CMD} add subject uid 1018 object not uid 1018 mode rxws;
+#${CMD} add subject gid 1018 object not gid 1018 mode rxws;
+
+
+# For the nobody account:
+${CMD} add subject uid 65534 object not uid 65534 mode rxws;
+${CMD} add subject gid 65534 object not gid 65534 mode rxws;
+
+
+# NOTICE: The next script adds a rule to allow
+#   access their mailbox which is owned by GID `6'.
+#   Removing this will give mailbox lock issues.
+for x in `awk -F: '($3 >= 1001) && ($3 != 65534) { print $1 }' /etc/passwd`;
+do ${CMD} add subject uid $x object gid 6 mode arwxs;
+done;
+
+
+# Use some script to get a list of users and
+# add all users to mode n for all other users.  This
+# will isolate all users from other user home directories while
+# permitting them t

svn commit: r348106 - in head: etc share/termcap

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:41:20 2019
New Revision: 348106
URL: https://svnweb.freebsd.org/changeset/base/348106

Log:
  pkgbase: Really move termcap.small
  
  Messed up with git->svn in r348101

Added:
  head/share/termcap/termcap.small
 - copied unchanged from r348105, head/etc/termcap.small
Deleted:
  head/etc/termcap.small

Copied: head/share/termcap/termcap.small (from r348105, head/etc/termcap.small)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/termcap/termcap.smallWed May 22 07:41:20 2019
(r348106, copy of r348105, head/etc/termcap.small)
@@ -0,0 +1,315 @@
+# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#must display the following acknowledgement:
+#  This product includes software developed by the University of
+#  California, Berkeley and its contributors.
+# 4. Neither the name of the University nor the names of its contributors
+#may be used to endorse or promote products derived from this software
+#without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+#  @(#)termcap.src 5.88 (Berkeley) 4/30/91
+# $FreeBSD$
+#
+# for syscons
+# common entry without semigraphics
+cons25w|ansiw|ansi80x25-raw:\
+   :am:bs:NP:ms:pt:AX:eo:bw:ut:km:\
+   :co#80:li#25:pa#64:Co#8:it#8:\
+   :al=\E[L:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:\
+   :dc=\E[P:dl=\E[M:do=\E[B:bt=\E[Z:ho=\E[H:ic=\E[@:cb=\E[1K:\
+   :nd=\E[C:rs=\Ec:so=\E[7m:se=\E[27m:up=\E[A:cr=^M:ta=^I:\
+   :AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:sc=\E7:rc=\E8:\
+   :k1=\E[M:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:\
+   :k9=\E[U:k;=\E[V:F1=\E[W:F2=\E[X:K2=\E[E:nw=\E[E:ec=\E[%dX:\
+   :kb=^H:kh=\E[H:ku=\E[A:kd=\E[B:kl=\E[D:kr=\E[C:le=^H:sf=\E[S:sr=\E[T:\
+   :kN=\E[G:kP=\E[I:@7=\E[F:kI=\E[L:kD=\177:kB=\E[Z:\
+   :IC=\E[%d@:DC=\E[%dP:SF=\E[%dS:SR=\E[%dT:AL=\E[%dL:DL=\E[%dM:\
+   :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:cv=\E[%i%dd:ch=\E[%i%d`:\
+   :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:bl=^G:\
+   :ve=\E[=S:vi=\E[=1S:vs=\E[=2S:
+# CP437 FreeBSD console with ACS support
+cons25|ansis|ansi80x25:\
+   
:ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\
+   :tc=cons25w:
+cons25-m|ansis-mono|ansi80x25-mono:\
+   :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25:
+cons30|ansi80x30:\
+   :li#30:tc=cons25:
+cons30-m|ansi80x30-mono:\
+   :li#30:tc=cons25-m:
+cons43|ansi80x43:\
+   :li#43:tc=cons25:
+cons43-m|ansi80x43-mono:\
+   :li#43:tc=cons25-m:
+cons50|ansil|ansi80x50:\
+   :li#50:tc=cons25:
+cons50-m|ansil-mono|ansi80x50-mono:\
+   :li#50:tc=cons25-m:
+cons60|ansi80x60:\
+   :li#60:tc=cons25:
+cons60-m|ansi80x60-mono:\
+   :li#60:tc=cons25-m:
+# Syscons console with 132 characters (VESA modes)
+cons25-w|ansi132x25:\
+   :co#132:tc=cons25:
+cons30-w|ansi132x30:\
+   :co#132:tc=cons30:
+cons43-w|ansi132x43:\
+   :co#132:tc=cons43:
+cons50-w|ansil-w|ansi132x50:\
+   :co#132:tc=cons50:
+cons60-w|ansi132x60:\
+   :co#132:tc=cons60:
+# KOI8-R/KOI8-U FreeBSD console with ACS support
+cons25r|cons25u|pc3r|ibmpc3r|cons25-koi8:\
+   
:ac=q\200x\201m\204v\211j\205t\206n\212u\207l\202w\210k\203y\230z\231f\234~\225a\220h\2210\215:\
+   :tc=cons25w:
+cons25r-m|cons25u-m|pc3r-m|ibmpc3r-mono|cons25-koi8-mono:\
+   :pa@:Co@:AF@:AB@:AX@:op@:us=\E[4m:ue=\E[24m:tc=cons25r:
+cons30r|cons30u|cons30-koi8:\
+   :li#30:tc=cons25r

svn commit: r348105 - in head: etc libexec/rc

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:40:39 2019
New Revision: 348105
URL: https://svnweb.freebsd.org/changeset/base/348105

Log:
  pkgbase: Really move rc.sendmail
  
  Messed up with git->svn in r348100

Added:
  head/libexec/rc/rc.sendmail
 - copied unchanged from r348104, head/etc/rc.sendmail
Deleted:
  head/etc/rc.sendmail

Copied: head/libexec/rc/rc.sendmail (from r348104, head/etc/rc.sendmail)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/rc/rc.sendmail Wed May 22 07:40:39 2019(r348105, copy 
of r348104, head/etc/rc.sendmail)
@@ -0,0 +1,277 @@
+#!/bin/sh
+
+#
+# Copyright (c) 2002  Gregory Neil Shapiro.  All Rights Reserved.
+# Copyright (c) 2000, 2002  The FreeBSD Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+# This script is used by /etc/rc at boot time to start sendmail.  It
+# is meant to be sendmail specific and not a generic script for all
+# MTAs.  It is only called by /etc/rc if the rc.conf mta_start_script is
+# set to /etc/rc.sendmail.  This provides the opportunity for other MTAs
+# to provide their own startup script.
+
+# The script is also used by /etc/mail/Makefile to enable the
+# start/stop/restart targets.
+
+# The source for the script can be found in src/etc/sendmail/rc.sendmail.
+
+if [ -r /etc/defaults/rc.conf ]; then
+   . /etc/defaults/rc.conf
+   source_rc_confs
+elif [ -r /etc/rc.conf ]; then
+   . /etc/rc.conf
+fi
+
+# The sendmail binary
+sendmail_program=${sendmail_program:-/usr/sbin/sendmail}
+
+# The pid is used to stop and restart the running daemon(s).
+sendmail_pidfile=${sendmail_pidfile:-/var/run/sendmail.pid}
+sendmail_mspq_pidfile=${sendmail_mspq_pidfile:-/var/spool/clientmqueue/sm-client.pid}
+
+start_mta()
+{
+   case ${sendmail_enable} in
+   [Nn][Oo][Nn][Ee])
+   ;;
+   [Yy][Ee][Ss])
+   echo -n ' sendmail'
+   ${sendmail_program} ${sendmail_flags}
+   ;;
+   *)
+   case ${sendmail_submit_enable} in
+   [Yy][Ee][Ss])
+   echo -n ' sendmail-submit'
+   ${sendmail_program} ${sendmail_submit_flags}
+   ;;
+   *)
+   case ${sendmail_outbound_enable} in
+   [Yy][Ee][Ss])
+   echo -n ' sendmail-outbound'
+   ${sendmail_program} ${sendmail_outbound_flags}
+   ;;
+   esac
+   ;;
+   esac
+   ;;
+   esac
+}
+
+stop_mta()
+{
+   # Check to make sure we are configured to start an MTA
+   case ${sendmail_enable} in
+   [Nn][Oo][Nn][Ee])
+   return
+   ;;
+   [Yy][Ee][Ss])
+   ;;
+   *)
+   case ${sendmail_submit_enable} in
+   [Yy][Ee][Ss])
+   ;;
+   *)
+   case ${sendmail_outbound_enable} in
+   [Yy][Ee][Ss])
+   ;;
+   *)
+   return
+   ;;
+   esac
+   ;;
+   esac
+   ;;
+   esac
+
+   if [ -r ${sendmail_pidfile} ]; then
+   echo -n ' sendmail'
+   kill -TERM `head -1 ${sendmail_pidfile}`
+   else
+   echo "$0: stop-mta: ${sendmail_pidfile} not found"
+   fi
+}
+
+restart_mta()
+{
+   # Check to make sure we are configured to start an MTA
+   ca

svn commit: r348107 - in head: etc usr.bin/login

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Wed May 22 07:41:58 2019
New Revision: 348107
URL: https://svnweb.freebsd.org/changeset/base/348107

Log:
  pkgbase: Really move login.access
  
  Messed up with git->svn r348102

Added:
  head/usr.bin/login/login.access
 - copied unchanged from r348106, head/etc/login.access
Deleted:
  head/etc/login.access

Copied: head/usr.bin/login/login.access (from r348106, head/etc/login.access)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/login/login.access Wed May 22 07:41:58 2019
(r348107, copy of r348106, head/etc/login.access)
@@ -0,0 +1,46 @@
+# $FreeBSD$
+#
+# Login access control table.
+#
+# When someone logs in, the table is scanned for the first entry that
+# matches the (user, host) combination, or, in case of non-networked
+# logins, the first entry that matches the (user, tty) combination.  The
+# permissions field of that table entry determines whether the login will
+# be accepted or refused.
+#
+# Format of the login access control table is three fields separated by a
+# ":" character:
+#
+#  permission : users : origins
+#
+# The first field should be a "+" (access granted) or "-" (access denied)
+# character. The second field should be a list of one or more login names,
+# group names, or ALL (always matches).  The third field should be a list
+# of one or more tty names (for non-networked logins), host names, domain
+# names (begin with "."), host addresses, internet network numbers (end
+# with "."), ALL (always matches) or LOCAL (matches any string that does
+# not contain a "." character). If you run NIS you can use @netgroupname
+# in host or user patterns.
+#
+# The EXCEPT operator makes it possible to write very compact rules.
+#
+# The group file is searched only when a name does not match that of the
+# logged-in user. Only groups are matched in which users are explicitly
+# listed: the program does not look at a user's primary group id value.
+#
+##
+#
+# Disallow console logins to all but a few accounts.
+#
+#-:ALL EXCEPT wheel shutdown sync:console
+#
+# Disallow non-local logins to privileged accounts (group wheel).
+#
+#-:wheel:ALL EXCEPT LOCAL .win.tue.nl
+#
+# Some accounts are not allowed to login from anywhere:
+#
+#-:wsbscaro wsbsecr wsbspac wsbsym wscosor wstaiwde:ALL
+#
+# All other accounts are allowed to login from anywhere.
+#
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348108 - head/sys/dev/acpica

2019-05-22 Thread Andriy Gapon
Author: avg
Date: Wed May 22 08:30:03 2019
New Revision: 348108
URL: https://svnweb.freebsd.org/changeset/base/348108

Log:
  acpi_hpet: restore support for timers defined only in HPET table
  
  This fixes a regress introduced in r339754.
  After that change the code required that there is a HPET device
  in the ACPI namespace.
  The problem has been noticed on an PC Engines apu2 system.
  
  While here, fix a small formatting issue.

Modified:
  head/sys/dev/acpica/acpi_hpet.c

Modified: head/sys/dev/acpica/acpi_hpet.c
==
--- head/sys/dev/acpica/acpi_hpet.c Wed May 22 07:41:58 2019
(r348107)
+++ head/sys/dev/acpica/acpi_hpet.c Wed May 22 08:30:03 2019
(r348108)
@@ -455,9 +455,12 @@ hpet_probe(device_t dev)
ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
if (acpi_disabled("hpet") || acpi_hpet_disabled)
return (ENXIO);
-   rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL);
+   if (acpi_get_handle(dev) != NULL)
+   rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL);
+   else
+   rv = 0;
if (rv <= 0)
-  device_set_desc(dev, "High Precision Event Timer");
+   device_set_desc(dev, "High Precision Event Timer");
return (rv);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r336547 - in head/etc: defaults rc.d

2019-05-22 Thread Andriy Gapon


Something I've just noticed about this commit:

On 20/07/2018 16:59, Ian Lepore wrote:
> Author: ian
> Date: Fri Jul 20 13:59:29 2018
> New Revision: 336547
> URL: https://svnweb.freebsd.org/changeset/base/336547
> 
> Log:
>   Automatically run ntpd as non-root when possible.

[snip]

> +ntpd_precmd()
> +{
> + local driftopt
> +
> + # If we can run as a non-root user, switch uid to ntpd and use the
> + # new default location for the driftfile inside the ntpd-owned dir.
> + # Otherwise, figure out what to do about the driftfile option.  If set
> + # by the admin, we don't add the option.  If the file exists in the old
> + # default location we use that, else we use the new default location.
> + if can_run_nonroot; then
> + _user="ntpd"
> + driftopt="-f ${_ntp_default_driftfile}"
> + elif [ -z "${rc_flags##*-f*}" ] ||
> +  [ -z "${rc_flags##*--driftfile*}" ] ||

It seems that the two checks above produce a false positive if rc_flags is empty
already.  And that's the case on a system that I recently brought up (very
recent CURRENT via source install).  /etc/defaults/rc.conf has ntpd_flags="".
As a result ntpd is started without the drift file option.
And the stock /etc/ntp.conf also does not have the directive.

> +  grep -q "^[ \t]*driftfile" "${ntpd_config}"; then
> + driftopt="" # admin set the option, we don't need to add it.
> + elif [ -f "${_ntp_old_driftfile}" ]; then
> + driftopt="-f ${_ntp_old_driftfile}"
> + else
> + driftopt="-f ${_ntp_default_driftfile}"
>   fi

-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r347961 - head

2019-05-22 Thread Renato Botelho
On 18/05/19 16:36, Brad Davis wrote:
> Author: brd
> Date: Sat May 18 19:36:23 2019
> New Revision: 347961
> URL: https://svnweb.freebsd.org/changeset/base/347961
> 
> Log:
>   Add note to UPDATING for users of mergemaster after the move of 
> master.passwd
>   and group in r347638.
>   
>   Approved by:allanjude (mentor)
> 
> Modified:
>   head/UPDATING
> 
> Modified: head/UPDATING
> ==
> --- head/UPDATING Sat May 18 19:32:38 2019(r347960)
> +++ head/UPDATING Sat May 18 19:36:23 2019(r347961)
> @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
>   disable the most expensive debugging functionality run
>   "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
>  
> +20190517:
> + For users of mergemaster, after recent changes to locations of
> + master.passwd and group in the source tree mergemaster needs to be
> + updated.  Before running `mergemaster -p', cd to usr.sbin/mergemaster
> + and run `make install'.
> +

etcupdate is installing group and master.passwd to /lib/libc/gen.  It
seems wrong.

root@x230:/usr/src # etcupdate -p
  A /lib/libc/gen/group
  A /lib/libc/gen/master.passwd

-- 
Renato Botelho



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r347961 - head

2019-05-22 Thread Alexey Dokuchaev
On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote:
> On 18/05/19 16:36, Brad Davis wrote:
> > New Revision: 347961
> > URL: https://svnweb.freebsd.org/changeset/base/347961
> > 
> > Log:
> >   Add note to UPDATING for users of mergemaster after the move of
> >   master.passwd and group in r347638.
> >   
> >   Approved by:  allanjude (mentor)
> > 
> > Modified:
> >   head/UPDATING
> > 
> > +20190517:
> > +   For users of mergemaster, after recent changes to locations of
> > +   master.passwd and group in the source tree mergemaster needs to be
> > +   updated.  Before running `mergemaster -p', cd to usr.sbin/mergemaster
> > +   and run `make install'.
> > +
> 
> etcupdate is installing group and master.passwd to /lib/libc/gen.  It
> seems wrong.
> 
> root@x230:/usr/src # etcupdate -p
>   A /lib/libc/gen/group
>   A /lib/libc/gen/master.passwd

*facepalm*

Let me ask again: why these files were moved out of their perfectly
(and likely the only) reasonable location (etc/) under some cryptic
libc/gen/ which not only makes little sense per se, but also breaks
mergemaster(8) and similar tools?

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348073 - head/lib/libmd

2019-05-22 Thread Allan Jude
On 2019-05-21 19:03, Rodney W. Grimes wrote:
>> Author: allanjude
>> Date: Tue May 21 22:17:00 2019
>> New Revision: 348073
>> URL: https://svnweb.freebsd.org/changeset/base/348073
>>
>> Log:
>>   Add admonitions against using MD5 and SHA1 to the API man pages
>>
>> Modified:
>>   head/lib/libmd/mdX.3
>>   head/lib/libmd/sha.3
>>
>> Modified: head/lib/libmd/mdX.3
>> ==
>> --- head/lib/libmd/mdX.3 Tue May 21 22:11:53 2019(r348072)
>> +++ head/lib/libmd/mdX.3 Tue May 21 22:17:00 2019(r348073)
>> @@ -208,6 +208,8 @@ This code is derived directly from these implementatio
>>  .Pp
>>  Phk ristede runen.
>>  .Sh BUGS
>> -No method is known to exist which finds two files having the same hash 
>> value,
>> -nor to find a file with a specific hash value.
>> -There is on the other hand no guarantee that such a method does not exist.
>> +The
>> +.Tn MD5
> 
> There needs to be a discussion about .Tn, some people are ripping
> them out of man pages, others are adding them.  mandoc is a semantic
> mark up language, .Tn gives the following word the semantic of being
> a Tradename.
> 
> Yes, I know, mandoc ignroes them BUTT other tools do not, mandoc is
> not the end all in what can process our man pages, groff/troff should
> still be able to produce photo typesetter output and the .Tn's look
> nice when you do that.
> 
> I would like to see that we stop removing them and infact, as this
> man page does, properly recognize trademarks/names in our man pages
> "as is often required by law."
> 
> Now, one final nit, I can neither verify nor deny that "MD5" is
> a tradename.
> 
>> +algorithm has been proven to be vulnerable to practical collision
>> +attacks and should not be relied upon to produce unique outputs,
>> +.Em nor should they be used as part of a cryptographic signature scheme.
>>
>> Modified: head/lib/libmd/sha.3
>> ==
>> --- head/lib/libmd/sha.3 Tue May 21 22:11:53 2019(r348072)
>> +++ head/lib/libmd/sha.3 Tue May 21 22:17:00 2019(r348073)
>> @@ -191,9 +191,11 @@ published
>>  .Tn FIPS
>>  standards.
>>  .Sh BUGS
>> -No method is known to exist which finds two files having the same hash 
>> value,
>> -nor to find a file with a specific hash value.
>> -There is on the other hand no guarantee that such a method does not exist.
>> +The
>> +.Tn SHA1
>> +algorithm has been proven to be vulnerable to practical collision
>> +attacks and should not be relied upon to produce unique outputs,
>> +.Em nor should they be used as part of a cryptographic signature scheme.
>>  .Pp
>>  The
>>  .Tn IA32
>>
>>
> 

I borrowed the message (with .Tn markup) from the md5(1) man page, and
just added it to the library reference man pages since they said 'No
method is known to exist which finds two files having the same hash
value' which has not been true in a while.

I did not spend any effort deciding which markup to use there, as I
don't think MD5 or SHA1 are tradenames, just acronyms.

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


svn commit: r348109 - in head/sys/x86: include x86

2019-05-22 Thread Andrew Gallatin
Author: gallatin
Date: Wed May 22 13:44:15 2019
New Revision: 348109
URL: https://svnweb.freebsd.org/changeset/base/348109

Log:
  x86 MCA: introduce MCA hooks for different vendor implementations
  
  This is needed for AMD SMCA processors, as SMCA uses different
  MSR address for access MCA banks.
  
  Use IA32 specific msr_ops as defualt, and use SMCA-specific msr_ops
  when on an SMCA-enabled processor
  
  Submitted by: chandu from amd dot com
  Reviewed by:  cem
  Differential Revision:https://reviews.freebsd.org/D18055

Modified:
  head/sys/x86/include/specialreg.h
  head/sys/x86/x86/mca.c

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Wed May 22 08:30:03 2019
(r348108)
+++ head/sys/x86/include/specialreg.h   Wed May 22 13:44:15 2019
(r348109)
@@ -944,6 +944,16 @@
 #defineMC_MISC_AMD_PTR_MASK0xff00  /* Pointer to 
additional registers */
 #defineMC_MISC_AMD_PTR_SHIFT   24
 
+/* AMD Scalable MCA */
+#define MSR_SMCA_MC0_CTL  0xc0002000
+#define MSR_SMCA_MC0_STATUS   0xc0002001
+#define MSR_SMCA_MC0_ADDR 0xc0002002
+#define MSR_SMCA_MC0_MISC00xc0002003
+#define MSR_SMCA_MC_CTL(x)   (MSR_SMCA_MC0_CTL + 0x10 * (x))
+#define MSR_SMCA_MC_STATUS(x)(MSR_SMCA_MC0_STATUS + 0x10 * (x))
+#define MSR_SMCA_MC_ADDR(x)  (MSR_SMCA_MC0_ADDR + 0x10 * (x))
+#define MSR_SMCA_MC_MISC(x)  (MSR_SMCA_MC0_MISC0 + 0x10 * (x))
+
 /*
  * The following four 3-byte registers control the non-cacheable regions.
  * These registers must be written as three separate bytes.

Modified: head/sys/x86/x86/mca.c
==
--- head/sys/x86/x86/mca.c  Wed May 22 08:30:03 2019(r348108)
+++ head/sys/x86/x86/mca.c  Wed May 22 13:44:15 2019(r348109)
@@ -90,6 +90,13 @@ struct mca_internal {
STAILQ_ENTRY(mca_internal) link;
 };
 
+struct mca_enumerator_ops {
+unsigned int (*ctl)(int);
+unsigned int (*status)(int);
+unsigned int (*addr)(int);
+unsigned int (*misc)(int);
+};
+
 static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture");
 
 static volatile int mca_count; /* Number of records stored. */
@@ -124,6 +131,61 @@ static struct taskqueue *mca_tq;
 static struct task mca_refill_task, mca_scan_task;
 static struct mtx mca_lock;
 
+static unsigned int
+mca_ia32_ctl_reg(int bank)
+{
+   return (MSR_MC_CTL(bank));
+}
+
+static unsigned int
+mca_ia32_status_reg(int bank)
+{
+   return (MSR_MC_STATUS(bank));
+}
+
+static unsigned int
+mca_ia32_addr_reg(int bank)
+{
+   return (MSR_MC_ADDR(bank));
+}
+
+static unsigned int
+mca_ia32_misc_reg(int bank)
+{
+   return (MSR_MC_MISC(bank));
+}
+
+static unsigned int
+mca_smca_ctl_reg(int bank)
+{
+return (MSR_SMCA_MC_CTL(bank));
+}
+
+static unsigned int
+mca_smca_status_reg(int bank)
+{
+return (MSR_SMCA_MC_STATUS(bank));
+}
+
+static unsigned int
+mca_smca_addr_reg(int bank)
+{
+return (MSR_SMCA_MC_ADDR(bank));
+}
+
+static unsigned int
+mca_smca_misc_reg(int bank)
+{
+return (MSR_SMCA_MC_MISC(bank));
+}
+
+static struct mca_enumerator_ops mca_msr_ops = {
+.ctl= mca_ia32_ctl_reg,
+.status = mca_ia32_status_reg,
+.addr   = mca_ia32_addr_reg,
+.misc   = mca_ia32_misc_reg
+};
+
 #ifdef DEV_APIC
 static struct cmc_state **cmc_state;   /* Indexed by cpuid, bank. */
 static struct amd_et_state **amd_et_state; /* Indexed by cpuid, bank. */
@@ -462,7 +524,7 @@ mca_check_status(int bank, struct mca_record *rec)
uint64_t status;
u_int p[4];
 
-   status = rdmsr(MSR_MC_STATUS(bank));
+   status = rdmsr(mca_msr_ops.status(bank));
if (!(status & MC_STATUS_VAL))
return (0);
 
@@ -471,10 +533,10 @@ mca_check_status(int bank, struct mca_record *rec)
rec->mr_bank = bank;
rec->mr_addr = 0;
if (status & MC_STATUS_ADDRV)
-   rec->mr_addr = rdmsr(MSR_MC_ADDR(bank));
+   rec->mr_addr = rdmsr(mca_msr_ops.addr(bank));
rec->mr_misc = 0;
if (status & MC_STATUS_MISCV)
-   rec->mr_misc = rdmsr(MSR_MC_MISC(bank));
+   rec->mr_misc = rdmsr(mca_msr_ops.misc(bank));
rec->mr_tsc = rdtsc();
rec->mr_apic_id = PCPU_GET(apic_id);
rec->mr_mcg_cap = rdmsr(MSR_MCG_CAP);
@@ -488,7 +550,7 @@ mca_check_status(int bank, struct mca_record *rec)
 * errors so that the BIOS can see them.
 */
if (!(rec->mr_status & (MC_STATUS_PCC | MC_STATUS_UC))) {
-   wrmsr(MSR_MC_STATUS(bank), 0);
+   wrmsr(mca_msr_ops.status(bank), 0);
do_cpuid(0, p);
}
return (1);
@@ -648,7 +710,7 @@ amd_thresholding_update(enum scan_mode mode, int bank,
int count;
 
cc = &amd_et_

Re: svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme

2019-05-22 Thread Alexey Dokuchaev
On Tue, Apr 02, 2019 at 07:37:53PM +, Alexander Motin wrote:
> New Revision: 345815
> URL: https://svnweb.freebsd.org/changeset/base/345815
> 
> Log:
>   Make cam_error_print() decode NVMe commands.
> 
> Modified: head/sys/cam/nvme/nvme_xpt.c
> ...
> @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb)
>  {
>   char cdb_str[(sizeof(struct nvme_command) * 3) + 1];
>  
> - if (ccb->ccb_h.func_code != XPT_NVME_IO)
> + if (ccb->ccb_h.func_code != XPT_NVME_IO ||
> + ccb->ccb_h.func_code != XPT_NVME_ADMIN)
>   return;

PVS Studio complains that "Expression is always true. Probably the '&&'
operator should be used here".  Can you take a look?

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw

2019-05-22 Thread Mark Johnston
On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote:
> > Author: markj
> > Date: Wed May 22 04:13:57 2019
> > New Revision: 348090
> > URL: https://svnweb.freebsd.org/changeset/base/348090
> > 
> > Log:
> >   Marginally improve usage() message style in bootpd.
> >   
> >   - Remove an extra space after "usage:".
> >   - Avoid lines exceeding 80 columns.
> >   
> >   Based on notes from rgrimes.
> 
> Thanks, but you missed an important aspect of those notes,
> see inline below.
> 
> >   
> >   MFC with: r348066
> >   Event:Waterloo Hackathon 2019
> > 
> > Modified:
> >   head/libexec/bootpd/bootpd.c
> >   head/libexec/bootpd/bootpgw/bootpgw.c
> > 
> > Modified: head/libexec/bootpd/bootpd.c
> > ==
> > --- head/libexec/bootpd/bootpd.cWed May 22 04:10:24 2019
> > (r348089)
> > +++ head/libexec/bootpd/bootpd.cWed May 22 04:13:57 2019
> > (r348090)
> > @@ -587,8 +587,8 @@ PRIVATE void
> >  usage()
> >  {
> > fprintf(stderr,
> > -   "usage:  bootpd [-a] [-i | -s] [-c chdir-path] [-d 
> > level] [-h hostname] [-t timeout]\n");
> > -   fprintf(stderr, "   [bootptab [dumpfile]]\n");
> > +   "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h 
> > hostname]\n"
> > +   "  [-t timeout] [bootptab [dumpfile]]\n");
> > fprintf(stderr, "\t -a\tdon't modify ARP table\n");
> > fprintf(stderr, "\t -c n\tset current directory\n");
> > fprintf(stderr, "\t -d n\tset debug level\n");
> 
> These 3 printf's are now miss aligned and contain a \t that should not be 
> there:
> there may be more, I am only look at what is in context here.
>  -fprintf(stderr, "\t -a\tdon't modify ARP table\n");
>  -fprintf(stderr, "\t -c n\tset current directory\n");
>  -fprintf(stderr, "\t -d n\tset debug level\n");
>  +fprintf(stderr, "   -a\tdon't modify ARP table\n");
>  +fprintf(stderr, "   -c n\tset current directory\n");
>  +fprintf(stderr, "   -d n\tset debug level\n");

They were seemingly misaligned before too.

Before:
usage:  bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]
   [bootptab [dumpfile]]
 -c n   set current directory
 -d n   set debug level
 -h n   set the hostname to listen on
 -i force inetd mode (run as child of inetd)
 -s force standalone mode (run without inetd)
 -t n   set inetd exit timeout to n minutes

After:
usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]
  [-t timeout] [bootptab [dumpfile]]
 -a don't modify ARP table
 -c n   set current directory
 -d n   set debug level
 -h n   set the hostname to listen on
 -i force inetd mode (run as child of inetd)
 -s force standalone mode (run without inetd)
 -t n   set inetd exit timeout to n minutes

To be honest I have no desire to spend more time on bootpd than I
already have.  You are welcome to improve the usage formatting if
you like.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r310524 - in head/sys/cam: ctl scsi

2019-05-22 Thread Alexey Dokuchaev
On Sat, Dec 24, 2016 at 05:42:34PM +, Alexander Motin wrote:
> New Revision: 310524
> URL: https://svnweb.freebsd.org/changeset/base/310524
> 
> Log:
>   Improve length handling when writing sense data.
>   
>- Allow maximal sense size limitation via Control Extension mode page.
>- When sense size limited, include descriptors atomically: whole or none.
>- Set new SDAT_OVFL bit if some descriptors don't fit the limit.
>- Report real written sense length instead of static maximal 252 bytes.
>   
> Modified: head/sys/cam/scsi/scsi_all.c
> ...
>   break;
> - case SSD_ELEM_DESC:
> - default:
> -
> - /*
> -  * If the user passes in descriptor sense,
> -  * we can't handle that in fixed format.
> -  * So just skip it, and any unknown argument
> -  * types.
> -  */
> + }
> + if (len > sizeof(sense->cmd_spec_info)) {
> + data += len - sizeof(sense->cmd_spec_info);
> + len -= len - sizeof(sense->cmd_spec_info);

PVS Studio complains here: error: V765 A compound assignment expression 'x
-= x - ...' is suspicious. Consider inspecting it for a possible error.

This "len -= len - sizeof(...)" indeed looks weird, can you take a look?

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348110 - head/sys/cam/nvme

2019-05-22 Thread Alexander Motin
Author: mav
Date: Wed May 22 15:25:10 2019
New Revision: 348110
URL: https://svnweb.freebsd.org/changeset/base/348110

Log:
  Fix condition broken at r345815.
  
  Reported by:  danfe
  MFC after:3 days

Modified:
  head/sys/cam/nvme/nvme_xpt.c

Modified: head/sys/cam/nvme/nvme_xpt.c
==
--- head/sys/cam/nvme/nvme_xpt.cWed May 22 13:44:15 2019
(r348109)
+++ head/sys/cam/nvme/nvme_xpt.cWed May 22 15:25:10 2019
(r348110)
@@ -769,7 +769,7 @@ nvme_proto_debug_out(union ccb *ccb)
 {
char cdb_str[(sizeof(struct nvme_command) * 3) + 1];
 
-   if (ccb->ccb_h.func_code != XPT_NVME_IO ||
+   if (ccb->ccb_h.func_code != XPT_NVME_IO &&
ccb->ccb_h.func_code != XPT_NVME_ADMIN)
return;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348111 - head/sys/cam/scsi

2019-05-22 Thread Alexander Motin
Author: mav
Date: Wed May 22 15:39:35 2019
New Revision: 348111
URL: https://svnweb.freebsd.org/changeset/base/348111

Log:
  Simplify math added in r310524.
  
  Should be no functional change.
  
  Reported by:  danfe
  MFC after:1 week

Modified:
  head/sys/cam/scsi/scsi_all.c

Modified: head/sys/cam/scsi/scsi_all.c
==
--- head/sys/cam/scsi/scsi_all.cWed May 22 15:25:10 2019
(r348110)
+++ head/sys/cam/scsi/scsi_all.cWed May 22 15:39:35 2019
(r348111)
@@ -3943,7 +3943,7 @@ scsi_set_sense_data_fixed_va(struct scsi_sense_data *s
}
if (len > sizeof(sense->cmd_spec_info)) {
data += len - sizeof(sense->cmd_spec_info);
-   len -= len - sizeof(sense->cmd_spec_info);
+   len = sizeof(sense->cmd_spec_info);
}
bcopy(data, &sense->cmd_spec_info[
sizeof(sense->cmd_spec_info) - len], len);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r345815 - in head: lib/libcam sys/cam sys/cam/nvme

2019-05-22 Thread Alexander Motin
On 22.05.2019 11:10, Alexey Dokuchaev wrote:
> On Tue, Apr 02, 2019 at 07:37:53PM +, Alexander Motin wrote:
>> New Revision: 345815
>> URL: https://svnweb.freebsd.org/changeset/base/345815
>>
>> Log:
>>   Make cam_error_print() decode NVMe commands.
>>
>> Modified: head/sys/cam/nvme/nvme_xpt.c
>> ...
>> @@ -769,11 +769,13 @@ nvme_proto_debug_out(union ccb *ccb)
>>  {
>>  char cdb_str[(sizeof(struct nvme_command) * 3) + 1];
>>  
>> -if (ccb->ccb_h.func_code != XPT_NVME_IO)
>> +if (ccb->ccb_h.func_code != XPT_NVME_IO ||
>> +ccb->ccb_h.func_code != XPT_NVME_ADMIN)
>>  return;
> 
> PVS Studio complains that "Expression is always true. Probably the '&&'
> operator should be used here".  Can you take a look?

Fixed. Thank you.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r310524 - in head/sys/cam: ctl scsi

2019-05-22 Thread Alexander Motin
On 22.05.2019 11:21, Alexey Dokuchaev wrote:
> On Sat, Dec 24, 2016 at 05:42:34PM +, Alexander Motin wrote:
>> New Revision: 310524
>> URL: https://svnweb.freebsd.org/changeset/base/310524
>>
>> Log:
>>   Improve length handling when writing sense data.
>>   
>>- Allow maximal sense size limitation via Control Extension mode page.
>>- When sense size limited, include descriptors atomically: whole or none.
>>- Set new SDAT_OVFL bit if some descriptors don't fit the limit.
>>- Report real written sense length instead of static maximal 252 bytes.
>>   
>> Modified: head/sys/cam/scsi/scsi_all.c
>> ...
>> +}
>> +if (len > sizeof(sense->cmd_spec_info)) {
>> +data += len - sizeof(sense->cmd_spec_info);
>> +len -= len - sizeof(sense->cmd_spec_info);
> 
> PVS Studio complains here: error: V765 A compound assignment expression 'x
> -= x - ...' is suspicious. Consider inspecting it for a possible error.
> 
> This "len -= len - sizeof(...)" indeed looks weird, can you take a look?

It may be weird, but not incorrect.  Fixed though.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r310524 - in head/sys/cam: ctl scsi

2019-05-22 Thread Alexey Dokuchaev
On Wed, May 22, 2019 at 11:40:42AM -0400, Alexander Motin wrote:
> On 22.05.2019 11:21, Alexey Dokuchaev wrote:
> > On Sat, Dec 24, 2016 at 05:42:34PM +, Alexander Motin wrote:
> >> New Revision: 310524
> >> URL: https://svnweb.freebsd.org/changeset/base/310524
> >>
> >> Modified: head/sys/cam/scsi/scsi_all.c
> >> ...
> >> +  }
> >> +  if (len > sizeof(sense->cmd_spec_info)) {
> >> +  data += len - sizeof(sense->cmd_spec_info);
> >> +  len -= len - sizeof(sense->cmd_spec_info);
> > 
> > PVS Studio complains here: error: V765 A compound assignment expression 'x
> > -= x - ...' is suspicious. Consider inspecting it for a possible error.
> > 
> > This "len -= len - sizeof(...)" indeed looks weird, can you take a look?
> 
> It may be weird, but not incorrect.  Fixed though.

Wow that was fast!  Thanks (for both commits),

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw

2019-05-22 Thread Rodney W. Grimes
> On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote:
> > > Author: markj
> > > Date: Wed May 22 04:13:57 2019
> > > New Revision: 348090
> > > URL: https://svnweb.freebsd.org/changeset/base/348090
> > > 
> > > Log:
> > >   Marginally improve usage() message style in bootpd.
> > >   
> > >   - Remove an extra space after "usage:".
> > >   - Avoid lines exceeding 80 columns.
> > >   
> > >   Based on notes from rgrimes.
> > 
> > Thanks, but you missed an important aspect of those notes,
> > see inline below.
> > 
> > >   
> > >   MFC with:   r348066
> > >   Event:  Waterloo Hackathon 2019
> > > 
> > > Modified:
> > >   head/libexec/bootpd/bootpd.c
> > >   head/libexec/bootpd/bootpgw/bootpgw.c
> > > 
> > > Modified: head/libexec/bootpd/bootpd.c
> > > ==
> > > --- head/libexec/bootpd/bootpd.c  Wed May 22 04:10:24 2019
> > > (r348089)
> > > +++ head/libexec/bootpd/bootpd.c  Wed May 22 04:13:57 2019
> > > (r348090)
> > > @@ -587,8 +587,8 @@ PRIVATE void
> > >  usage()
> > >  {
> > >   fprintf(stderr,
> > > - "usage:  bootpd [-a] [-i | -s] [-c chdir-path] [-d 
> > > level] [-h hostname] [-t timeout]\n");
> > > - fprintf(stderr, "   [bootptab [dumpfile]]\n");
> > > + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h 
> > > hostname]\n"
> > > + "  [-t timeout] [bootptab [dumpfile]]\n");
> > >   fprintf(stderr, "\t -a\tdon't modify ARP table\n");
> > >   fprintf(stderr, "\t -c n\tset current directory\n");
> > >   fprintf(stderr, "\t -d n\tset debug level\n");
> > 
> > These 3 printf's are now miss aligned and contain a \t that should not be 
> > there:
> > there may be more, I am only look at what is in context here.
> >  -  fprintf(stderr, "\t -a\tdon't modify ARP table\n");
> >  -  fprintf(stderr, "\t -c n\tset current directory\n");
> >  -  fprintf(stderr, "\t -d n\tset debug level\n");
> >  +  fprintf(stderr, "   -a\tdon't modify ARP table\n");
> >  +  fprintf(stderr, "   -c n\tset current directory\n");
> >  +  fprintf(stderr, "   -d n\tset debug level\n");
> 
> They were seemingly misaligned before too.
> 
> Before:
> usage:  bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]
>[bootptab [dumpfile]]
>  -c n   set current directory
>  -d n   set debug level
>  -h n   set the hostname to listen on
>  -i force inetd mode (run as child of inetd)
>  -s force standalone mode (run without inetd)
>  -t n   set inetd exit timeout to n minutes
> 
> After:
> usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname]
>   [-t timeout] [bootptab [dumpfile]]
>  -a don't modify ARP table
>  -c n   set current directory
>  -d n   set debug level
>  -h n   set the hostname to listen on
>  -i force inetd mode (run as child of inetd)
>  -s force standalone mode (run without inetd)
>  -t n   set inetd exit timeout to n minutes
> 
> To be honest I have no desire to spend more time on bootpd than I
> already have.  You are welcome to improve the usage formatting if
> you like.

omg, really?  Old "folke lore"  You touched, you own it.

If I didnt have to go through bde and/or phk I would of just gone
and commited the clean up.  I have handed you the diff.

Perhaps a phab review before would of made this less painfull.
And perhaps a phab review once an issue had been raised would
of been really less painful.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw

2019-05-22 Thread Ian Lepore
On Wed, 2019-05-22 at 08:48 -0700, Rodney W. Grimes wrote:
> > On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote:
> > > > Author: markj
> > > > Date: Wed May 22 04:13:57 2019
> > > > New Revision: 348090
> > > > URL: https://svnweb.freebsd.org/changeset/base/348090
> > > > 
> > > > Log:
> > > >   Marginally improve usage() message style in bootpd.
> > > >   
> > > >   - Remove an extra space after "usage:".
> > > >   - Avoid lines exceeding 80 columns.
> > > >   
> > > >   Based on notes from rgrimes.
> > > 
> > > Thanks, but you missed an important aspect of those notes,
> > > see inline below.
> > > 
> > > >   
> > > >   MFC with: r348066
> > > >   Event:Waterloo Hackathon 2019
> > > > 
> > > > Modified:
> > > >   head/libexec/bootpd/bootpd.c
> > > >   head/libexec/bootpd/bootpgw/bootpgw.c
> > > > 
> > > > Modified: head/libexec/bootpd/bootpd.c
> > > > ===
> > > > ===
> > > > --- head/libexec/bootpd/bootpd.cWed May 22 04:10:24
> > > > 2019(r348089)
> > > > +++ head/libexec/bootpd/bootpd.cWed May 22 04:13:57
> > > > 2019(r348090)
> > > > @@ -587,8 +587,8 @@ PRIVATE void
> > > >  usage()
> > > >  {
> > > > fprintf(stderr,
> > > > -   "usage:  bootpd [-a] [-i | -s] [-c
> > > > chdir-path] [-d level] [-h hostname] [-t timeout]\n");
> > > > -   fprintf(stderr, "   [bootptab
> > > > [dumpfile]]\n");
> > > > +   "usage: bootpd [-a] [-i | -s] [-c chdir-path]
> > > > [-d level] [-h hostname]\n"
> > > > +   "  [-t timeout] [bootptab
> > > > [dumpfile]]\n");
> > > > fprintf(stderr, "\t -a\tdon't modify ARP table\n");
> > > > fprintf(stderr, "\t -c n\tset current directory\n");
> > > > fprintf(stderr, "\t -d n\tset debug level\n");
> > > 
> > > These 3 printf's are now miss aligned and contain a \t that
> > > should not be there:
> > > there may be more, I am only look at what is in context here.
> > >  -fprintf(stderr, "\t -a\tdon't modify ARP table\n");
> > >  -fprintf(stderr, "\t -c n\tset current directory\n");
> > >  -fprintf(stderr, "\t -d n\tset debug level\n");
> > >  +fprintf(stderr, "   -a\tdon't modify ARP table\n");
> > >  +fprintf(stderr, "   -c n\tset current
> > > directory\n");
> > >  +fprintf(stderr, "   -d n\tset debug level\n");
> > 
> > They were seemingly misaligned before too.
> > 
> > Before:
> > usage:  bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname]
> > [-t timeout]
> >[bootptab [dumpfile]]
> >  -c n   set current directory
> >  -d n   set debug level
> >  -h n   set the hostname to listen on
> >  -i force inetd mode (run as child of inetd)
> >  -s force standalone mode (run without inetd)
> >  -t n   set inetd exit timeout to n minutes
> > 
> > After:
> > usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h
> > hostname]
> >   [-t timeout] [bootptab [dumpfile]]
> >  -a don't modify ARP table
> >  -c n   set current directory
> >  -d n   set debug level
> >  -h n   set the hostname to listen on
> >  -i force inetd mode (run as child of inetd)
> >  -s force standalone mode (run without inetd)
> >  -t n   set inetd exit timeout to n minutes
> > 
> > To be honest I have no desire to spend more time on bootpd than I
> > already have.  You are welcome to improve the usage formatting if
> > you like.
> 
> omg, really?  Old "folke lore"  You touched, you own it.
> 
> If I didnt have to go through bde and/or phk I would of just gone
> and commited the clean up.  I have handed you the diff.
> 
> Perhaps a phab review before would of made this less painfull.
> And perhaps a phab review once an issue had been raised would
> of been really less painful.
> 

Or perhaps trying to browbeat someone into doing extensive changes when
all they intended to do was a simple obvious thing is asking too much.

You seem to expend quite a bit of energy in making perfect the enemy of
better.  The long term result of that is that either people will just
habitually ignore your feedback, or they'll stop doing simple things to
make the world better because they're tired of being told their work
achieves less than perfection.

-- Ian


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348112 - in head/sys: conf powerpc/aim powerpc/powerpc

2019-05-22 Thread Leandro Lupori
Author: luporl
Date: Wed May 22 15:56:41 2019
New Revision: 348112
URL: https://svnweb.freebsd.org/changeset/base/348112

Log:
  Fix PPC64 kernel build with clang8 + lld8
  
  This patch fixes the following lld link errors:
  
  - unsupported dynamic relocations on read-only sections
  - out-of-range TOC references
  
  Submitted by: git_bdragon.rtk0.net
  Reviewed by:  jhibbits, luporl
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D19352

Modified:
  head/sys/conf/ldscript.powerpc64
  head/sys/powerpc/aim/trap_subr64.S
  head/sys/powerpc/powerpc/cpu_subr64.S

Modified: head/sys/conf/ldscript.powerpc64
==
--- head/sys/conf/ldscript.powerpc64Wed May 22 15:39:35 2019
(r348111)
+++ head/sys/conf/ldscript.powerpc64Wed May 22 15:56:41 2019
(r348112)
@@ -98,7 +98,8 @@ SECTIONS
   .opd   : ALIGN(8) { KEEP (*(.opd)) }
   .branch_lt : ALIGN(8) { *(.branch_lt) }
   . = ALIGN(4096);
-  .got   : ALIGN(8) { __tocbase = .; *(.got .toc) }
+  .got   : ALIGN(8) { __tocbase = .; *(.got) }
+  .toc   : ALIGN(8) { *(.toc) }
 
   .dynamic: { *(.dynamic) } :text :dynamic
   /* Put .ctors and .dtors next to the .got2 section, so that the pointers

Modified: head/sys/powerpc/aim/trap_subr64.S
==
--- head/sys/powerpc/aim/trap_subr64.S  Wed May 22 15:39:35 2019
(r348111)
+++ head/sys/powerpc/aim/trap_subr64.S  Wed May 22 15:56:41 2019
(r348112)
@@ -317,29 +317,33 @@ CNAME(rstcode):
 * processor is waking up from power saving mode
 * It is software reset when 46:47 = 0b00
 */
+   /* 0x00 */
+   ld  %r2,TRAP_GENTRAP(0) /* Real-mode &generictrap */
mfsrr1  %r9 /* Load SRR1 into r9 */
andis.  %r9,%r9,0x3 /* Logic AND with 46:47 bits */
+
beq 2f  /* Branch if software reset */
-   bl  1f
-   .llong  cpu_wakeup_handler
+   /* 0x10 */
+   /* Reset was wakeup */
+   addi%r9,%r2,(cpu_wakeup_handler-generictrap)
+   b   1f  /* Was power save, do the wakeup */
 
-   /* It is software reset */
-
+   /* Reset was software reset */
/* Explicitly set MSR[SF] */
 2: mfmsr   %r9
li  %r8,1
+   /* 0x20 */
insrdi  %r9,%r8,1,0
mtmsrd  %r9
isync
 
-   bl  1f
-   .llong  cpu_reset_handler /* Make sure to maintain 8-byte alignment */
+   addi%r9,%r2,(cpu_reset_handler-generictrap)
 
-1: mflr%r9
-   ld  %r9,0(%r9)
-   mtlr%r9
-
-   blr
+   /* 0x30 */
+1: mtlr%r9
+   blr /* Branch to either cpu_reset_handler
+* or cpu_wakeup_handler.
+*/
 CNAME(rstcodeend):
 
 cpu_reset_handler:
@@ -459,52 +463,59 @@ CNAME(hypertrapcode):
addi%r1,%r1,(generichypertrap-generictrap)
mtlr%r1
li  %r1, 0xe0   /* How to get the vector from LR */
-   blrl/* Branch to generictrap */
+   blrl/* Branch to generichypertrap */
 CNAME(hypertrapcodeend):
 
 /*
  * For SLB misses: do special things for the kernel
  *
- * Note: SPRG1 is always safe to overwrite any time the MMU is on, which is
+ * Note: SPRG1 is always safe to overwrite any time the MMU was on, which is
  * the only time this can be called.
  */
.globl  CNAME(slbtrap),CNAME(slbtrapend)
.p2align 3
 CNAME(slbtrap):
+   /* 0x00 */
mtsprg1 %r1 /* save SP */
GET_CPUINFO(%r1)
-   std %r2,(PC_SLBSAVE+16)(%r1)
-   mfcr%r2 /* save CR */
-   std %r2,(PC_SLBSAVE+104)(%r1)
+   std %r2,(PC_SLBSAVE+16)(%r1)/* save r2 */
+   mfcr%r2
+   /* 0x10 */
+   std %r2,(PC_SLBSAVE+104)(%r1)   /* save CR */
mfsrr1  %r2 /* test kernel mode */
mtcr%r2
bf  17,2f   /* branch if PSL_PR is false */
+   /* 0x20 */
/* User mode */
-   ld  %r2,(PC_SLBSAVE+104)(%r1) /* Restore CR */
-   mtcr%r2
-   ld  %r2,(PC_SLBSAVE+16)(%r1) /* Restore R2 */
-   mflr%r1 /* Save the old LR in r1 */
-   mtsprg2 %r1 /* And then in SPRG2 */
-   /* 52 bytes so far */
-   bl  1f
-   .llong  generictrap
-1: mflr%r1
-   ld  %r1,0(%r1)
+   ld  %r2,(PC_SLBSAVE+104)(%r1)
+   mtcr%r2 /* restore CR */
+   ld  %r2,(PC_SLBSAVE+16)(%r1)/* restore r2 */
+   mflr%r1
+   /* 0x30 */
+   mtsprg2 %r1 

Re: svn commit: r250609 - head/sys/dev/ath

2019-05-22 Thread Alexey Dokuchaev
On Mon, May 13, 2013 at 07:03:13PM +, Adrian Chadd wrote:
> New Revision: 250609
> URL: http://svnweb.freebsd.org/changeset/base/250609
> 
> Log:
>   Since the node state is 100% back under the TX lock, just kill the use
>   of atomics.
>   
> Modified:
>   head/sys/dev/ath/if_ath.c
> 
> @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc,
>   /*
>* Don't bother grabbing the lock unless the queue is empty.
>*/
> - if (atomic_load_acq_int(&an->an_swq_depth) != 0)
> + if (&an->an_swq_depth != 0)
>   return;
>  
>   if (an->an_is_powersave &&
>   an->an_stack_psq == 0 &&
>   an->an_tim_set == 1 &&
> - atomic_load_acq_int(&an->an_swq_depth) == 0) {
> + an->an_swq_depth == 0) {

PVS Studio complains here: warning: V560 A part of conditional expression
is always true: an->an_swq_depth == 0.  Which probably makes sense since
you return earlier if it's != 0.

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348113 - head/share/man/man9

2019-05-22 Thread Alan Somers
Author: asomers
Date: Wed May 22 16:24:39 2019
New Revision: 348113
URL: https://svnweb.freebsd.org/changeset/base/348113

Log:
  Update VFS_FHTOVP(9) with the flags argument
  
  Revison 222167 added a new argument to VFS_FHTOVP. This revision updates the
  man page to match.
  
  Reviewed by:  rmacklem
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D20323

Modified:
  head/share/man/man9/VFS_FHTOVP.9

Modified: head/share/man/man9/VFS_FHTOVP.9
==
--- head/share/man/man9/VFS_FHTOVP.9Wed May 22 15:56:41 2019
(r348112)
+++ head/share/man/man9/VFS_FHTOVP.9Wed May 22 16:24:39 2019
(r348113)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 4, 2010
+.Dd May 19, 2019
 .Dt VFS_FHTOVP 9
 .Os
 .Sh NAME
@@ -39,18 +39,26 @@
 .In sys/mount.h
 .In sys/vnode.h
 .Ft int
-.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "struct vnode **vpp"
+.Fn VFS_FHTOVP "struct mount *mp" "struct fid *fhp" "int flags" "struct vnode 
**vpp"
 .Sh DESCRIPTION
 The
 .Fn VFS_FHTOVP
 macro is used by the NFS server to turn an NFS filehandle into a vnode.
 .Pp
 The arguments it expects are:
-.Bl -tag -width vpp
+.Bl -tag -width flags
 .It Fa mp
 The file system.
 .It Fa fhp
 The filehandle to convert.
+.It Fa flags
+Additional locking flags to pass through to
+.Xr vget 9 .
+File systems are allowed to ignore
+.Ar flags
+and use
+.Dv LK_EXCLUSIVE
+instead.
 .It Fa vpp
 Return parameter for the new locked vnode.
 .El
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r250609 - head/sys/dev/ath

2019-05-22 Thread Ian Lepore
On Wed, 2019-05-22 at 16:20 +, Alexey Dokuchaev wrote:
> On Mon, May 13, 2013 at 07:03:13PM +, Adrian Chadd wrote:
> > New Revision: 250609
> > URL: http://svnweb.freebsd.org/changeset/base/250609
> > 
> > Log:
> >   Since the node state is 100% back under the TX lock, just kill
> > the use
> >   of atomics.
> >   
> > Modified:
> >   head/sys/dev/ath/if_ath.c
> > 
> > @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc,
> > /*
> >  * Don't bother grabbing the lock unless the queue is
> > empty.
> >  */
> > -   if (atomic_load_acq_int(&an->an_swq_depth) != 0)
> > +   if (&an->an_swq_depth != 0)
> > return;
> >  
> > if (an->an_is_powersave &&
> > an->an_stack_psq == 0 &&
> > an->an_tim_set == 1 &&
> > -   atomic_load_acq_int(&an->an_swq_depth) == 0) {
> > +   an->an_swq_depth == 0) {
> 
> PVS Studio complains here: warning: V560 A part of conditional
> expression
> is always true: an->an_swq_depth == 0.  Which probably makes sense
> since
> you return earlier if it's != 0.
> 
> ./danfe
> 

You're replying to a six year old commit?

It doesn't check earlier whether that value is 0, it checks whether the
address of that value is 0.  That's probably a bug.

-- Ian

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r244943 - in head/sys/dev/ath/ath_hal: ar5416 ar9002

2019-05-22 Thread Alexey Dokuchaev
On Wed, Jan 02, 2013 at 12:38:01AM +, Adrian Chadd wrote:
> New Revision: 244943
> URL: http://svnweb.freebsd.org/changeset/base/244943
> 
> Log:
>   Bring over the basic spectral scan framework code from Qualcomm Atheros.
>   
>   This includes the HAL routines to setup, enable/activate/disable spectral
>   scan and configure the relevant registers.
>   
>   Obtained from:  Qualcomm Atheros
> 
> Added:
>   head/sys/dev/ath/ath_hal/ar5416/ar5416_spectral.c
> 
> ...
> + if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) {
> + val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD;
> + val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
> + }
> +
> + if (ss->ss_period != HAL_SPECTRAL_PARAM_NOVAL) {
> + val &= ~AR_PHY_SPECTRAL_SCAN_PERIOD;
> + val |= SM(ss->ss_period, AR_PHY_SPECTRAL_SCAN_PERIOD);
> + }

PVS Studio complains here: warning: V581 The conditional expressions of
the 'if' operators situated alongside each other are identical.

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r250609 - head/sys/dev/ath

2019-05-22 Thread Alexey Dokuchaev
On Wed, May 22, 2019 at 10:34:35AM -0600, Ian Lepore wrote:
> On Wed, 2019-05-22 at 16:20 +, Alexey Dokuchaev wrote:
> > On Mon, May 13, 2013 at 07:03:13PM +, Adrian Chadd wrote:
> > > New Revision: 250609
> > > URL: http://svnweb.freebsd.org/changeset/base/250609
> > > 
> > > Log:
> > >   Since the node state is 100% back under the TX lock, just kill
> > > the use
> > >   of atomics.
> > >   
> > > Modified:
> > >   head/sys/dev/ath/if_ath.c
> > > 
> > > @@ -6140,13 +6133,13 @@ ath_tx_update_tim(struct ath_softc *sc,
> > >   /*
> > >* Don't bother grabbing the lock unless the queue is
> > > empty.
> > >*/
> > > - if (atomic_load_acq_int(&an->an_swq_depth) != 0)
> > > + if (&an->an_swq_depth != 0)
> > >   return;
> > >  
> > >   if (an->an_is_powersave &&
> > >   an->an_stack_psq == 0 &&
> > >   an->an_tim_set == 1 &&
> > > - atomic_load_acq_int(&an->an_swq_depth) == 0) {
> > > + an->an_swq_depth == 0) {
> > 
> > PVS Studio complains here: warning: V560 A part of conditional
> > expression
> > is always true: an->an_swq_depth == 0.  Which probably makes sense
> > since
> > you return earlier if it's != 0.
> 
> You're replying to a six year old commit?

Yeah, anything wrong with it?

> It doesn't check earlier whether that value is 0, it checks whether the
> address of that value is 0.  That's probably a bug.

No, the & is a vestige from the atomic_* conversion, it is not present in
current code.  The check is still there, however.

./danfe
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348090 - in head/libexec/bootpd: . bootpgw

2019-05-22 Thread Mark Johnston
On Wed, May 22, 2019 at 08:48:10AM -0700, Rodney W. Grimes wrote:
> > On Tue, May 21, 2019 at 09:25:23PM -0700, Rodney W. Grimes wrote:
> > To be honest I have no desire to spend more time on bootpd than I
> > already have.  You are welcome to improve the usage formatting if
> > you like.
> 
> omg, really?  Old "folke lore"  You touched, you own it.

I own plenty of things already.

> If I didnt have to go through bde and/or phk I would of just gone
> and commited the clean up.

Ok, that's something for you to figure out.

> I have handed you the diff.
> 
> Perhaps a phab review before would of made this less painfull.
> And perhaps a phab review once an issue had been raised would
> of been really less painful.

There was a phab review for the original change, and I fixed an issue
that was introduced by that change.  I think that's sufficient.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348114 - head

2019-05-22 Thread Niclas Zeising
Author: zeising (doc,ports committer)
Date: Wed May 22 16:59:22 2019
New Revision: 348114
URL: https://svnweb.freebsd.org/changeset/base/348114

Log:
  Fix ObsoleteFiles after ethernet driver removal
  
  Fix OpsoleteFiles.inc after removal of ethernet drivers.  The drivers have
  manual pages, and manual pages are generally stored compressed, with a .gz
  suffix, but this is not reflected in ObsoleteFiles and make delete-old fails
  to remove them.
  
  Approved by:  brooks
  Sponsored by: B3 Init
  Differential Revision:https://reviews.freebsd.org/D20351

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed May 22 16:24:39 2019(r348113)
+++ head/ObsoleteFiles.inc  Wed May 22 16:59:22 2019(r348114)
@@ -39,31 +39,31 @@
 # done
 
 # 20190517: Remove obsolete 10 and 10/100 ethernet drivers.
-OLD_FILES+=usr/share/man/man4/bm.4
-OLD_FILES+=usr/share/man/man4/cs.4
-OLD_FILES+=usr/share/man/man4/de.4
-OLD_FILES+=usr/share/man/man4/if_de.4
-OLD_FILES+=usr/share/man/man4/ed.4
-OLD_FILES+=usr/share/man/man4/if_ed.4
-OLD_FILES+=usr/share/man/man4/ep.4
-OLD_FILES+=usr/share/man/man4/ex.4
-OLD_FILES+=usr/share/man/man4/fe.4
-OLD_FILES+=usr/share/man/man4/pcn.4
-OLD_FILES+=usr/share/man/man4/if_pcn.4
-OLD_FILES+=usr/share/man/man4/sf.4
-OLD_FILES+=usr/share/man/man4/if_sf.4
-OLD_FILES+=usr/share/man/man4/sn.4
-OLD_FILES+=usr/share/man/man4/if_sn.4
-OLD_FILES+=usr/share/man/man4/tl.4
-OLD_FILES+=usr/share/man/man4/if_tl.4
-OLD_FILES+=usr/share/man/man4/tx.4
-OLD_FILES+=usr/share/man/man4/if_tx.4
-OLD_FILES+=usr/share/man/man4/txp.4
-OLD_FILES+=usr/share/man/man4/if_txp.4
-OLD_FILES+=usr/share/man/man4/vx.4
-OLD_FILES+=usr/share/man/man4/wb.4
-OLD_FILES+=usr/share/man/man4/xe.4
-OLD_FILES+=usr/share/man/man4/if_xe.4
+OLD_FILES+=usr/share/man/man4/bm.4.gz
+OLD_FILES+=usr/share/man/man4/cs.4.gz
+OLD_FILES+=usr/share/man/man4/de.4.gz
+OLD_FILES+=usr/share/man/man4/if_de.4.gz
+OLD_FILES+=usr/share/man/man4/ed.4.gz
+OLD_FILES+=usr/share/man/man4/if_ed.4.gz
+OLD_FILES+=usr/share/man/man4/ep.4.gz
+OLD_FILES+=usr/share/man/man4/ex.4.gz
+OLD_FILES+=usr/share/man/man4/fe.4.gz
+OLD_FILES+=usr/share/man/man4/pcn.4.gz
+OLD_FILES+=usr/share/man/man4/if_pcn.4.gz
+OLD_FILES+=usr/share/man/man4/sf.4.gz
+OLD_FILES+=usr/share/man/man4/if_sf.4.gz
+OLD_FILES+=usr/share/man/man4/sn.4.gz
+OLD_FILES+=usr/share/man/man4/if_sn.4.gz
+OLD_FILES+=usr/share/man/man4/tl.4.gz
+OLD_FILES+=usr/share/man/man4/if_tl.4.gz
+OLD_FILES+=usr/share/man/man4/tx.4.gz
+OLD_FILES+=usr/share/man/man4/if_tx.4.gz
+OLD_FILES+=usr/share/man/man4/txp.4.gz
+OLD_FILES+=usr/share/man/man4/if_txp.4.gz
+OLD_FILES+=usr/share/man/man4/vx.4.gz
+OLD_FILES+=usr/share/man/man4/wb.4.gz
+OLD_FILES+=usr/share/man/man4/xe.4.gz
+OLD_FILES+=usr/share/man/man4/if_xe.4.gz
 # 20190513: libcap_sysctl interface change
 OLD_FILES+=lib/casper/libcap_sysctl.1
 # 20190509: tests/sys/opencrypto requires the net/py-dpkt package.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348115 - head/sys/vm

2019-05-22 Thread Doug Moore
Author: dougm
Date: Wed May 22 17:40:54 2019
New Revision: 348115
URL: https://svnweb.freebsd.org/changeset/base/348115

Log:
  Passing a parameter to vm_map_entry_resize_free that describes the
  amount of resizing reduces the number of functions changing the vm_map
  invariants regarding the max_free field of map entries.
  
  Reviewed by: markj (mentor)
  Approved by: kib (mentor)
  Differential Revision: https://reviews.freebsd.org/D20356

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cWed May 22 16:59:22 2019(r348114)
+++ head/sys/vm/vm_map.cWed May 22 17:40:54 2019(r348115)
@@ -1251,7 +1251,7 @@ vm_map_entry_unlink(vm_map_t map,
  * The map must be locked, and leaves it so.
  */
 static void
-vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry)
+vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry, size_t 
grow_amount)
 {
vm_map_entry_t llist, rlist, root;
 
@@ -1262,11 +1262,12 @@ vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t 
("vm_map_entry_resize_free: resize_free object not mapped"));
vm_map_splay_findnext(root, &rlist);
root->right = NULL;
+   entry->end += grow_amount;
map->root = vm_map_splay_merge(root, llist, rlist,
root->left, root->right);
VM_MAP_ASSERT_CONSISTENT(map);
-   CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p", 
map,
-   map->nentries, entry);
+   CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p",
+map, map->nentries, entry);
 }
 
 /*
@@ -1486,8 +1487,8 @@ charged:
prev_entry));
if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0)
map->size += end - prev_entry->end;
-   prev_entry->end = end;
-   vm_map_entry_resize_free(map, prev_entry);
+   vm_map_entry_resize_free(map, prev_entry,
+   end - prev_entry->end);
vm_map_simplify_entry(map, prev_entry);
return (KERN_SUCCESS);
}
@@ -4314,7 +4315,7 @@ retry:
} else {
MPASS(gap_entry->start < gap_entry->end - grow_amount);
gap_entry->end -= grow_amount;
-   vm_map_entry_resize_free(map, gap_entry);
+   vm_map_entry_resize_free(map, gap_entry, -grow_amount);
gap_deleted = false;
}
rv = vm_map_insert(map, NULL, 0, grow_start,
@@ -4327,10 +4328,9 @@ retry:
gap_end, VM_PROT_NONE, VM_PROT_NONE,
MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN);
MPASS(rv1 == KERN_SUCCESS);
-   } else {
-   gap_entry->end += grow_amount;
-   vm_map_entry_resize_free(map, gap_entry);
-   }
+   } else
+   vm_map_entry_resize_free(map, gap_entry,
+   grow_amount);
}
} else {
grow_start = stack_entry->end;
@@ -4349,9 +4349,8 @@ retry:
vm_map_entry_delete(map, gap_entry);
else
gap_entry->start += grow_amount;
-   stack_entry->end += grow_amount;
map->size += grow_amount;
-   vm_map_entry_resize_free(map, stack_entry);
+   vm_map_entry_resize_free(map, stack_entry, grow_amount);
rv = KERN_SUCCESS;
} else
rv = KERN_FAILURE;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348109 - in head/sys/x86: include x86

2019-05-22 Thread Andriy Gapon
On 22/05/2019 16:44, Andrew Gallatin wrote:
>   This is needed for AMD SMCA processors, as SMCA uses different
>   MSR address for access MCA banks.

Just curious, what is SMCA?


-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2019-05-22 Thread Alexander Motin
Author: mav
Date: Wed May 22 18:43:48 2019
New Revision: 348117
URL: https://svnweb.freebsd.org/changeset/base/348117

Log:
  Allocate buffers smaller then ABD chunk size as linear.
  
  This allows to reduce memory waste by letting UMA to put multiple small
  buffers into one memory page slab.  The page sharing means that UMA
  may not be able to free memory page when some of buffers are freed, but
  alternatively memory used by that buffer would just be wasted from the
  beginning.
  
  This change follows alike change in ZoL, but unlike Linux (according to
  my understanding of it from comments) FreeBSD never shares slabs bigger
  then one memory page, so this should be even less invasive then there.
  
  MFC after:2 weeks
  Sponsored by: iXsystems, Inc.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c   Wed May 22 
17:42:22 2019(r348116)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c   Wed May 22 
18:43:48 2019(r348117)
@@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd)
 abd_t *
 abd_alloc(size_t size, boolean_t is_metadata)
 {
-   if (!zfs_abd_scatter_enabled)
+   if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size)
return (abd_alloc_linear(size, is_metadata));
 
VERIFY3U(size, <=, SPA_MAXBLOCKSIZE);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348109 - in head/sys/x86: include x86

2019-05-22 Thread Conrad Meyer
On Wed, May 22, 2019 at 11:06 AM Andriy Gapon  wrote:
>
> On 22/05/2019 16:44, Andrew Gallatin wrote:
> >   This is needed for AMD SMCA processors, as SMCA uses different
> >   MSR address for access MCA banks.
>
> Just curious, what is SMCA?

Scalable MCA.  It's a set of AMD Fam17h MCA extensions.

Best,
Conrad
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2019-05-22 Thread Slawa Olhovchenkov
On Wed, May 22, 2019 at 06:43:48PM +, Alexander Motin wrote:

> Author: mav
> Date: Wed May 22 18:43:48 2019
> New Revision: 348117
> URL: https://svnweb.freebsd.org/changeset/base/348117
> 
> Log:
>   Allocate buffers smaller then ABD chunk size as linear.
>   
>   This allows to reduce memory waste by letting UMA to put multiple small
>   buffers into one memory page slab.  The page sharing means that UMA
>   may not be able to free memory page when some of buffers are freed, but
>   alternatively memory used by that buffer would just be wasted from the
>   beginning.
>   
>   This change follows alike change in ZoL, but unlike Linux (according to
>   my understanding of it from comments) FreeBSD never shares slabs bigger
>   then one memory page, so this should be even less invasive then there.
>   
>   MFC after:  2 weeks
>   Sponsored by:   iXsystems, Inc.
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
> ==
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 
> 17:42:22 2019(r348116)
> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 
> 18:43:48 2019(r348117)
> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd)
>  abd_t *
>  abd_alloc(size_t size, boolean_t is_metadata)
>  {
> - if (!zfs_abd_scatter_enabled)
> + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size)
>   return (abd_alloc_linear(size, is_metadata));

may be `size < zfs_abd_chunk_size`?

>   VERIFY3U(size, <=, SPA_MAXBLOCKSIZE);
> ___
> svn-src-...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r347961 - head

2019-05-22 Thread John Baldwin
On 5/22/19 5:48 AM, Alexey Dokuchaev wrote:
> On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote:
>> On 18/05/19 16:36, Brad Davis wrote:
>>> New Revision: 347961
>>> URL: https://svnweb.freebsd.org/changeset/base/347961
>>>
>>> Log:
>>>   Add note to UPDATING for users of mergemaster after the move of
>>>   master.passwd and group in r347638.
>>>   
>>>   Approved by:  allanjude (mentor)
>>>
>>> Modified:
>>>   head/UPDATING
>>>
>>> +20190517:
>>> +   For users of mergemaster, after recent changes to locations of
>>> +   master.passwd and group in the source tree mergemaster needs to be
>>> +   updated.  Before running `mergemaster -p', cd to usr.sbin/mergemaster
>>> +   and run `make install'.
>>> +
>>
>> etcupdate is installing group and master.passwd to /lib/libc/gen.  It
>> seems wrong.
>>
>> root@x230:/usr/src # etcupdate -p
>>   A /lib/libc/gen/group
>>   A /lib/libc/gen/master.passwd
> 
> *facepalm*
> 
> Let me ask again: why these files were moved out of their perfectly
> (and likely the only) reasonable location (etc/) under some cryptic
> libc/gen/ which not only makes little sense per se, but also breaks
> mergemaster(8) and similar tools?

Because bmake doesn't support .PATH?  Oh wait...

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348109 - in head/sys/x86: include x86

2019-05-22 Thread John Baldwin
On 5/22/19 12:12 PM, Conrad Meyer wrote:
> On Wed, May 22, 2019 at 11:06 AM Andriy Gapon  wrote:
>>
>> On 22/05/2019 16:44, Andrew Gallatin wrote:
>>>   This is needed for AMD SMCA processors, as SMCA uses different
>>>   MSR address for access MCA banks.
>>
>> Just curious, what is SMCA?
> 
> Scalable MCA.  It's a set of AMD Fam17h MCA extensions.

How is it different aside from using different MSR numbers (which seems
a bit gratuitous if that is really all the change is).

-- 
John Baldwin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2019-05-22 Thread Alexander Motin
On 22.05.2019 15:49, Slawa Olhovchenkov wrote:
> On Wed, May 22, 2019 at 06:43:48PM +, Alexander Motin wrote:
>> Author: mav
>> Date: Wed May 22 18:43:48 2019
>> New Revision: 348117
>> URL: https://svnweb.freebsd.org/changeset/base/348117
>>
>> Log:
>>   Allocate buffers smaller then ABD chunk size as linear.
>>   
>>   This allows to reduce memory waste by letting UMA to put multiple small
>>   buffers into one memory page slab.  The page sharing means that UMA
>>   may not be able to free memory page when some of buffers are freed, but
>>   alternatively memory used by that buffer would just be wasted from the
>>   beginning.
>>   
>>   This change follows alike change in ZoL, but unlike Linux (according to
>>   my understanding of it from comments) FreeBSD never shares slabs bigger
>>   then one memory page, so this should be even less invasive then there.
>>   
>>   MFC after: 2 weeks
>>   Sponsored by:  iXsystems, Inc.
>>
>> Modified:
>>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
>>
>> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
>> ==
>> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.cWed May 
>> 22 17:42:22 2019(r348116)
>> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.cWed May 
>> 22 18:43:48 2019(r348117)
>> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd)
>>  abd_t *
>>  abd_alloc(size_t size, boolean_t is_metadata)
>>  {
>> -if (!zfs_abd_scatter_enabled)
>> +if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size)
>>  return (abd_alloc_linear(size, is_metadata));
> 
> may be `size < zfs_abd_chunk_size`?

Why?  It should be the same from memory usage, but I see theoretical
benefits from having linear buffer with one page rather then scatter
list with one page.  Plus ZoL also had there `size <= PAGESIZE`.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2019-05-22 Thread Slawa Olhovchenkov
On Wed, May 22, 2019 at 04:00:58PM -0400, Alexander Motin wrote:

> On 22.05.2019 15:49, Slawa Olhovchenkov wrote:
> > On Wed, May 22, 2019 at 06:43:48PM +, Alexander Motin wrote:
> >> Author: mav
> >> Date: Wed May 22 18:43:48 2019
> >> New Revision: 348117
> >> URL: https://svnweb.freebsd.org/changeset/base/348117
> >>
> >> Log:
> >>   Allocate buffers smaller then ABD chunk size as linear.
> >>   
> >>   This allows to reduce memory waste by letting UMA to put multiple small
> >>   buffers into one memory page slab.  The page sharing means that UMA
> >>   may not be able to free memory page when some of buffers are freed, but
> >>   alternatively memory used by that buffer would just be wasted from the
> >>   beginning.
> >>   
> >>   This change follows alike change in ZoL, but unlike Linux (according to
> >>   my understanding of it from comments) FreeBSD never shares slabs bigger
> >>   then one memory page, so this should be even less invasive then there.
> >>   
> >>   MFC after:   2 weeks
> >>   Sponsored by:iXsystems, Inc.
> >>
> >> Modified:
> >>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
> >>
> >> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
> >> ==
> >> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c  Wed May 
> >> 22 17:42:22 2019(r348116)
> >> +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c  Wed May 
> >> 22 18:43:48 2019(r348117)
> >> @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd)
> >>  abd_t *
> >>  abd_alloc(size_t size, boolean_t is_metadata)
> >>  {
> >> -  if (!zfs_abd_scatter_enabled)
> >> +  if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size)
> >>return (abd_alloc_linear(size, is_metadata));
> > 
> > may be `size < zfs_abd_chunk_size`?
> 
> Why?  It should be the same from memory usage, but I see theoretical
> benefits from having linear buffer with one page rather then scatter
> list with one page.  Plus ZoL also had there `size <= PAGESIZE`.

May be malloc() for page size more effictive? Not sure.
Less overhead for kegs and etc.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2019-05-22 Thread Alexander Motin
On 22.05.2019 16:34, Slawa Olhovchenkov wrote:
> On Wed, May 22, 2019 at 04:00:58PM -0400, Alexander Motin wrote:
> 
>> On 22.05.2019 15:49, Slawa Olhovchenkov wrote:
>>> On Wed, May 22, 2019 at 06:43:48PM +, Alexander Motin wrote:
 Author: mav
 Date: Wed May 22 18:43:48 2019
 New Revision: 348117
 URL: https://svnweb.freebsd.org/changeset/base/348117

 Log:
   Allocate buffers smaller then ABD chunk size as linear.
   
   This allows to reduce memory waste by letting UMA to put multiple small
   buffers into one memory page slab.  The page sharing means that UMA
   may not be able to free memory page when some of buffers are freed, but
   alternatively memory used by that buffer would just be wasted from the
   beginning.
   
   This change follows alike change in ZoL, but unlike Linux (according to
   my understanding of it from comments) FreeBSD never shares slabs bigger
   then one memory page, so this should be even less invasive then there.
   
   MFC after:   2 weeks
   Sponsored by:iXsystems, Inc.

 Modified:
   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c

 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c
 ==
 --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c  Wed May 
 22 17:42:22 2019(r348116)
 +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c  Wed May 
 22 18:43:48 2019(r348117)
 @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd)
  abd_t *
  abd_alloc(size_t size, boolean_t is_metadata)
  {
 -  if (!zfs_abd_scatter_enabled)
 +  if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size)
return (abd_alloc_linear(size, is_metadata));
>>>
>>> may be `size < zfs_abd_chunk_size`?
>>
>> Why?  It should be the same from memory usage, but I see theoretical
>> benefits from having linear buffer with one page rather then scatter
>> list with one page.  Plus ZoL also had there `size <= PAGESIZE`.
> 
> May be malloc() for page size more effictive? Not sure.
> Less overhead for kegs and etc.

malloc()'s up to 64KB are also backed by UMA.  May be it could be
optimized on platforms with direct map, and may be after 12 VM subsystem
would not be too shocked, but on platforms without direct map requests
going around UMA causes huge TLB shootdown on free().

Thinking again, I see one benefit of allocating 4KB buffers not as
linear but as ABD -- using same ABD UMA zone for both 4KB and above
should improve its caching efficiency.  On the other side I already saw
lock congestion on UMA locks there, so there may be trade-off.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r348109 - in head/sys/x86: include x86

2019-05-22 Thread Conrad Meyer
On Wed, May 22, 2019 at 12:59 PM John Baldwin  wrote:

> On 5/22/19 12:12 PM, Conrad Meyer wrote:
> > On Wed, May 22, 2019 at 11:06 AM Andriy Gapon  wrote:
> >>
> >> On 22/05/2019 16:44, Andrew Gallatin wrote:
> >>>   This is needed for AMD SMCA processors, as SMCA uses different
> >>>   MSR address for access MCA banks.
> >>
> >> Just curious, what is SMCA?
> >
> > Scalable MCA.  It's a set of AMD Fam17h MCA extensions.
>
> How is it different aside from using different MSR numbers (which seems
> a bit gratuitous if that is really all the change is).
>
> --
> John Baldwin
>
It adds new MSRs as well, though those are not present in this first
change.  And adds some information not representable in the “legacy” MSRs.
Some more detail can be found in the linux patches, eg
https://lore.kernel.org/patchwork/patch/655889/ .
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348120 - head/usr.sbin/i2c

2019-05-22 Thread Ian Lepore
Author: ian
Date: Wed May 22 21:06:10 2019
New Revision: 348120
URL: https://svnweb.freebsd.org/changeset/base/348120

Log:
  Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers.
  
  Some i2c controller hardware does not provide a way to do individual START,
  REPEAT-START and STOP actions on the i2c bus.  Instead, they can only do
  a complete transfer as a single operation.  Typically they can do either
  START-data-STOP or START-data-REPEATSTART-data-STOP.  In the i2c driver
  framework, this corresponds to the iicbus_transfer method.  In the userland
  interface they are initiated with the I2CRDWR ioctl command.
  
  These changes add a new 'tr' mode which can be specified with the '-m'
  command line option.  This mode should work on all hardware; when an i2c
  controller driver doesn't directly support the iicbus_transfer method,
  code in the i2c driver framework uses the lower-level START/REPEAT/STOP
  methods to implement the transfer.  After this new mode has gotten some
  testing on various hardware, the 'tr' mode should probably become the
  new default mode.
  
  PR:   189914

Modified:
  head/usr.sbin/i2c/i2c.8
  head/usr.sbin/i2c/i2c.c

Modified: head/usr.sbin/i2c/i2c.8
==
--- head/usr.sbin/i2c/i2c.8 Wed May 22 19:49:25 2019(r348119)
+++ head/usr.sbin/i2c/i2c.8 Wed May 22 21:06:10 2019(r348120)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2009
+.Dd May 22, 2019
 .Dt I2C 8
 .Os
 .Sh NAME
@@ -39,7 +39,7 @@
 .Op Fl w Ar 0|8|16
 .Op Fl o Ar offset
 .Op Fl c Ar count
-.Op Fl m Ar ss|rs|no
+.Op Fl m Ar tr|ss|rs|no
 .Op Fl b
 .Op Fl v
 .Nm
@@ -72,10 +72,29 @@ number of bytes to transfer (dec).
 transfer direction: r - read, w - write.
 .It Fl f Ar device
 I2C bus to use (default is /dev/iic0).
-.It Fl m Ar ss|rs|no
+.It Fl m Ar tr|ss|rs|no
 addressing mode, i.e., I2C bus operations performed after the offset for the
 transfer has been written to the device and before the actual read/write
-operation. rs - repeated start; ss - stop start; no - none.
+operation.
+.Bl -tag -compact -offset indent
+.It Va tr
+complete-transfer
+.It Va ss
+stop then start
+.It Va rs
+repeated start
+.It Va no
+none
+.El
+Some I2C bus hardware does not provide control over the individual start,
+repeat-start, and stop operations.
+Such hardware can only perform a complete transfer of the offset and the
+data as a single operation.
+The
+.Va tr
+mode creates control structures describing the transfer and submits them
+to the driver as a single complete transaction.
+This mode works on all types of I2C hardware.
 .It Fl n Ar skip_addr
 skip address - address(es) to be skipped during bus scan.
 There are two ways to specify addresses to ignore: by range 'a..b' or

Modified: head/usr.sbin/i2c/i2c.c
==
--- head/usr.sbin/i2c/i2c.c Wed May 22 19:49:25 2019(r348119)
+++ head/usr.sbin/i2c/i2c.c Wed May 22 21:06:10 2019(r348120)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #defineI2C_MODE_NONE   1
 #defineI2C_MODE_STOP_START 2
 #defineI2C_MODE_REPEATED_START 3
+#defineI2C_MODE_TRANSFER   4
 
 struct options {
int width;
@@ -73,7 +74,7 @@ usage(void)
 {
 
fprintf(stderr, "usage: %s -a addr [-f device] [-d [r|w]] [-o offset] "
-   "[-w [0|8|16]] [-c count] [-m [ss|rs|no]] [-b] [-v]\n",
+   "[-w [0|8|16]] [-c count] [-m [tr|ss|rs|no]] [-b] [-v]\n",
getprogname());
fprintf(stderr, "   %s -s [-f device] [-n skip_addr] -v\n",
getprogname());
@@ -297,24 +298,9 @@ static int
 i2c_write(char *dev, struct options i2c_opt, char *i2c_buf)
 {
struct iiccmd cmd;
-   int ch, i, error, fd, bufsize;
+   int error, fd, bufsize;
char *err_msg, *buf;
 
-   /*
-* Read data to be written to the chip from stdin
-*/
-   if (i2c_opt.verbose && !i2c_opt.binary)
-   fprintf(stderr, "Enter %u bytes of data: ", i2c_opt.count);
-
-   for (i = 0; i < i2c_opt.count; i++) {
-   ch = getchar();
-   if (ch == EOF) {
-   free(i2c_buf);
-   err(1, "not enough data, exiting\n");
-   }
-   i2c_buf[i] = ch;
-   }
-
fd = open(dev, O_RDWR);
if (fd == -1) {
free(i2c_buf);
@@ -558,6 +544,72 @@ err2:
return (1);
 }
 
+/*
+ * i2c_rdwr_transfer() - use I2CRDWR to conduct a complete i2c transfer.
+ *
+ * Some i2c hardware is unable to provide direct control over START, REPEAT-
+ * START, and STOP operations.  Such hardware can only perform a complete
+ * START--STOP or START--REPEAT-START--STOP sequence as a
+ * single operation.  The driver framework refers to this sequence as a
+ * "transfer" so we call it "transfer mode".  We a

Re: svn commit: r347961 - head

2019-05-22 Thread Rodney W. Grimes
> On 5/22/19 5:48 AM, Alexey Dokuchaev wrote:
> > On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote:
> >> On 18/05/19 16:36, Brad Davis wrote:
> >>> New Revision: 347961
> >>> URL: https://svnweb.freebsd.org/changeset/base/347961
> >>>
> >>> Log:
> >>>   Add note to UPDATING for users of mergemaster after the move of
> >>>   master.passwd and group in r347638.
> >>>   
> >>>   Approved by:allanjude (mentor)
> >>>
> >>> Modified:
> >>>   head/UPDATING
> >>>
> >>> +20190517:
> >>> + For users of mergemaster, after recent changes to locations of
> >>> + master.passwd and group in the source tree mergemaster needs to be
> >>> + updated.  Before running `mergemaster -p', cd to usr.sbin/mergemaster
> >>> + and run `make install'.
> >>> +
> >>
> >> etcupdate is installing group and master.passwd to /lib/libc/gen.  It
> >> seems wrong.
> >>
> >> root@x230:/usr/src # etcupdate -p
> >>   A /lib/libc/gen/group
> >>   A /lib/libc/gen/master.passwd
> > 
> > *facepalm*
> > 
> > Let me ask again: why these files were moved out of their perfectly
> > (and likely the only) reasonable location (etc/) under some cryptic
> > libc/gen/ which not only makes little sense per se, but also breaks
> > mergemaster(8) and similar tools?
> 
> Because bmake doesn't support .PATH?  Oh wait...

I spoke long ago when this whole "rip etc/ apart" started, and objected
repeatedly and was shot down.  I even asked for a "complete plan" and
was more or less told this is by design of pkg base.

Let me speak to "by design", the BSD source tree is, by design, to
reflect the installed location of a file with very rare exception
to that design.  The .mk system by design is written with this
assumption in mind as well.  The above artifact is by that design.

Attempts to alter such by design behavior has problems, some of
which are now, repeatedly showing there ugly head.

.PATH could of easily been used,
as well as cd ${SRCTOP}/etc && make FOOCONF
to implement exactly what was done without ANY file moves.
Oh, wait that was pointed out, I belive twice, maybe 3 times,
and by some experts on the .mk system as well.

sjg (bmake maintainr) and bdrewery (one of our .mk system experts)
have both pushed back on these changes.

Good luck with supporting this so not by design package system
if it requires this to be operable.  Also good luck maintaining
any of the ${DESTDIR}/etc files as now no one knows how to
find them in the source tree.

> John Baldwin
-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r347961 - head

2019-05-22 Thread Cy Schubert
On May 22, 2019 2:06:18 PM PDT, "Rodney W. Grimes"  
wrote:
>> On 5/22/19 5:48 AM, Alexey Dokuchaev wrote:
>> > On Wed, May 22, 2019 at 09:42:29AM -0300, Renato Botelho wrote:
>> >> On 18/05/19 16:36, Brad Davis wrote:
>> >>> New Revision: 347961
>> >>> URL: https://svnweb.freebsd.org/changeset/base/347961
>> >>>
>> >>> Log:
>> >>>   Add note to UPDATING for users of mergemaster after the move of
>> >>>   master.passwd and group in r347638.
>> >>>   
>> >>>   Approved by:   allanjude (mentor)
>> >>>
>> >>> Modified:
>> >>>   head/UPDATING
>> >>>
>> >>> +20190517:
>> >>> +For users of mergemaster, after recent changes to locations of
>> >>> +master.passwd and group in the source tree mergemaster needs to
>be
>> >>> +updated.  Before running `mergemaster -p', cd to
>usr.sbin/mergemaster
>> >>> +and run `make install'.
>> >>> +
>> >>
>> >> etcupdate is installing group and master.passwd to /lib/libc/gen. 
>It
>> >> seems wrong.
>> >>
>> >> root@x230:/usr/src # etcupdate -p
>> >>   A /lib/libc/gen/group
>> >>   A /lib/libc/gen/master.passwd
>> > 
>> > *facepalm*
>> > 
>> > Let me ask again: why these files were moved out of their perfectly
>> > (and likely the only) reasonable location (etc/) under some cryptic
>> > libc/gen/ which not only makes little sense per se, but also breaks
>> > mergemaster(8) and similar tools?
>> 
>> Because bmake doesn't support .PATH?  Oh wait...
>
>I spoke long ago when this whole "rip etc/ apart" started, and objected
>repeatedly and was shot down.  I even asked for a "complete plan" and
>was more or less told this is by design of pkg base.
>
>Let me speak to "by design", the BSD source tree is, by design, to
>reflect the installed location of a file with very rare exception
>to that design.  The .mk system by design is written with this
>assumption in mind as well.  The above artifact is by that design.
>
>Attempts to alter such by design behavior has problems, some of
>which are now, repeatedly showing there ugly head.
>
>.PATH could of easily been used,
>as well as cd ${SRCTOP}/etc && make FOOCONF
>to implement exactly what was done without ANY file moves.
>Oh, wait that was pointed out, I belive twice, maybe 3 times,
>and by some experts on the .mk system as well.
>
>sjg (bmake maintainr) and bdrewery (one of our .mk system experts)
>have both pushed back on these changes.
>
>Good luck with supporting this so not by design package system
>if it requires this to be operable.  Also good luck maintaining
>any of the ${DESTDIR}/etc files as now no one knows how to
>find them in the source tree.
>
>> John Baldwin

I couldn't have said this better, my sentiments exactly.


-- 
Pardon the typos and autocorrect, small keyboard in use.
Cheers,
Cy Schubert 
FreeBSD UNIX:  Web: http://www.FreeBSD.org

The need of the many outweighs the greed of the few.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348121 - in head/sys: net netinet6

2019-05-22 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed May 22 21:20:15 2019
New Revision: 348121
URL: https://svnweb.freebsd.org/changeset/base/348121

Log:
  Fix gateway setup for the interface routes.
  
  Currently rinit1() and its IPv6 counterpart
nd6_prefix_onlink_rtrequest() uses dummy null_sdl gateway address
during route insertion and change it afterwards. This behaviour
brings complications to the routing stack and the users of its
upcoming notification system.
  
  This change fixes both rinit1() and nd6_prefix_onlink_rtrequest()
by filling in proper gateway in the beginning. It does not change any
of the userland notifications as in both cases, they happen after
the insertion and fixup process (rt_newaddrmsg_fib() and nd6_rtmsg()).
  
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D20328

Modified:
  head/sys/net/route.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cWed May 22 21:06:10 2019(r348120)
+++ head/sys/net/route.cWed May 22 21:20:15 2019(r348121)
@@ -1995,7 +1995,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi
char tempbuf[_SOCKADDR_TMPSIZE];
int didwork = 0;
int a_failure = 0;
-   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
+   struct sockaddr_dl *sdl = NULL;
struct rib_head *rnh;
 
if (flags & RTF_HOST) {
@@ -2046,7 +2046,14 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi
rt_maskedcopy(dst, (struct sockaddr *)tempbuf, netmask);
dst = (struct sockaddr *)tempbuf;
}
-   }
+   } else if (cmd == RTM_ADD) {
+   sdl = (struct sockaddr_dl *)tempbuf;
+   bzero(sdl, sizeof(struct sockaddr_dl));
+   sdl->sdl_family = AF_LINK;
+   sdl->sdl_len = sizeof(struct sockaddr_dl);
+   sdl->sdl_type = ifa->ifa_ifp->if_type;
+   sdl->sdl_index = ifa->ifa_ifp->if_index;
+}
/*
 * Now go through all the requested tables (fibs) and do the
 * requested action. Realistically, this will either be fib 0
@@ -2109,8 +2116,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi
 * doing this for compatibility reasons
 */
if (cmd == RTM_ADD)
-   info.rti_info[RTAX_GATEWAY] =
-   (struct sockaddr *)&null_sdl;
+   info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)sdl;
else
info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr;
info.rti_info[RTAX_NETMASK] = netmask;
@@ -2137,15 +2143,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fi
rt->rt_ifa = ifa;
}
 #endif
-   /* 
-* doing this for compatibility reasons
-*/
-   if (cmd == RTM_ADD) {
-   ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type  =
-   rt->rt_ifp->if_type;
-   ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index =
-   rt->rt_ifp->if_index;
-   }
RT_ADDREF(rt);
RT_UNLOCK(rt);
rt_newaddrmsg_fib(cmd, ifa, error, rt, fibnum);

Modified: head/sys/netinet6/nd6_rtr.c
==
--- head/sys/netinet6/nd6_rtr.c Wed May 22 21:06:10 2019(r348120)
+++ head/sys/netinet6/nd6_rtr.c Wed May 22 21:20:15 2019(r348121)
@@ -1894,8 +1894,7 @@ restart:
 static int
 nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, struct ifaddr *ifa)
 {
-   static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK};
-   struct rib_head *rnh;
+   struct sockaddr_dl sdl;
struct rtentry *rt;
struct sockaddr_in6 mask6;
u_long rtflags;
@@ -1910,6 +1909,12 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru
mask6.sin6_addr = pr->ndpr_mask;
rtflags = (ifa->ifa_flags & ~IFA_RTSELF) | RTF_UP;
 
+   bzero(&sdl, sizeof(struct sockaddr_dl));
+   sdl.sdl_len = sizeof(struct sockaddr_dl);
+   sdl.sdl_family = AF_LINK;
+   sdl.sdl_type = ifa->ifa_ifp->if_type;
+   sdl.sdl_index = ifa->ifa_ifp->if_index;
+
if(V_rt_add_addr_allfibs) {
fibnum = 0;
maxfib = rt_numfibs;
@@ -1922,26 +1927,13 @@ nd6_prefix_onlink_rtrequest(struct nd_prefix *pr, stru
 
rt = NULL;
error = in6_rtrequest(RTM_ADD,
-   (struct sockaddr *)&pr->ndpr_prefix, ifa->ifa_addr,
+   (struct sockaddr *)&pr->ndpr_prefix, (struct sockaddr 
*)

svn commit: r348122 - in head/libexec: rc/rc.d save-entropy

2019-05-22 Thread Conrad Meyer
Author: cem
Date: Wed May 22 21:47:17 2019
New Revision: 348122
URL: https://svnweb.freebsd.org/changeset/base/348122

Log:
  save-entropy(8), rc.d/random: Set nodump flag
  
  Tag saved entropy files as "nodump," to signal that the files should not be
  backed up by dump(8) or other automated backup software that honors the file
  flag.
  
  Do not produce an error if the target file resides on a filesystem that does
  not support file flags (e.g., msdos /boot).
  
  Reviewed by:  delphij
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D20358

Modified:
  head/libexec/rc/rc.d/random
  head/libexec/save-entropy/save-entropy.sh

Modified: head/libexec/rc/rc.d/random
==
--- head/libexec/rc/rc.d/random Wed May 22 21:20:15 2019(r348121)
+++ head/libexec/rc/rc.d/random Wed May 22 21:47:17 2019(r348122)
@@ -25,6 +25,7 @@ save_dev_random()
for f ; do
debug "saving entropy to $f"
dd if=/dev/random of="$f" bs=4096 count=1 status=none &&
+   ( chflags nodump "$f" 2>/dev/null || : ) &&
chmod 600 "$f" &&
fsync "$f" "$(dirname "$f")"
done
@@ -99,7 +100,7 @@ random_stop()
[Nn][Oo])
;;
*)
-   echo -n 'Writing entropy file:'
+   echo -n 'Writing entropy file: '
rm -f ${entropy_file} 2> /dev/null
oumask=`umask`
umask 077
@@ -118,12 +119,7 @@ random_stop()
warn 'write failed (read-only fs?)'
;;
*)
-   dd if=/dev/random of=${entropy_file_confirmed} \
-   bs=4096 count=1 2> /dev/null ||
-   warn 'write failed (unwriteable file or full fs?)'
-   fsync "${entropy_file_confirmed}" \
-   "$(dirname "${entropy_file_confirmed}")" \
-   2> /dev/null
+   save_dev_random "${entropy_file_confirmed}"
echo '.'
;;
esac
@@ -134,7 +130,7 @@ random_stop()
[Nn][Oo])
;;
*)
-   echo -n 'Writing early boot entropy file:'
+   echo -n 'Writing early boot entropy file: '
rm -f ${entropy_boot_file} 2> /dev/null
oumask=`umask`
umask 077
@@ -146,12 +142,7 @@ random_stop()
warn 'write failed (read-only fs?)'
;;
*)
-   dd if=/dev/random of=${entropy_boot_file_confirmed} \
-   bs=4096 count=1 2> /dev/null ||
-   warn 'write failed (unwriteable file or full fs?)'
-   fsync "${entropy_boot_file_confirmed}" \
-   "$(dirname "${entropy_boot_file_confirmed}")" \
-   2> /dev/null
+   save_dev_random "${entropy_boot_file_confirmed}"
echo '.'
;;
esac

Modified: head/libexec/save-entropy/save-entropy.sh
==
--- head/libexec/save-entropy/save-entropy.sh   Wed May 22 21:20:15 2019
(r348121)
+++ head/libexec/save-entropy/save-entropy.sh   Wed May 22 21:47:17 2019
(r348122)
@@ -90,6 +90,7 @@ while [ ${n} -ge 1 ]; do
 done
 
 dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null
+chflags nodump saved-entropy.1 2>/dev/null || :
 fsync saved-entropy.1 "."
 
 exit 0
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348123 - head/sys/arm/freescale/imx

2019-05-22 Thread Ian Lepore
Author: ian
Date: Wed May 22 21:47:26 2019
New Revision: 348123
URL: https://svnweb.freebsd.org/changeset/base/348123

Log:
  Add pnp info to the imx_i2c driver.

Modified:
  head/sys/arm/freescale/imx/imx_i2c.c

Modified: head/sys/arm/freescale/imx/imx_i2c.c
==
--- head/sys/arm/freescale/imx/imx_i2c.cWed May 22 21:47:17 2019
(r348122)
+++ head/sys/arm/freescale/imx/imx_i2c.cWed May 22 21:47:26 2019
(r348123)
@@ -194,6 +194,7 @@ DRIVER_MODULE(imx_i2c, simplebus, i2c_driver, i2c_devc
 DRIVER_MODULE(ofw_iicbus, imx_i2c, ofw_iicbus_driver, ofw_iicbus_devclass, 0, 
0);
 MODULE_DEPEND(imx_i2c, iicbus, 1, 1, 1);
 MODULE_DEPEND(imx_i2c, ofw_iicbus, 1, 1, 1);
+SIMPLEBUS_PNP_INFO(compat_data);
 
 static phandle_t
 i2c_get_node(device_t bus, device_t dev)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r347638 - in head: . etc lib/libc/gen

2019-05-22 Thread Conrad Meyer
Hi Brad,

Ping.  It's still broken.  Can you revert this please?

Thanks,
Conrad

On Thu, May 16, 2019 at 8:05 AM Conrad Meyer  wrote:
>
> Hi Brad,
>
> Can you revert this?  It seems to break every config-management tool
> we have (mergemaster, etcupdate, beinstall ...).
>
> Additionally, I don't believe this move has been justified — the cons
> seem to outweigh the pros, if there are any.  I skimmed the
> differential and it was not immediately obvious what the benefit was.
> The commit message describes what was changed, but not *why* you
> thought it was a good idea.
>
> Thanks,
> Conrad
>
> On Wed, May 15, 2019 at 6:09 PM Brad Davis  wrote:
> >
> > Author: brd
> > Date: Thu May 16 01:09:13 2019
> > New Revision: 347638
> > URL: https://svnweb.freebsd.org/changeset/base/347638
> >
> > Log:
> >   Move master.passwd and group to lib/libc/gen/
> >
> >   libc was picked as the destination location for these because of the 
> > syscalls
> >   that use these files as the lowest level place they are referenced.
> >
> >   Approved by:  will (mentor), rgrimes, manu
> >   Differential Revision:https://reviews.freebsd.org/D16728
> >
> > Added:
> >   head/lib/libc/gen/group
> >  - copied unchanged from r347637, head/etc/group
> >   head/lib/libc/gen/master.passwd
> >  - copied unchanged from r347637, head/etc/master.passwd
> > Deleted:
> >   head/etc/group
> >   head/etc/master.passwd
> > Modified:
> >   head/Makefile.inc1
> >   head/etc/Makefile
> >   head/lib/libc/gen/Makefile.inc
> >
> > Modified: head/Makefile.inc1
> > ==
> > --- head/Makefile.inc1  Thu May 16 00:53:54 2019(r347637)
> > +++ head/Makefile.inc1  Thu May 16 01:09:13 2019(r347638)
> > @@ -871,8 +871,8 @@ DB_FROM_SRC=yes
> >  .endif
> >
> >  .if defined(DB_FROM_SRC)
> > -INSTALLFLAGS+= -N ${.CURDIR}/etc
> > -MTREEFLAGS+=   -N ${.CURDIR}/etc
> > +INSTALLFLAGS+= -N ${.CURDIR}/lib/libc/gen
> > +MTREEFLAGS+=   -N ${.CURDIR}/lib/libc/gen
> >  .endif
> >  _INSTALL_DDIR= ${DESTDIR}/${DISTDIR}
> >  INSTALL_DDIR=  ${_INSTALL_DDIR:S://:/:g:C:/$::}
> >
> > Modified: head/etc/Makefile
> > ==
> > --- head/etc/Makefile   Thu May 16 00:53:54 2019(r347637)
> > +++ head/etc/Makefile   Thu May 16 01:09:13 2019(r347638)
> > @@ -15,7 +15,6 @@ SUBDIR+=sendmail
> >  .endif
> >
> >  BIN1=  \
> > -   group \
> > login.access \
> > rc.bsdextended \
> > rc.firewall \
> > @@ -65,21 +64,7 @@ distribution:
> >  .endif
> > cd ${.CURDIR}; \
> > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
> > -   ${BIN1} ${DESTDIR}/etc; \
> > -   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
> > -   master.passwd ${DESTDIR}/etc;
> > -
> > -.if ${MK_TCSH} == "no"
> > -   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > -.endif
> > -   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > -.if defined(NO_ROOT)
> > -   ( \
> > -   echo "./etc/passwd type=file mode=0644 uname=root 
> > gname=wheel"; \
> > -   echo "./etc/pwd.db type=file mode=0644 uname=root 
> > gname=wheel"; \
> > -   echo "./etc/spwd.db type=file mode=0600 uname=root 
> > gname=wheel"; \
> > -   ) | ${METALOG.add}
> > -.endif
> > +   ${BIN1} ${DESTDIR}/etc
> > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> > ${_+_}cd ${.CURDIR}/mtree; ${MAKE} install
> > ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap
> >
> > Modified: head/lib/libc/gen/Makefile.inc
> > ==
> > --- head/lib/libc/gen/Makefile.inc  Thu May 16 00:53:54 2019
> > (r347637)
> > +++ head/lib/libc/gen/Makefile.inc  Thu May 16 01:09:13 2019
> > (r347638)
> > @@ -4,7 +4,8 @@
> >  # machine-independent gen sources
> >  .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen
> >
> > -CONFS= shells
> > +CONFS+=group master.passwd shells
> > +CONFSMODE_master.passwd=   600
> >
> >  SRCS+= __getosreldate.c \
> > __pthread_mutex_init_calloc_cb_stub.c \
> > @@ -543,3 +544,16 @@ MLINKS+=vis.3 nvis.3 \
> > vis.3 svis.3
> >
> >  MLINKS+=wordexp.3 wordfree.3
> > +
> > +afterinstallconfig:
> > +.if ${MK_TCSH} == "no"
> > +   sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
> > +.endif
> > +   pwd_mkdb -i -p -d ${DESTDIR}/etc ${DESTDIR}/etc/master.passwd
> > +.if defined(NO_ROOT) && defined(METALOG)
> > +   ( \
> > +   echo "./etc/pwd.db type=file mode=0644 uname=root 
> > gname=wheel"; \
> > +   echo "./etc/spwd.db type=file mode=0600 uname=root 
> > gname=wheel"; \
> > +   echo "./etc/passwd type=file mode=0644 uname=root 
> > gname=wheel"; \
> > +   ) | cat -l >> ${METALOG}
> > +.endif
> >

svn commit: r348127 - head/sbin/bectl

2019-05-22 Thread Kyle Evans
Author: kevans
Date: Wed May 22 23:07:40 2019
New Revision: 348127
URL: https://svnweb.freebsd.org/changeset/base/348127

Log:
  bectl(8): add description for create subcommand
  
  In commit r345845, a portion of documentation for the create subcommand was
  removed. Specifically, for creating a snapshot of an existing boot
  environment. bectl even has a test-case for this functionality.
  
  Removing the sub-command description was discussed in PR 235850.
  
  This patch brings back the second "create" description that was originally
  in place. Albeit, with a few wording/clarifying changes.
  
  Submitted by: Rob Fairbanks 
  Reviewed by:  kevans
  MFC after:3 days
  Differential Revision:https://reviews.freebsd.org/D20249

Modified:
  head/sbin/bectl/bectl.8

Modified: head/sbin/bectl/bectl.8
==
--- head/sbin/bectl/bectl.8 Wed May 22 22:56:05 2019(r348126)
+++ head/sbin/bectl/bectl.8 Wed May 22 23:07:40 2019(r348127)
@@ -18,7 +18,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 3, 2019
+.Dd May 12, 2019
 .Dt BECTL 8
 .Os
 .Sh NAME
@@ -35,6 +35,10 @@
 .Op Fl e Brq Ar nonActiveBe | Ar beName Ns Cm @ Ns Ar snapshot
 .Ar newBeName
 .Nm
+.Cm create
+.Op Fl r
+.Ar beName@snapshot
+.Nm
 .Cm destroy
 .Op Fl \&Fo
 .Ar beName Ns Op Cm @ Ns Ar snapshot
@@ -120,6 +124,20 @@ Otherwise, the new environment will be created from th
 If
 .Nm
 is creating from another boot environment, a snapshot of that boot environment 
will be created to clone from.
+.It Xo
+.Cm create
+.Op Fl r
+.Ar beName@snapshot
+.Xc
+Create a snapshot of the boot environment named
+.Ar beName .
+.Pp
+If the
+.Fl r
+flag is given, a recursive snapshot of the boot environment will be created.
+A snapshot is created for each descendant dataset of the boot environment.
+.Pp
+No new boot environment is created with this command.
 .It Xo
 .Cm destroy
 .Op Fl \&Fo
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348128 - head/sys/vm

2019-05-22 Thread Doug Moore
Author: dougm
Date: Wed May 22 23:11:16 2019
New Revision: 348128
URL: https://svnweb.freebsd.org/changeset/base/348128

Log:
  Cleanups made necessary by r348115, or reactions to it:
  1. Change size_t to vm_size_t in some places.
  2. Rename vm_map_entry_resize_free to drop the _free part.
  3. Fix whitespace errors.
  4. Fix screwups in patch-conflict-management that left out important
  changes related to growing and shrinking objects.
  
  Reviewed by: alc
  Approved by: kib (mentor)

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cWed May 22 23:07:40 2019(r348127)
+++ head/sys/vm/vm_map.cWed May 22 23:11:16 2019(r348128)
@@ -1241,17 +1241,15 @@ vm_map_entry_unlink(vm_map_t map,
 }
 
 /*
- * vm_map_entry_resize_free:
+ * vm_map_entry_resize:
  *
- * Recompute the amount of free space following a modified vm_map_entry
- * and propagate those values up the tree.  Call this function after
- * resizing a map entry in-place by changing the end value, without a
- * call to vm_map_entry_link() or _unlink().
+ * Resize a vm_map_entry, recompute the amount of free space that
+ * follows it and propagate that value up the tree.
  *
  * The map must be locked, and leaves it so.
  */
 static void
-vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t entry, size_t 
grow_amount)
+vm_map_entry_resize(vm_map_t map, vm_map_entry_t entry, vm_size_t grow_amount)
 {
vm_map_entry_t llist, rlist, root;
 
@@ -1259,15 +1257,15 @@ vm_map_entry_resize_free(vm_map_t map, vm_map_entry_t 
root = map->root;
root = vm_map_splay_split(entry->start, 0, root, &llist, &rlist);
KASSERT(root != NULL,
-   ("vm_map_entry_resize_free: resize_free object not mapped"));
+   ("%s: resize object not mapped", __func__));
vm_map_splay_findnext(root, &rlist);
root->right = NULL;
entry->end += grow_amount;
map->root = vm_map_splay_merge(root, llist, rlist,
root->left, root->right);
VM_MAP_ASSERT_CONSISTENT(map);
-   CTR3(KTR_VM, "vm_map_entry_resize_free: map %p, nentries %d, entry %p",
-map, map->nentries, entry);
+   CTR4(KTR_VM, "%s: map %p, nentries %d, entry %p",
+   _func__, map, map->nentries, entry);
 }
 
 /*
@@ -1487,7 +1485,7 @@ charged:
prev_entry));
if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0)
map->size += end - prev_entry->end;
-   vm_map_entry_resize_free(map, prev_entry,
+   vm_map_entry_resize(map, prev_entry,
end - prev_entry->end);
vm_map_simplify_entry(map, prev_entry);
return (KERN_SUCCESS);
@@ -4168,7 +4166,7 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_ma
struct vmspace *vm;
struct ucred *cred;
vm_offset_t gap_end, gap_start, grow_start;
-   size_t grow_amount, guard, max_grow;
+   vm_size_t grow_amount, guard, max_grow;
rlim_t lmemlim, stacklim, vmemlim;
int rv, rv1;
bool gap_deleted, grow_down, is_procstack;
@@ -4314,8 +4312,7 @@ retry:
gap_deleted = true;
} else {
MPASS(gap_entry->start < gap_entry->end - grow_amount);
-   gap_entry->end -= grow_amount;
-   vm_map_entry_resize_free(map, gap_entry, -grow_amount);
+   vm_map_entry_resize(map, gap_entry, -grow_amount);
gap_deleted = false;
}
rv = vm_map_insert(map, NULL, 0, grow_start,
@@ -4329,7 +4326,7 @@ retry:
MAP_CREATE_GUARD | MAP_CREATE_STACK_GAP_DN);
MPASS(rv1 == KERN_SUCCESS);
} else
-   vm_map_entry_resize_free(map, gap_entry,
+   vm_map_entry_resize(map, gap_entry,
grow_amount);
}
} else {
@@ -4344,13 +4341,16 @@ retry:
vm_object_coalesce(stack_entry->object.vm_object,
stack_entry->offset,
(vm_size_t)(stack_entry->end - stack_entry->start),
-   (vm_size_t)grow_amount, cred != NULL)) {
-   if (gap_entry->start + grow_amount == gap_entry->end)
+   grow_amount, cred != NULL)) {
+   if (gap_entry->start + grow_amount == gap_entry->end) {
vm_map_entry_delete(map, gap_entry);
-   else
+   vm_map_entry_resize(map, stack_entry,
+   grow_amount);
+   } else {

svn commit: r348130 - in head/sys/x86: include x86

2019-05-22 Thread Conrad Meyer
Author: cem
Date: Wed May 22 23:22:36 2019
New Revision: 348130
URL: https://svnweb.freebsd.org/changeset/base/348130

Log:
  Decode and name additional x86 feature bits
  
  These are all enumerated in Intel's ISA extension reference, 37th ed.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/x86/include/specialreg.h
  head/sys/x86/x86/identcpu.c

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Wed May 22 23:19:20 2019
(r348129)
+++ head/sys/x86/include/specialreg.h   Wed May 22 23:22:36 2019
(r348130)
@@ -433,29 +433,41 @@
 /*
  * CPUID instruction 7 Structured Extended Features, leaf 0 ecx info
  */
-#defineCPUID_STDEXT2_PREFETCHWT1 0x0001
-#defineCPUID_STDEXT2_UMIP  0x0004
-#defineCPUID_STDEXT2_PKU   0x0008
-#defineCPUID_STDEXT2_OSPKE 0x0010
-#defineCPUID_STDEXT2_WAITPKG   0x0020
-#defineCPUID_STDEXT2_GFNI  0x0100
-#defineCPUID_STDEXT2_RDPID 0x0040
-#defineCPUID_STDEXT2_CLDEMOTE  0x0200
-#defineCPUID_STDEXT2_MOVDIRI   0x0800
+#defineCPUID_STDEXT2_PREFETCHWT1   0x0001
+#defineCPUID_STDEXT2_AVX512VBMI0x0002
+#defineCPUID_STDEXT2_UMIP  0x0004
+#defineCPUID_STDEXT2_PKU   0x0008
+#defineCPUID_STDEXT2_OSPKE 0x0010
+#defineCPUID_STDEXT2_WAITPKG   0x0020
+#defineCPUID_STDEXT2_AVX512VBMI2   0x0040
+#defineCPUID_STDEXT2_GFNI  0x0100
+#defineCPUID_STDEXT2_VAES  0x0200
+#defineCPUID_STDEXT2_VPCLMULQDQ0x0400
+#defineCPUID_STDEXT2_AVX512VNNI0x0800
+#defineCPUID_STDEXT2_AVX512BITALG  0x1000
+#defineCPUID_STDEXT2_AVX512VPOPCNTDQ   0x4000
+#defineCPUID_STDEXT2_RDPID 0x0040
+#defineCPUID_STDEXT2_CLDEMOTE  0x0200
+#defineCPUID_STDEXT2_MOVDIRI   0x0800
 #defineCPUID_STDEXT2_MOVDIRI64B0x1000
-#defineCPUID_STDEXT2_SGXLC 0x4000
+#defineCPUID_STDEXT2_ENQCMD0x2000
+#defineCPUID_STDEXT2_SGXLC 0x4000
 
 /*
  * CPUID instruction 7 Structured Extended Features, leaf 0 edx info
  */
-#defineCPUID_STDEXT3_MD_CLEAR  0x0400
-#defineCPUID_STDEXT3_TSXFA 0x2000
-#defineCPUID_STDEXT3_IBPB  0x0400
-#defineCPUID_STDEXT3_STIBP 0x0800
-#defineCPUID_STDEXT3_L1D_FLUSH 0x1000
-#defineCPUID_STDEXT3_ARCH_CAP  0x2000
-#defineCPUID_STDEXT3_CORE_CAP  0x4000
-#defineCPUID_STDEXT3_SSBD  0x8000
+#defineCPUID_STDEXT3_AVX5124VNNIW  0x0004
+#defineCPUID_STDEXT3_AVX5124FMAPS  0x0008
+#defineCPUID_STDEXT3_AVX512VP2INTERSECT0x0100
+#defineCPUID_STDEXT3_MD_CLEAR  0x0400
+#defineCPUID_STDEXT3_TSXFA 0x2000
+#defineCPUID_STDEXT3_PCONFIG   0x0004
+#defineCPUID_STDEXT3_IBPB  0x0400
+#defineCPUID_STDEXT3_STIBP 0x0800
+#defineCPUID_STDEXT3_L1D_FLUSH 0x1000
+#defineCPUID_STDEXT3_ARCH_CAP  0x2000
+#defineCPUID_STDEXT3_CORE_CAP  0x4000
+#defineCPUID_STDEXT3_SSBD  0x8000
 
 /* MSR IA32_ARCH_CAP(ABILITIES) bits */
 #defineIA32_ARCH_CAP_RDCL_NO   0x0001

Modified: head/sys/x86/x86/identcpu.c
==
--- head/sys/x86/x86/identcpu.c Wed May 22 23:19:20 2019(r348129)
+++ head/sys/x86/x86/identcpu.c Wed May 22 23:22:36 2019(r348130)
@@ -983,11 +983,18 @@ printcpuinfo(void)
   "\004PKU"
   "\005OSPKE"
   "\006WAITPKG"
+  "\007AVX512VBMI2"
   "\011GFNI"
+  "\012VAES"
+  "\013VPCLMULQDQ"
+  "\014AVX512VNNI"
+  "\015AVX512BITALG"
+  "\016AVX512VPOPCNTDQ"
   "\027RDPID"
   "\032CLDEMOTE"
   "\034MOVDIRI"
   "\035MOVDIRI64B"
+  "\036ENQCMD"
   "\037SGXLC"
   );
}
@@ -996,8 +1003,12 @@ printcpuinfo(void)
printf("\n  S

svn commit: r348141 - head/libexec/rc/rc.d

2019-05-22 Thread Ian Lepore
Author: ian
Date: Thu May 23 01:41:49 2019
New Revision: 348141
URL: https://svnweb.freebsd.org/changeset/base/348141

Log:
  Handle the driftfile option correctly when ntpd_flags is empty.
  
  The logic I originally wrote to detect whether a driftfile option was in the
  set of flags was based on the result of removing the pattern *flag* being an
  empty string.  That didn't handle the case where the string was empty to
  begin with.  Doh!  So now it also specifically checks for an empty string.
  
  The result of the bad check was that ntpd would run without a driftfile, but
  it would do so only if it was running as root instead of the non-priveleged
  ntpd user, which isn't a typical case.  Ntpd runs fine without a driftfile,
  although it does take it longer to stabilize the clock frequency at startup.
  
  Reported by:  avg@
  Pointy hat:   ian@
  MFC after:some testing

Modified:
  head/libexec/rc/rc.d/ntpd

Modified: head/libexec/rc/rc.d/ntpd
==
--- head/libexec/rc/rc.d/ntpd   Thu May 23 01:25:34 2019(r348140)
+++ head/libexec/rc/rc.d/ntpd   Thu May 23 01:41:49 2019(r348141)
@@ -87,12 +87,14 @@ ntpd_precmd()
# Otherwise, figure out what to do about the driftfile option.  If set
# by the admin, we don't add the option.  If the file exists in the old
# default location we use that, else we use the new default location.
+
if can_run_nonroot; then
_user="ntpd"
driftopt="-f ${_ntp_default_driftfile}"
-   elif [ -z "${rc_flags##*-f*}" ] ||
-[ -z "${rc_flags##*--driftfile*}" ] ||
-grep -q "^[ \t]*driftfile" "${ntpd_config}"; then
+   elif grep -q "^[ \t]*driftfile" "${ntpd_config}" ||
+[ -n "${rc_flags}" ] &&
+( [ -z "${rc_flags##*-f*}" ] ||
+  [ -z "${rc_flags##*--driftfile*}" ] ); then
driftopt="" # admin set the option, we don't need to add it.
elif [ -f "${_ntp_old_driftfile}" ]; then
driftopt="-f ${_ntp_old_driftfile}"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r336547 - in head/etc: defaults rc.d

2019-05-22 Thread Ian Lepore
On Wed, 2019-05-22 at 14:40 +0300, Andriy Gapon wrote:
> Something I've just noticed about this commit:
> 
> On 20/07/2018 16:59, Ian Lepore wrote:
> > Author: ian
> > Date: Fri Jul 20 13:59:29 2018
> > New Revision: 336547
> > URL: https://svnweb.freebsd.org/changeset/base/336547
> > 
> > Log:
> >   Automatically run ntpd as non-root when possible.
> 
> [snip]
> 
> > +ntpd_precmd()
> > +{
> > +   local driftopt
> > +
> > +   # If we can run as a non-root user, switch uid to ntpd and use
> > the
> > +   # new default location for the driftfile inside the ntpd-owned
> > dir.
> > +   # Otherwise, figure out what to do about the driftfile
> > option.  If set
> > +   # by the admin, we don't add the option.  If the file exists in
> > the old
> > +   # default location we use that, else we use the new default
> > location.
> > +   if can_run_nonroot; then
> > +   _user="ntpd"
> > +   driftopt="-f ${_ntp_default_driftfile}"
> > +   elif [ -z "${rc_flags##*-f*}" ] ||
> > +[ -z "${rc_flags##*--driftfile*}" ] ||
> 
> It seems that the two checks above produce a false positive if
> rc_flags is empty
> already.  And that's the case on a system that I recently brought up
> (very
> recent CURRENT via source install).  /etc/defaults/rc.conf has
> ntpd_flags="".
> As a result ntpd is started without the drift file option.
> And the stock /etc/ntp.conf also does not have the directive.
> 

Doh!  I use that pattern-removal technique all the time at $work, I
wonder how many times I've committed this mistake and just haven't been
burned by it yet?

Good catch, should be fixed by r348141.

I'm curious though... it can only hit this condition if can_run_nonroot
returns false, and it shouldn't do so on a freshly-installed system. 
The idea was to make it run non-priv out of the box and only run as
root if the admin had done something non-standard.  Does it make sense
to you that it was running as root on your system?  Like have you
customized ntp.conf to add some file-related commands?

-- Ian


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348143 - head/libexec/rc/rc.d

2019-05-22 Thread Ian Lepore
Author: ian
Date: Thu May 23 01:49:08 2019
New Revision: 348143
URL: https://svnweb.freebsd.org/changeset/base/348143

Log:
  Remove accidentally-added blank line; the style throughout this file
  is to use no whitespace between a comment block and the code it describes.

Modified:
  head/libexec/rc/rc.d/ntpd

Modified: head/libexec/rc/rc.d/ntpd
==
--- head/libexec/rc/rc.d/ntpd   Thu May 23 01:48:07 2019(r348142)
+++ head/libexec/rc/rc.d/ntpd   Thu May 23 01:49:08 2019(r348143)
@@ -87,7 +87,6 @@ ntpd_precmd()
# Otherwise, figure out what to do about the driftfile option.  If set
# by the admin, we don't add the option.  If the file exists in the old
# default location we use that, else we use the new default location.
-
if can_run_nonroot; then
_user="ntpd"
driftopt="-f ${_ntp_default_driftfile}"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348144 - head/sys/vm

2019-05-22 Thread Doug Moore
Author: dougm
Date: Thu May 23 02:10:41 2019
New Revision: 348144
URL: https://svnweb.freebsd.org/changeset/base/348144

Log:
  Fix typo from r348128: _func__ -> __func__
  
  Reported by: LINT

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cThu May 23 01:49:08 2019(r348143)
+++ head/sys/vm/vm_map.cThu May 23 02:10:41 2019(r348144)
@@ -1265,7 +1265,7 @@ vm_map_entry_resize(vm_map_t map, vm_map_entry_t entry
root->left, root->right);
VM_MAP_ASSERT_CONSISTENT(map);
CTR4(KTR_VM, "%s: map %p, nentries %d, entry %p",
-   _func__, map, map->nentries, entry);
+   __func__, map, map->nentries, entry);
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348146 - head/sys/powerpc/booke

2019-05-22 Thread Justin Hibbits
Author: jhibbits
Date: Thu May 23 03:40:48 2019
New Revision: 348146
URL: https://svnweb.freebsd.org/changeset/base/348146

Log:
  powerpc/booke: It helps to set variables before using them
  
  Actually set the source and destination VA's before using them.  Fixes a
  bizarre panic on 32-bit Book-E.  Not sure why this wasn't caught by the
  compiler.

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Thu May 23 02:12:00 2019
(r348145)
+++ head/sys/powerpc/booke/pmap.c   Thu May 23 03:40:48 2019
(r348146)
@@ -3043,11 +3043,12 @@ mmu_booke_copy_page(mmu_t mmu, vm_page_t sm, vm_page_t
dva = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dm));
memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE);
 #else
+   sva = copy_page_src_va;
+   dva = copy_page_dst_va;
+
mtx_lock(©_page_mutex);
mmu_booke_kenter(mmu, sva, VM_PAGE_TO_PHYS(sm));
mmu_booke_kenter(mmu, dva, VM_PAGE_TO_PHYS(dm));
-   sva = copy_page_src_va;
-   dva = copy_page_dst_va;
 
memcpy((caddr_t)dva, (caddr_t)sva, PAGE_SIZE);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348147 - head/sys/powerpc/mpc85xx

2019-05-22 Thread Justin Hibbits
Author: jhibbits
Date: Thu May 23 03:47:25 2019
New Revision: 348147
URL: https://svnweb.freebsd.org/changeset/base/348147

Log:
  powerpc/mpc85xx: Use the proper (EREF) form of writing to DBCR0
  
  DBCR0, according to the Freescale EREF, is guaranteed to be updated, and
  changes take effect, after an isync plus change of MSR[DE] from 0 to 1.
  Otherwise it's guaranteed to be updated "eventually".  Use the expected
  synchronization sequence to write it for resetting.
  
  This prevents "Reset failed" from being printed immediately before the CPU
  resets.
  
  MFC after:2 weeks

Modified:
  head/sys/powerpc/mpc85xx/platform_mpc85xx.c

Modified: head/sys/powerpc/mpc85xx/platform_mpc85xx.c
==
--- head/sys/powerpc/mpc85xx/platform_mpc85xx.c Thu May 23 03:40:48 2019
(r348146)
+++ head/sys/powerpc/mpc85xx/platform_mpc85xx.c Thu May 23 03:47:25 2019
(r348147)
@@ -517,15 +517,14 @@ mpc85xx_reset(platform_t plat)
 */
ccsr_write4(OCP85XX_RSTCR, 2);
 
-   /* Clear DBCR0, disables debug interrupts and events. */
-   mtspr(SPR_DBCR0, 0);
+   mtmsr(mfmsr() & ~PSL_DE);
+
+   /* Enable debug interrupts and issue reset. */
+   mtspr(SPR_DBCR0, DBCR0_IDM | DBCR0_RST_SYSTEM);
__asm __volatile("isync");
 
/* Enable Debug Interrupts in MSR. */
mtmsr(mfmsr() | PSL_DE);
-
-   /* Enable debug interrupts and issue reset. */
-   mtspr(SPR_DBCR0, mfspr(SPR_DBCR0) | DBCR0_IDM | DBCR0_RST_SYSTEM);
 
printf("Reset failed...\n");
while (1)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348148 - head/sys/mips/mips

2019-05-22 Thread Xin LI
Author: delphij
Date: Thu May 23 05:17:18 2019
New Revision: 348148
URL: https://svnweb.freebsd.org/changeset/base/348148

Log:
  Delete unneeded #include  from sys/mips.
  
  PR:   229763
  Submitted by: Yoshihiro Ota 
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D20190

Modified:
  head/sys/mips/mips/elf_trampoline.c

Modified: head/sys/mips/mips/elf_trampoline.c
==
--- head/sys/mips/mips/elf_trampoline.c Thu May 23 03:47:25 2019
(r348147)
+++ head/sys/mips/mips/elf_trampoline.c Thu May 23 05:17:18 2019
(r348148)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
  */
 #include "opt_global.h"
 
-#include 
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r336547 - in head/etc: defaults rc.d

2019-05-22 Thread Andriy Gapon
On 23/05/2019 04:45, Ian Lepore wrote:
> Doh!  I use that pattern-removal technique all the time at $work, I
> wonder how many times I've committed this mistake and just haven't been
> burned by it yet?
> 
> Good catch, should be fixed by r348141.

Thank you!

> I'm curious though... it can only hit this condition if can_run_nonroot
> returns false, and it shouldn't do so on a freshly-installed system. 
> The idea was to make it run non-priv out of the box and only run as
> root if the admin had done something non-standard.  Does it make sense
> to you that it was running as root on your system?  Like have you
> customized ntp.conf to add some file-related commands?

I think that it could be because of a customer kernel without MAC.
I'll consider adding it.

-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r348150 - head/libexec/rc/rc.d

2019-05-22 Thread Emmanuel Vadot
Author: manu
Date: Thu May 23 06:53:59 2019
New Revision: 348150
URL: https://svnweb.freebsd.org/changeset/base/348150

Log:
  pkgbase: Remove etc/zfs from being packaged
  
  This is an empty directory and it cause a FreeBSD-zfs package to
  be created when we don't need one.
  
  Reviewed by:  bapt

Modified:
  head/libexec/rc/rc.d/Makefile

Modified: head/libexec/rc/rc.d/Makefile
==
--- head/libexec/rc/rc.d/Makefile   Thu May 23 05:49:43 2019
(r348149)
+++ head/libexec/rc/rc.d/Makefile   Thu May 23 06:53:59 2019
(r348150)
@@ -327,9 +327,6 @@ ZFS+=   zfsbe
 ZFS+=  zfsd
 ZFS+=  zvol
 ZFSPACKAGE=zfs
-DIRS+= ETC_ZFS
-ETC_ZFS=   /etc/zfs
-ETC_ZFSPACKAGE=zfs
 .endif
 
 .for fg in ${CONFGROUPS}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"