svn commit: r289993 - head/sys/ofed/include/linux

2015-10-26 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Oct 26 09:34:43 2015
New Revision: 289993
URL: https://svnweb.freebsd.org/changeset/base/289993

Log:
  Build fix for MIPS.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/sched.h

Modified: head/sys/ofed/include/linux/sched.h
==
--- head/sys/ofed/include/linux/sched.h Mon Oct 26 07:19:03 2015
(r289992)
+++ head/sys/ofed/include/linux/sched.h Mon Oct 26 09:34:43 2015
(r289993)
@@ -64,9 +64,12 @@ struct task_struct {
int should_stop;
 };
 
-#definecurrent ((struct task_struct 
*)curthread->td_retval[1])
-#definetask_struct_get(x)  (struct task_struct *)(x)->td_retval[1]
-#definetask_struct_set(x, y)   (x)->td_retval[1] = (register_t)(y)
+#definecurrent task_struct_get(curthread)
+#definetask_struct_get(x)  ((struct task_struct 
*)(uintptr_t)(x)->td_retval[1])
+#definetask_struct_set(x, y)   (x)->td_retval[1] = (uintptr_t)(y)
+
+/* ensure the task_struct pointer fits into the td_retval[1] field */
+CTASSERT(sizeof(((struct thread *)0)->td_retval[1]) >= sizeof(uintptr_t));
 
 #defineset_current_state(x)
\
atomic_store_rel_int((volatile int *)>state, (x))
___
svn-src-all@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"


Re: svn commit: r289995 - head/usr.bin/dtc

2015-10-26 Thread Baptiste Daroussin
On Mon, Oct 26, 2015 at 10:37:17AM +, David Chisnall wrote:
> Author: theraven
> Date: Mon Oct 26 10:37:17 2015
> New Revision: 289995
> URL: https://svnweb.freebsd.org/changeset/base/289995
> 
> Log:
>   Ensure that dtc is built in C++11 mode.
>   
>   Reported by:George Abdelmalik
> 
> Modified:
>   head/usr.bin/dtc/Makefile
> 
> Modified: head/usr.bin/dtc/Makefile
> ==
> --- head/usr.bin/dtc/Makefile Mon Oct 26 10:09:08 2015(r289994)
> +++ head/usr.bin/dtc/Makefile Mon Oct 26 10:37:17 2015(r289995)
> @@ -6,6 +6,8 @@ MAN=  dtc.1
>  
>  WARNS?=  3
>  
> +CXXFLAGS+=   -std=c++11
> +
>  NO_SHARED?=NO
>  
>  .include 
> 
Just jumping on that one, you should probably revisit de HACKING files :)

Bapt


signature.asc
Description: PGP signature


Re: svn commit: r289995 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
On 26 Oct 2015, at 10:48, Baptiste Daroussin  wrote:
> 
> Just jumping on that one, you should probably revisit de HACKING files :)

Ah, good point.  I’ll update them.

David

___
svn-src-all@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 commit: r289996 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
Author: theraven
Date: Mon Oct 26 11:02:57 2015
New Revision: 289996
URL: https://svnweb.freebsd.org/changeset/base/289996

Log:
  Update some obsolete information in the HACKING document.
  
  Reported by:  bapt

Modified:
  head/usr.bin/dtc/HACKING

Modified: head/usr.bin/dtc/HACKING
==
--- head/usr.bin/dtc/HACKINGMon Oct 26 10:37:17 2015(r289995)
+++ head/usr.bin/dtc/HACKINGMon Oct 26 11:02:57 2015(r289996)
@@ -21,19 +21,17 @@ welcome.
 C++11
 -
 
-This project currently aims to compile with g++ 4.2.1 and so doesn't make any
-use of C++11 features.  It would be a good idea to relax this restriction once
-clang is the default compiler for ARM, MIPS and PowerPC.
-
-This code makes use of a lot of iterator loops, which would be cleaner using
-the new syntax in C++11.  It also explicitly deletes a lot of objects held in
-collections in destructors that have these collections as their members.  This
-could be simplified by using `shared_ptr`.
-
-The code does make use of `static_assert()`, but uses a macro in utility.hh to
-remove these if they are not supported.  The FreeBSD standard headers also
-define a compatibility macro the implements static asserts in terms of an array
-with 1 element on success and -1 elements on failure.
+This project uses C++11, as the goal for FreeBSD 11 is to require C/C++11 as a
+minimum, either from clang or an external toolchain.  In particular, it uses
+`std::unique_ptr` extensively for memory management within the tree.  Unique
+pointers are also used in several other places to track ownership.
+
+Most iterator loops use the new loop syntax and the `auto` type for type
+deduction.  Range-based `for` loops generally improve the readability of the
+code, though `auto` should only be used in places where the type can be deduced
+as easily by the reader as by the compiler.
+
+The code also makes use of `static_assert()` to track compile-time invariants.
 
 Adding New Checks
 -
___
svn-src-all@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 commit: r289999 - in releng/10.2: . contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/ker...

2015-10-26 Thread Gleb Smirnoff
   (props changed)
  releng/10.2/contrib/ntp/tests/sandbox/bug-2803.c   (props changed)
  releng/10.2/contrib/ntp/tests/sandbox/modetoa.c   (props changed)
  releng/10.2/contrib/ntp/tests/sandbox/uglydate.c   (props changed)
  releng/10.2/contrib/ntp/tests/sandbox/ut-2803.c   (props changed)

Modified: releng/10.2/UPDATING
==
--- releng/10.2/UPDATINGMon Oct 26 11:36:40 2015(r289998)
+++ releng/10.2/UPDATINGMon Oct 26 11:36:55 2015(r28)
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20151026:  p6  FreeBSD-SA-15:25.ntp
+
+   Fix multiple NTP vulnerabilities. New NTP version is 4.2.8p4.
+
 20151002:  p5  FreeBSD-SA-15:24.rpcbind [revised]
Revised patch to address a regression that prevents NIS from working.
 

Modified: releng/10.2/contrib/ntp/ChangeLog
==
--- releng/10.2/contrib/ntp/ChangeLog   Mon Oct 26 11:36:40 2015
(r289998)
+++ releng/10.2/contrib/ntp/ChangeLog   Mon Oct 26 11:36:55 2015
(r28)
@@ -1,4 +1,159 @@
 ---
+(4.2.8p4) 2015/10/21 Released by Harlan Stenn <st...@ntp.org>
+(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn <st...@ntp.org>
+
+* [Sec 2899] CVE-2014-9297  perlin...@ntp.org
+* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's.
+  Danny Mayer.  Log incoming packets that fail TEST2.  Harlan Stenn.
+* [Sec 2902] configuration directives "pidfile" and "driftfile"
+  should be local-only. perlin...@ntp.org (patch by Miroslav Lichvar)
+* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlin...@ntp.org
+* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlin...@ntp.org
+* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger
+* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and
+  the logfile and keyfile are the same. perlin...@ntp.org
+* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when
+  using 'saveconfig' command.  perlin...@ntp.org
+* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlin...@ntp.org
+* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun
+  and memory corruption. perlin...@ntp.org
+* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger.
+* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL
+  on some bogus values.  Harlan Stenn.
+* [Sec 2941] NAK to the Future: Symmetric association authentication
+  bypass via crypto-NAK. Patch applied. perlin...@ntp.org
+* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
+  privileges and limiting resources in NTPD removes the need to link
+  forcefully against 'libgcc_s' which does not always work. J.Perlinger
+* [Bug 2595] ntpdate man page quirks.  Hal Murray, Harlan Stenn.
+* [Bug 2625] Deprecate flag1 in local refclock.  Hal Murray, Harlan Stenn.
+* [Bug 2817] Stop locking ntpd into memory by default under Linux.  H.Stenn.
+* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c.  perlin...@ntp.org
+* [Bug 2823] ntpsweep with recursive peers option doesn't work.  H.Stenn.
+* [Bug 2849] Systems with more than one default route may never
+  synchronize.  Brian Utterback.  Note that this patch might need to
+  be reverted once Bug 2043 has been fixed.
+* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
+* [Bug 2866] segmentation fault at initgroups().  Harlan Stenn.
+* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
+* [Bug 2873] libevent should not include .deps/ in the tarball.  H.Stenn
+* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS.  libevent must
+  be configured for the distribution targets.  Harlan Stenn.
+* [Bug 2883] ntpd crashes on exit with empty driftfile.  Miroslav Lichvar.
+* [Bug 2886] Mis-spelling: "outlyer" should be "outlier".  d...@horsfall.org
+* [Bug 2888] streamline calendar functions.  perlin...@ntp.org
+* [Bug 2889] ntp-dev-4.3.67 does not build on Windows.  perlin...@ntp.org
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket.  Konstantin Khlebnikov.
+* [Bug 2906] make check needs better support for pthreads.  Harlan Stenn.
+* [Bug 2907] dist* build targets require our libevent/ to be enabled.  HStenn.
+* [Bug 2912] no munlockall() under Windows.  David Taylor, Harlan Stenn.
+* libntp/emalloc.c: Remove explicit include of stdint.h.  Harlan Stenn.
+* Put Unity CPPFLAGS items in unity_config.h.  Harlan Stenn.
+* tests/ntpd/g_leapsec.cpp typo fix.  Harlan Stenn.
+* Phase 1 deprecation of google test in sntp/tests/.  Harlan Stenn.
+* On some versions of HP-UX, inttypes.

svn commit: r289995 - head/usr.bin/dtc

2015-10-26 Thread David Chisnall
Author: theraven
Date: Mon Oct 26 10:37:17 2015
New Revision: 289995
URL: https://svnweb.freebsd.org/changeset/base/289995

Log:
  Ensure that dtc is built in C++11 mode.
  
  Reported by:  George Abdelmalik

Modified:
  head/usr.bin/dtc/Makefile

Modified: head/usr.bin/dtc/Makefile
==
--- head/usr.bin/dtc/Makefile   Mon Oct 26 10:09:08 2015(r289994)
+++ head/usr.bin/dtc/Makefile   Mon Oct 26 10:37:17 2015(r289995)
@@ -6,6 +6,8 @@ MAN=dtc.1
 
 WARNS?=3
 
+CXXFLAGS+= -std=c++11
+
 NO_SHARED?=NO
 
 .include 
___
svn-src-all@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 commit: r289997 - in stable/10: . contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kerne...

2015-10-26 Thread Gleb Smirnoff
/tests/bug-2803/bug-2803.c   (props changed)
  stable/10/contrib/ntp/tests/sandbox/bug-2803.c   (props changed)
  stable/10/contrib/ntp/tests/sandbox/modetoa.c   (props changed)
  stable/10/contrib/ntp/tests/sandbox/uglydate.c   (props changed)
  stable/10/contrib/ntp/tests/sandbox/ut-2803.c   (props changed)

Modified: stable/10/UPDATING
==
--- stable/10/UPDATING  Mon Oct 26 11:02:57 2015(r289996)
+++ stable/10/UPDATING  Mon Oct 26 11:35:40 2015(r289997)
@@ -16,6 +16,9 @@ from older versions of FreeBSD, try WITH
 stable/10, and then rebuild without this option. The bootstrap process from
 older version of current is a bit fragile.
 
+20151026:
+   NTP has been upgraded to 4.2.8p4.
+
 20151025:
ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from
atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf

Modified: stable/10/contrib/ntp/ChangeLog
==
--- stable/10/contrib/ntp/ChangeLog Mon Oct 26 11:02:57 2015
(r289996)
+++ stable/10/contrib/ntp/ChangeLog Mon Oct 26 11:35:40 2015
(r289997)
@@ -1,4 +1,159 @@
 ---
+(4.2.8p4) 2015/10/21 Released by Harlan Stenn <st...@ntp.org>
+(4.2.8p4-RC1) 2015/10/06 Released by Harlan Stenn <st...@ntp.org>
+
+* [Sec 2899] CVE-2014-9297  perlin...@ntp.org
+* [Sec 2901] Drop invalid packet before checking KoD. Check for all KoD's.
+  Danny Mayer.  Log incoming packets that fail TEST2.  Harlan Stenn.
+* [Sec 2902] configuration directives "pidfile" and "driftfile"
+  should be local-only. perlin...@ntp.org (patch by Miroslav Lichvar)
+* [Sec 2909] added missing call to 'free()' in ntp_crypto.c. perlin...@ntp.org
+* [Sec 2913] TALOS-CAN-0052: crash by loop counter underrun. perlin...@ntp.org
+* [Sec 2916] TALOS-CAN-0054: memory corruption in password store. JPerlinger
+* [Sec 2917] TALOS-CAN-0055: Infinite loop if extended logging enabled and
+  the logfile and keyfile are the same. perlin...@ntp.org
+* [Sec 1918] TALOS-CAN-0062: prevent directory traversal for VMS, too, when
+  using 'saveconfig' command.  perlin...@ntp.org
+* [Bug 2919] TALOS-CAN-0063: avoid buffer overrun in ntpq. perlin...@ntp.org
+* [Sec 2020] TALOS-CAN-0064: signed/unsiged clash could lead to buffer overun
+  and memory corruption. perlin...@ntp.org
+* [Sec 2921] TALOS-CAN-0065: password length memory corruption. JPerlinger.
+* [Sec 2922] decodenetnum() will ASSERT botch instead of returning FAIL
+  on some bogus values.  Harlan Stenn.
+* [Sec 2941] NAK to the Future: Symmetric association authentication
+  bypass via crypto-NAK. Patch applied. perlin...@ntp.org
+* [Bug 2332] (reopened) Exercise thread cancellation once before dropping
+  privileges and limiting resources in NTPD removes the need to link
+  forcefully against 'libgcc_s' which does not always work. J.Perlinger
+* [Bug 2595] ntpdate man page quirks.  Hal Murray, Harlan Stenn.
+* [Bug 2625] Deprecate flag1 in local refclock.  Hal Murray, Harlan Stenn.
+* [Bug 2817] Stop locking ntpd into memory by default under Linux.  H.Stenn.
+* [Bug 2821] minor build issues: fixed refclock_gpsdjson.c.  perlin...@ntp.org
+* [Bug 2823] ntpsweep with recursive peers option doesn't work.  H.Stenn.
+* [Bug 2849] Systems with more than one default route may never
+  synchronize.  Brian Utterback.  Note that this patch might need to
+  be reverted once Bug 2043 has been fixed.
+* [Bug 2864] 4.2.8p3 fails to compile on Windows. Juergen Perlinger
+* [Bug 2866] segmentation fault at initgroups().  Harlan Stenn.
+* [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'. J.Perlinger
+* [Bug 2873] libevent should not include .deps/ in the tarball.  H.Stenn
+* [Bug 2874] Don't distribute generated sntp/tests/fileHandlingTest.h. H.Stenn
+* [Bug 2875] sntp/Makefile.am: Get rid of DIST_SUBDIRS.  libevent must
+  be configured for the distribution targets.  Harlan Stenn.
+* [Bug 2883] ntpd crashes on exit with empty driftfile.  Miroslav Lichvar.
+* [Bug 2886] Mis-spelling: "outlyer" should be "outlier".  d...@horsfall.org
+* [Bug 2888] streamline calendar functions.  perlin...@ntp.org
+* [Bug 2889] ntp-dev-4.3.67 does not build on Windows.  perlin...@ntp.org
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket.  Konstantin Khlebnikov.
+* [Bug 2906] make check needs better support for pthreads.  Harlan Stenn.
+* [Bug 2907] dist* build targets require our libevent/ to be enabled.  HStenn.
+* [Bug 2912] no munlockall() under Windows.  David Taylor, Harlan Stenn.
+* libntp/emalloc.c: Remove explicit include of stdint.h.  Harlan Stenn.
+* Put Unity CPPFLAGS items in unity_config.h.  Harlan Stenn.
+* tests/ntpd/g_leapsec.cpp typo fix.  Harlan Stenn.
+* Phase 1 deprecation of google test in sntp/tests/.  Harlan Stenn.
+* On some versions of HP-UX, inttypes.h does not include stdint.h.  H.Stenn.
+*

svn commit: r289994 - head/sys/modules

2015-10-26 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Oct 26 10:09:08 2015
New Revision: 289994
URL: https://svnweb.freebsd.org/changeset/base/289994

Log:
  Build the LinuxKPI module by default.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Mon Oct 26 09:34:43 2015(r289993)
+++ head/sys/modules/Makefile   Mon Oct 26 10:09:08 2015(r289994)
@@ -202,7 +202,7 @@ SUBDIR= \
${_linux} \
${_linux_common} \
${_linux64} \
-   ${_linuxkpi} \
+   linuxkpi \
lmc \
lpt \
mac_biba \
@@ -539,9 +539,6 @@ _ixv=   ixv
 _linprocfs=linprocfs
 _linsysfs= linsysfs
 _linux=linux
-.if ${MK_OFED} != "no"
-_linuxkpi= linuxkpi
-.endif
 _ndis= ndis
 _pccard=   pccard
 .if ${MK_OFED} != "no" || defined(ALL_MODULES)
___
svn-src-all@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 commit: r289992 - stable/9/tools/build/mk

2015-10-26 Thread Garrett Cooper
Author: ngie
Date: Mon Oct 26 07:19:03 2015
New Revision: 289992
URL: https://svnweb.freebsd.org/changeset/base/289992

Log:
  MFstable/10 r286636:
  r286636 (by garga):
  
  MFC 256710:
  
  Add lot of missed files and dirs
  
  Approved by:  loos
  Sponsored by: Netgate

Modified:
  stable/9/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/build/   (props changed)

Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/9/tools/build/mk/OptionalObsoleteFiles.inc   Mon Oct 26 04:11:33 
2015(r289991)
+++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc   Mon Oct 26 07:19:03 
2015(r289992)
@@ -84,6 +84,7 @@ OLD_FILES+=usr/include/netnatm/addr.h
 OLD_FILES+=usr/include/netnatm/api/atmapi.h
 OLD_FILES+=usr/include/netnatm/api/ccatm.h
 OLD_FILES+=usr/include/netnatm/api/unisap.h
+OLD_DIRS+=usr/include/netnatm/api
 OLD_FILES+=usr/include/netnatm/msg/uni_config.h
 OLD_FILES+=usr/include/netnatm/msg/uni_hdr.h
 OLD_FILES+=usr/include/netnatm/msg/uni_ie.h
@@ -91,13 +92,16 @@ OLD_FILES+=usr/include/netnatm/msg/uni_m
 OLD_FILES+=usr/include/netnatm/msg/unimsglib.h
 OLD_FILES+=usr/include/netnatm/msg/uniprint.h
 OLD_FILES+=usr/include/netnatm/msg/unistruct.h
+OLD_DIRS+=usr/include/netnatm/msg
 OLD_FILES+=usr/include/netnatm/saal/sscfu.h
 OLD_FILES+=usr/include/netnatm/saal/sscfudef.h
 OLD_FILES+=usr/include/netnatm/saal/sscop.h
 OLD_FILES+=usr/include/netnatm/saal/sscopdef.h
+OLD_DIRS+=usr/include/netnatm/saal
 OLD_FILES+=usr/include/netnatm/sig/uni.h
 OLD_FILES+=usr/include/netnatm/sig/unidef.h
 OLD_FILES+=usr/include/netnatm/sig/unisig.h
+OLD_DIRS+=usr/include/netnatm/sig
 OLD_FILES+=usr/include/netnatm/unimsg.h
 OLD_FILES+=usr/lib/libngatm.a
 OLD_FILES+=usr/lib/libngatm.so
@@ -113,6 +117,7 @@ OLD_FILES+=usr/lib32/libngatm_p.a
 .endif
 OLD_FILES+=usr/share/doc/atm/atmconfig.help
 OLD_FILES+=usr/share/doc/atm/atmconfig_device.help
+OLD_DIRS+=usr/share/doc/atm
 OLD_FILES+=usr/share/man/man1/sscop.1.gz
 OLD_FILES+=usr/share/man/man3/libngatm.3.gz
 OLD_FILES+=usr/share/man/man3/snmp_atm.3.gz
@@ -607,6 +612,7 @@ OLD_FILES+=usr/bin/calendar
 OLD_FILES+=usr/share/calendar/calendar.all
 OLD_FILES+=usr/share/calendar/calendar.australia
 OLD_FILES+=usr/share/calendar/calendar.birthday
+OLD_FILES+=usr/share/calendar/calendar.brazilian
 OLD_FILES+=usr/share/calendar/calendar.christian
 OLD_FILES+=usr/share/calendar/calendar.computer
 OLD_FILES+=usr/share/calendar/calendar.croatian
@@ -626,8 +632,8 @@ OLD_FILES+=usr/share/calendar/calendar.s
 OLD_FILES+=usr/share/calendar/calendar.ukrainian
 OLD_FILES+=usr/share/calendar/calendar.usholiday
 OLD_FILES+=usr/share/calendar/calendar.world
-OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15
 OLD_FILES+=usr/share/calendar/de_AT.ISO_8859-15/calendar.feiertag
+OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.all
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.feiertag
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.geschichte
@@ -635,18 +641,32 @@ OLD_FILES+=usr/share/calendar/de_DE.ISO8
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.literatur
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.musik
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-1/calendar.wissenschaft
+OLD_DIRS+=usr/share/calendar/de_DE.ISO8859-1
 OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.all
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.fetes
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.french
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.jferies
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-1/calendar.proverbes
+OLD_DIRS+=usr/share/calendar/fr_FR.ISO8859-1
 OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15
 OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.all
 OLD_FILES+=usr/share/calendar/hr_HR.ISO8859-2/calendar.praznici
+OLD_DIRS+=usr/share/calendar/hr_HR.ISO8859-2
 OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.all
 OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.nevnapok
 OLD_FILES+=usr/share/calendar/hu_HU.ISO8859-2/calendar.unnepek
+OLD_DIRS+=usr/share/calendar/hu_HU.ISO8859-2
+OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.all
+OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.commemorative
+OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.holidays
+OLD_FILES+=usr/share/calendar/pt_BR.ISO8859-1/calendar.mcommemorative
+OLD_DIRS+=usr/share/calendar/pt_BR.ISO8859-1
+OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.all
+OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.commemorative
+OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.holidays
+OLD_FILES+=usr/share/calendar/pt_BR.UTF-8/calendar.mcommemorative
+OLD_DIRS+=usr/share/calendar/pt_BR.UTF-8
 

Re: svn commit: r289269 - head/usr.sbin/tzsetup

2015-10-26 Thread Adrian Chadd
Hi,

Please don't break non-root builds. I may get stabby.

:)



-adrian


On 26 October 2015 at 19:44, Bryan Drewery  wrote:
> On 10/13/2015 3:55 PM, Xin LI wrote:
>> Author: delphij
>> Date: Tue Oct 13 22:55:17 2015
>> New Revision: 289269
>> URL: https://svnweb.freebsd.org/changeset/base/289269
>>
>> Log:
>>   Use chroot(2) instead of using prefixes for files.
>>
>>   Previously, the code prefixes the chroot path to actual file paths to
>>   simulate the effect.  This, however, will not work for tzset(3) which
>>   expects the current system have a working set of timezone data files,
>>   and that is not always the case.
>>
>>   This changeset simplifies the handling of paths and use an actual
>>   chroot(2) call to implement the effect.
>>
>>   PR: bin/197313
>>   MFC after:  2 weeks
>>
>> Modified:
>>   head/usr.sbin/tzsetup/tzsetup.c
>>
>> Modified: head/usr.sbin/tzsetup/tzsetup.c
>> ==
>> --- head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 21:34:54 2015
>> (r289268)
>> +++ head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 22:55:17 2015
>> (r289269)
>> @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>
>> @@ -944,23 +945,18 @@ main(int argc, char **argv)
>>   if (argc - optind > 1)
>>   usage();
>>
>> - if (chrootenv == NULL) {
>
> I would think there would be a reason for not really using chroot(2)
> here, such as preparing images as non-root.
>
> --
> Regards,
> Bryan Drewery
>
___
svn-src-all@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 commit: r290019 - head

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Mon Oct 26 19:28:20 2015
New Revision: 290019
URL: https://svnweb.freebsd.org/changeset/base/290019

Log:
  Add a note about DEPFLAGS which is currently a hack around not properly 
passing
  CXXFLAGS to sub-makes.
  
  The bad passing also causes bsd.dep.mk's logic to selectively pull only some
  flags from C[XX]FLAGS to not apply which can be seen with '-L' being passed to
  mkdep when using an external compiler.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Oct 26 18:14:15 2015(r290018)
+++ head/Makefile.inc1  Mon Oct 26 19:28:20 2015(r290019)
@@ -398,6 +398,9 @@ TARGET_ABI= gnueabi
 .if defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc
 XCFLAGS+=  -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
 XCXXFLAGS+=-I${WORLDTMP}/usr/include/c++/v1 -std=gnu++11 
-L${WORLDTMP}/../lib/libc++
+# XXX: DEPFLAGS is a workaround for not properly passing CXXFLAGS to sub-makes
+# due to CXX="${XCXX} ${XCXXFLAGS}".  bsd.dep.mk does use CXXFLAGS when
+# building C++ files so this can come out if passing CXXFLAGS down is fixed.
 DEPFLAGS+= -I${WORLDTMP}/usr/include/c++/v1
 .else
 TARGET_ABI?=   unknown
___
svn-src-all@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 commit: r290021 - in head: sys/dev/ioat tools/tools/ioat

2015-10-26 Thread Conrad E. Meyer
Author: cem
Date: Mon Oct 26 19:34:12 2015
New Revision: 290021
URL: https://svnweb.freebsd.org/changeset/base/290021

Log:
  ioat: Add support for Block Fill operations
  
  The IOAT hardware supports writing a 64-bit pattern to some destination
  buffer.  The same limitations on buffer length apply as for copy
  operations.  Throughput is a bit higher (probably because fill does not
  have to spend bandwidth reading from a source in memory).
  
  Support for testing Block Fill has been added to ioatcontrol(8) and the
  ioat_test device.  ioatcontrol(8) accepts the '-f' flag, which tests
  Block Fill.  (If the flag is omitted, the tool tests copy by default.)
  The '-V' flag, in conjunction with '-f', verifies that buffers are
  filled in the expected pattern.
  
  Tested on:Broadwell DE (Xeon D-1500)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ioat/ioat.c
  head/sys/dev/ioat/ioat.h
  head/sys/dev/ioat/ioat_test.c
  head/sys/dev/ioat/ioat_test.h
  head/tools/tools/ioat/ioatcontrol.8
  head/tools/tools/ioat/ioatcontrol.c

Modified: head/sys/dev/ioat/ioat.c
==
--- head/sys/dev/ioat/ioat.cMon Oct 26 19:34:00 2015(r290020)
+++ head/sys/dev/ioat/ioat.cMon Oct 26 19:34:12 2015(r290021)
@@ -748,6 +748,37 @@ ioat_copy(bus_dmaengine_t dmaengine, bus
return (>bus_dmadesc);
 }
 
+struct bus_dmadesc *
+ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t dst, uint64_t fillpattern,
+bus_size_t len, bus_dmaengine_callback_t callback_fn, void *callback_arg,
+uint32_t flags)
+{
+   struct ioat_fill_hw_descriptor *hw_desc;
+   struct ioat_descriptor *desc;
+   struct ioat_softc *ioat;
+
+   CTR0(KTR_IOAT, __func__);
+   ioat = to_ioat_softc(dmaengine);
+
+   if ((dst & (0xull << 48)) != 0) {
+   ioat_log_message(0, "%s: High 16 bits of dst invalid\n",
+   __func__);
+   return (NULL);
+   }
+
+   desc = ioat_op_generic(ioat, IOAT_OP_FILL, len, fillpattern, dst,
+   callback_fn, callback_arg, flags);
+   if (desc == NULL)
+   return (NULL);
+
+   hw_desc = desc->u.fill;
+   if (g_ioat_debug_level >= 3)
+   dump_descriptor(hw_desc);
+
+   ioat_submit_single(ioat);
+   return (>bus_dmadesc);
+}
+
 /*
  * Ring Management
  */

Modified: head/sys/dev/ioat/ioat.h
==
--- head/sys/dev/ioat/ioat.hMon Oct 26 19:34:00 2015(r290020)
+++ head/sys/dev/ioat/ioat.hMon Oct 26 19:34:12 2015(r290021)
@@ -68,6 +68,14 @@ void ioat_put_dmaengine(bus_dmaengine_t 
 void ioat_acquire(bus_dmaengine_t dmaengine);
 void ioat_release(bus_dmaengine_t dmaengine);
 
+/*
+ * Issue a blockfill operation.  The 64-bit pattern 'fillpattern' is written to
+ * 'len' physically contiguous bytes at 'dst'.
+ */
+struct bus_dmadesc *ioat_blockfill(bus_dmaengine_t dmaengine, bus_addr_t dst,
+uint64_t fillpattern, bus_size_t len, bus_dmaengine_callback_t callback_fn,
+void *callback_arg, uint32_t flags);
+
 /* Issues the copy data operation */
 struct bus_dmadesc *ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst,
 bus_addr_t src, bus_size_t len, bus_dmaengine_callback_t callback_fn,

Modified: head/sys/dev/ioat/ioat_test.c
==
--- head/sys/dev/ioat/ioat_test.c   Mon Oct 26 19:34:00 2015
(r290020)
+++ head/sys/dev/ioat/ioat_test.c   Mon Oct 26 19:34:12 2015
(r290021)
@@ -123,11 +123,26 @@ test_transaction *ioat_test_transaction_
 static bool
 ioat_compare_ok(struct test_transaction *tx)
 {
-   uint32_t i;
+   struct ioat_test *test;
+   char *dst, *src;
+   uint32_t i, j;
+
+   test = tx->test;
 
for (i = 0; i < tx->depth; i++) {
-   if (memcmp(tx->buf[2*i], tx->buf[2*i+1], tx->length) != 0)
-   return (false);
+   dst = tx->buf[2 * i + 1];
+   src = tx->buf[2 * i];
+
+   if (test->testkind == IOAT_TEST_FILL) {
+   for (j = 0; j < tx->length; j += sizeof(uint64_t)) {
+   if (memcmp(src, [j],
+   MIN(sizeof(uint64_t), tx->length - j))
+   != 0)
+   return (false);
+   }
+   } else if (test->testkind == IOAT_TEST_DMA)
+   if (memcmp(src, dst, tx->length) != 0)
+   return (false);
}
return (true);
 }
@@ -208,8 +223,11 @@ ioat_test_submit_1_tx(struct ioat_test *
struct bus_dmadesc *desc;
bus_dmaengine_callback_t cb;
bus_addr_t src, dest;
+   uint64_t fillpattern;
uint32_t i, flags;
 
+   desc = NULL;
+

svn commit: r290022 - head/sys/dev/usb/wlan

2015-10-26 Thread Andriy Voskoboinyk
Author: avos
Date: Mon Oct 26 21:03:20 2015
New Revision: 290022
URL: https://svnweb.freebsd.org/changeset/base/290022

Log:
  urtwn(4): do not filter out control frames in the RX path
  
  Approved by:  adrian (mentor)
  Differential Revision:https://reviews.freebsd.org/D3811

Modified:
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cMon Oct 26 19:34:12 2015
(r290021)
+++ head/sys/dev/usb/wlan/if_urtwn.cMon Oct 26 21:03:20 2015
(r290022)
@@ -626,7 +626,8 @@ urtwn_rx_frame(struct urtwn_softc *sc, u
counter_u64_add(ic->ic_ierrors, 1);
return (NULL);
}
-   if (pktlen < sizeof(*wh) || pktlen > MCLBYTES) {
+   if (pktlen < sizeof(struct ieee80211_frame_ack) ||
+   pktlen > MCLBYTES) {
counter_u64_add(ic->ic_ierrors, 1);
return (NULL);
}
@@ -744,7 +745,7 @@ urtwn_bulk_rx_callback(struct usb_xfer *
 {
struct urtwn_softc *sc = usbd_xfer_softc(xfer);
struct ieee80211com *ic = >sc_ic;
-   struct ieee80211_frame *wh;
+   struct ieee80211_frame_min *wh;
struct ieee80211_node *ni;
struct mbuf *m = NULL, *next;
struct urtwn_data *data;
@@ -784,9 +785,11 @@ tr_setup:
while (m != NULL) {
next = m->m_next;
m->m_next = NULL;
-   wh = mtod(m, struct ieee80211_frame *);
-   ni = ieee80211_find_rxnode(ic,
-   (struct ieee80211_frame_min *)wh);
+   wh = mtod(m, struct ieee80211_frame_min *);
+   if (m->m_len >= sizeof(*wh))
+   ni = ieee80211_find_rxnode(ic, wh);
+   else
+   ni = NULL;
nf = URTWN_NOISE_FLOOR;
if (ni != NULL) {
(void)ieee80211_input(ni, m, rssi - nf, nf);
___
svn-src-all@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 commit: r290020 - head/sys/dev/ioat

2015-10-26 Thread Conrad E. Meyer
Author: cem
Date: Mon Oct 26 19:34:00 2015
New Revision: 290020
URL: https://svnweb.freebsd.org/changeset/base/290020

Log:
  ioat: Dedupe operation enqueue logic
  
  Add generic hw descriptor struct and generic control flags struct, in
  preparation for other kinds of IOAT operation.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ioat/ioat.c
  head/sys/dev/ioat/ioat_internal.h

Modified: head/sys/dev/ioat/ioat.c
==
--- head/sys/dev/ioat/ioat.cMon Oct 26 19:28:20 2015(r290019)
+++ head/sys/dev/ioat/ioat.cMon Oct 26 19:34:00 2015(r290020)
@@ -648,15 +648,18 @@ ioat_release(bus_dmaengine_t dmaengine)
mtx_unlock(>submit_lock);
 }
 
-struct bus_dmadesc *
-ioat_null(bus_dmaengine_t dmaengine, bus_dmaengine_callback_t callback_fn,
-void *callback_arg, uint32_t flags)
+static struct ioat_descriptor *
+ioat_op_generic(struct ioat_softc *ioat, uint8_t op,
+uint32_t size, uint64_t src, uint64_t dst,
+bus_dmaengine_callback_t callback_fn, void *callback_arg,
+uint32_t flags)
 {
-   struct ioat_softc *ioat;
+   struct ioat_generic_hw_descriptor *hw_desc;
struct ioat_descriptor *desc;
-   struct ioat_dma_hw_descriptor *hw_desc;
int mflags;
 
+   mtx_assert(>submit_lock, MA_OWNED);
+
KASSERT((flags & ~DMA_ALL_FLAGS) == 0, ("Unrecognized flag(s): %#x",
flags & ~DMA_ALL_FLAGS));
if ((flags & DMA_NO_WAIT) != 0)
@@ -664,31 +667,52 @@ ioat_null(bus_dmaengine_t dmaengine, bus
else
mflags = M_WAITOK;
 
-   ioat = to_ioat_softc(dmaengine);
-   mtx_assert(>submit_lock, MA_OWNED);
+   if (size > ioat->max_xfer_size) {
+   ioat_log_message(0, "%s: max_xfer_size = %d, requested = %u\n",
+   __func__, ioat->max_xfer_size, (unsigned)size);
+   return (NULL);
+   }
 
if (ioat_reserve_space(ioat, 1, mflags) != 0)
return (NULL);
 
-   CTR0(KTR_IOAT, __func__);
-
desc = ioat_get_ring_entry(ioat, ioat->head);
-   hw_desc = desc->u.dma;
+   hw_desc = desc->u.generic;
 
hw_desc->u.control_raw = 0;
-   hw_desc->u.control.null = 1;
-   hw_desc->u.control.completion_update = 1;
+   hw_desc->u.control_generic.op = op;
+   hw_desc->u.control_generic.completion_update = 1;
 
if ((flags & DMA_INT_EN) != 0)
-   hw_desc->u.control.int_enable = 1;
+   hw_desc->u.control_generic.int_enable = 1;
 
-   hw_desc->size = 8;
-   hw_desc->src_addr = 0;
-   hw_desc->dest_addr = 0;
+   hw_desc->size = size;
+   hw_desc->src_addr = src;
+   hw_desc->dest_addr = dst;
 
desc->bus_dmadesc.callback_fn = callback_fn;
desc->bus_dmadesc.callback_arg = callback_arg;
+   return (desc);
+}
+
+struct bus_dmadesc *
+ioat_null(bus_dmaengine_t dmaengine, bus_dmaengine_callback_t callback_fn,
+void *callback_arg, uint32_t flags)
+{
+   struct ioat_dma_hw_descriptor *hw_desc;
+   struct ioat_descriptor *desc;
+   struct ioat_softc *ioat;
+
+   CTR0(KTR_IOAT, __func__);
+   ioat = to_ioat_softc(dmaengine);
 
+   desc = ioat_op_generic(ioat, IOAT_OP_COPY, 8, 0, 0, callback_fn,
+   callback_arg, flags);
+   if (desc == NULL)
+   return (NULL);
+
+   hw_desc = desc->u.dma;
+   hw_desc->u.control.null = 1;
ioat_submit_single(ioat);
return (>bus_dmadesc);
 }
@@ -698,51 +722,28 @@ ioat_copy(bus_dmaengine_t dmaengine, bus
 bus_addr_t src, bus_size_t len, bus_dmaengine_callback_t callback_fn,
 void *callback_arg, uint32_t flags)
 {
-   struct ioat_descriptor *desc;
struct ioat_dma_hw_descriptor *hw_desc;
+   struct ioat_descriptor *desc;
struct ioat_softc *ioat;
-   int mflags;
-
-   KASSERT((flags & ~DMA_ALL_FLAGS) == 0, ("Unrecognized flag(s): %#x",
-   flags & ~DMA_ALL_FLAGS));
-   if ((flags & DMA_NO_WAIT) != 0)
-   mflags = M_NOWAIT;
-   else
-   mflags = M_WAITOK;
 
+   CTR0(KTR_IOAT, __func__);
ioat = to_ioat_softc(dmaengine);
-   mtx_assert(>submit_lock, MA_OWNED);
 
-   if (len > ioat->max_xfer_size) {
-   ioat_log_message(0, "%s: max_xfer_size = %d, requested = %d\n",
-   __func__, ioat->max_xfer_size, (int)len);
+   if (((src | dst) & (0xull << 48)) != 0) {
+   ioat_log_message(0, "%s: High 16 bits of src/dst invalid\n",
+   __func__);
return (NULL);
}
 
-   if (ioat_reserve_space(ioat, 1, mflags) != 0)
+   desc = ioat_op_generic(ioat, IOAT_OP_COPY, len, src, dst, callback_fn,
+   callback_arg, flags);
+   if (desc == NULL)
return (NULL);
 
-   CTR0(KTR_IOAT, __func__);
-
-   desc = ioat_get_ring_entry(ioat, ioat->head);

svn commit: r290023 - head/sys/netinet

2015-10-26 Thread Michael Tuexen
Author: tuexen
Date: Mon Oct 26 21:19:49 2015
New Revision: 290023
URL: https://svnweb.freebsd.org/changeset/base/290023

Log:
  When processing a cookie, any mismatch in port numbers or the vtag results
  in failing the check.
  This fixes 
https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite/blob/master/sctp-imh-tests/sctp-imh-i-3-3.pkt
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Mon Oct 26 21:03:20 2015
(r290022)
+++ head/sys/netinet/sctp_input.c   Mon Oct 26 21:19:49 2015
(r290023)
@@ -2435,8 +2435,8 @@ sctp_handle_cookie_echo(struct mbuf *m, 
cookie_offset = offset + sizeof(struct sctp_chunkhdr);
cookie_len = ntohs(cp->ch.chunk_length);
 
-   if ((cookie->peerport != sh->src_port) &&
-   (cookie->myport != sh->dest_port) &&
+   if ((cookie->peerport != sh->src_port) ||
+   (cookie->myport != sh->dest_port) ||
(cookie->my_vtag != sh->v_tag)) {
/*
 * invalid ports or bad tag.  Note that we always leave the
___
svn-src-all@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 commit: r290025 - head/share/mk

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Mon Oct 26 22:31:57 2015
New Revision: 290025
URL: https://svnweb.freebsd.org/changeset/base/290025

Log:
  META MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is no
  need to set STAGE_SYMLINKS_DIR.${STAGE_SET}.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk
  head/share/mk/bsd.files.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Mon Oct 26 22:29:58 2015(r290024)
+++ head/share/mk/bsd.confs.mk  Mon Oct 26 22:31:57 2015(r290025)
@@ -24,7 +24,6 @@ ${group}MODE?=${CONFMODE}
 ${group}DIR?=  ${CONFIGDIR}/
 STAGE_SETS+=   ${group}
 STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
-STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP}
 
 _${group}CONFS=
 .for cnf in ${${group}}

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Mon Oct 26 22:29:58 2015(r290024)
+++ head/share/mk/bsd.files.mk  Mon Oct 26 22:31:57 2015(r290025)
@@ -30,7 +30,6 @@ ${group}DIR?= ${BINDIR}
 STAGE_SETS+=   ${group}
 .endif
 STAGE_DIR.${group}= ${STAGE_OBJTOP}${${group}DIR}
-STAGE_SYMLINKS_DIR.${group}= ${STAGE_OBJTOP}
 
 _${group}FILES=
 .for file in ${${group}}
___
svn-src-all@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"


Re: svn commit: r289269 - head/usr.sbin/tzsetup

2015-10-26 Thread Bryan Drewery
On 10/13/2015 3:55 PM, Xin LI wrote:
> Author: delphij
> Date: Tue Oct 13 22:55:17 2015
> New Revision: 289269
> URL: https://svnweb.freebsd.org/changeset/base/289269
> 
> Log:
>   Use chroot(2) instead of using prefixes for files.
>   
>   Previously, the code prefixes the chroot path to actual file paths to
>   simulate the effect.  This, however, will not work for tzset(3) which
>   expects the current system have a working set of timezone data files,
>   and that is not always the case.
>   
>   This changeset simplifies the handling of paths and use an actual
>   chroot(2) call to implement the effect.
>   
>   PR: bin/197313
>   MFC after:  2 weeks
> 
> Modified:
>   head/usr.sbin/tzsetup/tzsetup.c
> 
> Modified: head/usr.sbin/tzsetup/tzsetup.c
> ==
> --- head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 21:34:54 2015
> (r289268)
> +++ head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 22:55:17 2015
> (r289269)
> @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  
> @@ -944,23 +945,18 @@ main(int argc, char **argv)
>   if (argc - optind > 1)
>   usage();
>  
> - if (chrootenv == NULL) {

I would think there would be a reason for not really using chroot(2)
here, such as preparing images as non-root.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r290026 - head/share/mk

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Mon Oct 26 23:28:35 2015
New Revision: 290026
URL: https://svnweb.freebsd.org/changeset/base/290026

Log:
  META MODE: Fix FILESNAME not being respected sans other FILES_group overrides.
  
  This was fixed in bsd.incs.mk in r242801 already.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.files.mk

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Mon Oct 26 22:31:57 2015(r290025)
+++ head/share/mk/bsd.files.mk  Mon Oct 26 23:28:35 2015(r290026)
@@ -35,7 +35,7 @@ _${group}FILES=
 .for file in ${${group}}
 .if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \
 defined(${group}MODE_${file:T}) || defined(${group}DIR_${file:T}) || \
-defined(${group}NAME_${file:T})
+defined(${group}NAME_${file:T}) || defined(${group}NAME)
 ${group}OWN_${file:T}?=${${group}OWN}
 ${group}GRP_${file:T}?=${${group}GRP}
 ${group}MODE_${file:T}?=   ${${group}MODE}
___
svn-src-all@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 commit: r290032 - svnadmin/conf

2015-10-26 Thread George V. Neville-Neil
Author: gnn
Date: Tue Oct 27 01:28:07 2015
New Revision: 290032
URL: https://svnweb.freebsd.org/changeset/base/290032

Log:
  Welcome Jonathan Looney to the project.
  
  Approved by:  core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessTue Oct 27 01:26:50 2015(r290031)
+++ svnadmin/conf/accessTue Oct 27 01:28:07 2015(r290032)
@@ -131,6 +131,7 @@ jmmv
 joerg  freebsd-de...@uriah.heep.sax.de
 jonathan
 jpaetzel
+jtl
 julian
 jwd
 kadesai

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Tue Oct 27 01:26:50 2015(r290031)
+++ svnadmin/conf/mentors   Tue Oct 27 01:28:07 2015(r290032)
@@ -23,6 +23,7 @@ erj   gnn Co-mentor: jfv
 jceel  wkoszek Co-mentor: cognet
 jkhrwatson
 jonathan   rwatson
+jtlgnn
 jwdrmacklem
 kadesaiken Co-mentor: scottl, ambrisko
 mahrensmckusick
___
svn-src-all@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 commit: r290031 - head/usr.sbin/tzsetup

2015-10-26 Thread Xin LI
Author: delphij
Date: Tue Oct 27 01:26:50 2015
New Revision: 290031
URL: https://svnweb.freebsd.org/changeset/base/290031

Log:
  Revert r289269 for now.  After looking at share/zoneinfo/Makefile this could
  potentially break non-root installs and we need a better solution, probably
  by doing it differently when no UI is involved.

Modified:
  head/usr.sbin/tzsetup/tzsetup.c

Modified: head/usr.sbin/tzsetup/tzsetup.c
==
--- head/usr.sbin/tzsetup/tzsetup.c Tue Oct 27 01:24:57 2015
(r290030)
+++ head/usr.sbin/tzsetup/tzsetup.c Tue Oct 27 01:26:50 2015
(r290031)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -945,18 +944,23 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv != NULL) {
-   rv = chroot(chrootenv);
-   if (rv != 0)
-   err(EX_OSERR, "chroot to %s", chrootenv);
+   if (chrootenv == NULL) {
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
+   } else {
+   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
+   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
+   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
+   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
+   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
+   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
+   _PATH_WALL_CMOS_CLOCK);
}
 
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-all@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 commit: r290033 - stable/10/usr.sbin/tzsetup

2015-10-26 Thread Xin LI
Author: delphij
Date: Tue Oct 27 01:28:11 2015
New Revision: 290033
URL: https://svnweb.freebsd.org/changeset/base/290033

Log:
  Revert the merge of r289269 for now as it may break non-root installs.

Modified:
  stable/10/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/tzsetup/tzsetup.c
==
--- stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 01:28:07 2015
(r290032)
+++ stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 01:28:11 2015
(r290033)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -936,18 +935,23 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv != NULL) {
-   rv = chroot(chrootenv);
-   if (rv != 0)
-   err(EX_OSERR, "chroot to %s", chrootenv);
+   if (chrootenv == NULL) {
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
+   } else {
+   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
+   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
+   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
+   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
+   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
+   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
+   _PATH_WALL_CMOS_CLOCK);
}
 
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-all@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"


Re: svn commit: r289863 - head/lib/libc/stdio

2015-10-26 Thread Andrey Chernov
On 26.10.2015 20:27, John Baldwin wrote:
> On Saturday, October 24, 2015 02:23:15 AM Andrey A. Chernov wrote:
>> Author: ache
>> Date: Sat Oct 24 02:23:15 2015
>> New Revision: 289863
>> URL: https://svnweb.freebsd.org/changeset/base/289863
>>
>> Log:
>>   Since no room left in the _flags, reuse __SALC for O_APPEND.
>>   It helps to remove _fcntl() call from _ftello() and optimize seek position
>>   calculation in _swrite().
> 
> You could just add a _flags2 to FILE if that would be cleaner.  It should even
> be MFC'able without being an ABI change since stdio always allocates FILE
> objects internally and we only export pointers to them.  Programs do not
> allocate them statically.
> 

Thanx, I understand it from your bugzilla answer, but I have a doubt.
What if some 3rd party port will use static FILE f; and then ? Some of
ports may deal with FILE internals and I don't know which ones. I prefer
rather to not break something there and currently I need only one flag
and __SALC is not conflicting since used only with _file = -1 and
__SSTR. If you or somebody else will need another flag and be brave
enough to add _flags2, this patch can be easily converted.

-- 
http://ache.vniz.net/
___
svn-src-all@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 commit: r290027 - stable/10/usr.sbin/tzsetup

2015-10-26 Thread Xin LI
Author: delphij
Date: Tue Oct 27 00:37:19 2015
New Revision: 290027
URL: https://svnweb.freebsd.org/changeset/base/290027

Log:
  MFC r289269:
  
  Use chroot(2) instead of using prefixes for files.
  
  Previously, the code prefixes the chroot path to actual file paths to
  simulate the effect.  This, however, will not work for tzset(3) which
  expects the current system have a working set of timezone data files,
  and that is not always the case.
  
  This changeset simplifies the handling of paths and use an actual
  chroot(2) call to implement the effect.
  
  PR:   bin/197313

Modified:
  stable/10/usr.sbin/tzsetup/tzsetup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/tzsetup/tzsetup.c
==
--- stable/10/usr.sbin/tzsetup/tzsetup.cMon Oct 26 23:28:35 2015
(r290026)
+++ stable/10/usr.sbin/tzsetup/tzsetup.cTue Oct 27 00:37:19 2015
(r290027)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -935,23 +936,18 @@ main(int argc, char **argv)
if (argc - optind > 1)
usage();
 
-   if (chrootenv == NULL) {
-   strcpy(path_zonetab, _PATH_ZONETAB);
-   strcpy(path_iso3166, _PATH_ISO3166);
-   strcpy(path_zoneinfo, _PATH_ZONEINFO);
-   strcpy(path_localtime, _PATH_LOCALTIME);
-   strcpy(path_db, _PATH_DB);
-   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
-   } else {
-   sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
-   sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
-   sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
-   sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
-   sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
-   sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,
-   _PATH_WALL_CMOS_CLOCK);
+   if (chrootenv != NULL) {
+   rv = chroot(chrootenv);
+   if (rv != 0)
+   err(EX_OSERR, "chroot to %s", chrootenv);
}
 
+   strcpy(path_zonetab, _PATH_ZONETAB);
+   strcpy(path_iso3166, _PATH_ISO3166);
+   strcpy(path_zoneinfo, _PATH_ZONEINFO);
+   strcpy(path_localtime, _PATH_LOCALTIME);
+   strcpy(path_db, _PATH_DB);
+   strcpy(path_wall_cmos_clock, _PATH_WALL_CMOS_CLOCK);
 
/* Override the user-supplied umask. */
(void)umask(S_IWGRP | S_IWOTH);
___
svn-src-all@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 commit: r290028 - in head/sys: netinet netipsec

2015-10-26 Thread George V. Neville-Neil
Author: gnn
Date: Tue Oct 27 00:42:15 2015
New Revision: 290028
URL: https://svnweb.freebsd.org/changeset/base/290028

Log:
  Turning on IPSEC used to introduce a slight amount of performance
  degradation (7%) for host host TCP connections over 10Gbps links,
  even when there were no secuirty policies in place. There is no
  change in performance on 1Gbps network links. Testing GENERIC vs.
  GENERIC-NOIPSEC vs. GENERIC with this change shows that the new
  code removes any overhead introduced by having IPSEC always in the
  kernel.
  
  Differential Revision:D3993
  MFC after:1 month
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/netinet/ip_ipsec.c
  head/sys/netinet/tcp_subr.c
  head/sys/netipsec/ipsec.c

Modified: head/sys/netinet/ip_ipsec.c
==
--- head/sys/netinet/ip_ipsec.c Tue Oct 27 00:37:19 2015(r290027)
+++ head/sys/netinet/ip_ipsec.c Tue Oct 27 00:42:15 2015(r290028)
@@ -158,6 +158,10 @@ int
 ip_ipsec_output(struct mbuf **m, struct inpcb *inp, int *error)
 {
struct secpolicy *sp;
+
+   if (!key_havesp(IPSEC_DIR_INBOUND))
+   return 0;
+
/*
 * Check the security policy (SP) for the packet and, if
 * required, do IPsec-related processing.  There are two

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Tue Oct 27 00:37:19 2015(r290027)
+++ head/sys/netinet/tcp_subr.c Tue Oct 27 00:42:15 2015(r290028)
@@ -1972,7 +1972,8 @@ ipsec_hdrsiz_tcp(struct tcpcb *tp)
 #endif
struct tcphdr *th;
 
-   if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL))
+   if ((tp == NULL) || ((inp = tp->t_inpcb) == NULL) ||
+   (!key_havesp(IPSEC_DIR_OUTBOUND)))
return (0);
m = m_gethdr(M_NOWAIT, MT_DATA);
if (!m)

Modified: head/sys/netipsec/ipsec.c
==
--- head/sys/netipsec/ipsec.c   Tue Oct 27 00:37:19 2015(r290027)
+++ head/sys/netipsec/ipsec.c   Tue Oct 27 00:42:15 2015(r290028)
@@ -1276,6 +1276,9 @@ ipsec46_in_reject(struct mbuf *m, struct
int error;
int result;
 
+   if (!key_havesp(IPSEC_DIR_INBOUND))
+   return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
 
/* Get SP for this packet. */
@@ -1403,6 +1406,9 @@ ipsec_hdrsiz(struct mbuf *m, u_int dir, 
int error;
size_t size;
 
+   if (!key_havesp(dir))
+   return 0;
+
IPSEC_ASSERT(m != NULL, ("null mbuf"));
 
/* Get SP for this packet. */
___
svn-src-all@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 commit: r290030 - in head/libexec/dma: dma-mbox-create dmagent

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 27 01:24:57 2015
New Revision: 290030
URL: https://svnweb.freebsd.org/changeset/base/290030

Log:
  Add Makefile.depend

Added:
  head/libexec/dma/dma-mbox-create/Makefile.depend   (contents, props changed)
  head/libexec/dma/dmagent/Makefile.depend   (contents, props changed)

Added: head/libexec/dma/dma-mbox-create/Makefile.depend
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/dma/dma-mbox-create/Makefile.dependTue Oct 27 01:24:57 
2015(r290030)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+   gnu/lib/csu \
+   gnu/lib/libgcc \
+   include \
+   include/arpa \
+   include/xlocale \
+   lib/${CSU_DIR} \
+   lib/libc \
+   lib/libcompiler_rt \
+   secure/lib/libcrypto \
+   secure/lib/libssl \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif

Added: head/libexec/dma/dmagent/Makefile.depend
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/libexec/dma/dmagent/Makefile.dependTue Oct 27 01:24:57 2015
(r290030)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+   gnu/lib/csu \
+   gnu/lib/libgcc \
+   include \
+   include/arpa \
+   include/xlocale \
+   lib/${CSU_DIR} \
+   lib/libc \
+   lib/libcompiler_rt \
+   secure/lib/libcrypto \
+   secure/lib/libssl \
+
+
+.include 
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+aliases_parse.o: aliases_parse.c
+aliases_parse.o: aliases_parse.h
+aliases_parse.po: aliases_parse.c
+aliases_parse.po: aliases_parse.h
+aliases_scan.o: aliases_parse.h
+aliases_scan.o: aliases_scan.c
+aliases_scan.po: aliases_parse.h
+aliases_scan.po: aliases_scan.c
+.endif
___
svn-src-all@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"


Re: svn commit: r289269 - head/usr.sbin/tzsetup

2015-10-26 Thread Xin Li
On 10/26/15 18:07, Adrian Chadd wrote:
> Hi,
> 
> Please don't break non-root builds. I may get stabby.
> 
> :)

Will revert now.

> -adrian
> 
> 
> On 26 October 2015 at 19:44, Bryan Drewery  wrote:
>> On 10/13/2015 3:55 PM, Xin LI wrote:
>>> Author: delphij
>>> Date: Tue Oct 13 22:55:17 2015
>>> New Revision: 289269
>>> URL: https://svnweb.freebsd.org/changeset/base/289269
>>>
>>> Log:
>>>   Use chroot(2) instead of using prefixes for files.
>>>
>>>   Previously, the code prefixes the chroot path to actual file paths to
>>>   simulate the effect.  This, however, will not work for tzset(3) which
>>>   expects the current system have a working set of timezone data files,
>>>   and that is not always the case.
>>>
>>>   This changeset simplifies the handling of paths and use an actual
>>>   chroot(2) call to implement the effect.
>>>
>>>   PR: bin/197313
>>>   MFC after:  2 weeks
>>>
>>> Modified:
>>>   head/usr.sbin/tzsetup/tzsetup.c
>>>
>>> Modified: head/usr.sbin/tzsetup/tzsetup.c
>>> ==
>>> --- head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 21:34:54 2015
>>> (r289268)
>>> +++ head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 22:55:17 2015
>>> (r289269)
>>> @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
>>>  #include 
>>>  #include 
>>>  #include 
>>> +#include 
>>>  #include 
>>>  #include 
>>>
>>> @@ -944,23 +945,18 @@ main(int argc, char **argv)
>>>   if (argc - optind > 1)
>>>   usage();
>>>
>>> - if (chrootenv == NULL) {
>>
>> I would think there would be a reason for not really using chroot(2)
>> here, such as preparing images as non-root.
>>
>> --
>> Regards,
>> Bryan Drewery
>>
> 


-- 
Xin LI https://www.delphij.net/
FreeBSD - The Power to Serve!   Live free or die



signature.asc
Description: OpenPGP digital signature


svn commit: r290024 - head/usr.bin/gzip

2015-10-26 Thread Xin LI
Author: delphij
Date: Mon Oct 26 22:29:58 2015
New Revision: 290024
URL: https://svnweb.freebsd.org/changeset/base/290024

Log:
  In gunzip(1), treat trailing garbage as a warning and not an error.  This
  allows scripts to distinguish it between real fatal errors, for instance a
  CRC mismatch.
  
  Update manual page for the behavior change.
  
  PR:   bin/203873
  Submitted by: Eugene Grosbein 
  MFC after:2 weeks

Modified:
  head/usr.bin/gzip/gzip.1
  head/usr.bin/gzip/gzip.c

Modified: head/usr.bin/gzip/gzip.1
==
--- head/usr.bin/gzip/gzip.1Mon Oct 26 21:19:49 2015(r290023)
+++ head/usr.bin/gzip/gzip.1Mon Oct 26 22:29:58 2015(r290024)
@@ -25,7 +25,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD$
-.Dd April 6, 2015
+.Dd October 26, 2015
 .Dt GZIP 1
 .Os
 .Sh NAME
@@ -136,7 +136,7 @@ option, allowing non-compressed data to 
 .It Fl h , -help
 This option prints a usage summary and exits.
 .It Fl k , -keep
-Keep (don't delete) input files during compression
+Keep (do not delete) input files during compression
 or decompression.
 .It Fl L , -license
 This option prints
@@ -183,6 +183,12 @@ is set, it is parsed as a white-space se
 handled before any options on the command line.
 Options on the command line will override anything in
 .Ev GZIP .
+.Sh EXIT STATUS
+The
+.Nm
+utility exits 0 on success,
+1 on errors,
+and 2 if a warning occurs.
 .Sh SEE ALSO
 .Xr bzip2 1 ,
 .Xr compress 1 ,
@@ -220,7 +226,7 @@ with unpack support written by
 .An Xin LI Aq Mt delp...@freebsd.org .
 .Sh BUGS
 According to RFC 1952, the recorded file size is stored in a 32-bit
-integer, therefore, it can not represent files larger than 4GB.
+integer, therefore, it cannot represent files larger than 4GB.
 This limitation also applies to
 .Fl l
 option of

Modified: head/usr.bin/gzip/gzip.c
==
--- head/usr.bin/gzip/gzip.cMon Oct 26 21:19:49 2015(r290023)
+++ head/usr.bin/gzip/gzip.cMon Oct 26 22:29:58 2015(r290024)
@@ -810,6 +810,7 @@ gz_uncompress(int in, int out, char *pre
if (in_tot > 0) {
maybe_warnx("%s: trailing garbage "
"ignored", filename);
+   exit_value = 2;
goto stop;
}
maybe_warnx("input not gziped (MAGIC0)");
___
svn-src-all@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 commit: r290029 - head/sys/dev/otus

2015-10-26 Thread Adrian Chadd
Author: adrian
Date: Tue Oct 27 00:57:06 2015
New Revision: 290029
URL: https://svnweb.freebsd.org/changeset/base/290029

Log:
  otus(4) - monitor mode fixes, large-mbuf crash fix
  
  * refactor out the rx filter and operating mode code into a separate
method.
  * add some comments about what's left with setting the operating mode
based on what carl9170 does.
  * comment out some init from otus_init_mac() - it's no longer needed as
it's always init'ed now.
  * add debugging and a missing return around a failure to call m_get2() -
during monitor mode operation I found RXing of frames > 2k, which
fails allocation.  I'm sure they're valid (it's configuring 11n RX and
receiving 11n frames even though the driver doesn't "do" 11n)
and may be A-MSDU; but allocations fail and we should handle that
gracefully.
  
  Tested:
  
  * UB82 reference NIC (AR9170 + AR9104 2x2 dual band NIC); STA and
monitor mode operation.

Modified:
  head/sys/dev/otus/if_otus.c

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Tue Oct 27 00:42:15 2015(r290028)
+++ head/sys/dev/otus/if_otus.c Tue Oct 27 00:57:06 2015(r290029)
@@ -1645,8 +1645,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui
}
tail = (struct ar_rx_tail *)(plcp + len - sizeof (*tail));
 
-   /* Discard error frames. */
-   if (__predict_false(tail->error != 0)) {
+   /* Discard error frames; don't discard BAD_RA (eg monitor mode); let 
net80211 do that */
+   if (__predict_false((tail->error & ~AR_RX_ERROR_BAD_RA) != 0)) {
OTUS_DPRINTF(sc, OTUS_DEBUG_RXDONE, "error frame 0x%02x\n", 
tail->error);
if (tail->error & AR_RX_ERROR_FCS) {
OTUS_DPRINTF(sc, OTUS_DEBUG_RXDONE, "bad FCS\n");
@@ -1671,10 +1671,14 @@ otus_sub_rxeof(struct otus_softc *sc, ui
 
wh = (struct ieee80211_frame *)(plcp + AR_PLCP_HDR_LEN);
 
+   /*
+* TODO: I see > 2KiB buffers in this path; is it A-MSDU or something?
+*/
m = m_get2(mlen, M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL) {
-   device_printf(sc->sc_dev, "%s: failed m_get2()\n", __func__);
+   device_printf(sc->sc_dev, "%s: failed m_get2() (mlen=%d)\n", 
__func__, mlen);
counter_u64_add(ic->ic_ierrors, 1);
+   return;
}
 
/* Finalize mbuf. */
@@ -2469,8 +2473,8 @@ otus_init_mac(struct otus_softc *sc)
otus_write(sc, AR_MAC_REG_BACKOFF_PROTECT, 0x105);
otus_write(sc, AR_MAC_REG_AMPDU_FACTOR, 0x1a);
/* Filter any control frames, BAR is bit 24. */
-   otus_write(sc, AR_MAC_REG_FRAMETYPE_FILTER, 0x0500);
-   otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1);
+// otus_write(sc, AR_MAC_REG_FRAMETYPE_FILTER, 0x0500);
+// otus_write(sc, AR_MAC_REG_RX_CONTROL, 0x1);
otus_write(sc, AR_MAC_REG_BASIC_RATE, 0x150f);
otus_write(sc, AR_MAC_REG_MANDATORY_RATE, 0x150f);
otus_write(sc, AR_MAC_REG_RTS_CTS_RATE, 0x10b01bb);
@@ -3070,6 +3074,57 @@ otus_led_newstate_type3(struct otus_soft
 #endif
 }
 
+/*
+ * TODO:
+ *
+ * + If in monitor mode, set BSSID to all zeros, else the node BSSID.
+ * + Handle STA + monitor (eg tcpdump/promisc/radiotap) as well as
+ *   pure monitor mode.
+ */
+static int
+otus_set_operating_mode(struct otus_softc *sc)
+{
+   struct ieee80211com *ic = >sc_ic;
+   uint32_t rx_ctrl;
+   uint32_t frm_filt;
+   uint32_t cam_mode;
+   uint32_t rx_sniffer;
+
+   OTUS_LOCK_ASSERT(sc);
+
+   /* XXX TODO: too many magic constants */
+   rx_ctrl = 0x1;
+   /* Filter any control frames, BAR is bit 24. */
+   frm_filt = 0x0500;
+   cam_mode = 0x0f02;  /* XXX STA */
+   rx_sniffer = 0x2000;
+
+   switch (ic->ic_opmode) {
+   case IEEE80211_M_STA:
+   cam_mode = 0x0f02;  /* XXX STA */
+   rx_ctrl = 0x1;
+   frm_filt = 0x0500;
+   rx_sniffer = 0x2000;
+   break;
+   case IEEE80211_M_MONITOR:
+   cam_mode = 0x0f02;  /* XXX STA */
+   rx_ctrl = 0x1;
+   frm_filt = 0x;
+   rx_sniffer = 0x2001;
+   break;
+   default:
+   break;
+   }
+
+   otus_write(sc, AR_MAC_REG_SNIFFER, rx_sniffer);
+   otus_write(sc, AR_MAC_REG_CAM_MODE, cam_mode);
+   otus_write(sc, AR_MAC_REG_FRAMETYPE_FILTER, frm_filt);
+   otus_write(sc, AR_MAC_REG_RX_CONTROL, cam_mode);
+
+   (void) otus_write_barrier(sc);
+   return (0);
+}
+
 int
 otus_init(struct otus_softc *sc)
 {
@@ -3092,48 +3147,7 @@ otus_init(struct otus_softc *sc)
}
 
(void) otus_set_macaddr(sc, ic->ic_macaddr);
-
-#if 0
-   switch (ic->ic_opmode) {
-#ifdef notyet
-#ifndef IEEE80211_STA_ONLY
-   case IEEE80211_M_HOSTAP:
-   

Re: svn commit: r289269 - head/usr.sbin/tzsetup

2015-10-26 Thread Adrian Chadd
aw thanks

I would really love to see a non-terrible way to do this stuff. :(


-a


On 26 October 2015 at 20:25, Xin Li  wrote:
> On 10/26/15 18:07, Adrian Chadd wrote:
>> Hi,
>>
>> Please don't break non-root builds. I may get stabby.
>>
>> :)
>
> Will revert now.
>
>> -adrian
>>
>>
>> On 26 October 2015 at 19:44, Bryan Drewery  wrote:
>>> On 10/13/2015 3:55 PM, Xin LI wrote:
 Author: delphij
 Date: Tue Oct 13 22:55:17 2015
 New Revision: 289269
 URL: https://svnweb.freebsd.org/changeset/base/289269

 Log:
   Use chroot(2) instead of using prefixes for files.

   Previously, the code prefixes the chroot path to actual file paths to
   simulate the effect.  This, however, will not work for tzset(3) which
   expects the current system have a working set of timezone data files,
   and that is not always the case.

   This changeset simplifies the handling of paths and use an actual
   chroot(2) call to implement the effect.

   PR: bin/197313
   MFC after:  2 weeks

 Modified:
   head/usr.sbin/tzsetup/tzsetup.c

 Modified: head/usr.sbin/tzsetup/tzsetup.c
 ==
 --- head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 21:34:54 2015
 (r289268)
 +++ head/usr.sbin/tzsetup/tzsetup.c   Tue Oct 13 22:55:17 2015
 (r289269)
 @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
  #include 
  #include 
  #include 
 +#include 
  #include 
  #include 

 @@ -944,23 +945,18 @@ main(int argc, char **argv)
   if (argc - optind > 1)
   usage();

 - if (chrootenv == NULL) {
>>>
>>> I would think there would be a reason for not really using chroot(2)
>>> here, such as preparing images as non-root.
>>>
>>> --
>>> Regards,
>>> Bryan Drewery
>>>
>>
>
>
> --
> Xin LI https://www.delphij.net/
> FreeBSD - The Power to Serve!   Live free or die
>
___
svn-src-all@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 commit: r290036 - stable/10/etc/rc.d

2015-10-26 Thread Eric van Gyzen
Author: vangyzen
Date: Tue Oct 27 02:52:05 2015
New Revision: 290036
URL: https://svnweb.freebsd.org/changeset/base/290036

Log:
  Fix indentation in etc/rc.d/fsck.

Modified:
  stable/10/etc/rc.d/fsck
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/fsck
==
--- stable/10/etc/rc.d/fsck Tue Oct 27 02:04:21 2015(r290035)
+++ stable/10/etc/rc.d/fsck Tue Oct 27 02:52:05 2015(r290036)
@@ -20,7 +20,7 @@ fsck_start()
elif [ ! -r /etc/fstab ]; then
echo "Warning! No /etc/fstab: skipping disk checks."
elif [ "$autoboot" = yes ]; then
-   # During fsck ignore SIGQUIT
+   # During fsck ignore SIGQUIT
trap : 3
 
check_startmsgs && echo "Starting file system checks:"
___
svn-src-all@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 commit: r290037 - stable/9/etc/rc.d

2015-10-26 Thread Eric van Gyzen
Author: vangyzen
Date: Tue Oct 27 03:02:48 2015
New Revision: 290037
URL: https://svnweb.freebsd.org/changeset/base/290037

Log:
  MFC r289186: Fix indentation in etc/rc.d/fsck.

Modified:
  stable/9/etc/rc.d/fsck
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/etc/rc.d/   (props changed)

Modified: stable/9/etc/rc.d/fsck
==
--- stable/9/etc/rc.d/fsck  Tue Oct 27 02:52:05 2015(r290036)
+++ stable/9/etc/rc.d/fsck  Tue Oct 27 03:02:48 2015(r290037)
@@ -20,7 +20,7 @@ fsck_start()
elif [ ! -r /etc/fstab ]; then
echo "Warning! No /etc/fstab: skipping disk checks."
elif [ "$autoboot" = yes ]; then
-   # During fsck ignore SIGQUIT
+   # During fsck ignore SIGQUIT
trap : 3
 
check_startmsgs && echo "Starting file system checks:"
___
svn-src-all@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 commit: r290038 - in head/sys/netgraph/bluetooth: hci include l2cap socket

2015-10-26 Thread Takanori Watanabe
Author: takawata
Date: Tue Oct 27 03:42:26 2015
New Revision: 290038
URL: https://svnweb.freebsd.org/changeset/base/290038

Log:
  Bluetooth LE Security Management channel support.
  Add a socket option to block until underlying HCI connection encrypted.
  
  Differential Revision:https://reviews.freebsd.org/D3981

Modified:
  head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
  head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
  head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h
  head/sys/netgraph/bluetooth/include/ng_btsocket.h
  head/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h
  head/sys/netgraph/bluetooth/include/ng_hci.h
  head/sys/netgraph/bluetooth/include/ng_l2cap.h
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
  head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c

Modified: head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
==
--- head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c   Tue Oct 27 03:02:48 
2015(r290037)
+++ head/sys/netgraph/bluetooth/hci/ng_hci_evnt.c   Tue Oct 27 03:42:26 
2015(r290038)
@@ -929,7 +929,7 @@ encryption_change(ng_hci_unit_p unit, st
 "%s: %s - invalid connection handle=%d\n",
__func__, NG_NODE_NAME(unit->node), h);
error = ENOENT;
-   } else if (con->link_type != NG_HCI_LINK_ACL) {
+   } else if (con->link_type == NG_HCI_LINK_SCO) {
NG_HCI_ALERT(
 "%s: %s - invalid link type=%d\n",
__func__, NG_NODE_NAME(unit->node), 
@@ -940,6 +940,7 @@ encryption_change(ng_hci_unit_p unit, st
con->encryption_mode = NG_HCI_ENCRYPTION_MODE_P2P;
else
con->encryption_mode = NG_HCI_ENCRYPTION_MODE_NONE;
+   ng_hci_lp_enc_change(con, ep->encryption_enable);
} else
NG_HCI_ERR(
 "%s: %s - failed to change encryption mode, status=%d\n",

Modified: head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
==
--- head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c   Tue Oct 27 03:02:48 
2015(r290037)
+++ head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c   Tue Oct 27 03:42:26 
2015(r290038)
@@ -814,6 +814,37 @@ ng_hci_lp_con_cfm(ng_hci_unit_con_p con,
return (0);
 } /* ng_hci_lp_con_cfm */
 
+int
+ng_hci_lp_enc_change(ng_hci_unit_con_p con, int status)
+{
+   ng_hci_unit_punit = con->unit;
+   struct ng_mesg  *msg = NULL;
+   ng_hci_lp_enc_change_ep *ep = NULL;
+   int  error;
+
+
+   if (con->link_type != NG_HCI_LINK_SCO) {
+   if (unit->acl != NULL && NG_HOOK_IS_VALID(unit->acl)) {
+   NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_LP_ENC_CHG, 
+   sizeof(*ep), M_NOWAIT);
+   if (msg != NULL) {
+   ep = (ng_hci_lp_enc_change_ep *) msg->data;
+   ep->status = status;
+   ep->link_type = con->link_type;
+   ep->con_handle = con->con_handle;
+
+   NG_SEND_MSG_HOOK(error, unit->node, msg,
+   unit->acl, 0);
+   }
+   } else
+   NG_HCI_INFO(
+"%s: %s - ACL hook not valid, hook=%p\n",
+   __func__, NG_NODE_NAME(unit->node), unit->acl);
+
+   }
+   return (0);
+} /* ng_hci_lp_con_cfm */
+
 /*
  * Send LP_ConnectInd event to the upper layer protocol
  */

Modified: head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h
==
--- head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h   Tue Oct 27 03:02:48 
2015(r290037)
+++ head/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h   Tue Oct 27 03:42:26 
2015(r290038)
@@ -47,6 +47,7 @@ int  ng_hci_lp_discon_ind   
 int  ng_hci_lp_qos_req   (ng_hci_unit_p, item_p, hook_p);
 int  ng_hci_lp_qos_cfm   (ng_hci_unit_con_p, int);
 int  ng_hci_lp_qos_ind   (ng_hci_unit_con_p);
+int  ng_hci_lp_enc_change(ng_hci_unit_con_p, int);
 
 void ng_hci_process_con_timeout  (node_p, hook_p, void *, int);
 

Modified: head/sys/netgraph/bluetooth/include/ng_btsocket.h
==
--- 

svn commit: r290035 - head/share/mk

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 27 02:04:21 2015
New Revision: 290035
URL: https://svnweb.freebsd.org/changeset/base/290035

Log:
  Spell CONFGROUPS properly.

Modified:
  head/share/mk/bsd.confs.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Tue Oct 27 01:29:38 2015(r290034)
+++ head/share/mk/bsd.confs.mk  Tue Oct 27 02:04:21 2015(r290035)
@@ -7,7 +7,7 @@
 CONFGROUPS?=   CONFS
 
 .if !target(buildconfig)
-.for group in ${CONFSGROUPS}
+.for group in ${CONFGROUPS}
 buildconfig: ${${group}}
 .endfor
 .endif
___
svn-src-all@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 commit: r290034 - head/share/mk

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 27 01:29:38 2015
New Revision: 290034
URL: https://svnweb.freebsd.org/changeset/base/290034

Log:
  META MODE: Fix after addition of bsd.confs.mk: Stage in "files" set.
  
  The "files" staging name is not the same as "bsd.files.mk" but seems to just 
be
  a group of extra files that are not the essential includes or libraries, which
  include .
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.confs.mk

Modified: head/share/mk/bsd.confs.mk
==
--- head/share/mk/bsd.confs.mk  Tue Oct 27 01:28:11 2015(r290033)
+++ head/share/mk/bsd.confs.mk  Tue Oct 27 01:29:38 2015(r290034)
@@ -44,7 +44,6 @@ STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:
 # XXX {group}OWN,GRP,MODE
 STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}}
 stage_as.${cnf:T}: ${cnf}
-stage_config: stage_as.${cnf:T}
 
 installconfig: _${group}INS_${cnf:T}
 _${group}INS_${cnf:T}: ${cnf}
@@ -58,7 +57,6 @@ _${group}CONFS+= ${cnf}
 .endfor
 .if !empty(_${group}CONFS)
 stage_files.${group}: ${_${group}CONFS}
-stage_config: stage_files.${group}
 
 installconfig: _${group}INS
 _${group}INS: ${_${group}CONFS}
@@ -76,8 +74,12 @@ _${group}INS: ${_${group}CONFS}
 
 .endif # !target(installconfig)
 
-.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD)
-.if !defined(NO_STAGE_CONFIG)
-STAGE_TARGETS+= stage_config
+.if ${MK_STAGING} != "no"
+.if !empty(STAGE_SETS)
+buildconfig: stage_files
+.if !empty(STAGE_AS_SETS)
+buildconfig: stage_as
 .endif
 .endif
+.endif
+
___
svn-src-all@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 commit: r290039 - head/share/misc

2015-10-26 Thread Kurt Lidl
Author: lidl
Date: Tue Oct 27 03:48:42 2015
New Revision: 290039
URL: https://svnweb.freebsd.org/changeset/base/290039

Log:
  Add myself and my mentors to the committers-src.dot file.
  
  Approved by:  rpaulo (mentor)
  Differential Revision:https://reviews.freebsd.org/D4006

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Tue Oct 27 03:42:26 2015
(r290038)
+++ head/share/misc/committers-src.dot  Tue Oct 27 03:48:42 2015
(r290039)
@@ -217,6 +217,7 @@ kib [label="Konstantin Belousov\nkib@Fre
 kmacy [label="Kip Macy\nkm...@freebsd.org\n2005/06/01"]
 kp [label="Kristof Provost\n...@freebsd.org\n2015/03/22"]
 le [label="Lukas Ertl\n...@freebsd.org\n2004/02/02"]
+lidl [label="Kurt Lidl\nl...@freebsd.org\n2015/10/21"]
 loos [label="Luiz Otavio O Souza\nl...@freebsd.org\n2013/07/03"]
 lstewart [label="Lawrence Stewart\nlstew...@freebsd.org\n2008/10/06"]
 marcel [label="Marcel Moolenaar\nmar...@freebsd.org\n1999/07/03"]
@@ -334,6 +335,7 @@ day1 -> alm
 day1 -> dg
 
 adrian -> avos
+adrian -> lidl
 adrian -> loos
 adrian -> monthadar
 adrian -> ray
@@ -660,6 +662,7 @@ rpaulo -> avg
 rpaulo -> bschmidt
 rpaulo -> dim
 rpaulo -> jmmv
+rpaulo -> lidl
 rpaulo -> ngie
 
 rrs -> brucec
___
svn-src-all@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"


Re: svn commit: r289863 - head/lib/libc/stdio

2015-10-26 Thread John Baldwin
On Tuesday, October 27, 2015 02:55:43 AM Andrey Chernov wrote:
> On 26.10.2015 20:27, John Baldwin wrote:
> > On Saturday, October 24, 2015 02:23:15 AM Andrey A. Chernov wrote:
> >> Author: ache
> >> Date: Sat Oct 24 02:23:15 2015
> >> New Revision: 289863
> >> URL: https://svnweb.freebsd.org/changeset/base/289863
> >>
> >> Log:
> >>   Since no room left in the _flags, reuse __SALC for O_APPEND.
> >>   It helps to remove _fcntl() call from _ftello() and optimize seek 
> >> position
> >>   calculation in _swrite().
> > 
> > You could just add a _flags2 to FILE if that would be cleaner.  It should 
> > even
> > be MFC'able without being an ABI change since stdio always allocates FILE
> > objects internally and we only export pointers to them.  Programs do not
> > allocate them statically.
> > 
> 
> Thanx, I understand it from your bugzilla answer, but I have a doubt.
> What if some 3rd party port will use static FILE f; and then ? Some of
> ports may deal with FILE internals and I don't know which ones. I prefer
> rather to not break something there and currently I need only one flag
> and __SALC is not conflicting since used only with _file = -1 and
> __SSTR. If you or somebody else will need another flag and be brave
> enough to add _flags2, this patch can be easily converted.

A static FILE f has never worked.  Even in libc we have a special macro
to initialize internal static FILE objects.  Not too long ago (6.x?) we
used to have a separate xFILE structure in a parallel array of extended
fields.  The only reason was that stdout/err/in resolved to offsets in a
global array.  Peter fixed those to indirect individual pointers, so we
merged xFILE back into FILE.  We've basically broken any software using
static FILE f multiple times.  It is true that some ports may abuse
FILE internals, but they mostly do it via the macros in stdio.h, not
directly.

-- 
John Baldwin
___
svn-src-all@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 commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Roger Pau Monné
Author: royger
Date: Mon Oct 26 14:50:35 2015
New Revision: 290005
URL: https://svnweb.freebsd.org/changeset/base/290005

Log:
  x86/dma_bounce: revert r289834 and r289836
  
  The new load_ma implementation can cause dereferences when used with
  certain drivers, back it out until the reason is found:
  
  Fatal trap 12: page fault while in kernel mode
  cpuid = 11; apic id = 03
  fault virtual address   = 0x30
  fault code  = supervisor read data, page not present
  instruction pointer = 0x20:0x808a2d22
  stack pointer   = 0x28:0xfe07cc737710
  frame pointer   = 0x28:0xfe07cc737790
  code segment= base 0x0, limit 0xf, type 0x1b
  = DPL 0, pres 1, long 1, def32 0, gran 1
  processor eflags= interrupt enabled, resume, IOPL = 0
  current process = 13 (g_down)
  trap number = 12
  panic: page fault
  cpuid = 11
  KDB: stack backtrace:
  #0 0x80641647 at kdb_backtrace+0x67
  #1 0x80606762 at vpanic+0x182
  #2 0x806067e3 at panic+0x43
  #3 0x8084eef1 at trap_fatal+0x351
  #4 0x8084f0e4 at trap_pfault+0x1e4
  #5 0x8084e82f at trap+0x4bf
  #6 0x80830d57 at calltrap+0x8
  #7 0x8063beab at _bus_dmamap_load_ccb+0x1fb
  #8 0x8063bc51 at bus_dmamap_load_ccb+0x91
  #9 0x8042dcad at ata_dmaload+0x11d
  #10 0x8042df7e at ata_begin_transaction+0x7e
  #11 0x8042c18e at ataaction+0x9ce
  #12 0x802a220f at xpt_run_devq+0x5bf
  #13 0x802a17ad at xpt_action_default+0x94d
  #14 0x802c0024 at adastart+0x8b4
  #15 0x802a2e93 at xpt_run_allocq+0x193
  #16 0x802c0735 at adastrategy+0xf5
  #17 0x80554206 at g_disk_start+0x426
  Uptime: 2m29s

Modified:
Directory Properties:
  vendor/   (props changed)

Changes in other areas also in this revision:
Modified:
  head/sys/dev/xen/blkfront/blkfront.c
  head/sys/x86/x86/busdma_bounce.c
Directory Properties:
  svnadmin/tools/checkacl/Makefile   (props changed)
  svnadmin/tools/checkacl/checkacl.c   (props changed)
___
svn-src-all@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"


Re: svn commit: r289834 - head/sys/x86/x86

2015-10-26 Thread Oliver Pinter
On 10/26/15, Adrian Chadd  wrote:
> Hi,
>
> I'll take a photo of it when it breaks next.
>
> Would you mind reverting it for now until we can figure it out?

btw, this was the two kernel panic what I got:

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 03
fault virtual address   = 0x30
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x808a2d22
stack pointer   = 0x28:0xfe07cc75a6f0
frame pointer   = 0x28:0xfe07cc75a770
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 5 (doneq0)
trap number = 12
panic: page fault
cpuid = 11
KDB: stack backtrace:
#0 0x80641647 at kdb_backtrace+0x67
#1 0x80606762 at vpanic+0x182
#2 0x806067e3 at panic+0x43
#3 0x8084eef1 at trap_fatal+0x351
#4 0x8084f0e4 at trap_pfault+0x1e4
#5 0x8084e82f at trap+0x4bf
#6 0x80830d57 at calltrap+0x8
#7 0x8063beab at _bus_dmamap_load_ccb+0x1fb
#8 0x8063bc51 at bus_dmamap_load_ccb+0x91
#9 0x8042dcad at ata_dmaload+0x11d
#10 0x8042df7e at ata_begin_transaction+0x7e
#11 0x8042c18e at ataaction+0x9ce
#12 0x802a220f at xpt_run_devq+0x5bf
#13 0x802a17ad at xpt_action_default+0x94d
#14 0x802c0024 at adastart+0x8b4
#15 0x802a2e93 at xpt_run_allocq+0x193
#16 0x802c0ea0 at adadone+0x280
#17 0x802a5310 at xpt_done_process+0x3a0
Uptime: 1m40s

Fatal trap 12: page fault while in kernel mode
cpuid = 11; apic id = 03
fault virtual address   = 0x30
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x808a2d22
stack pointer   = 0x28:0xfe07cc737710
frame pointer   = 0x28:0xfe07cc737790
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 13 (g_down)
trap number = 12
panic: page fault
cpuid = 11
KDB: stack backtrace:
#0 0x80641647 at kdb_backtrace+0x67
#1 0x80606762 at vpanic+0x182
#2 0x806067e3 at panic+0x43
#3 0x8084eef1 at trap_fatal+0x351
#4 0x8084f0e4 at trap_pfault+0x1e4
#5 0x8084e82f at trap+0x4bf
#6 0x80830d57 at calltrap+0x8
#7 0x8063beab at _bus_dmamap_load_ccb+0x1fb
#8 0x8063bc51 at bus_dmamap_load_ccb+0x91
#9 0x8042dcad at ata_dmaload+0x11d
#10 0x8042df7e at ata_begin_transaction+0x7e
#11 0x8042c18e at ataaction+0x9ce
#12 0x802a220f at xpt_run_devq+0x5bf
#13 0x802a17ad at xpt_action_default+0x94d
#14 0x802c0024 at adastart+0x8b4
#15 0x802a2e93 at xpt_run_allocq+0x193
#16 0x802c0735 at adastrategy+0xf5
#17 0x80554206 at g_disk_start+0x426
Uptime: 2m29s


Extra info, it's a Dell R410, with 2x1TB disc in mirrored raidz + plus
a gmirrored partition.

>
>
>
> -adrian
>
>
> On 26 October 2015 at 05:53, Oliver Pinter
>  wrote:
>> Hi Roger!
>>
>> On 10/26/15, Roger Pau Monné  wrote:
>>> El 26/10/15 a les 13.24, Adrian Chadd ha escrit:
 Hi,

 I've started seeing panics on -head with ATA code doing a dmamap load
 -> panic. I'll test by reverting this patch and see what happens, but
 when it /does/ happen I can't get a crashdump, so debugging will be
 less easy.

 Has anyone else seen this?
>>>
>>> I've got another report regarding ATA page-faults from Oliver Pinter.
>>> The crash he was seeing was caused by bus_dmamap_load_ccb, but the calls
>>> to the specific dma functions where optimized away. Can you figure out
>>> which bounce_* function causes this specifically?
>>
>> I have already deleted the broken kernel, and I'm now running on
>> kernel without this patch.
>>
>>>
>>> Thanks, Roger.
>>>
>>> ___
>>> svn-src-h...@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-src-all@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"

Re: svn commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Andriy Gapon
On 26/10/2015 16:50, Roger Pau Monné wrote:
> Changes in other areas also in this revision:
> Modified:
> Directory Properties:
>   svnadmin/tools/checkacl/Makefile   (props changed)
>   svnadmin/tools/checkacl/checkacl.c   (props changed)
>   vendor/   (props changed)

Seems like those shouldn't have been committed...

-- 
Andriy Gapon
___
svn-src-all@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 commit: r290006 - head/etc

2015-10-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Oct 26 15:14:16 2015
New Revision: 290006
URL: https://svnweb.freebsd.org/changeset/base/290006

Log:
  Loading rc.subr and rc.conf has no effect since all we do is run other
  scripts which load them again.
  
  MFC after:3 weeks

Modified:
  head/etc/netstart

Modified: head/etc/netstart
==
--- head/etc/netstart   Mon Oct 26 14:50:35 2015(r290005)
+++ head/etc/netstart   Mon Oct 26 15:14:16 2015(r290006)
@@ -34,9 +34,6 @@
 # the network by hand, this script will do it for you).
 #
 
-. /etc/rc.subr
-
-load_rc_config 'XXX'
 _start=quietstart
 
 /etc/rc.d/devd ${_start}
___
svn-src-all@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 commit: r290004 - head/sys/cam/ctl

2015-10-26 Thread Alexander Motin
Author: mav
Date: Mon Oct 26 14:14:56 2015
New Revision: 290004
URL: https://svnweb.freebsd.org/changeset/base/290004

Log:
  Don't try to replicate mode pages not present on this device.
  
  MFC after:3 days

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Mon Oct 26 13:28:34 2015(r290003)
+++ head/sys/cam/ctl/ctl.c  Mon Oct 26 14:14:56 2015(r290004)
@@ -927,6 +927,11 @@ ctl_isc_announce_mode(struct ctl_lun *lu
}
if (i == CTL_NUM_MODE_PAGES)
return;
+
+   /* Don't try to replicate pages not present on this device. */
+   if (lun->mode_pages.index[i].page_data == NULL)
+   return;
+
bzero(, sizeof(msg.mode));
msg.hdr.msg_type = CTL_MSG_MODE_SYNC;
msg.hdr.nexus.targ_port = initidx / CTL_MAX_INIT_PER_PORT;
___
svn-src-all@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"


Re: svn commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Roger Pau Monné
El 26/10/15 a les 16.02, Andriy Gapon ha escrit:
> On 26/10/2015 16:50, Roger Pau Monné wrote:
>> Changes in other areas also in this revision:
>> Modified:
>> Directory Properties:
>>   svnadmin/tools/checkacl/Makefile   (props changed)
>>   svnadmin/tools/checkacl/checkacl.c   (props changed)
>>   vendor/   (props changed)
> 
> Seems like those shouldn't have been committed...

Yes, something went wrong while doing the revert. For the record, I did
the following inside of the head/ folder:

$ svn merge -c -289834,-289836 .
$ svn diff
$ svn ci

I did a pre-commit diff, but props changes are not shown there.

Roger.


___
svn-src-all@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 commit: r290007 - head/etc

2015-10-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Oct 26 15:14:55 2015
New Revision: 290007
URL: https://svnweb.freebsd.org/changeset/base/290007

Log:
  Correctly document the change made in r275359.

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrMon Oct 26 15:14:16 2015(r290006)
+++ head/etc/rc.subrMon Oct 26 15:14:55 2015(r290007)
@@ -1316,8 +1316,10 @@ run_rc_script()
 }
 
 #
-# load_rc_config name
-#  Source in the configuration file for a given name.
+# load_rc_config [service]
+#  Source in the configuration file(s) for a given service.
+#  If no service is specified, only the global configuration
+#  file(s) will be loaded.
 #
 load_rc_config()
 {
___
svn-src-all@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 commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Roger Pau Monné
Author: royger
Date: Mon Oct 26 14:50:35 2015
New Revision: 290005
URL: https://svnweb.freebsd.org/changeset/base/290005

Log:
  x86/dma_bounce: revert r289834 and r289836
  
  The new load_ma implementation can cause dereferences when used with
  certain drivers, back it out until the reason is found:
  
  Fatal trap 12: page fault while in kernel mode
  cpuid = 11; apic id = 03
  fault virtual address   = 0x30
  fault code  = supervisor read data, page not present
  instruction pointer = 0x20:0x808a2d22
  stack pointer   = 0x28:0xfe07cc737710
  frame pointer   = 0x28:0xfe07cc737790
  code segment= base 0x0, limit 0xf, type 0x1b
  = DPL 0, pres 1, long 1, def32 0, gran 1
  processor eflags= interrupt enabled, resume, IOPL = 0
  current process = 13 (g_down)
  trap number = 12
  panic: page fault
  cpuid = 11
  KDB: stack backtrace:
  #0 0x80641647 at kdb_backtrace+0x67
  #1 0x80606762 at vpanic+0x182
  #2 0x806067e3 at panic+0x43
  #3 0x8084eef1 at trap_fatal+0x351
  #4 0x8084f0e4 at trap_pfault+0x1e4
  #5 0x8084e82f at trap+0x4bf
  #6 0x80830d57 at calltrap+0x8
  #7 0x8063beab at _bus_dmamap_load_ccb+0x1fb
  #8 0x8063bc51 at bus_dmamap_load_ccb+0x91
  #9 0x8042dcad at ata_dmaload+0x11d
  #10 0x8042df7e at ata_begin_transaction+0x7e
  #11 0x8042c18e at ataaction+0x9ce
  #12 0x802a220f at xpt_run_devq+0x5bf
  #13 0x802a17ad at xpt_action_default+0x94d
  #14 0x802c0024 at adastart+0x8b4
  #15 0x802a2e93 at xpt_run_allocq+0x193
  #16 0x802c0735 at adastrategy+0xf5
  #17 0x80554206 at g_disk_start+0x426
  Uptime: 2m29s

Modified:
Directory Properties:
  svnadmin/tools/checkacl/Makefile   (props changed)
  svnadmin/tools/checkacl/checkacl.c   (props changed)

Changes in other areas also in this revision:
Modified:
  head/sys/dev/xen/blkfront/blkfront.c
  head/sys/x86/x86/busdma_bounce.c
Directory Properties:
  vendor/   (props changed)
___
svn-src-all@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 commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Roger Pau Monné
Author: royger
Date: Mon Oct 26 14:50:35 2015
New Revision: 290005
URL: https://svnweb.freebsd.org/changeset/base/290005

Log:
  x86/dma_bounce: revert r289834 and r289836
  
  The new load_ma implementation can cause dereferences when used with
  certain drivers, back it out until the reason is found:
  
  Fatal trap 12: page fault while in kernel mode
  cpuid = 11; apic id = 03
  fault virtual address   = 0x30
  fault code  = supervisor read data, page not present
  instruction pointer = 0x20:0x808a2d22
  stack pointer   = 0x28:0xfe07cc737710
  frame pointer   = 0x28:0xfe07cc737790
  code segment= base 0x0, limit 0xf, type 0x1b
  = DPL 0, pres 1, long 1, def32 0, gran 1
  processor eflags= interrupt enabled, resume, IOPL = 0
  current process = 13 (g_down)
  trap number = 12
  panic: page fault
  cpuid = 11
  KDB: stack backtrace:
  #0 0x80641647 at kdb_backtrace+0x67
  #1 0x80606762 at vpanic+0x182
  #2 0x806067e3 at panic+0x43
  #3 0x8084eef1 at trap_fatal+0x351
  #4 0x8084f0e4 at trap_pfault+0x1e4
  #5 0x8084e82f at trap+0x4bf
  #6 0x80830d57 at calltrap+0x8
  #7 0x8063beab at _bus_dmamap_load_ccb+0x1fb
  #8 0x8063bc51 at bus_dmamap_load_ccb+0x91
  #9 0x8042dcad at ata_dmaload+0x11d
  #10 0x8042df7e at ata_begin_transaction+0x7e
  #11 0x8042c18e at ataaction+0x9ce
  #12 0x802a220f at xpt_run_devq+0x5bf
  #13 0x802a17ad at xpt_action_default+0x94d
  #14 0x802c0024 at adastart+0x8b4
  #15 0x802a2e93 at xpt_run_allocq+0x193
  #16 0x802c0735 at adastrategy+0xf5
  #17 0x80554206 at g_disk_start+0x426
  Uptime: 2m29s

Modified:
  head/sys/dev/xen/blkfront/blkfront.c
  head/sys/x86/x86/busdma_bounce.c

Changes in other areas also in this revision:
Modified:
Directory Properties:
  svnadmin/tools/checkacl/Makefile   (props changed)
  svnadmin/tools/checkacl/checkacl.c   (props changed)
  vendor/   (props changed)

Modified: head/sys/dev/xen/blkfront/blkfront.c
==
--- head/sys/dev/xen/blkfront/blkfront.cMon Oct 26 14:14:56 2015
(r290004)
+++ head/sys/dev/xen/blkfront/blkfront.cMon Oct 26 14:50:35 2015
(r290005)
@@ -293,12 +293,8 @@ xbd_queue_request(struct xbd_softc *sc, 
 {
int error;
 
-   if (cm->cm_bp != NULL)
-   error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_bp, xbd_queue_cb, cm, 0);
-   else
-   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0);
+   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data,
+   cm->cm_datalen, xbd_queue_cb, cm, 0);
if (error == EINPROGRESS) {
/*
 * Maintain queuing order by freezing the queue.  The next
@@ -358,6 +354,8 @@ xbd_bio_command(struct xbd_softc *sc)
}
 
cm->cm_bp = bp;
+   cm->cm_data = bp->bio_data;
+   cm->cm_datalen = bp->bio_bcount;
cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno;
 
switch (bp->bio_cmd) {
@@ -1011,7 +1009,7 @@ xbd_instance_create(struct xbd_softc *sc
 
sc->xbd_disk->d_mediasize = sectors * sector_size;
sc->xbd_disk->d_maxsize = sc->xbd_max_request_size;
-   sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO;
+   sc->xbd_disk->d_flags = 0;
if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) {
sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
device_printf(sc->xbd_dev,

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cMon Oct 26 14:14:56 2015
(r290004)
+++ head/sys/x86/x86/busdma_bounce.cMon Oct 26 14:50:35 2015
(r290005)
@@ -79,8 +79,8 @@ struct bounce_page {
vm_offset_t vaddr;  /* kva of bounce buffer */
bus_addr_t  busaddr;/* Physical address */
vm_offset_t datavaddr;  /* kva of client data */
+   vm_page_t   datapage;   /* physical page of client data */
vm_offset_t dataoffs;   /* page offset of client data */
-   vm_page_t   datapage[2];/* physical page(s) of client data */
bus_size_t  datacount;  /* client data count */
STAILQ_ENTRY(bounce_page) links;
 };
@@ -135,8 +135,8 @@ static int alloc_bounce_pages(bus_dma_ta
 static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
int commit);
 static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map,
- vm_offset_t vaddr, bus_addr_t addr1,
- bus_addr_t 

Re: svn commit: r289834 - head/sys/x86/x86

2015-10-26 Thread Roger Pau Monné
El 26/10/15 a les 13.24, Adrian Chadd ha escrit:
> Hi,
> 
> I've started seeing panics on -head with ATA code doing a dmamap load
> -> panic. I'll test by reverting this patch and see what happens, but
> when it /does/ happen I can't get a crashdump, so debugging will be
> less easy.
> 
> Has anyone else seen this?

I've got another report regarding ATA page-faults from Oliver Pinter.
The crash he was seeing was caused by bus_dmamap_load_ccb, but the calls
to the specific dma functions where optimized away. Can you figure out
which bounce_* function causes this specifically?

Thanks, Roger.

___
svn-src-all@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 commit: r290003 - head/sys/ofed/include/linux

2015-10-26 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Oct 26 13:28:34 2015
New Revision: 290003
URL: https://svnweb.freebsd.org/changeset/base/290003

Log:
  Add support for binding IRQs to CPUs in the LinuxKPI. The new function
  added is for BSD only and does not exist in Linux.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/interrupt.h

Modified: head/sys/ofed/include/linux/interrupt.h
==
--- head/sys/ofed/include/linux/interrupt.h Mon Oct 26 12:16:50 2015
(r290002)
+++ head/sys/ofed/include/linux/interrupt.h Mon Oct 26 13:28:34 2015
(r290003)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -118,6 +118,23 @@ request_irq(unsigned int irq, irq_handle
return 0;
 }
 
+static inline int
+bind_irq_to_cpu(unsigned int irq, int cpu_id)
+{
+   struct irq_ent *irqe;
+   struct device *dev;
+
+   dev = _pci_find_irq_dev(irq);
+   if (dev == NULL)
+   return (-ENOENT);
+
+   irqe = _irq_ent(dev, irq);
+   if (irqe == NULL)
+   return (-ENOENT);
+
+   return (-bus_bind_intr(dev->bsddev, irqe->res, cpu_id));
+}
+
 static inline void
 free_irq(unsigned int irq, void *device)
 {
___
svn-src-all@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 commit: r290002 - svnadmin/conf

2015-10-26 Thread Gleb Smirnoff
Author: glebius
Date: Mon Oct 26 12:16:50 2015
New Revision: 290002
URL: https://svnweb.freebsd.org/changeset/base/290002

Log:
  Done with NTP.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confMon Oct 26 11:42:25 2015
(r290001)
+++ svnadmin/conf/sizelimit.confMon Oct 26 12:16:50 2015
(r290002)
@@ -45,4 +45,3 @@ sam
 stas
 thompsa
 rpaulo
-glebius
___
svn-src-all@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"


Re: svn commit: r289834 - head/sys/x86/x86

2015-10-26 Thread Oliver Pinter
Hi Roger!

On 10/26/15, Roger Pau Monné  wrote:
> El 26/10/15 a les 13.24, Adrian Chadd ha escrit:
>> Hi,
>>
>> I've started seeing panics on -head with ATA code doing a dmamap load
>> -> panic. I'll test by reverting this patch and see what happens, but
>> when it /does/ happen I can't get a crashdump, so debugging will be
>> less easy.
>>
>> Has anyone else seen this?
>
> I've got another report regarding ATA page-faults from Oliver Pinter.
> The crash he was seeing was caused by bus_dmamap_load_ccb, but the calls
> to the specific dma functions where optimized away. Can you figure out
> which bounce_* function causes this specifically?

I have already deleted the broken kernel, and I'm now running on
kernel without this patch.

>
> Thanks, Roger.
>
> ___
> svn-src-h...@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-src-all@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"

Re: svn commit: r289834 - head/sys/x86/x86

2015-10-26 Thread Adrian Chadd
Hi,

I've started seeing panics on -head with ATA code doing a dmamap load
-> panic. I'll test by reverting this patch and see what happens, but
when it /does/ happen I can't get a crashdump, so debugging will be
less easy.

Has anyone else seen this?


-a


On 23 October 2015 at 08:46, Roger Pau Monné  wrote:
> El 23/10/15 a les 17.39, Roger Pau Monné ha escrit:
>> Author: royger
>> Date: Fri Oct 23 15:39:59 2015
>> New Revision: 289834
>> URL: https://svnweb.freebsd.org/changeset/base/289834
>>
>> Log:
>>   x86/dma_bounce: rework _bus_dmamap_load_ma implementation
>>
>>   The implementation of bus_dmamap_load_ma_triv currently calls
>>   _bus_dmamap_load_phys on each page that is part of the passed in buffer.
>>   Since each page is treated as an individual buffer, the resulting behaviour
>>   is different from the behaviour of _bus_dmamap_load_buffer. This breaks
>>   certain drivers, like Xen blkfront.
>>
>>   If an unmapped buffer of size 4096 that starts at offset 13 into the first
>>   page is passed to the current _bus_dmamap_load_ma implementation (so the ma
>>   array contains two pages), the result is that two segments are created, one
>>   with a size of 4083 and the other with size 13 (because two independant
>>   calls to _bus_dmamap_load_phys are performed, one for each physical page).
>>   If the same is done with a mapped buffer and calling 
>> _bus_dmamap_load_buffer
>>   the result is that only one segment is created, with a size of 4096.
>>
>>   This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce
>>   buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements
>>   _bus_dmamap_load_ma so that it's behaviour is the same as the mapped 
>> version
>>   (_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer
>>   code, other arches are left untouched.
>>
>>   Reviewed by:kib, jah
>>   Differential Revision:  https://reviews.freebsd.org/D888
>>   Sponsored by:   Citrix Systems R
>
> Forgot to add:
>
> MFC after:  2 weeks
>
> Roger.
>
___
svn-src-all@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"

Re: svn commit: r289834 - head/sys/x86/x86

2015-10-26 Thread Adrian Chadd
Hi,

I'll take a photo of it when it breaks next.

Would you mind reverting it for now until we can figure it out?



-adrian


On 26 October 2015 at 05:53, Oliver Pinter
 wrote:
> Hi Roger!
>
> On 10/26/15, Roger Pau Monné  wrote:
>> El 26/10/15 a les 13.24, Adrian Chadd ha escrit:
>>> Hi,
>>>
>>> I've started seeing panics on -head with ATA code doing a dmamap load
>>> -> panic. I'll test by reverting this patch and see what happens, but
>>> when it /does/ happen I can't get a crashdump, so debugging will be
>>> less easy.
>>>
>>> Has anyone else seen this?
>>
>> I've got another report regarding ATA page-faults from Oliver Pinter.
>> The crash he was seeing was caused by bus_dmamap_load_ccb, but the calls
>> to the specific dma functions where optimized away. Can you figure out
>> which bounce_* function causes this specifically?
>
> I have already deleted the broken kernel, and I'm now running on
> kernel without this patch.
>
>>
>> Thanks, Roger.
>>
>> ___
>> svn-src-h...@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-src-all@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 commit: r290010 - vendor/ntp

2015-10-26 Thread Gleb Smirnoff
Author: glebius
Date: Mon Oct 26 15:38:58 2015
New Revision: 290010
URL: https://svnweb.freebsd.org/changeset/base/290010

Log:
  Document NTP import procedure, using experience from the last one.
  
  Sponsored by: Nginx, Inc.

Deleted:
  vendor/ntp/FREEBSD-Xlist
Modified:
  vendor/ntp/FREEBSD-upgrade

Modified: vendor/ntp/FREEBSD-upgrade
==
--- vendor/ntp/FREEBSD-upgrade  Mon Oct 26 15:20:45 2015(r290009)
+++ vendor/ntp/FREEBSD-upgrade  Mon Oct 26 15:38:58 2015(r290010)
@@ -1,55 +1,128 @@
-# ex:ts=8
-#
 # $FreeBSD$
 
-NTP 4.2.8
-originals can be found on http://www.ntp.org/downloads.html
+Last import was NTP 4.2.8p4. Below are steps taken for the import,
+to ease the next one. And don't forget to update this file afterwards.
 
 Import
 --
 
-For the import of NTP the following files were removed:
+# tar xzf ntp-4.2.8p4.tar.gz
+# mv ntp-4.2.8p4 4.2.8p4
 
-ports/* NT files
-html/pic/*  GIF files
-html/build/hints/solaris.xtra.4095849 Trigger merge conflict script
+Edit your ~/.subversion/config to avoid adding fbsd:* properties to
+vendor files. The golden rules for properties are:
+- All text files should have svn:eol-style set to native.
+- All binary files should have svn:mime-type set to application/octet-stream,
+  unless there is a more appropriate media type.
+- There should be no other properties on any file.
 
-The stripped down version was created using FREEBSD-Xlist during
-extraction:
+Note that some files (documentation in Japanese) conflict with FreeBSD
+repo commit hooks, and for now there is no better choice than give them
+application/octet-stream mime-type.
 
-tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz
-mv ntp-4.2.8 4.2.8
+# svn add 4.2.8p4
+# svn commit
 
-Imported by:
-See procedure on
-https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html
+Now we got vanilla 4.2.8p4 in the tree, and we need to update dist.
+
+# cd 4.2.8p4/
+# rsync --archive --delete . ../dist/
+# cd ../dist/
+# svn rm $(svn stat | awk '$1 == "!" { print $2 }')
+# svn add --no-auto-props $(svn stat | awk '$1 == "?" { print $2 }')
+
+The dist is prepared for commit. Check that there is no difference
+to vanilla version and commit:
+
+# diff -ru ../4.2.8p4 .
+# svn commit
+
+Upgrade
+---
+
+Record the revision from the last commit. We are going to merge
+it to head/.
+
+# cd ${head}/contrib/ntp
+# svn merge -c rXX svn+ssh://repo.freebsd.org/base/vendor/ntp/dist
+
+Here is our exclusion list for NTP:
+
+# svn rm ports
+# svn rm ntpd/ntp_parser.y
+
+The ports dir is just not needed. The ntp_parser.y is harmful. Our build
+system will regenerate ntp_parser.c from it, which will produce bad ntpd.
+We should consider not importing the tests dir with next NTP upgrade, it
+is getting quite huge.
+
+Now it is time to compare vendor/ntp/dist and head/contrib/ntp with
+help of diff -ru. This is list of differencies, that should be there:
+
+r276071
+ ntpd/ntp_crypto.c
+
+r243933
+ libntp/Makefile.in
+ ntp/libparse/Makefile.in
+ ntpd/Makefile.in 
+
+Only in vendor/ntp: ports
+Only in vendor/ntp: ntpd/ntp_parse.y
+
+If new import brings in new legitimate differencies, document them
+right here. Don't commit contrib/ntp yet.
 
 Updating usr.sbin/ntp
 -
 
+The config.h wasn't regenerated for a long time. It could be a good
+idea to do it with next upgrade. According to older documentation,
+last time it was regenerated with this command line:
+
 ./configure --disable-all-clocks --enable-NMEA --enable-ONCORE
 --enable-RAWDCF --with-crypto --disable-debugging
 --enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr
 
-config.h was generated by running configure and excluding almost all clock
-drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE
-and local clocks).
-
+Quoting roberto@: "config.h was generated by running configure and
+excluding almost all clock drivers (what is included is DCF77 -- what
+I use --, NMEA, Motorola OnCORE and local clocks).
 The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we
 need to set no parity on the serial port (needed for DCF77). All clock
 drivers are then disabled (some of them are included by default by ntpd).
 
 Note that there are two #ifdef to support other architectures (WRT to long
 size and endianness). They'll need to be redone for each upgrade to the
-vendor branch to keep config.h in sync.
-
-ntpd/ntp_control.c is now the only file that is different from the vendor
-branch for unsigned char/int fixes and removal of a DoS.
+vendor branch to keep config.h in sync."
 
-Documentation in /usr/share/doc/ntp is generated from the HTML files with
-lynx (without the GIF files of course).
+Updating usr.sbin/ntp/doc
+-
+Paste this script into your shell. This will update manual pages.
+

Re: svn commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Gleb Smirnoff
On Mon, Oct 26, 2015 at 04:09:25PM +0100, Roger Pau Monné wrote:
R> El 26/10/15 a les 16.02, Andriy Gapon ha escrit:
R> > On 26/10/2015 16:50, Roger Pau Monné wrote:
R> >> Changes in other areas also in this revision:
R> >> Modified:
R> >> Directory Properties:
R> >>   svnadmin/tools/checkacl/Makefile   (props changed)
R> >>   svnadmin/tools/checkacl/checkacl.c   (props changed)
R> >>   vendor/   (props changed)
R> > 
R> > Seems like those shouldn't have been committed...
R> 
R> Yes, something went wrong while doing the revert. For the record, I did
R> the following inside of the head/ folder:
R> 
R> $ svn merge -c -289834,-289836 .
R> $ svn diff
R> $ svn ci
R> 
R> I did a pre-commit diff, but props changes are not shown there.

Merging is quite a weird way of reverting. IMO should be:

svn diff -c 289836 | svn patch --reverse-diff
svn diff -c 289834 | svn patch --reverse-diff

-- 
Totus tuus, Glebius.
___
svn-src-all@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"


Re: svn commit: r290005 - head/sys/dev/xen/blkfront head/sys/x86/x86 svnadmin/tools/checkacl

2015-10-26 Thread Eitan Adler
On 26 October 2015 at 08:55, Gleb Smirnoff  wrote:
> On Mon, Oct 26, 2015 at 04:09:25PM +0100, Roger Pau Monné wrote:
> R> El 26/10/15 a les 16.02, Andriy Gapon ha escrit:
> R> > On 26/10/2015 16:50, Roger Pau Monné wrote:
> R> >> Changes in other areas also in this revision:
> R> >> Modified:
> R> >> Directory Properties:
> R> >>   svnadmin/tools/checkacl/Makefile   (props changed)
> R> >>   svnadmin/tools/checkacl/checkacl.c   (props changed)
> R> >>   vendor/   (props changed)
> R> >
> R> > Seems like those shouldn't have been committed...
> R>
> R> Yes, something went wrong while doing the revert. For the record, I did
> R> the following inside of the head/ folder:
> R>
> R> $ svn merge -c -289834,-289836 .
> R> $ svn diff
> R> $ svn ci
> R>
> R> I did a pre-commit diff, but props changes are not shown there.
>
> Merging is quite a weird way of reverting. IMO should be:

Merging with a negative diff is the correct way of reverting. Using
'svn patch' loses information.



-- 
Eitan Adler
___
svn-src-all@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"

Re: svn commit: r282145 - head/etc/rc.d

2015-10-26 Thread Gleb Smirnoff
  Garrett,

On Sat, Oct 24, 2015 at 09:51:01PM -0700, NGie Cooper wrote:
N> > Author: glebius
N> > Date: Tue Apr 28 13:13:23 2015
N> > New Revision: 282145
N> > URL: https://svnweb.freebsd.org/changeset/base/282145
N> > 
N> > Log:
N> >  Require "ldconfig" for "devd". It is possible that user puts into
N> >  devd.conf execution of third-party software, that needs libraries
N> >  from /usr/local. Since devd is launched before ldconfig script, if
N> >  the hardware that has associated software is attached on boot, then
N> >  execution would fail.
N> > 
N> >  Differential Revision:https://reviews.freebsd.org/D2332
N> >  Reviewed by:  imp
N> 
N> This broke rcorder. With my custom knobs it breaks with:
N> 
N> rcorder: Circular dependency on provision `ldconfig' in file `devd’.
N> 
N> With the defaults knobs, it breaks like this:
N> 
N> rcorder: Circular dependency on provision `mountcritremote' in file 
`ldconfig'.
N> 
N> Repro:
N> 
N> (cd /usr/src/etc/rc.d; rcorder `SRCCONF=/dev/null make -VFILES` 2>&1)

I've seen the bug in the bugzilla. Thanks for taking it, Garrett. It
is definitely not an easy one.

-- 
Totus tuus, Glebius.
___
svn-src-all@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 commit: r290012 - in head/contrib/ntp: html/drivers include libjsmn/example libntp ntpd scripts/update-leap sntp sntp/ag-tpl sntp/libpkgver sntp/tests sntp/unity sntp/unity/auto tests/bug-2803 ...

2015-10-26 Thread Gleb Smirnoff
Author: glebius
Date: Mon Oct 26 15:43:08 2015
New Revision: 290012
URL: https://svnweb.freebsd.org/changeset/base/290012

Log:
  Remove svn:keywords that leaked in.

Modified:
Directory Properties:
  head/contrib/ntp/html/drivers/driver40-ja.html   (props changed)
  head/contrib/ntp/include/refidsmear.h   (props changed)
  head/contrib/ntp/libjsmn/example/jsondump.c   (props changed)
  head/contrib/ntp/libjsmn/example/simple.c   (props changed)
  head/contrib/ntp/libntp/refidsmear.c   (props changed)
  head/contrib/ntp/ntpd/rc_cmdlength.c   (props changed)
  head/contrib/ntp/scripts/update-leap/Makefile.am   (props changed)
  head/contrib/ntp/scripts/update-leap/Makefile.in   (props changed)
  head/contrib/ntp/scripts/update-leap/update-leap.html   (props changed)
  head/contrib/ntp/scripts/update-leap/update-leap.in   (props changed)
  head/contrib/ntp/scripts/update-leap/update-leap.man.in   (props changed)
  head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in   (props changed)
  head/contrib/ntp/scripts/update-leap/update-leap.sh   (props changed)
  head/contrib/ntp/sntp/ag-tpl/Mdoc.pm   (props changed)
  head/contrib/ntp/sntp/libpkgver/colcomp.c   (props changed)
  head/contrib/ntp/sntp/libpkgver/pkgver.h   (props changed)
  head/contrib/ntp/sntp/tests/crypto.c   (props changed)
  head/contrib/ntp/sntp/tests/fileHandlingTest.h.in   (props changed)
  head/contrib/ntp/sntp/tests/keyFile.c   (props changed)
  head/contrib/ntp/sntp/tests/kodDatabase.c   (props changed)
  head/contrib/ntp/sntp/tests/kodFile.c   (props changed)
  head/contrib/ntp/sntp/tests/networking.c   (props changed)
  head/contrib/ntp/sntp/tests/packetHandling.c   (props changed)
  head/contrib/ntp/sntp/tests/packetProcessing.c   (props changed)
  head/contrib/ntp/sntp/tests/run-crypto.c   (props changed)
  head/contrib/ntp/sntp/tests/run-keyFile.c   (props changed)
  head/contrib/ntp/sntp/tests/run-kodDatabase.c   (props changed)
  head/contrib/ntp/sntp/tests/run-kodFile.c   (props changed)
  head/contrib/ntp/sntp/tests/run-networking.c   (props changed)
  head/contrib/ntp/sntp/tests/run-packetHandling.c   (props changed)
  head/contrib/ntp/sntp/tests/run-packetProcessing.c   (props changed)
  head/contrib/ntp/sntp/tests/run-utilities.c   (props changed)
  head/contrib/ntp/sntp/tests/utilities.c   (props changed)
  head/contrib/ntp/sntp/unity/Makefile.am   (props changed)
  head/contrib/ntp/sntp/unity/Makefile.in   (props changed)
  head/contrib/ntp/sntp/unity/auto/colour_prompt.rb   (props changed)
  head/contrib/ntp/sntp/unity/auto/colour_reporter.rb   (props changed)
  head/contrib/ntp/sntp/unity/auto/generate_module.rb   (props changed)
  head/contrib/ntp/sntp/unity/auto/generate_test_runner.rb   (props changed)
  head/contrib/ntp/sntp/unity/auto/runner_maybe.c   (props changed)
  head/contrib/ntp/sntp/unity/auto/test_file_filter.rb   (props changed)
  head/contrib/ntp/sntp/unity/auto/unity_test_summary.rb   (props changed)
  head/contrib/ntp/sntp/unity/unity.c   (props changed)
  head/contrib/ntp/sntp/unity/unity.h   (props changed)
  head/contrib/ntp/sntp/unity/unity_fixture.c   (props changed)
  head/contrib/ntp/sntp/unity/unity_fixture.h   (props changed)
  head/contrib/ntp/sntp/unity/unity_fixture_internals.h   (props changed)
  head/contrib/ntp/sntp/unity/unity_fixture_malloc_overrides.h   (props changed)
  head/contrib/ntp/sntp/unity/unity_internals.h   (props changed)
  head/contrib/ntp/sntp/version.c   (props changed)
  head/contrib/ntp/tests/bug-2803/Makefile.am   (props changed)
  head/contrib/ntp/tests/bug-2803/Makefile.in   (props changed)
  head/contrib/ntp/tests/bug-2803/bug-2803.c   (props changed)
  head/contrib/ntp/tests/bug-2803/run-bug-2803.c   (props changed)
  head/contrib/ntp/tests/libntp/a_md5encrypt.c   (props changed)
  head/contrib/ntp/tests/libntp/atoint.c   (props changed)
  head/contrib/ntp/tests/libntp/atouint.c   (props changed)
  head/contrib/ntp/tests/libntp/authkeys.c   (props changed)
  head/contrib/ntp/tests/libntp/buftvtots.c   (props changed)
  head/contrib/ntp/tests/libntp/calendar.c   (props changed)
  head/contrib/ntp/tests/libntp/caljulian.c   (props changed)
  head/contrib/ntp/tests/libntp/caltontp.c   (props changed)
  head/contrib/ntp/tests/libntp/calyearstart.c   (props changed)
  head/contrib/ntp/tests/libntp/clocktime.c   (props changed)
  head/contrib/ntp/tests/libntp/decodenetnum.c   (props changed)
  head/contrib/ntp/tests/libntp/hextoint.c   (props changed)
  head/contrib/ntp/tests/libntp/hextolfp.c   (props changed)
  head/contrib/ntp/tests/libntp/humandate.c   (props changed)
  head/contrib/ntp/tests/libntp/lfpfunc.c   (props changed)
  head/contrib/ntp/tests/libntp/lfptostr.c   (props changed)
  head/contrib/ntp/tests/libntp/modetoa.c   (props changed)
  head/contrib/ntp/tests/libntp/msyslog.c   (props changed)
  head/contrib/ntp/tests/libntp/netof.c   (props changed)
  head/contrib/ntp/tests/libntp/numtoa.c   (props changed)
  head/contrib/ntp/tests/libntp/numtohost.c  

svn commit: r290014 - in stable/10: lib/libthr/arch/amd64 lib/libthr/arch/i386 libexec/rtld-elf/amd64 libexec/rtld-elf/i386 share/mk

2015-10-26 Thread Eric van Gyzen
Author: vangyzen
Date: Mon Oct 26 16:21:56 2015
New Revision: 290014
URL: https://svnweb.freebsd.org/changeset/base/290014

Log:
  Disable SSE in libthr
  
  Clang emits SSE instructions on amd64 in the common path of
  pthread_mutex_unlock.  If the thread does not otherwise use SSE,
  this usage incurs a context-switch of the FPU/SSE state, which
  reduces the performance of multiple real-world applications by a
  non-trivial amount (3-5% in one application).
  
  Instead of this change, I experimented with eagerly switching the
  FPU state at context-switch time.  This did not help.  Most of the
  cost seems to be in the read/write of memory--as kib@ stated--and
  not in the #NM handling.  I tested on machines with and without
  XSAVEOPT.
  
  One counter-argument to this change is that most applications already
  use SIMD, and the number of applications and amount of SIMD usage
  are only increasing.  This is absolutely true.  I agree that--in
  general and in principle--this change is in the wrong direction.
  However, there are applications that do not use enough SSE to offset
  the extra context-switch cost.  SSE does not provide a clear benefit
  in the current libthr code with the current compiler, but it does
  provide a clear loss in some cases.  Therefore, disabling SSE in
  libthr is a non-loss for most, and a gain for some.
  
  I refrained from disabling SSE in libc--as was suggested--because
  I can't make the above argument for libc.  It provides a wide variety
  of code; each case should be analyzed separately.
  
  https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html
  
  Suggestions from:   dim, jmg, rpaulo
  Sponsored by:   Dell Inc.

Modified:
  stable/10/lib/libthr/arch/amd64/Makefile.inc
  stable/10/lib/libthr/arch/i386/Makefile.inc
  stable/10/libexec/rtld-elf/amd64/Makefile.inc
  stable/10/libexec/rtld-elf/i386/Makefile.inc
  stable/10/share/mk/bsd.cpu.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libthr/arch/amd64/Makefile.inc
==
--- stable/10/lib/libthr/arch/amd64/Makefile.incMon Oct 26 15:50:39 
2015(r290013)
+++ stable/10/lib/libthr/arch/amd64/Makefile.incMon Oct 26 16:21:56 
2015(r290014)
@@ -1,3 +1,9 @@
 #$FreeBSD$
 
 SRCS+= pthread_md.c _umtx_op_err.S
+
+# With the current compiler and libthr code, using SSE in libthr
+# does not provide enough performance improvement to outweigh
+# the extra context switch cost.  This can measurably impact
+# performance when the application also does not use enough SSE.
+CFLAGS+=${CFLAGS_NO_SIMD}

Modified: stable/10/lib/libthr/arch/i386/Makefile.inc
==
--- stable/10/lib/libthr/arch/i386/Makefile.inc Mon Oct 26 15:50:39 2015
(r290013)
+++ stable/10/lib/libthr/arch/i386/Makefile.inc Mon Oct 26 16:21:56 2015
(r290014)
@@ -1,3 +1,9 @@
 # $FreeBSD$
 
 SRCS+= pthread_md.c _umtx_op_err.S
+
+# With the current compiler and libthr code, using SSE in libthr
+# does not provide enough performance improvement to outweigh
+# the extra context switch cost.  This can measurably impact
+# performance when the application also does not use enough SSE.
+CFLAGS+=${CFLAGS_NO_SIMD}

Modified: stable/10/libexec/rtld-elf/amd64/Makefile.inc
==
--- stable/10/libexec/rtld-elf/amd64/Makefile.inc   Mon Oct 26 15:50:39 
2015(r290013)
+++ stable/10/libexec/rtld-elf/amd64/Makefile.inc   Mon Oct 26 16:21:56 
2015(r290014)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-CFLAGS+=   -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+=   ${CFLAGS_NO_SIMD} -msoft-float
 # Uncomment this to build the dynamic linker as an executable instead
 # of a shared library:
 #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x

Modified: stable/10/libexec/rtld-elf/i386/Makefile.inc
==
--- stable/10/libexec/rtld-elf/i386/Makefile.incMon Oct 26 15:50:39 
2015(r290013)
+++ stable/10/libexec/rtld-elf/i386/Makefile.incMon Oct 26 16:21:56 
2015(r290014)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-CFLAGS+=   -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+=   ${CFLAGS_NO_SIMD} -msoft-float
 # Uncomment this to build the dynamic linker as an executable instead
 # of a shared library:
 #LDSCRIPT= ${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x

Modified: stable/10/share/mk/bsd.cpu.mk
==
--- stable/10/share/mk/bsd.cpu.mk   Mon Oct 26 15:50:39 2015
(r290013)
+++ stable/10/share/mk/bsd.cpu.mk   Mon Oct 26 16:21:56 2015
(r290014)
@@ -267,6 +267,27 @@ _CPUCFLAGS += -mfloat-abi=softfp
 CFLAGS += ${_CPUCFLAGS}
 .endif
 

svn commit: r290008 - in head/etc: . rc.d

2015-10-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Oct 26 15:16:27 2015
New Revision: 290008
URL: https://svnweb.freebsd.org/changeset/base/290008

Log:
  Since r275359, there is no need to provide a bogus service name.
  
  MFC after:3 weeks

Modified:
  head/etc/rc.d/othermta
  head/etc/rc.shutdown

Modified: head/etc/rc.d/othermta
==
--- head/etc/rc.d/othermta  Mon Oct 26 15:14:55 2015(r290007)
+++ head/etc/rc.d/othermta  Mon Oct 26 15:16:27 2015(r290008)
@@ -10,7 +10,7 @@
 #
 . /etc/rc.subr
 
-load_rc_config 'XXX'
+load_rc_config
 
 if [ -n "${mta_start_script}" ]; then
[ "${mta_start_script}" != "/etc/rc.sendmail" ] && \

Modified: head/etc/rc.shutdown
==
--- head/etc/rc.shutdownMon Oct 26 15:14:55 2015(r290007)
+++ head/etc/rc.shutdownMon Oct 26 15:16:27 2015(r290008)
@@ -45,7 +45,7 @@ export HOME PATH
 
 . /etc/rc.subr
 
-load_rc_config 'XXX'
+load_rc_config
 
 # reverse_list list
 #  print the list in reverse order
___
svn-src-all@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 commit: r290009 - stable/10/etc

2015-10-26 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Oct 26 15:20:45 2015
New Revision: 290009
URL: https://svnweb.freebsd.org/changeset/base/290009

Log:
  MFH (r275359, r290007): make load_rc_config's name argument optional

Modified:
  stable/10/etc/rc.subr
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.subr
==
--- stable/10/etc/rc.subr   Mon Oct 26 15:16:27 2015(r290008)
+++ stable/10/etc/rc.subr   Mon Oct 26 15:20:45 2015(r290009)
@@ -1308,16 +1308,15 @@ run_rc_script()
 }
 
 #
-# load_rc_config name
-#  Source in the configuration file for a given name.
+# load_rc_config [service]
+#  Source in the configuration file(s) for a given service.
+#  If no service is specified, only the global configuration
+#  file(s) will be loaded.
 #
 load_rc_config()
 {
local _name _rcvar_val _var _defval _v _msg _new _d
_name=$1
-   if [ -z "$_name" ]; then
-   err 3 'USAGE: load_rc_config name'
-   fi
 
if ${_rc_conf_loaded:-false}; then
:
@@ -1333,20 +1332,24 @@ load_rc_config()
_rc_conf_loaded=true
fi
 
-   for _d in /etc ${local_startup%*/rc.d}; do
-   if [ -f ${_d}/rc.conf.d/"$_name" ]; then
-   debug "Sourcing ${_d}/rc.conf.d/$_name"
-   . ${_d}/rc.conf.d/"$_name"
-   elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then
-   local _rc
-   for _rc in ${_d}/rc.conf.d/"$_name"/* ; do
-   if [ -f "$_rc" ] ; then
-   debug "Sourcing $_rc"
-   . "$_rc"
-   fi
-   done
-   fi
-   done
+   # If a service name was specified, attempt to load
+   # service-specific configuration
+   if [ -n "$_name" ] ; then
+   for _d in /etc ${local_startup%*/rc.d}; do
+   if [ -f ${_d}/rc.conf.d/"$_name" ]; then
+   debug "Sourcing ${_d}/rc.conf.d/$_name"
+   . ${_d}/rc.conf.d/"$_name"
+   elif [ -d ${_d}/rc.conf.d/"$_name" ] ; then
+   local _rc
+   for _rc in ${_d}/rc.conf.d/"$_name"/* ; do
+   if [ -f "$_rc" ] ; then
+   debug "Sourcing $_rc"
+   . "$_rc"
+   fi
+   done
+   fi
+   done
+   fi
 
# Set defaults if defined.
for _var in $rcvar $rcvars; do
___
svn-src-all@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 commit: r290011 - in vendor/ntp/dist: html/drivers include libjsmn/example libntp ntpd ports/winnt/include ports/winnt/include/arpa ports/winnt/include/sys ports/winnt/instsrv ports/winnt/libnt...

2015-10-26 Thread Gleb Smirnoff
Author: glebius
Date: Mon Oct 26 15:40:47 2015
New Revision: 290011
URL: https://svnweb.freebsd.org/changeset/base/290011

Log:
  Remove svn:keywords from contributed files.

Modified:
Directory Properties:
  vendor/ntp/dist/html/drivers/driver40-ja.html   (props changed)
  vendor/ntp/dist/include/refidsmear.h   (props changed)
  vendor/ntp/dist/libjsmn/example/jsondump.c   (props changed)
  vendor/ntp/dist/libjsmn/example/simple.c   (props changed)
  vendor/ntp/dist/libntp/refidsmear.c   (props changed)
  vendor/ntp/dist/ntpd/rc_cmdlength.c   (props changed)
  vendor/ntp/dist/ports/winnt/include/arpa/inet.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/clockstuff.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/config.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/gaa_compat.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/hopf_PCI_io.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/netdb.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/ntp_iocompletionport.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/ntp_timer.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/ntservice.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/stdint.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/stdnoreturn.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/ioctl.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/param.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/resource.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/signal.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/time.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/sys/wait.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/syslog.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/termios.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/timepps.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/unistd.h   (props changed)
  vendor/ntp/dist/ports/winnt/include/win32_io.h   (props changed)
  vendor/ntp/dist/ports/winnt/instsrv/instsrv.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/SetSystemTime.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/arc4wrap.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/getclock.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/messages.h   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/randfile.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/setpriority.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/syslog.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/termios.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/util_clockstuff.c   (props changed)
  vendor/ntp/dist/ports/winnt/libntp/win32_io.c   (props changed)
  vendor/ntp/dist/ports/winnt/ntpd/hopf_PCI_io.c   (props changed)
  vendor/ntp/dist/ports/winnt/ntpd/nt_clockstuff.c   (props changed)
  vendor/ntp/dist/ports/winnt/ntpd/ntp_iocompletionport.c   (props changed)
  vendor/ntp/dist/ports/winnt/ntpd/ntservice.c   (props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.h   
(props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/monolithic-serialpps-timepps.txt  
 (props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.c   (props 
changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/src/loopback-ppsapi.h   (props 
changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/src/sys/time.h   (props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/loopback/src/timepps.h   (props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.c   
(props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/skelprov/skeleton-ppsapi-provider.h   
(props changed)
  vendor/ntp/dist/ports/winnt/ppsapi/skelprov/sys/time.h   (props changed)
  vendor/ntp/dist/scripts/update-leap/Makefile.am   (props changed)
  vendor/ntp/dist/scripts/update-leap/Makefile.in   (props changed)
  vendor/ntp/dist/scripts/update-leap/update-leap.html   (props changed)
  vendor/ntp/dist/scripts/update-leap/update-leap.in   (props changed)
  vendor/ntp/dist/scripts/update-leap/update-leap.man.in   (props changed)
  vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in   (props changed)
  vendor/ntp/dist/scripts/update-leap/update-leap.sh   (props changed)
  vendor/ntp/dist/sntp/ag-tpl/Mdoc.pm   (props changed)
  vendor/ntp/dist/sntp/libpkgver/colcomp.c   (props changed)
  vendor/ntp/dist/sntp/libpkgver/pkgver.h   (props changed)
  vendor/ntp/dist/sntp/tests/crypto.c   (props changed)
  vendor/ntp/dist/sntp/tests/fileHandlingTest.h.in   (props changed)
  vendor/ntp/dist/sntp/tests/keyFile.c   (props changed)
  vendor/ntp/dist/sntp/tests/kodDatabase.c   (props changed)
  vendor/ntp/dist/sntp/tests/kodFile.c   (props changed)
  vendor/ntp/dist/sntp/tests/networking.c   (props changed)
  vendor/ntp/dist/sntp/tests/packetHandling.c   (props changed)
  

svn commit: r290017 - stable/10

2015-10-26 Thread Bryan Drewery
Author: bdrewery
Date: Mon Oct 26 17:49:13 2015
New Revision: 290017
URL: https://svnweb.freebsd.org/changeset/base/290017

Log:
  MFC r289407:
  
Fix delete-old and check-old-files not removing old debug symbols.

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Mon Oct 26 17:45:37 2015(r290016)
+++ stable/10/Makefile.inc1 Mon Oct 26 17:49:13 2015(r290017)
@@ -1902,6 +1902,13 @@ delete-old-files:
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || 
true; \
rm ${RM_I} "${DESTDIR}/$${file}" <&3; \
fi; \
+   for ext in debug symbols; do \
+ if ! [ -e "${DESTDIR}/$${file}" ] && [ -f \
+ "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
+ rm ${RM_I} "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" \
+ <&3; \
+ fi; \
+   done; \
done
 # Remove catpages without corresponding manpages.
@exec 3<&0; \
@@ -1924,6 +1931,11 @@ check-old-files:
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; 
then \
echo "${DESTDIR}/$${file}"; \
fi; \
+   for ext in debug symbols; do \
+ if [ -f "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}" ]; then \
+ echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
+ fi; \
+   done; \
done
 # Check for catpages without corresponding manpages.
@find ${DESTDIR}/usr/share/man/cat* ! -type d | \
___
svn-src-all@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"


Re: svn commit: r289863 - head/lib/libc/stdio

2015-10-26 Thread John Baldwin
On Saturday, October 24, 2015 02:23:15 AM Andrey A. Chernov wrote:
> Author: ache
> Date: Sat Oct 24 02:23:15 2015
> New Revision: 289863
> URL: https://svnweb.freebsd.org/changeset/base/289863
> 
> Log:
>   Since no room left in the _flags, reuse __SALC for O_APPEND.
>   It helps to remove _fcntl() call from _ftello() and optimize seek position
>   calculation in _swrite().

You could just add a _flags2 to FILE if that would be cleaner.  It should even
be MFC'able without being an ABI change since stdio always allocates FILE
objects internally and we only export pointers to them.  Programs do not
allocate them statically.

-- 
John Baldwin
___
svn-src-all@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 commit: r290016 - stable/10/share/examples/mdoc

2015-10-26 Thread Christian Brueffer
Author: brueffer
Date: Mon Oct 26 17:45:37 2015
New Revision: 290016
URL: https://svnweb.freebsd.org/changeset/base/290016

Log:
  MFC: r288419
  
  Join excessive split lines.

Modified:
  stable/10/share/examples/mdoc/example.4
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/examples/mdoc/example.4
==
--- stable/10/share/examples/mdoc/example.4 Mon Oct 26 17:07:22 2015
(r290015)
+++ stable/10/share/examples/mdoc/example.4 Mon Oct 26 17:45:37 2015
(r290016)
@@ -26,15 +26,14 @@
 .\"
 .\" Note: The date here should be updated whenever a non-trivial
 .\" change is made to the manual page.
-.Dd April 1, 2006
+.Dd July 31, 2015
 .Dt EXAMPLE 4 i386
 .Os
 .Sh NAME
 .Nm example
 .Nd "example device driver manual page"
 .Sh SYNOPSIS
-To compile the
-driver into the kernel,
+To compile the driver into the kernel,
 place the following lines in the
 kernel configuration file:
 .Bd -ragged -offset indent
@@ -42,8 +41,7 @@ kernel configuration file:
 .Cd "options EXAMPLE_DEBUG"
 .Ed
 .Pp
-Alternatively, to load the
-driver as a
+Alternatively, to load the driver as a
 module at boot time, place the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
___
svn-src-all@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 commit: r290015 - head/cddl/contrib/opensolaris/cmd/zfs

2015-10-26 Thread Allan Jude
Author: allanjude
Date: Mon Oct 26 17:07:22 2015
New Revision: 290015
URL: https://svnweb.freebsd.org/changeset/base/290015

Log:
  Allow 'zfs holds -r' to recurse over a file system or volume to find holds
  
  Previously, the parameters of 'zfs holds' could only be snapshots
  
  Add -d  flag to limit depth of recursion
  Add -p flag to print literal values, rather than interpreted values
  Add -H flag to suppress header output and use tabs rather than whitespace
  
  Reviewed by:  mahrens, smh, dteske
  Approved by:  bapt (mentor)
  MFC after:3 weeks
  Relnotes: yes
  Sponsored by: ScaleEngine Inc.
  Differential Revision:https://reviews.freebsd.org/D3994

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 26 16:21:56 2015
(r290014)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 26 17:07:22 2015
(r290015)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 14, 2015
+.Dd October 24, 2015
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -272,8 +272,10 @@
 .Ar tag snapshot Ns ...
 .Nm
 .Cm holds
-.Op Fl r
-.Ar snapshot Ns ...
+.Op Fl Hp
+.Op Fl r Ns | Ns Fl d Ar depth
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
+.Ns ...
 .Nm
 .Cm release
 .Op Fl r
@@ -3159,15 +3161,26 @@ snapshots of all descendent file systems
 .It Xo
 .Nm
 .Cm holds
-.Op Fl r
-.Ar snapshot Ns ...
+.Op Fl Hp
+.Op Fl r Ns | Ns Fl d Ar depth
+.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
+.Ns ...
 .Xc
 .Pp
-Lists all existing user references for the given snapshot or snapshots.
+Lists all existing user references for the given dataset or datasets.
 .Bl -tag -width indent
+.It Fl H
+Used for scripting mode. Do not print headers and separate fields by a single
+tab instead of arbitrary white space.
+.It Fl p
+Display numbers in parsable (exact) values.
 .It Fl r
-Lists the holds that are set on the named descendent snapshots, in addition to
-listing the holds on the named snapshot.
+Lists the holds that are set on the descendent snapshots of the named datasets
+or snapshots, in addition to listing the holds on the named snapshots, if any.
+.It Fl d Ar depth
+Recursively display any holds on the named snapshots, or descendent snapshots 
of
+the named datasets or snapshots, limiting the recursion to
+.Ar depth .
 .El
 .It Xo
 .Nm

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 26 16:21:56 
2015(r290014)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.cMon Oct 26 17:07:22 
2015(r290015)
@@ -329,7 +329,8 @@ get_usage(zfs_help_t idx)
case HELP_HOLD:
return (gettext("\thold [-r]   ...\n"));
case HELP_HOLDS:
-   return (gettext("\tholds [-r]  ...\n"));
+   return (gettext("\tholds [-Hp] [-r|-d depth] "
+   " ...\n"));
case HELP_RELEASE:
return (gettext("\trelease [-r]   ...\n"));
case HELP_DIFF:
@@ -5543,7 +5544,8 @@ typedef struct holds_cbdata {
  *
  */
 static void
-print_holds(boolean_t scripted, size_t nwidth, size_t tagwidth, nvlist_t *nvl)
+print_holds(boolean_t scripted, boolean_t literal, size_t nwidth,
+size_t tagwidth, nvlist_t *nvl)
 {
int i;
nvpair_t *nvp = NULL;
@@ -5576,10 +5578,14 @@ print_holds(boolean_t scripted, size_t n
size_t sepnum = scripted ? 1 : 2;
 
(void) nvpair_value_uint64(nvp2, );
-   time = (time_t)val;
-   (void) localtime_r(, );
-   (void) strftime(tsbuf, DATETIME_BUF_LEN,
-   gettext(STRFTIME_FMT_STR), );
+   if (literal)
+   snprintf(tsbuf, DATETIME_BUF_LEN, "%llu", val);
+   else {
+   time = (time_t)val;
+   (void) localtime_r(, );
+   (void) strftime(tsbuf, DATETIME_BUF_LEN,
+   gettext(STRFTIME_FMT_STR), );
+   }
 
(void) printf("%-*s%*c%-*s%*c%s\n", nwidth, zname,
sepnum, sep, tagwidth, tagname, sepnum, sep, tsbuf);
@@ -5600,7 +5606,7 @@ holds_callback(zfs_handle_t *zhp, void *
const char *zname = zfs_get_name(zhp);
size_t znamelen = strnlen(zname, ZFS_MAXNAMELEN);
 
-   if (cbp->cb_recursive) {
+   if (cbp->cb_recursive && cbp->cb_snapname != NULL) {
const char *snapname;
char *delim  = strchr(zname, '@');
if (delim == NULL)
@@ -5628,9 

svn commit: r290018 - head/sys/dev/isp

2015-10-26 Thread Alexander Motin
Author: mav
Date: Mon Oct 26 18:14:15 2015
New Revision: 290018
URL: https://svnweb.freebsd.org/changeset/base/290018

Log:
  Reimplement enable and implement disable of virtual ports.
  
  Now on 24xx and above chips it is really possible to simulate several
  virtual FC ports with single physical one.  For example, it allows to
  configure several targets in ctl.conf, assign each of them to separate
  virtual port, and let user to control access to them with switch zoning.
  
  I still doubt that all problems are solved there, but at now it passes
  at least basic tests.

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_library.c
  head/sys/dev/isp/ispmbox.h

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Mon Oct 26 17:49:13 2015(r290017)
+++ head/sys/dev/isp/isp.c  Mon Oct 26 18:14:15 2015(r290018)
@@ -1275,7 +1275,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d
 */
if (IS_FC(isp) && isp->isp_nchan > 1) {
if (!ISP_CAP_MULTI_ID(isp)) {
-   isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, only 
can enable 1 of %d channels", isp->isp_nchan);
+   isp_prt(isp, ISP_LOGWARN, "non-MULTIID f/w loaded, "
+   "only can enable 1 of %d channels", isp->isp_nchan);
+   isp->isp_nchan = 1;
+   } else if (!ISP_CAP_VP0(isp)) {
+   isp_prt(isp, ISP_LOGWARN, "We can not use MULTIID "
+   "feature properly without VP0_Decoupling");
isp->isp_nchan = 1;
}
}
@@ -2017,7 +2022,7 @@ isp_fibre_init_2400(ispsoftc_t *isp)
icbp->icb_fwoptions1 = fcp->isp_fwoptions;
icbp->icb_fwoptions2 = fcp->isp_xfwoptions;
icbp->icb_fwoptions3 = fcp->isp_zfwoptions;
-   if (isp->isp_nchan > 1 && (isp->isp_fwattr & ISP2400_FW_ATTR_VP0)) {
+   if (isp->isp_nchan > 1 && ISP_CAP_VP0(isp)) {
icbp->icb_fwoptions1 &= ~ICB2400_OPT1_INI_DISABLE;
icbp->icb_fwoptions1 |= ICB2400_OPT1_TGT_ENABLE;
} else {
@@ -2200,7 +2205,7 @@ isp_fibre_init_2400(ispsoftc_t *isp)
uint8_t *off;
 
vpinfo.vp_global_options = 0;
-   if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0) {
+   if (ISP_CAP_VP0(isp)) {
vpinfo.vp_global_options |= ICB2400_VPGOPT_VP0_DECOUPLE;
vpinfo.vp_count = isp->isp_nchan;
chan = 0;
@@ -2235,7 +2240,7 @@ isp_fibre_init_2400(ispsoftc_t *isp)
MAKE_NODE_NAME_FROM_WWN(pi.vp_port_portname, 
fcp2->isp_wwpn);
MAKE_NODE_NAME_FROM_WWN(pi.vp_port_nodename, 
fcp2->isp_wwnn);
off = fcp->isp_scratch;
-   if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0)
+   if (ISP_CAP_VP0(isp))
off += ICB2400_VPINFO_PORT_OFF(chan);
else
off += ICB2400_VPINFO_PORT_OFF(chan - 1);

Modified: head/sys/dev/isp/isp_library.c
==
--- head/sys/dev/isp/isp_library.c  Mon Oct 26 17:49:13 2015
(r290017)
+++ head/sys/dev/isp/isp_library.c  Mon Oct 26 18:14:15 2015
(r290018)
@@ -581,6 +581,136 @@ isp_fc_toponame(fcparam *fcp)
}
 }
 
+static int
+isp_fc_enable_vp(ispsoftc_t *isp, int chan)
+{
+   fcparam *fcp = FCPARAM(isp, chan);
+   mbreg_t mbs;
+   vp_modify_t *vp;
+   uint8_t qe[QENTRY_LEN], *scp;
+
+   ISP_MEMZERO(qe, QENTRY_LEN);
+   if (FC_SCRATCH_ACQUIRE(isp, chan)) {
+   return (EBUSY);
+   }
+   scp = fcp->isp_scratch;
+
+   /*
+* Build a VP MODIFY command in memory
+*/
+   vp = (vp_modify_t *) qe;
+   vp->vp_mod_hdr.rqs_entry_type = RQSTYPE_VP_MODIFY;
+   vp->vp_mod_hdr.rqs_entry_count = 1;
+   vp->vp_mod_cnt = 1;
+   vp->vp_mod_idx0 = chan;
+   vp->vp_mod_cmd = VP_MODIFY_ENA;
+   vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED;
+   if (fcp->role & ISP_ROLE_INITIATOR) {
+   vp->vp_mod_ports[0].options |= ICB2400_VPOPT_INI_ENABLE;
+   }
+   if ((fcp->role & ISP_ROLE_TARGET) == 0) {
+   vp->vp_mod_ports[0].options |= ICB2400_VPOPT_TGT_DISABLE;
+   }
+   if (fcp->isp_loopid < LOCAL_LOOP_LIM) {
+   vp->vp_mod_ports[0].loopid = fcp->isp_loopid;
+   if (isp->isp_confopts & ISP_CFG_OWNLOOPID)
+   vp->vp_mod_ports[0].options |=
+   ICB2400_VPOPT_HARD_ADDRESS;
+   else
+   vp->vp_mod_ports[0].options |=
+   ICB2400_VPOPT_PREV_ADDRESS;
+   }
+   MAKE_NODE_NAME_FROM_WWN(vp->vp_mod_ports[0].wwpn,