svn commit: r289489 - stable/10/sys/cam/ctl

2015-10-17 Thread Alexander Motin
Author: mav
Date: Sun Oct 18 06:53:31 2015
New Revision: 289489
URL: https://svnweb.freebsd.org/changeset/base/289489

Log:
  MFC r289136: Remove lock upgrade attempt from ctl_be_block_open_file().
  
  I am not sure what for it was done.  Now open routine should automatically
  fall back to read-only if open for writing is impossible.  In such case
  attempt to upgrade to write sounds strange.

Modified:
  stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==
--- stable/10/sys/cam/ctl/ctl_backend_block.c   Sun Oct 18 05:51:44 2015
(r289488)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c   Sun Oct 18 06:53:31 2015
(r289489)
@@ -1843,21 +1843,6 @@ ctl_be_block_open_file(struct ctl_be_blo
return (error);
}
 
-   /*
-* Verify that we have the ability to upgrade to exclusive
-* access on this file so we can trap errors at open instead
-* of reporting them during first access.
-*/
-   if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) {
-   vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY);
-   if (be_lun->vn->v_iflag & VI_DOOMED) {
-   error = EBADF;
-   snprintf(req->error_str, sizeof(req->error_str),
-"error locking file %s", be_lun->dev_path);
-   return (error);
-   }
-   }
-
file_data->cred = crhold(curthread->td_ucred);
if (params->lun_size_bytes != 0)
be_lun->size_bytes = params->lun_size_bytes;
___
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: r289488 - head/bin/test/tests

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sun Oct 18 05:51:44 2015
New Revision: 289488
URL: https://svnweb.freebsd.org/changeset/base/289488

Log:
  Clean up trailing whitespace
  
  MFC after: 3 days

Modified:
  head/bin/test/tests/legacy_test.sh

Modified: head/bin/test/tests/legacy_test.sh
==
--- head/bin/test/tests/legacy_test.sh  Sun Oct 18 05:49:58 2015
(r289487)
+++ head/bin/test/tests/legacy_test.sh  Sun Oct 18 05:51:44 2015
(r289488)
@@ -2,7 +2,7 @@
 
 #-
 # Copyright (c) June 1996 Wolfram Schneider . Berlin.
-# All rights reserved. 
+# All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -31,7 +31,7 @@
 # $FreeBSD$
 
 # force a specified test program, e.g. `env test=/bin/test sh regress.sh'
-: ${test=test} 
+: ${test=test}
 
 t ()
 {
@@ -54,13 +54,13 @@ t ()
 count=0
 echo "1..130"
 
-t 0 'b = b' 
-t 0 'b == b' 
-t 1 'b != b' 
-t 0 '\( b = b \)' 
-t 0 '\( b == b \)' 
-t 1 '! \( b = b \)' 
-t 1 '! \( b == b \)' 
+t 0 'b = b'
+t 0 'b == b'
+t 1 'b != b'
+t 0 '\( b = b \)'
+t 0 '\( b == b \)'
+t 1 '! \( b = b \)'
+t 1 '! \( b == b \)'
 t 1 '! -f /etc/passwd'
 
 t 0 '-h = -h'
___
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: r289487 - in head: bin/dd bin/dd/tests contrib/netbsd-tests/bin/dd etc/mtree

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sun Oct 18 05:49:58 2015
New Revision: 289487
URL: https://svnweb.freebsd.org/changeset/base/289487

Log:
  Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as
  bin/dd/tests
  
  Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used
  in validating the characters read from /dev/zero
  
  MFC after: 2 weeks
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/bin/dd/tests/
 - copied from r289485, user/ngie/more-tests2/bin/dd/tests/
Modified:
  head/bin/dd/Makefile
  head/bin/dd/tests/Makefile
  head/contrib/netbsd-tests/bin/dd/t_dd.sh
  head/etc/mtree/BSD.tests.dist
Directory Properties:
  head/   (props changed)

Modified: head/bin/dd/Makefile
==
--- head/bin/dd/MakefileSun Oct 18 05:36:05 2015(r289486)
+++ head/bin/dd/MakefileSun Oct 18 05:49:58 2015(r289487)
@@ -1,6 +1,8 @@
 #  @(#)Makefile8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include 
+
 PROG=  dd
 SRCS=  args.c conv.c conv_tab.c dd.c misc.c position.c
 
@@ -24,4 +26,8 @@ test: ${PROG} gen
 .endfor
@rm -f gen
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Modified: head/bin/dd/tests/Makefile
==
--- user/ngie/more-tests2/bin/dd/tests/Makefile Sun Oct 18 05:29:49 2015
(r289485)
+++ head/bin/dd/tests/Makefile  Sun Oct 18 05:49:58 2015(r289487)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-NETBSD_ATF_TESTS_SH=   dd
+NETBSD_ATF_TESTS_SH=   dd_test
 
 .include 
 

Modified: head/contrib/netbsd-tests/bin/dd/t_dd.sh
==
--- head/contrib/netbsd-tests/bin/dd/t_dd.shSun Oct 18 05:36:05 2015
(r289486)
+++ head/contrib/netbsd-tests/bin/dd/t_dd.shSun Oct 18 05:49:58 2015
(r289487)
@@ -44,6 +44,12 @@ length_head() {
"the one expected to fail.  (NetBSD PR bin/8521)"
 }
 length_body() {
+   # Begin FreeBSD
+   if ! df /dev/fd | grep -q '^fdescfs'; then
+   atf_skip "fdescfs is not mounted on /dev/fd"
+   fi
+   # End FreeBSD
+
test_dd_length 512 \
"dd if=/dev/zero of=/dev/fd/5 count=1 5>&1 >/dev/null 2>/dev/null"
test_dd_length 512 \

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Sun Oct 18 05:36:05 2015
(r289486)
+++ head/etc/mtree/BSD.tests.dist   Sun Oct 18 05:49:58 2015
(r289487)
@@ -12,6 +12,8 @@
 ..
 date
 ..
+dd
+..
 expr
 ..
 ls
___
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: r289482 - head/sys/mips/conf

2015-10-17 Thread Sean Bruno
Author: sbruno
Date: Sun Oct 18 04:50:51 2015
New Revision: 289482
URL: https://svnweb.freebsd.org/changeset/base/289482

Log:
  Correctly use the default values for location of MAC addrs of arge0,
  arge1, ath0.  woo!
  
  Reviewed by:  adrian

Modified:
  head/sys/mips/conf/TP-MR3020.hints

Modified: head/sys/mips/conf/TP-MR3020.hints
==
--- head/sys/mips/conf/TP-MR3020.hints  Sun Oct 18 04:07:40 2015
(r289481)
+++ head/sys/mips/conf/TP-MR3020.hints  Sun Oct 18 04:50:51 2015
(r289482)
@@ -26,18 +26,18 @@ hint.arswitch.0.is_gmii=1   # arge1 <-> sw
 # arge0 - MII, autoneg, phy(4)
 hint.arge.0.phymask=0x10   # PHY4
 hint.arge.0.mdio=mdioproxy1# .. off of the switch mdiobus
+hint.arge.0.eeprommac=0x1fff
 
 # arge1 - GMII, 1000/full
 hint.arge.1.phymask=0x0# No directly mapped PHYs
 hint.arge.1.media=1000
 hint.arge.1.fduplex=1
+hint.arge.1.eeprommac=0x1fff0006
 
 # Where the ART is - last 64k in the flash
 # 0x9fff1000 ?
-hint.ath.0.eepromaddr=0x1fff1000
+hint.ath.0.eepromaddr=0x1fff
 hint.ath.0.eepromsize=16384
- 
-hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00
 
 # The board 4MiB flash layout in uboot env:
 #
___
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: r289481 - head/share/mk

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sun Oct 18 04:07:40 2015
New Revision: 289481
URL: https://svnweb.freebsd.org/changeset/base/289481

Log:
  Only enable -fstack-protector-strong on gcc 4.9+ and default to 
-fstack-protector
  when -fstack-protector-strong is not available, like it was implicitly before
  r288669
  
  As noted by antoine@, devel/gcc (which is 4.8.5) lacks 
-fstack-protector-strong
  support, whereas 4.8.4i (devel/gcc48) has the support.
  
  Until a version is available which has -fstack-protector-strong support, be
  conservative and only enable support with 4.9+.
  
  Reviewed by: pfg
  X-MFC with: r288669, r289465
  Differential Revision: https://reviews.freebsd.org/D3924

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

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkSun Oct 18 03:09:03 2015(r289480)
+++ head/share/mk/bsd.sys.mkSun Oct 18 04:07:40 2015(r289481)
@@ -150,11 +150,13 @@ CXXFLAGS.clang+=   -Wno-c++11-extensions
 ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
 .if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \
 (${COMPILER_TYPE} == "gcc" && \
- (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800))
+ (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40900))
 # Don't use -Wstack-protector as it breaks world with -Werror.
 SSP_CFLAGS?=   -fstack-protector-strong
-CFLAGS+=   ${SSP_CFLAGS}
+.else
+SSP_CFLAGS?=   -fstack-protector
 .endif
+CFLAGS+=   ${SSP_CFLAGS}
 .endif # SSP && !ARM && !MIPS
 
 # Allow user-specified additional warning flags, plus compiler specific flag 
overrides.
___
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: r289480 - head/sys/contrib/ipfilter/netinet

2015-10-17 Thread Cy Schubert
Author: cy
Date: Sun Oct 18 03:09:03 2015
New Revision: 289480
URL: https://svnweb.freebsd.org/changeset/base/289480

Log:
  Really fix ipfilter bug 3600459.
  
  Obtained from:ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4
  MFC after:3 days

Modified:
  head/sys/contrib/ipfilter/netinet/ip_state.c

Modified: head/sys/contrib/ipfilter/netinet/ip_state.c
==
--- head/sys/contrib/ipfilter/netinet/ip_state.cSun Oct 18 01:30:23 
2015(r289479)
+++ head/sys/contrib/ipfilter/netinet/ip_state.cSun Oct 18 03:09:03 
2015(r289480)
@@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why)
if (is->is_ref > 0) {
int refs;
 
-   is->is_ref--;
refs = is->is_ref;
MUTEX_EXIT(&is->is_lock);
if (!orphan)
@@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why)
}
}
 
-   is->is_ref = 0;
+   ASSERT(is->is_ref == 0);
MUTEX_EXIT(&is->is_lock);
 
if (is->is_tqehead[0] != NULL) {
___
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: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Cy Schubert
In message <1445109956.71631.44.ca...@freebsd.org>, Ian Lepore writes:
> On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote:
> > Until the next leap second…. It would be better to just
> > always try to grab the latest one… Can we put something
> > in periodic to do that so users that have releases
> > that are older than 6 months aren’t screwed?
> > 
> > Warner
> > 
> 
> I think writing a leapfeatcher task for periodic daily|weekly would
> make a nice junior-hacker task.  It would be nice if it only hit the
> network when expiration of the installed file is imminent (like within
> a month), and only if both ntp and the leapfile feature are enabled and
> stuff like that.  It should probably have a configurable list of URLs t
> o fetch from.

Enablement through and rc.conf option possibly? Not that this is an elegant 
solution though.


-- 
Cheers,
Cy Schubert  or 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


> 
> -- Ian
> 
> > > On Oct 16, 2015, at 8:04 AM, Cy Schubert  wrote:
> > > 
> > > Author: cy
> > > Date: Fri Oct 16 14:04:16 2015
> > > New Revision: 289421
> > > URL: https://svnweb.freebsd.org/changeset/base/289421
> > > 
> > > Log:
> > >  Add default leap-seconds file. This should help ntp networks get
> > > the
> > >  leap second date correct
> > > 
> > >  Updates to the file can be obtained from ftp://time.nist.gov/pub/ 
> > > or
> > >  ftp://tycho.usno.navy.mil/pub/ntp/.
> > > 
> > >  Suggested by:dwmalone
> > >  Reviewed by: roberto, dwmalone, delphij
> > >  Approved by: roberto
> > >  MFC after:   1 week
> > > 
> > > Added:
> > >  head/etc/ntp/
> > >  head/etc/ntp/Makefile   (contents, props changed)
> > >  head/etc/ntp/leap-seconds   (contents, props changed)
> > > Modified:
> > >  head/etc/Makefile
> > >  head/etc/mtree/BSD.var.dist
> > >  head/etc/ntp.conf
> > > 
> > > Modified: head/etc/Makefile
> > > ===
> > > ===
> > > --- head/etc/Makefile Fri Oct 16 12:53:22 2015(r2894
> > > 20)
> > > +++ head/etc/Makefile Fri Oct 16 14:04:16 2015(r2894
> > > 21)
> > > @@ -240,6 +240,9 @@ distribution:
> > >   ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
> > >   ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
> > >   ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> > > +.if ${MK_NTP} != "no"
> > > + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
> > > +.endif
> > >   ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
> > > .if ${MK_PKGBOOTSTRAP} != "no"
> > >   ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
> > > 
> > > Modified: head/etc/mtree/BSD.var.dist
> > > ===
> > > ===
> > > --- head/etc/mtree/BSD.var.dist   Fri Oct 16 12:53:22 2015
> > > (r289420)
> > > +++ head/etc/mtree/BSD.var.dist   Fri Oct 16 14:04:16 2015
> > > (r289421)
> > > @@ -46,6 +46,8 @@
> > > ..
> > > ipf mode=0700
> > > ..
> > > +ntp mode=0700
> > > +..
> > > pkg
> > > ..
> > > ports
> > > 
> > > Modified: head/etc/ntp.conf
> > > ===
> > > ===
> > > --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015(r2894
> > > 20)
> > > +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015(r2894
> > > 21)
> > > @@ -77,3 +77,8 @@ restrict 127.127.1.0
> > > #
> > > #server 127.127.1.0
> > > #fudge 127.127.1.0 stratum 10
> > > +
> > > +# See 
> > > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14
> > > .
> > > +# for documentation regarding leapfile. Updates to the file can be
> > > obtained
> > > +# from ftp://time.nist.gov/pub/ or 
> > > ftp://tycho.usno.navy.mil/pub/ntp/.
> > > +leapfile "/etc/ntp/leap-seconds"
> > > 
> > > Added: head/etc/ntp/Makefile
> > > ===
> > > ===
> > > --- /dev/null 00:00:00 1970   (empty, because file is
> > > newly added)
> > > +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015(r
> > > 289421)
> > > @@ -0,0 +1,10 @@
> > > +# $FreeBSD$
> > > +
> > > +NO_OBJ=
> > > +
> > > +FILES=   leap-seconds
> > > +
> > > +FILESDIR=/etc/ntp
> > > +FILESMODE=   644
> > > +
> > > +.include 
> > > 
> > > Added: head/etc/ntp/leap-seconds
> > > ===
> > > ===
> > > --- /dev/null 00:00:00 1970   (empty, because file is
> > > newly added)
> > > +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015
> > > (r289421)
> > > @@ -0,0 +1,119 @@
> > > +#
> > > +# $FreeBSD$
> > > +#
> > > +#ATOMIC TIME.
> > > +#The Coordinated Universal Time (UTC) is the reference
> > > time scale derived
> > > +#from The "Temps Atomique International" (TAI) calculated
> > > by the Bureau
> > > +#International des Poids et Mes

Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Cy Schubert
In message <00150ef2-0020-42e5-a1e5-324a23975...@bsdimp.com>, Warner Losh 
writes:
> > On Oct 17, 2015, at 3:20 PM, David Malone  =
> wrote:
> >=20
> > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote:
> >>If the leapseconds file is present, the leap bits for reference
> >>clocks and downstratum servers are ignored.
> >>=20
> >> I can't determine from casual code examination (and I don't have time
> >> to experiment now) whether that is true even if the file is expired.
> >=20
> > The way the code seems to work is:
> >=20
> > 1) Take a vote from your peers on if there is an upcoming
> > leap second. Refclocks can outvote other peers. (This is
> > in ntp_proto.c:clock_update() - search for leap_vote_ins).
> 
> Assuming no bugs, yes. And assuming your peers are sending
> the correct information. History with ntpd and ntp serves well
> illustrates that these assumptions are violated often.
> 
> > 2) If one seems to be pending, try to insert it into an
> > in-memory table for the end of the month.
> 
> NTP only recognizes June and December as valid leap insertion
> points. This is likely safe for the foreseeable future though, even
> though the official standard allows leap seconds to be the end of
> any month. Too many things assume you only have leap seconds
> at these times for IERS to issue one that isn=E2=80=99t at the end of =
> December
> or June until earth rotation forces their hand sometime around the
> end of this century (give or take a few decades).
> 
> > 3) If you find that you loaded a table and the leapsecond
> > you are trying to insert is within the valid range of the
> > table, return an error. (This is in ntp_leapsec.c:leapsec_add())
> >=20
> > So, I think the change should be safe, if the comments match the code.
> 
> That=E2=80=99s a big if. Both Ian and I have witnessed the carnage of =
> incorrect
> leap seconds first hand and so are somewhat touchy on the subject. It
> is a place where getting the canonical information is 1000x better than
> relying on code to implement things that can=E2=80=99t go wrong. Because =
> they
> often do. Way way too often. When you have leap second info, always
> always always try extra hard to make sure it is as up to date as you
> can get it. Any =E2=80=9Cshort cut=E2=80=9D here is asking for trouble, =
> even if you think
> you can prove that no such trouble is possible.

Would an rc.conf option to use an alternate ntp.conf be of help? Having 
said that (and shooting down my own idea), it does seem a bit messy and 
rather inelegant though.


-- 
Cheers,
Cy Schubert  or 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.




___
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: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Cy Schubert
Agreed, this would be best. There was a suggestion a GSoC person could do 
it (though I'm willing to roll up my sleeves if necessary).


-- 
Cheers,
Cy Schubert  or 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.



In message <8154492e-c29e-41b1-a13b-34e33586d...@bsdimp.com>, Warner Losh 
write
s:
> 
> 
> --Apple-Mail=_60572A67-97E7-4200-AEF6-88DC6354712B
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain;
>   charset=utf-8
> 
> Until the next leap second=E2=80=A6. It would be better to just
> always try to grab the latest one=E2=80=A6 Can we put something
> in periodic to do that so users that have releases
> that are older than 6 months aren=E2=80=99t screwed?
> 
> Warner
> 
> > On Oct 16, 2015, at 8:04 AM, Cy Schubert  wrote:
> >=20
> > Author: cy
> > Date: Fri Oct 16 14:04:16 2015
> > New Revision: 289421
> > URL: https://svnweb.freebsd.org/changeset/base/289421
> >=20
> > Log:
> >  Add default leap-seconds file. This should help ntp networks get the
> >  leap second date correct
> >=20
> >  Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
> >  ftp://tycho.usno.navy.mil/pub/ntp/.
> >=20
> >  Suggested by:  dwmalone
> >  Reviewed by:   roberto, dwmalone, delphij
> >  Approved by:   roberto
> >  MFC after: 1 week
> >=20
> > Added:
> >  head/etc/ntp/
> >  head/etc/ntp/Makefile   (contents, props changed)
> >  head/etc/ntp/leap-seconds   (contents, props changed)
> > Modified:
> >  head/etc/Makefile
> >  head/etc/mtree/BSD.var.dist
> >  head/etc/ntp.conf
> >=20
> > Modified: head/etc/Makefile
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- head/etc/Makefile   Fri Oct 16 12:53:22 2015(r289420)
> > +++ head/etc/Makefile   Fri Oct 16 14:04:16 2015(r289421)
> > @@ -240,6 +240,9 @@ distribution:
> > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
> > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
> > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> > +.if ${MK_NTP} !=3D "no"
> > +   ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
> > +.endif
> > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
> > .if ${MK_PKGBOOTSTRAP} !=3D "no"
> > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
> >=20
> > Modified: head/etc/mtree/BSD.var.dist
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015=
> (r289420)
> > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015=
> (r289421)
> > @@ -46,6 +46,8 @@
> > ..
> > ipf mode=3D0700
> > ..
> > +ntp mode=3D0700
> > +..
> > pkg
> > ..
> > ports
> >=20
> > Modified: head/etc/ntp.conf
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- head/etc/ntp.conf   Fri Oct 16 12:53:22 2015(r289420)
> > +++ head/etc/ntp.conf   Fri Oct 16 14:04:16 2015(r289421)
> > @@ -77,3 +77,8 @@ restrict 127.127.1.0
> > #
> > #server 127.127.1.0
> > #fudge 127.127.1.0 stratum 10
> > +
> > +# See =
> http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14.
> > +# for documentation regarding leapfile. Updates to the file can be =
> obtained
> > +# from ftp://time.nist.gov/pub/ or =
> ftp://tycho.usno.navy.mil/pub/ntp/.
> > +leapfile "/etc/ntp/leap-seconds"
> >=20
> > Added: head/etc/ntp/Makefile
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> > +++ head/etc/ntp/Makefile   Fri Oct 16 14:04:16 2015=
> (r289421)
> > @@ -0,0 +1,10 @@
> > +# $FreeBSD$
> > +
> > +NO_OBJ=3D
> > +
> > +FILES=3D   leap-seconds
> > +
> > +FILESDIR=3D/etc/ntp
> > +FILESMODE=3D   644
> > +
> > +.include 
> >=20
> > Added: head/etc/ntp/leap-seconds
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> > +++ head

svn commit: r289477 - head/sys/arm/mv

2015-10-17 Thread Ian Lepore
Author: ian
Date: Sun Oct 18 01:03:43 2015
New Revision: 289477
URL: https://svnweb.freebsd.org/changeset/base/289477

Log:
  Fix a strange macro re-definition compile error.  If the VM_MAXUSER_ADDRESS
  value is defined as a config option the definition is emitted into
  opt_global.h which is force-included into everything.  In addition, the
  symbol is emitted by the genassym mechanism, but that by its nature reduces
  the value to a 0x number.  When compiling a .S file you end up
  with two different definitions of the macro (they evaluate to the same
  number, but the text is different, upsetting the compiler).
  
  Nothing has changed about this code for a while but the compile error is
  new, so this must be fallout from the clang 3.7 update or something.

Modified:
  head/sys/arm/mv/std-pj4b.mv

Modified: head/sys/arm/mv/std-pj4b.mv
==
--- head/sys/arm/mv/std-pj4b.mv Sun Oct 18 00:59:28 2015(r289476)
+++ head/sys/arm/mv/std-pj4b.mv Sun Oct 18 01:03:43 2015(r289477)
@@ -5,4 +5,8 @@ cpu CPU_MV_PJ4B
 machinearm armv6
 makeoptionsCONF_CFLAGS="-march=armv7a"
 
-optionsVM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))"
+# This was originally defined as "(KERNBASE-(1024*1024*1024))" but that
+# (in opt_global.h) clashed with the value emitted by genassym which
+# reduces the original macro text to its numeric value.  The only way
+# to avoid that is to define it here as the numeric value genassym emits.
+optionsVM_MAXUSER_ADDRESS="0x8000"
___
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: r289476 - head/sys/mips/atheros

2015-10-17 Thread Adrian Chadd
Author: adrian
Date: Sun Oct 18 00:59:28 2015
New Revision: 289476
URL: https://svnweb.freebsd.org/changeset/base/289476

Log:
  if_arge: fix up TX workaround; add TX/RX requirements for busdma; add stats
  
  The early ethernet MACs (I think AR71xx and AR913x) require that both
  TX and RX require 4-byte alignment for all packets.
  
  The later MACs have started relaxing the requirements.
  
  For now, the 1-byte TX and 1-byte RX alignment requirements are only for
  the QCA955x SoCs.  I'll add in the relaxed requirements as I review the
  datasheets and do testing.
  
  * Add a hardware flags field and 1-byte / 4-byte TX/RX alignment.
  * .. defaulting to 4-byte TX and 4-byte RX alignment.
  * Only enforce the TX alignment fixup if the hardware requires a 4-byte
TX alignment.  This avoids a call to m_defrag().
  * Add counters for various situations for further debugging.
  * Set the 1-byte and 4-byte busdma alignment requirement when
the tag is created.
  
  This improves the straight bridging performance from 130mbit/sec
  to 180mbit/sec, purely by removing the need for TX path bounce buffers.
  
  The main performance issue is the RX alignment requirement and any RX
  bounce buffering that's occuring.  (In a local test, removing the RX
  fixup path and just aligning buffers raises the performance to above
  400mbit/sec.
  
  In theory it's a no-op for SoCs before the QCA955x.
  
  Tested:
  
  * QCA9558 SoC in AP135 board, using software bridging between arge0/arge1.

Modified:
  head/sys/mips/atheros/if_arge.c
  head/sys/mips/atheros/if_argevar.h

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Sat Oct 17 22:41:30 2015
(r289475)
+++ head/sys/mips/atheros/if_arge.c Sun Oct 18 00:59:28 2015
(r289476)
@@ -298,6 +298,29 @@ arge_attach_sysctl(device_t dev)
"tx_pkts_unaligned", CTLFLAG_RW, &sc->stats.tx_pkts_unaligned,
0, "number of TX unaligned packets");
 
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "tx_pkts_unaligned_start", CTLFLAG_RW, 
&sc->stats.tx_pkts_unaligned_start,
+   0, "number of TX unaligned packets (start)");
+
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "tx_pkts_unaligned_len", CTLFLAG_RW, 
&sc->stats.tx_pkts_unaligned_len,
+   0, "number of TX unaligned packets (len)");
+
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "tx_pkts_nosegs", CTLFLAG_RW, &sc->stats.tx_pkts_nosegs,
+   0, "number of TX packets fail with no ring slots avail");
+
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "intr_stray_filter", CTLFLAG_RW, &sc->stats.intr_stray,
+   0, "number of stray interrupts (filter)");
+
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "intr_stray_intr", CTLFLAG_RW, &sc->stats.intr_stray2,
+   0, "number of stray interrupts (intr)");
+
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "intr_ok", CTLFLAG_RW, &sc->stats.intr_ok,
+   0, "number of OK interrupts");
 #ifdef ARGE_DEBUG
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "tx_prod",
CTLFLAG_RW, &sc->arge_cdata.arge_tx_prod, 0, "");
@@ -627,6 +650,22 @@ arge_attach(device_t dev)
}
 
/*
+* Hardware workarounds.
+*/
+   switch (ar71xx_soc) {
+   case AR71XX_SOC_QCA9556:
+   case AR71XX_SOC_QCA9558:
+   /* Arbitrary alignment */
+   sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_1BYTE;
+   sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE;
+   break;
+   default:
+   sc->arge_hw_flags |= ARGE_HW_FLG_TX_DESC_ALIGN_4BYTE;
+   sc->arge_hw_flags |= ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE;
+   break;
+   }
+
+   /*
 * Some units (eg the TP-Link WR-1043ND) do not have a convenient
 * EEPROM location to read the ethernet MAC address from.
 * OpenWRT simply snaffles it from a fixed location.
@@ -825,6 +864,9 @@ arge_attach(device_t dev)
ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG0,
FIFO_CFG0_ALL << FIFO_CFG0_ENABLE_SHIFT);
 
+   /*
+* SoC specific bits.
+*/
switch (ar71xx_soc) {
case AR71XX_SOC_AR7240:
case AR71XX_SOC_AR7241:
@@ -1351,24 +1393,35 @@ arge_init_locked(struct arge_softc *sc)
  * Return whether the mbuf chain is correctly aligned
  * for the arge TX engine.
  *
- * The TX engine requires each fragment to be aligned to a
- * 4 byte boundary and the size of each fragment except
- * the last to be a multiple of 4 bytes.
+ * All the MACs have a length requirement: any non-final
+ * fragment (ie, descriptor with MORE bit set) needs to have
+ * a length divisible b

Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Warner Losh

> On Oct 17, 2015, at 1:25 PM, Ian Lepore  wrote:
> 
> On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote:
>> Until the next leap second…. It would be better to just
>> always try to grab the latest one… Can we put something
>> in periodic to do that so users that have releases
>> that are older than 6 months aren’t screwed?
>> 
>> Warner
>> 
> 
> I think writing a leapfeatcher task for periodic daily|weekly would
> make a nice junior-hacker task.  It would be nice if it only hit the
> network when expiration of the installed file is imminent (like within
> a month), and only if both ntp and the leapfile feature are enabled and
> stuff like that.  It should probably have a configurable list of URLs
> to fetch from.

It should be very easy to try to fetch it once a day in June and December
until you succeed from each of the URLs in a list, with the default
list being the two canonical (for the US at least) sources. Shouldn’t
be more than a dozen lines in a periodic script.

The BIPM also publishes this data in another form, as does USNO for the
paranoid that want to check. phk has also spearheaded an effort
to publish this data via DNS, but I don’t know if that’s live and
automated or just live and experimental…

Warner

> -- Ian
> 
>>> On Oct 16, 2015, at 8:04 AM, Cy Schubert  wrote:
>>> 
>>> Author: cy
>>> Date: Fri Oct 16 14:04:16 2015
>>> New Revision: 289421
>>> URL: https://svnweb.freebsd.org/changeset/base/289421
>>> 
>>> Log:
>>> Add default leap-seconds file. This should help ntp networks get
>>> the
>>> leap second date correct
>>> 
>>> Updates to the file can be obtained from ftp://time.nist.gov/pub/
>>> or
>>> ftp://tycho.usno.navy.mil/pub/ntp/.
>>> 
>>> Suggested by:   dwmalone
>>> Reviewed by:roberto, dwmalone, delphij
>>> Approved by:roberto
>>> MFC after:  1 week
>>> 
>>> Added:
>>> head/etc/ntp/
>>> head/etc/ntp/Makefile   (contents, props changed)
>>> head/etc/ntp/leap-seconds   (contents, props changed)
>>> Modified:
>>> head/etc/Makefile
>>> head/etc/mtree/BSD.var.dist
>>> head/etc/ntp.conf
>>> 
>>> Modified: head/etc/Makefile
>>> ===
>>> ===
>>> --- head/etc/Makefile   Fri Oct 16 12:53:22 2015(r2894
>>> 20)
>>> +++ head/etc/Makefile   Fri Oct 16 14:04:16 2015(r2894
>>> 21)
>>> @@ -240,6 +240,9 @@ distribution:
>>> ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
>>> ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
>>> ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
>>> +.if ${MK_NTP} != "no"
>>> +   ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
>>> +.endif
>>> ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
>>> .if ${MK_PKGBOOTSTRAP} != "no"
>>> ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
>>> 
>>> Modified: head/etc/mtree/BSD.var.dist
>>> ===
>>> ===
>>> --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015
>>> (r289420)
>>> +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015
>>> (r289421)
>>> @@ -46,6 +46,8 @@
>>>..
>>>ipf mode=0700
>>>..
>>> +ntp mode=0700
>>> +..
>>>pkg
>>>..
>>>ports
>>> 
>>> Modified: head/etc/ntp.conf
>>> ===
>>> ===
>>> --- head/etc/ntp.conf   Fri Oct 16 12:53:22 2015(r2894
>>> 20)
>>> +++ head/etc/ntp.conf   Fri Oct 16 14:04:16 2015(r2894
>>> 21)
>>> @@ -77,3 +77,8 @@ restrict 127.127.1.0
>>> #
>>> #server 127.127.1.0
>>> #fudge 127.127.1.0 stratum 10
>>> +
>>> +# See
>>> http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14
>>> .
>>> +# for documentation regarding leapfile. Updates to the file can be
>>> obtained
>>> +# from ftp://time.nist.gov/pub/ or
>>> ftp://tycho.usno.navy.mil/pub/ntp/.
>>> +leapfile "/etc/ntp/leap-seconds"
>>> 
>>> Added: head/etc/ntp/Makefile
>>> ===
>>> ===
>>> --- /dev/null   00:00:00 1970   (empty, because file is
>>> newly added)
>>> +++ head/etc/ntp/Makefile   Fri Oct 16 14:04:16 2015(r
>>> 289421)
>>> @@ -0,0 +1,10 @@
>>> +# $FreeBSD$
>>> +
>>> +NO_OBJ=
>>> +
>>> +FILES= leap-seconds
>>> +
>>> +FILESDIR=  /etc/ntp
>>> +FILESMODE= 644
>>> +
>>> +.include 
>>> 
>>> Added: head/etc/ntp/leap-seconds
>>> ===
>>> ===
>>> --- /dev/null   00:00:00 1970   (empty, because file is
>>> newly added)
>>> +++ head/etc/ntp/leap-seconds   Fri Oct 16 14:04:16 2015
>>> (r289421)
>>> @@ -0,0 +1,119 @@
>>> +#
>>> +# $FreeBSD$
>>> +#
>>> +#  ATOMIC TIME.
>>> +#  The Coordinated Universal Time (UTC) is the reference
>>> time scale derived
>>> +#  from The "Temps Atomique International" (TAI) calculated
>>> by the Bureau
>>> +#  International des Poids et Mesures (BIPM) using a
>>> worldwide network 

Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Warner Losh

> On Oct 17, 2015, at 3:20 PM, David Malone  wrote:
> 
> On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote:
>>If the leapseconds file is present, the leap bits for reference
>>clocks and downstratum servers are ignored.
>> 
>> I can't determine from casual code examination (and I don't have time
>> to experiment now) whether that is true even if the file is expired.
> 
> The way the code seems to work is:
> 
>   1) Take a vote from your peers on if there is an upcoming
>   leap second. Refclocks can outvote other peers. (This is
>   in ntp_proto.c:clock_update() - search for leap_vote_ins).

Assuming no bugs, yes. And assuming your peers are sending
the correct information. History with ntpd and ntp serves well
illustrates that these assumptions are violated often.

>   2) If one seems to be pending, try to insert it into an
>   in-memory table for the end of the month.

NTP only recognizes June and December as valid leap insertion
points. This is likely safe for the foreseeable future though, even
though the official standard allows leap seconds to be the end of
any month. Too many things assume you only have leap seconds
at these times for IERS to issue one that isn’t at the end of December
or June until earth rotation forces their hand sometime around the
end of this century (give or take a few decades).

>   3) If you find that you loaded a table and the leapsecond
>   you are trying to insert is within the valid range of the
>   table, return an error. (This is in ntp_leapsec.c:leapsec_add())
> 
> So, I think the change should be safe, if the comments match the code.

That’s a big if. Both Ian and I have witnessed the carnage of incorrect
leap seconds first hand and so are somewhat touchy on the subject. It
is a place where getting the canonical information is 1000x better than
relying on code to implement things that can’t go wrong. Because they
often do. Way way too often. When you have leap second info, always
always always try extra hard to make sure it is as up to date as you
can get it. Any “short cut” here is asking for trouble, even if you think
you can prove that no such trouble is possible.

Warner



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread David Malone
On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote:
> If the leapseconds file is present, the leap bits for reference
> clocks and downstratum servers are ignored.
> 
> I can't determine from casual code examination (and I don't have time
> to experiment now) whether that is true even if the file is expired.

The way the code seems to work is:

1) Take a vote from your peers on if there is an upcoming
leap second. Refclocks can outvote other peers. (This is
in ntp_proto.c:clock_update() - search for leap_vote_ins).

2) If one seems to be pending, try to insert it into an
in-memory table for the end of the month.

3) If you find that you loaded a table and the leapsecond
you are trying to insert is within the valid range of the
table, return an error. (This is in ntp_leapsec.c:leapsec_add())

So, I think the change should be safe, if the comments match the code.

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: r289469 - head/rescue/rescue

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 21:11:42 2015
New Revision: 289469
URL: https://svnweb.freebsd.org/changeset/base/289469

Log:
  Make iscsictl and iscsid build if MK_ISCSI == yes
  
  MFC after: 1 month
  X-MFC with: r289452

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Sat Oct 17 20:38:40 2015(r289468)
+++ head/rescue/rescue/Makefile Sat Oct 17 21:11:42 2015(r289469)
@@ -179,7 +179,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU
 #
 CRUNCH_SRCDIRS+= usr.bin
 
-CRUNCH_PROGS_usr.bin= head iscsictl mt nc sed tail tee
+CRUNCH_PROGS_usr.bin= head mt nc sed tail tee
 
 CRUNCH_PROGS_usr.bin+= gzip
 CRUNCH_ALIAS_gzip= gunzip gzcat zcat
@@ -214,12 +214,17 @@ CRUNCH_ALIAS_id= groups whoami
 #
 CRUNCH_SRCDIRS+= usr.sbin
 
-CRUNCH_PROGS_usr.sbin+= chroot iscsid
+CRUNCH_PROGS_usr.sbin+= chroot
 
 CRUNCH_PROGS_usr.sbin+= chown
 CRUNCH_ALIAS_chown= chgrp
 ##
 CRUNCH_LIBS+= -lm
 
+.if ${MK_ISCSI} != "no"
+CRUNCH_PROGS_usr.bin+= iscsictl
+CRUNCH_PROGS_usr.sbin+=iscsid
+.endif
+
 .include 
 .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: r289468 - stable/10/cddl/contrib/opensolaris/cmd/dtrace

2015-10-17 Thread Mark Johnston
Author: markj
Date: Sat Oct 17 20:38:40 2015
New Revision: 289468
URL: https://svnweb.freebsd.org/changeset/base/289468

Log:
  MFC r272455:
  Have dtrace(1) handle SIGPIPE, and handle signals when in list mode (-l).
  In particular, make sure to detach from child processes before exiting.

Modified:
  stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
==
--- stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c  Sat Oct 17 
19:55:58 2015(r289467)
+++ stable/10/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c  Sat Oct 17 
20:38:40 2015(r289468)
@@ -710,6 +710,9 @@ list_probe(dtrace_hdl_t *dtp, const dtra
if (g_verbose && dtrace_probe_info(dtp, pdp, &p) == 0)
print_probe_info(&p);
 
+   if (g_intr != 0)
+   return (1);
+
return (0);
 }
 
@@ -1220,11 +1223,34 @@ intr(int signo)
g_impatient = 1;
 }
 
+static void
+installsighands(void)
+{
+   struct sigaction act, oact;
+
+   (void) sigemptyset(&act.sa_mask);
+   act.sa_flags = 0;
+   act.sa_handler = intr;
+
+   if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
+   (void) sigaction(SIGINT, &act, NULL);
+
+   if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
+   (void) sigaction(SIGTERM, &act, NULL);
+
+#if !defined(sun)
+   if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
+   (void) sigaction(SIGPIPE, &act, NULL);
+
+   if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
+   (void) sigaction(SIGUSR1, &act, NULL);
+#endif
+}
+
 int
 main(int argc, char *argv[])
 {
dtrace_bufdesc_t buf;
-   struct sigaction act, oact;
dtrace_status_t status[2];
dtrace_optval_t opt;
dtrace_cmd_t *dcp;
@@ -1776,6 +1802,8 @@ main(int argc, char *argv[])
if (g_ofile != NULL && (g_ofp = fopen(g_ofile, "a")) == NULL)
fatal("failed to open output file '%s'", g_ofile);
 
+   installsighands();
+
oprintf("%5s %10s %17s %33s %s\n",
"ID", "PROVIDER", "MODULE", "FUNCTION", "NAME");
 
@@ -1861,20 +1889,7 @@ main(int argc, char *argv[])
if (opt != DTRACEOPT_UNSET)
notice("allowing destructive actions\n");
 
-   (void) sigemptyset(&act.sa_mask);
-   act.sa_flags = 0;
-   act.sa_handler = intr;
-
-   if (sigaction(SIGINT, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
-   (void) sigaction(SIGINT, &act, NULL);
-
-   if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
-   (void) sigaction(SIGTERM, &act, NULL);
-
-#if !defined(sun)
-   if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
-   (void) sigaction(SIGUSR1, &act, NULL);
-#endif
+   installsighands();
 
/*
 * Now that tracing is active and we are ready to consume trace data,
___
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: r289467 - in head: lib/libc/string share/man/man3 share/man/man9

2015-10-17 Thread Conrad E. Meyer
Author: cem
Date: Sat Oct 17 19:55:58 2015
New Revision: 289467
URL: https://svnweb.freebsd.org/changeset/base/289467

Log:
  Document bitset(9)

Added:
  head/share/man/man9/bitset.9   (contents, props changed)
Modified:
  head/lib/libc/string/ffs.3
  head/share/man/man3/bitstring.3
  head/share/man/man9/Makefile

Modified: head/lib/libc/string/ffs.3
==
--- head/lib/libc/string/ffs.3  Sat Oct 17 19:52:17 2015(r289466)
+++ head/lib/libc/string/ffs.3  Sat Oct 17 19:55:58 2015(r289467)
@@ -30,7 +30,7 @@
 .\" @(#)ffs.3  8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd September 29, 2012
+.Dd October 17, 2015
 .Dt FFS 3
 .Os
 .Sh NAME
@@ -81,7 +81,8 @@ Bits are numbered starting at 1, the lea
 A return value of zero from any of these functions means that the
 argument was zero.
 .Sh SEE ALSO
-.Xr bitstring 3
+.Xr bitstring 3 ,
+.Xr bitset 9
 .Sh HISTORY
 The
 .Fn ffs

Modified: head/share/man/man3/bitstring.3
==
--- head/share/man/man3/bitstring.3 Sat Oct 17 19:52:17 2015
(r289466)
+++ head/share/man/man3/bitstring.3 Sat Oct 17 19:55:58 2015
(r289467)
@@ -30,7 +30,7 @@
 .\" @(#)bitstring.38.1 (Berkeley) 7/19/93
 .\" $FreeBSD$
 .\"
-.Dd July 19, 1993
+.Dd October 17, 2015
 .Dt BITSTRING 3
 .Os
 .Sh NAME
@@ -178,7 +178,8 @@ make_lpr_available()
 }
 .Ed
 .Sh SEE ALSO
-.Xr malloc 3
+.Xr malloc 3 ,
+.Xr bitset 9
 .Sh HISTORY
 The
 .Nm bitstring

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileSat Oct 17 19:52:17 2015
(r289466)
+++ head/share/man/man9/MakefileSat Oct 17 19:55:58 2015
(r289467)
@@ -11,6 +11,7 @@ MAN=  accept_filter.9 \
altq.9 \
atomic.9 \
bios.9 \
+   bitset.9 \
boot.9 \
bpf.9 \
buf.9 \
@@ -429,6 +430,32 @@ MLINKS+=atomic.9 atomic_add.9 \
atomic.9 atomic_subtract.9 \
atomic.9 atomic_swap.9 \
atomic.9 atomic_testandset.9
+MLINKS+=bitset.9 BITSET_DEFINE.9 \
+   bitset.9 BITSET_T_INITIALIZER.9 \
+   bitset.9 BITSET_FSET.9 \
+   bitset.9 BIT_CLR.9 \
+   bitset.9 BIT_COPY.9 \
+   bitset.9 BIT_ISSET.9 \
+   bitset.9 BIT_SET.9 \
+   bitset.9 BIT_ZERO.9 \
+   bitset.9 BIT_FILL.9 \
+   bitset.9 BIT_SETOF.9 \
+   bitset.9 BIT_EMPTY.9 \
+   bitset.9 BIT_ISFULLSET.9 \
+   bitset.9 BIT_FFS.9 \
+   bitset.9 BIT_COUNT.9 \
+   bitset.9 BIT_SUBSET.9 \
+   bitset.9 BIT_OVERLAP.9 \
+   bitset.9 BIT_CMP.9 \
+   bitset.9 BIT_OR.9 \
+   bitset.9 BIT_AND.9 \
+   bitset.9 BIT_NAND.9 \
+   bitset.9 BIT_CLR_ATOMIC.9 \
+   bitset.9 BIT_SET_ATOMIC.9 \
+   bitset.9 BIT_SET_ATOMIC_ACQ.9 \
+   bitset.9 BIT_AND_ATOMIC.9 \
+   bitset.9 BIT_OR_ATOMIC.9 \
+   bitset.9 BIT_COPY_STORE_REL.9
 MLINKS+=bpf.9 bpfattach.9 \
bpf.9 bpfattach2.9 \
bpf.9 bpfdetach.9 \

Added: head/share/man/man9/bitset.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/bitset.9Sat Oct 17 19:55:58 2015
(r289467)
@@ -0,0 +1,400 @@
+.\" Copyright (c) 2015 Conrad Meyer 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 17, 2015
+.Dt BITSET 9
+.Os
+.Sh NAME
+.Nm bitset(9)
+\(em
+.Nm BITSET_DEFINE ,
+.Nm BITSET_T_INITIALIZER ,
+.Nm BITSET_FSET ,
+.Nm BIT_CLR ,
+.Nm BIT_COPY ,
+.Nm BIT_ISS

svn commit: r289466 - head/sys/arm64/arm64

2015-10-17 Thread Andrew Turner
Author: andrew
Date: Sat Oct 17 19:52:17 2015
New Revision: 289466
URL: https://svnweb.freebsd.org/changeset/base/289466

Log:
  Replace build_section_pagetable with build_l1_block_pagetable as it takes
  an extra argument to specify the number of 1GiB pages to map. This should
  be a nop as we are only mapping a single page, but when we move to use an
  extra level of page tables we will be able to map a second block, e.g. if
  the kernel was loaded over a 1GiB boundary.

Modified:
  head/sys/arm64/arm64/locore.S

Modified: head/sys/arm64/arm64/locore.S
==
--- head/sys/arm64/arm64/locore.S   Sat Oct 17 19:48:17 2015
(r289465)
+++ head/sys/arm64/arm64/locore.S   Sat Oct 17 19:52:17 2015
(r289466)
@@ -379,7 +379,8 @@ create_pagetables:
mov x7, #DEVICE_MEM
mov x8, #(SOCDEV_VA)/* VA start */
mov x9, #(SOCDEV_PA)/* PA start */
-   bl  build_section_pagetable
+   mov x10, #1
+   bl  build_l1_block_pagetable
 #endif
 
/* Create the VA = PA map */
@@ -387,36 +388,38 @@ create_pagetables:
mov x7, #NORMAL_UNCACHED /* Uncached as it's only needed early on */
mov x9, x27
mov x8, x9  /* VA start (== PA start) */
-   bl  build_section_pagetable
+   mov x10, #1
+   bl  build_l1_block_pagetable
 
/* Restore the Link register */
mov x30, x5
ret
 
 /*
- * Builds a 1 GiB page table entry
- *  x6 = L1 table
- *  x7 = Type (0 = Device, 1 = Normal)
- *  x8 = VA start
- *  x9 = PA start (trashed)
+ * Builds an L1 -> L2 table descriptor
+ *
+ * This is a link for a 1GiB block of memory with up to 2MiB regions mapped
+ * within it by build_l2_block_pagetable.
+ *
+ *  x6  = L1 table
+ *  x8  = Virtual Address
+ *  x9  = L2 PA (trashed)
  *  x11, x12 and x13 are trashed
  */
-build_section_pagetable:
+link_l1_pagetable:
/*
-* Build the L1 table entry.
+* Link an L1 -> L2 table entry.
 */
/* Find the table index */
lsr x11, x8, #L1_SHIFT
and x11, x11, #Ln_ADDR_MASK
 
/* Build the L1 block entry */
-   lsl x12, x7, #2
-   orr x12, x12, #L1_BLOCK
-   orr x12, x12, #(ATTR_AF)
+   mov x12, #L1_TABLE
 
/* Only use the output address bits */
-   lsr x9, x9, #L1_SHIFT
-   orr x12, x12, x9, lsl #L1_SHIFT
+   lsr x9, x9, #12
+   orr x12, x12, x9, lsl #12
 
/* Store the entry */
str x12, [x6, x11, lsl #3]
@@ -424,35 +427,48 @@ build_section_pagetable:
ret
 
 /*
- * Builds an L1 -> L2 table descriptor
- *
- * This is a link for a 1GiB block of memory with up to 2MiB regions mapped
- * within it by build_l1_block_pagetable.
- *
+ * Builds count 1 GiB page table entry
  *  x6  = L1 table
- *  x8  = Virtual Address
- *  x9  = L2 PA (trashed)
+ *  x7  = Type (0 = Device, 1 = Normal)
+ *  x8  = VA start
+ *  x9  = PA start (trashed)
+ *  x10 = Entry count (TODO)
  *  x11, x12 and x13 are trashed
  */
-link_l1_pagetable:
+build_l1_block_pagetable:
/*
-* Link an L1 -> L2 table entry.
+* Build the L1 table entry.
 */
/* Find the table index */
lsr x11, x8, #L1_SHIFT
and x11, x11, #Ln_ADDR_MASK
 
/* Build the L1 block entry */
-   mov x12, #L1_TABLE
+   lsl x12, x7, #2
+   orr x12, x12, #L1_BLOCK
+   orr x12, x12, #(ATTR_AF)
+#ifdef SMP
+   orr x12, x12, ATTR_SH(ATTR_SH_IS)
+#endif
 
/* Only use the output address bits */
-   lsr x9, x9, #12
-   orr x12, x12, x9, lsl #12
+   lsr x9, x9, #L1_SHIFT
+
+   /* Set the physical address for this virtual address */
+1: orr x12, x12, x9, lsl #L1_SHIFT
 
/* Store the entry */
str x12, [x6, x11, lsl #3]
 
-   ret
+   /* Clear the address bits */
+   and x12, x12, #ATTR_MASK_L
+
+   sub x10, x10, #1
+   add x11, x11, #1
+   add x9, x9, #1
+   cbnzx10, 1b
+
+2: ret
 
 /*
  * Builds count 2 MiB page table entry
___
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: r289465 - head/share/mk

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 19:48:17 2015
New Revision: 289465
URL: https://svnweb.freebsd.org/changeset/base/289465

Log:
  Only use -fstack-protector-strong with supported compilers
  
  This includes clang 3.5.0+, gcc 4.2.1, gcc 4.8.4+
  
  This allows me to do subdirectory makes again after setting
  MAKESYSPATH on 10.2-RELEASE as it comes with clang 3.4.1.
  
  As a sidenote: this isn't technically correct for all vintages
  of gcc 4.2.1, but will be correct when gcc is rebuilt/reinstalled
  after r286074, so this version check should be good enough.
  
  X-MFC with: r288669
  Differential Revision: https://reviews.freebsd.org/D3924
  Reviewed by: emaste, pfg

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

Modified: head/share/mk/bsd.sys.mk
==
--- head/share/mk/bsd.sys.mkSat Oct 17 18:59:14 2015(r289464)
+++ head/share/mk/bsd.sys.mkSat Oct 17 19:48:17 2015(r289465)
@@ -148,9 +148,13 @@ CXXFLAGS.clang+=-Wno-c++11-extensions
 
 .if ${MK_SSP} != "no" && \
 ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
+.if (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30500) || \
+(${COMPILER_TYPE} == "gcc" && \
+ (${COMPILER_VERSION} == 40201 || ${COMPILER_VERSION} >= 40800))
 # Don't use -Wstack-protector as it breaks world with -Werror.
 SSP_CFLAGS?=   -fstack-protector-strong
 CFLAGS+=   ${SSP_CFLAGS}
+.endif
 .endif # SSP && !ARM && !MIPS
 
 # Allow user-specified additional warning flags, plus compiler specific flag 
overrides.
___
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: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Ian Lepore
On Sat, 2015-10-17 at 13:19 -0600, Warner Losh wrote:
> Until the next leap second…. It would be better to just
> always try to grab the latest one… Can we put something
> in periodic to do that so users that have releases
> that are older than 6 months aren’t screwed?
> 
> Warner
> 

I think writing a leapfeatcher task for periodic daily|weekly would
make a nice junior-hacker task.  It would be nice if it only hit the
network when expiration of the installed file is imminent (like within
a month), and only if both ntp and the leapfile feature are enabled and
stuff like that.  It should probably have a configurable list of URLs t
o fetch from.

-- Ian

> > On Oct 16, 2015, at 8:04 AM, Cy Schubert  wrote:
> > 
> > Author: cy
> > Date: Fri Oct 16 14:04:16 2015
> > New Revision: 289421
> > URL: https://svnweb.freebsd.org/changeset/base/289421
> > 
> > Log:
> >  Add default leap-seconds file. This should help ntp networks get
> > the
> >  leap second date correct
> > 
> >  Updates to the file can be obtained from ftp://time.nist.gov/pub/ 
> > or
> >  ftp://tycho.usno.navy.mil/pub/ntp/.
> > 
> >  Suggested by:  dwmalone
> >  Reviewed by:   roberto, dwmalone, delphij
> >  Approved by:   roberto
> >  MFC after: 1 week
> > 
> > Added:
> >  head/etc/ntp/
> >  head/etc/ntp/Makefile   (contents, props changed)
> >  head/etc/ntp/leap-seconds   (contents, props changed)
> > Modified:
> >  head/etc/Makefile
> >  head/etc/mtree/BSD.var.dist
> >  head/etc/ntp.conf
> > 
> > Modified: head/etc/Makefile
> > ===
> > ===
> > --- head/etc/Makefile   Fri Oct 16 12:53:22 2015(r2894
> > 20)
> > +++ head/etc/Makefile   Fri Oct 16 14:04:16 2015(r2894
> > 21)
> > @@ -240,6 +240,9 @@ distribution:
> > ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
> > ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
> > ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> > +.if ${MK_NTP} != "no"
> > +   ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
> > +.endif
> > ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
> > .if ${MK_PKGBOOTSTRAP} != "no"
> > ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
> > 
> > Modified: head/etc/mtree/BSD.var.dist
> > ===
> > ===
> > --- head/etc/mtree/BSD.var.dist Fri Oct 16 12:53:22 2015
> > (r289420)
> > +++ head/etc/mtree/BSD.var.dist Fri Oct 16 14:04:16 2015
> > (r289421)
> > @@ -46,6 +46,8 @@
> > ..
> > ipf mode=0700
> > ..
> > +ntp mode=0700
> > +..
> > pkg
> > ..
> > ports
> > 
> > Modified: head/etc/ntp.conf
> > ===
> > ===
> > --- head/etc/ntp.conf   Fri Oct 16 12:53:22 2015(r2894
> > 20)
> > +++ head/etc/ntp.conf   Fri Oct 16 14:04:16 2015(r2894
> > 21)
> > @@ -77,3 +77,8 @@ restrict 127.127.1.0
> > #
> > #server 127.127.1.0
> > #fudge 127.127.1.0 stratum 10
> > +
> > +# See 
> > http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14
> > .
> > +# for documentation regarding leapfile. Updates to the file can be
> > obtained
> > +# from ftp://time.nist.gov/pub/ or 
> > ftp://tycho.usno.navy.mil/pub/ntp/.
> > +leapfile "/etc/ntp/leap-seconds"
> > 
> > Added: head/etc/ntp/Makefile
> > ===
> > ===
> > --- /dev/null   00:00:00 1970   (empty, because file is
> > newly added)
> > +++ head/etc/ntp/Makefile   Fri Oct 16 14:04:16 2015(r
> > 289421)
> > @@ -0,0 +1,10 @@
> > +# $FreeBSD$
> > +
> > +NO_OBJ=
> > +
> > +FILES= leap-seconds
> > +
> > +FILESDIR=  /etc/ntp
> > +FILESMODE= 644
> > +
> > +.include 
> > 
> > Added: head/etc/ntp/leap-seconds
> > ===
> > ===
> > --- /dev/null   00:00:00 1970   (empty, because file is
> > newly added)
> > +++ head/etc/ntp/leap-seconds   Fri Oct 16 14:04:16 2015
> > (r289421)
> > @@ -0,0 +1,119 @@
> > +#
> > +# $FreeBSD$
> > +#
> > +#  ATOMIC TIME.
> > +#  The Coordinated Universal Time (UTC) is the reference
> > time scale derived
> > +#  from The "Temps Atomique International" (TAI) calculated
> > by the Bureau
> > +#  International des Poids et Mesures (BIPM) using a
> > worldwide network of atomic
> > +#  clocks. UTC differs from TAI by an integer number of
> > seconds; it is the basis
> > +#  of all activities in the world.
> > +#
> > +#
> > +#  ASTRONOMICAL TIME (UT1) is the time scale based on the
> > rate of rotation of the earth.
> > +#  It is now mainly derived from Very Long Baseline
> > Interferometry (VLBI). The various
> > +#  irregular fluctuations progressively detected in the
> > rotation rate of the Earth lead
> > +#  in 1972 to the replacement of UT1 by UTC as the reference
> > time scale.
> > +#
> > +#
> > +#  LE

Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Warner Losh

> On Oct 17, 2015, at 12:34 PM, Bryan Drewery  wrote:
> 
> On 10/17/15 11:25 AM, Ian Lepore wrote:
>> On Fri, 2015-10-16 at 14:04 +, Cy Schubert wrote:
>>> Author: cy
>>> Date: Fri Oct 16 14:04:16 2015
>>> New Revision: 289421
>>> URL: https://svnweb.freebsd.org/changeset/base/289421
>>> 
>>> Log:
>>>  Add default leap-seconds file. This should help ntp networks get
>>> the
>>>  leap second date correct
>>> 
>>>  Updates to the file can be obtained from ftp://time.nist.gov/pub/ o
>>> r
>>>  ftp://tycho.usno.navy.mil/pub/ntp/.
>>> 
>>>  Suggested by:  dwmalone
>>>  Reviewed by:   roberto, dwmalone, delphij
>>>  Approved by:   roberto
>>>  MFC after: 1 week
>> 
>> One thing about this change scares me.  In the ntpd documentation:
>> 
>>If the leapseconds file is present, the leap bits for reference
>>clocks and downstratum servers are ignored.
>> 
>> I can't determine from casual code examination (and I don't have time
>> to experiment now) whether that is true even if the file is expired.
>> 
>> The leapfile expires every six months, and users must update it using
>> some external mechanism, or they must have configured autokey stuff so
>> that updates can be accepted from peer servers.  In either case what
>> we've done is created a default configuration that is likely to fail
>> right out of the box, because at least for releases the file we deliver
>> will be expired before they even download and install the image.
>> 
>> At the very least I think we should hold off on MFC of this until we
>> know for sure whether an expired-but-present leapfile causes incorrect
>> operation.  If a pending leap notification in the leap bits of packets
>> from peer servers and refclocks will be honored when the file is
>> expired, then there is no problem with this change.
>> 
> 
> Yeah. This sounds like something that needs to be delivered more easily
> in a normal update mechanism, such as packages.  ENs every 6 months are
> not practical for this and a lot of users don't always apply EN while
> IMO they are more likely to apply package upgrades. Short of that, some
> kind of periodic script could fetch an updated file  discussion>.

The file itself is signed, but only weakly with a sha hash at the end. Don’t 
know if
the hash is one of the ones that’s been broken yet or not.

Warner


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Warner Losh
Until the next leap second…. It would be better to just
always try to grab the latest one… Can we put something
in periodic to do that so users that have releases
that are older than 6 months aren’t screwed?

Warner

> On Oct 16, 2015, at 8:04 AM, Cy Schubert  wrote:
> 
> Author: cy
> Date: Fri Oct 16 14:04:16 2015
> New Revision: 289421
> URL: https://svnweb.freebsd.org/changeset/base/289421
> 
> Log:
>  Add default leap-seconds file. This should help ntp networks get the
>  leap second date correct
> 
>  Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
>  ftp://tycho.usno.navy.mil/pub/ntp/.
> 
>  Suggested by:dwmalone
>  Reviewed by: roberto, dwmalone, delphij
>  Approved by: roberto
>  MFC after:   1 week
> 
> Added:
>  head/etc/ntp/
>  head/etc/ntp/Makefile   (contents, props changed)
>  head/etc/ntp/leap-seconds   (contents, props changed)
> Modified:
>  head/etc/Makefile
>  head/etc/mtree/BSD.var.dist
>  head/etc/ntp.conf
> 
> Modified: head/etc/Makefile
> ==
> --- head/etc/Makefile Fri Oct 16 12:53:22 2015(r289420)
> +++ head/etc/Makefile Fri Oct 16 14:04:16 2015(r289421)
> @@ -240,6 +240,9 @@ distribution:
>   ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install
>   ${_+_}cd ${.CURDIR}/devd; ${MAKE} install
>   ${_+_}cd ${.CURDIR}/gss; ${MAKE} install
> +.if ${MK_NTP} != "no"
> + ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install
> +.endif
>   ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install
> .if ${MK_PKGBOOTSTRAP} != "no"
>   ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install
> 
> Modified: head/etc/mtree/BSD.var.dist
> ==
> --- head/etc/mtree/BSD.var.dist   Fri Oct 16 12:53:22 2015
> (r289420)
> +++ head/etc/mtree/BSD.var.dist   Fri Oct 16 14:04:16 2015
> (r289421)
> @@ -46,6 +46,8 @@
> ..
> ipf mode=0700
> ..
> +ntp mode=0700
> +..
> pkg
> ..
> ports
> 
> Modified: head/etc/ntp.conf
> ==
> --- head/etc/ntp.conf Fri Oct 16 12:53:22 2015(r289420)
> +++ head/etc/ntp.conf Fri Oct 16 14:04:16 2015(r289421)
> @@ -77,3 +77,8 @@ restrict 127.127.1.0
> #
> #server 127.127.1.0
> #fudge 127.127.1.0 stratum 10
> +
> +# See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14.
> +# for documentation regarding leapfile. Updates to the file can be obtained
> +# from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/.
> +leapfile "/etc/ntp/leap-seconds"
> 
> Added: head/etc/ntp/Makefile
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/etc/ntp/Makefile Fri Oct 16 14:04:16 2015(r289421)
> @@ -0,0 +1,10 @@
> +# $FreeBSD$
> +
> +NO_OBJ=
> +
> +FILES=   leap-seconds
> +
> +FILESDIR=/etc/ntp
> +FILESMODE=   644
> +
> +.include 
> 
> Added: head/etc/ntp/leap-seconds
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/etc/ntp/leap-seconds Fri Oct 16 14:04:16 2015(r289421)
> @@ -0,0 +1,119 @@
> +#
> +# $FreeBSD$
> +#
> +#ATOMIC TIME.
> +#The Coordinated Universal Time (UTC) is the reference time scale derived
> +#from The "Temps Atomique International" (TAI) calculated by the Bureau
> +#International des Poids et Mesures (BIPM) using a worldwide network of 
> atomic
> +#clocks. UTC differs from TAI by an integer number of seconds; it is the 
> basis
> +#of all activities in the world.
> +#
> +#
> +#ASTRONOMICAL TIME (UT1) is the time scale based on the rate of rotation 
> of the earth.
> +#It is now mainly derived from Very Long Baseline Interferometry (VLBI). 
> The various
> +#irregular fluctuations progressively detected in the rotation rate of 
> the Earth lead
> +#in 1972 to the replacement of UT1 by UTC as the reference time scale.
> +#
> +#
> +#LEAP SECOND
> +#Atomic clocks are more stable than the rate of the earth rotatiob since 
> the later
> +#undergoes a full range of geophysical perturbations at various time 
> scales (lunisolar
> +#and core-mantle torques,atmospheric and oceanic effetcs, ...)
> +#Leap seconds are needed to keep the two time scales in agreement, i.e. 
> UT1-UTC smaller
> +#than 0.9 second. So, when necessary a "leap second" is introduced in 
> UTC.
> +#Since the adoption of this system in 1972 it has been necessary to add 
> 26 seconds to UTC,
> +#firstly due to the initial choice of the value of the second (1/86400 
> mean solar day of
> +#the year 1820) and secondly to the general slowing down of the Earth's 
> rotation. It is
> +#theorically possible 

Re: svn commit: r289451 - head/share/zoneinfo

2015-10-17 Thread John-Mark Gurney
Bryan Drewery wrote this message on Sat, Oct 17, 2015 at 12:01 -0700:
> On 10/17/15 11:53 AM, John-Mark Gurney wrote:
> > Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +:
> >> Author: ngie
> >> Date: Sat Oct 17 09:26:16 2015
> >> New Revision: 289451
> >> URL: https://svnweb.freebsd.org/changeset/base/289451
> >>
> >> Log:
> >>   Install share/zoneinfo in a deterministic way by sorting the results 
> >> from find
> >>   
> >>   This helps produce deterministic METALOG output
> > 
> > We seem to have duplicate installs happening again:
> > /tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of 
> > mailer.conf
> > /tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc
> > /tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr
> > /tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests
> > /tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref
> > /tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi
> > /tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi
> > 
> > This is after an installworld/distribution to the same directory...
> > 
> > This would be a great jenkins test IMO...
> 
> How new is this / when did you last check for warnings?

It's been a number of months, since this spring or summer, when I last
had a non-duplicate set of installs...

I'm pretty sure either ngie or I fixed the mailer.conf last time...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r289451 - head/share/zoneinfo

2015-10-17 Thread Bryan Drewery
On 10/17/15 11:53 AM, John-Mark Gurney wrote:
> Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +:
>> Author: ngie
>> Date: Sat Oct 17 09:26:16 2015
>> New Revision: 289451
>> URL: https://svnweb.freebsd.org/changeset/base/289451
>>
>> Log:
>>   Install share/zoneinfo in a deterministic way by sorting the results from 
>> find
>>   
>>   This helps produce deterministic METALOG output
> 
> We seem to have duplicate installs happening again:
> /tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of mailer.conf
> /tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc
> /tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr
> /tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests
> /tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref
> /tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi
> /tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi
> 
> This is after an installworld/distribution to the same directory...
> 
> This would be a great jenkins test IMO...
> 

How new is this / when did you last check for warnings?

-- 
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: r289464 - head

2015-10-17 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 17 18:59:14 2015
New Revision: 289464
URL: https://svnweb.freebsd.org/changeset/base/289464

Log:
  Remove unneeded MK_CTF=no when MK_CDDL=no.
  
  This has been handled since r228158 made MK_CTF dependent on MK_CDDL
  in share/mk/bsd.opts.mk.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Oct 17 18:35:40 2015(r289463)
+++ head/Makefile.inc1  Sat Oct 17 18:59:14 2015(r289464)
@@ -325,10 +325,6 @@ HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MT
 HMAKE+=PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
 .endif
 
-.if ${MK_CDDL} == "no"
-WMAKEENV+= MK_CTF=no
-.endif
-
 .if defined(CROSS_TOOLCHAIN)
 LOCALBASE?=/usr/local
 .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk"
___
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: r289451 - head/share/zoneinfo

2015-10-17 Thread John-Mark Gurney
Garrett Cooper wrote this message on Sat, Oct 17, 2015 at 09:26 +:
> Author: ngie
> Date: Sat Oct 17 09:26:16 2015
> New Revision: 289451
> URL: https://svnweb.freebsd.org/changeset/base/289451
> 
> Log:
>   Install share/zoneinfo in a deterministic way by sorting the results from 
> find
>   
>   This helps produce deterministic METALOG output

We seem to have duplicate installs happening again:
/tmp/makeroot.UHdcn/manifest:161: warning: duplicate definition of mailer.conf
/tmp/makeroot.UHdcn/manifest:935: warning: duplicate definition of dtc
/tmp/makeroot.UHdcn/manifest:4334: warning: duplicate definition of usr
/tmp/makeroot.UHdcn/manifest:4354: warning: duplicate definition of tests
/tmp/makeroot.UHdcn/manifest:5721: warning: duplicate definition of 10.exref
/tmp/makeroot.UHdcn/manifest:5724: warning: duplicate definition of 12.vi
/tmp/makeroot.UHdcn/manifest:5725: warning: duplicate definition of 12.vi

This is after an installworld/distribution to the same directory...

This would be a great jenkins test IMO...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Bryan Drewery
On 10/17/15 11:25 AM, Ian Lepore wrote:
> On Fri, 2015-10-16 at 14:04 +, Cy Schubert wrote:
>> Author: cy
>> Date: Fri Oct 16 14:04:16 2015
>> New Revision: 289421
>> URL: https://svnweb.freebsd.org/changeset/base/289421
>>
>> Log:
>>   Add default leap-seconds file. This should help ntp networks get
>> the
>>   leap second date correct
>>   
>>   Updates to the file can be obtained from ftp://time.nist.gov/pub/ o
>> r
>>   ftp://tycho.usno.navy.mil/pub/ntp/.
>>   
>>   Suggested by:  dwmalone
>>   Reviewed by:   roberto, dwmalone, delphij
>>   Approved by:   roberto
>>   MFC after: 1 week
> 
> One thing about this change scares me.  In the ntpd documentation:
> 
> If the leapseconds file is present, the leap bits for reference
> clocks and downstratum servers are ignored.
> 
> I can't determine from casual code examination (and I don't have time
> to experiment now) whether that is true even if the file is expired.
> 
> The leapfile expires every six months, and users must update it using
> some external mechanism, or they must have configured autokey stuff so
> that updates can be accepted from peer servers.  In either case what
> we've done is created a default configuration that is likely to fail
> right out of the box, because at least for releases the file we deliver
> will be expired before they even download and install the image.
> 
> At the very least I think we should hold off on MFC of this until we
> know for sure whether an expired-but-present leapfile causes incorrect
> operation.  If a pending leap notification in the leap bits of packets
> from peer servers and refclocks will be honored when the file is
> expired, then there is no problem with this change.
> 

Yeah. This sounds like something that needs to be delivered more easily
in a normal update mechanism, such as packages.  ENs every 6 months are
not practical for this and a lot of users don't always apply EN while
IMO they are more likely to apply package upgrades. Short of that, some
kind of periodic script could fetch an updated file .



-- 
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"


Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-17 Thread Ian Lepore
On Fri, 2015-10-16 at 14:04 +, Cy Schubert wrote:
> Author: cy
> Date: Fri Oct 16 14:04:16 2015
> New Revision: 289421
> URL: https://svnweb.freebsd.org/changeset/base/289421
> 
> Log:
>   Add default leap-seconds file. This should help ntp networks get
> the
>   leap second date correct
>   
>   Updates to the file can be obtained from ftp://time.nist.gov/pub/ o
> r
>   ftp://tycho.usno.navy.mil/pub/ntp/.
>   
>   Suggested by:   dwmalone
>   Reviewed by:roberto, dwmalone, delphij
>   Approved by:roberto
>   MFC after:  1 week

One thing about this change scares me.  In the ntpd documentation:

If the leapseconds file is present, the leap bits for reference
clocks and downstratum servers are ignored.

I can't determine from casual code examination (and I don't have time
to experiment now) whether that is true even if the file is expired.

The leapfile expires every six months, and users must update it using
some external mechanism, or they must have configured autokey stuff so
that updates can be accepted from peer servers.  In either case what
we've done is created a default configuration that is likely to fail
right out of the box, because at least for releases the file we deliver
will be expired before they even download and install the image.

At the very least I think we should hold off on MFC of this until we
know for sure whether an expired-but-present leapfile causes incorrect
operation.  If a pending leap notification in the leap bits of packets
from peer servers and refclocks will be honored when the file is
expired, then there is no problem with this change.

-- Ian
___
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: r289462 - head

2015-10-17 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 17 18:22:18 2015
New Revision: 289462
URL: https://svnweb.freebsd.org/changeset/base/289462

Log:
  Fix wrong PATH being set for world 'includes' stage after r289438.
  
  The 'includes' target is currently a pseudo target in bsd.subdir.mk that
  does 'cd ${.CURDIR} && ${MAKE} buildincludes && ${MAKE} installincludes',
  versus all over targets that just recurse.
  
  In Makefile.inc1 the older duplicated bsd.subdir.mk logic for calling
  'includes' was being executed in each subdir directly, meaning 'cd lib && make
  includes' became 'cd lib && make buildincludes && make installincludes'.  Now
  that the bsd.subdir.mk logic is used it is calling 'make buildincludes && make
  installincludes' from the top-level which pulls in the PATH=
  from /Makefile.
  
  The sub-make logic for 'includes' in bsd.subdir.mk was attempted to be removed
  in r289282 but turned out to be wrong.  I have a working version now but
  it is not yet ready for commit.  So for now in Makefile.inc1 split out
  'includes' to 'buildincludes' and 'installincludes' which will avoid the
  problem.
  
  MFC after:2 weeks
  X-MFC-With:   r289438
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Oct 17 17:26:44 2015(r289461)
+++ head/Makefile.inc1  Sat Oct 17 18:22:18 2015(r289462)
@@ -624,7 +624,8 @@ _includes:
@echo "--"
@echo ">>> stage 4.1: building includes"
@echo "--"
-   ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes
+   ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks buildincludes
+   ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks installincludes
 _libraries:
@echo
@echo "--"
@@ -2268,7 +2269,9 @@ _xi-cross-tools:
 .endfor
 
 _xi-includes:
-   ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 includes \
+   ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 buildincludes \
+   DESTDIR=${XDDESTDIR}
+   ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 installincludes \
DESTDIR=${XDDESTDIR}
 
 _xi-libraries:
___
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: r289332 - head/tools/regression/lib/msun

2015-10-17 Thread Bruce Evans

On Sat, 17 Oct 2015, Konstantin Belousov wrote:


On Thu, Oct 15, 2015 at 10:12:03PM +1100, Bruce Evans wrote:

On Thu, 15 Oct 2015, Konstantin Belousov wrote:


On Wed, Oct 14, 2015 at 08:22:12PM +, Garrett Cooper wrote:

Author: ngie
Date: Wed Oct 14 20:22:12 2015
New Revision: 289332
URL: https://svnweb.freebsd.org/changeset/base/289332

Log:
  Fix test-fenv:test_dfl_env when run on some amd64 CPUs

  Compare the fields that the AMD [1] and Intel [2] specs say will be
  set once fnstenv returns.

  Not all amd64 capable processors zero out the env.__x87.__other field
  (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the
  env.__x87.__other field will contain after fnstenv is executed, so the values
  in env.__x87.__other could be filled with arbitrary data depending on how the
  CPU-specific implementation of fnstenv.

No Intel or AMD CPU write to __other field at all.


No, they all do.

Test on old i386 on old A64:
...

No, I did not thought about fegetenv() as executing FXSAVE instruction.
I did knew that fegetenv() is a wrapper around FNSAVE, and I was completely
sure that FNSAVE in the long mode, when executed by a 64bit program,
never writes anything into the %eip/data offset portion of the FNSAVE
area.  I suspect that this was motivated by unavoidable 32-bitness of
the store format.


fegetenv() is actually a wrapper around FNSTENV, and FNSTENV is a subset
of FNSAVE.


I was unable to find a reference in either Intel SDM or in AMD APM which
would support my statement.  The closest thing is the claim that the FOP
field is not filled, in the SDM.  Still, I wonder how things are really
arranged by hardware for FNSAVE in 64bit mode.


Let's check FOP below.


Are your experiments below were done for the 32bit programs, or for 64bit ?
Both FXSAVE and XSAVE area formats and rules would be irrelevant for the
FreeBSD ABI.


For amd64, I used the freefall default which I think is long mode, but
there is some magic for the pointer size (small model?)

BTW, -m32 has been broken on freefall for years.  At least libgcc.a is
incompatible or not installed.


...
Modified state for fegetenv():
X 005C  7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08
 --cw- -mxhi --sw- -mxlo --tw- -pad- fip
  -
X 006C  1F 00 1D 05 A0 92 04 08 2F 00 FF FF
 -fcs- -opc- foff--- -fds- -pad-
other[16]--


FOP (opc) is clearly filled on i386 (32-bit mode).


...
Test on -current amd64 on Xeon (freefall):
...
Later fegetenv():
X 0060  7f 03 ff ff 00 00 ff ff  ff ff ff ff 75 08 40 00
X 0070  43 00 1c 05 20 62 60 00  3b 00 ff ff 80 1f 00 00


FOP is filled to 1c 05 on freefall and to 1D 05 on my old i386.  But the
instruction is the same (fstpl).  The difference is a different encoding
of the direct address mode.

Futher testing:

Only small model seems to be supported.  I got relocation errors with
messages about R_X86_64_32S for an array of size 4G.

malloc() works to allocate arrays larger than 4G.  Writing to addresses
above 4G in such arrays or on the stack never gave 64-bit offsets.
It truncated the offsets to 32 bits and still printed the segment
register.

Bruce
___
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: r289461 - in head/sys: net netinet

2015-10-17 Thread Alexander V. Chernikov
Author: melifaro
Date: Sat Oct 17 17:26:44 2015
New Revision: 289461
URL: https://svnweb.freebsd.org/changeset/base/289461

Log:
  Remove several compat functions from pre-fib era.

Modified:
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet/in_var.h

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cSat Oct 17 16:42:54 2015(r289460)
+++ head/sys/net/route.cSat Oct 17 17:26:44 2015(r289461)
@@ -931,13 +931,6 @@ rt_flushifroutes(struct ifnet *ifp)
 #defineifpaddr info->rti_info[RTAX_IFP]
 #defineflags   info->rti_flags
 
-int
-rt_getifa(struct rt_addrinfo *info)
-{
-
-   return (rt_getifa_fib(info, RT_DEFAULT_FIB));
-}
-
 /*
  * Look up rt_addrinfo for a specific fib.  Note that if rti_ifa is defined,
  * it will be referenced so the caller must free it.

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hSat Oct 17 16:42:54 2015(r289460)
+++ head/sys/net/route.hSat Oct 17 17:26:44 2015(r289461)
@@ -387,7 +387,6 @@ voidrt_flushifroutes(struct ifnet *ifp)
 
 /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */
 /* Thes are used by old code not yet converted to use multiple FIBS */
-int rt_getifa(struct rt_addrinfo *);
 voidrtalloc_ign(struct route *ro, u_long ignflags);
 voidrtalloc(struct route *ro); /* XXX deprecated, use rtalloc_ign(ro, 0) */
 struct rtentry *rtalloc1(struct sockaddr *, int, u_long);

Modified: head/sys/netinet/in_rmx.c
==
--- head/sys/netinet/in_rmx.c   Sat Oct 17 16:42:54 2015(r289460)
+++ head/sys/netinet/in_rmx.c   Sat Oct 17 17:26:44 2015(r289461)
@@ -228,19 +228,6 @@ in_rtalloc_ign(struct route *ro, u_long 
rtalloc_ign_fib(ro, ignflags, fibnum);
 }
 
-int
-in_rtrequest( int req,
-   struct sockaddr *dst,
-   struct sockaddr *gateway,
-   struct sockaddr *netmask,
-   int flags,
-   struct rtentry **ret_nrt,
-   u_int fibnum)
-{
-   return (rtrequest_fib(req, dst, gateway, netmask, 
-   flags, ret_nrt, fibnum));
-}
-
 struct rtentry *
 in_rtalloc1(struct sockaddr *dst, int report, u_long ignflags, u_int fibnum)
 {
@@ -264,10 +251,3 @@ in_rtalloc(struct route *ro, u_int fibnu
rtalloc_ign_fib(ro, 0UL, fibnum);
 }
 
-#if 0
-int in_rt_getifa(struct rt_addrinfo *, u_int fibnum);
-int in_rtioctl(u_long, caddr_t, u_int);
-int in_rtrequest1(int, struct rt_addrinfo *, struct rtentry **, u_int);
-#endif
-
-

Modified: head/sys/netinet/in_var.h
==
--- head/sys/netinet/in_var.h   Sat Oct 17 16:42:54 2015(r289460)
+++ head/sys/netinet/in_var.h   Sat Oct 17 17:26:44 2015(r289461)
@@ -391,8 +391,6 @@ void in_rtalloc(struct route *ro, u_int
 struct rtentry *in_rtalloc1(struct sockaddr *, int, u_long, u_int);
 voidin_rtredirect(struct sockaddr *, struct sockaddr *,
struct sockaddr *, int, struct sockaddr *, u_int);
-int in_rtrequest(int, struct sockaddr *,
-   struct sockaddr *, struct sockaddr *, int, struct rtentry **, 
u_int);
 #endif /* _KERNEL */
 
 /* INET6 stuff */
___
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: r289460 - in head: . share/mk

2015-10-17 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 17 16:42:54 2015
New Revision: 289460
URL: https://svnweb.freebsd.org/changeset/base/289460

Log:
  Rework the 'make -n -n' feature such that '-n' recurses and '-N' does not.
  
  Bmake has a documented feature of '-N' to skip executing commands which is
  specifically intended for debugging top-level builds and not recursing into
  sub-directories.  This matches the older 'make -n' behavior we added which 
made
  '-n -n' the recursing target and '-n' a non-recursing target.
  
  Removing the '-n -n' feature allows the build to work as documented in
  the bmake manpage with '-n' and '-N'.  The older '-n -n' feature was also
  not documented anywhere that I could see.
  
  Note that the ${_+_} var is still needed as currently bmake incorrectly
  executes '+' commands when '-N' is specified.
  
  The '-n' and '-n -n' features were broken for several reasons prior to this.
  r251748 made '_+_' never expand with '-n -n' which resulted in many
  sub-directories not being visited until fixed 2 years later in r288391, and
  many targets were given .MAKE over the past few years which resulted in
  non-sub-make commands, such as rm and ln and mtree, to be executed.
  
  This should also allow removing some indirection hacks in bsd.subdir.mk and
  other cases of .USE that have a .MAKE by using '+'.
  
  Sponsored by: EMC / Isilon Storage Division
  Discussed on: arch@ (mostly silence)

Modified:
  head/Makefile
  head/UPDATING
  head/share/mk/sys.mk

Modified: head/Makefile
==
--- head/Makefile   Sat Oct 17 16:05:42 2015(r289459)
+++ head/Makefile   Sat Oct 17 16:42:54 2015(r289460)
@@ -243,14 +243,8 @@ cleanworld:
 # Handle the user-driven targets, using the source relative mk files.
 #
 
-.if !(!empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n")
-# skip this for -n to avoid changing previous behavior of 
-# 'make -n buildworld' etc.  Using -n -n will run it.
-${TGTS}: .MAKE
 tinderbox toolchains kernel-toolchains: .MAKE
-.endif
-
-${TGTS}: .PHONY
+${TGTS}: .PHONY .MAKE
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
 
 # The historic default "all" target creates files which may cause stale

Modified: head/UPDATING
==
--- head/UPDATING   Sat Oct 17 16:05:42 2015(r289459)
+++ head/UPDATING   Sat Oct 17 16:42:54 2015(r289460)
@@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20151017:
+   The build previously allowed using 'make -n' to not recurse into
+   sub-directories while showing what commands would be executed, and
+   'make -n -n' to recursively show commands.  Now 'make -n' will recurse
+   and 'make -N' will not.
+
 20151012:
If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster
and etcupdate will now use this file. A custom sendmail.cf is now

Modified: head/share/mk/sys.mk
==
--- head/share/mk/sys.mkSat Oct 17 16:05:42 2015(r289459)
+++ head/share/mk/sys.mkSat Oct 17 16:42:54 2015(r289460)
@@ -145,13 +145,12 @@ ECHODIR   ?=  true
 .endif
 .endif
 
-.if defined(.PARSEDIR)
-# _+_ appears to be a workaround for the special src .MAKE not working.
-# setting it to + interferes with -N
-_+_?=
-.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n"
-# the check above matches only a single -n, so -n -n will result
-# in _+_ = +
+.if ${.MAKEFLAGS:M-N}
+# bmake -N is supposed to skip executing anything but it does not skip
+# exeucting '+' commands.  The '+' feature is used where .MAKE
+# is not safe for the entire target.  -N is intended to skip building sub-makes
+# so it executing '+' commands is not right.  Work around the bug by not
+# setting '+' when -N is used.
 _+_?=
 .else
 _+_?=  +
___
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: r289459 - head/usr.bin/iscsictl

2015-10-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Oct 17 16:05:42 2015
New Revision: 289459
URL: https://svnweb.freebsd.org/changeset/base/289459

Log:
  Remove write-only variable.
  
  Submitted by: Dominic Marks
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/iscsictl/iscsictl.c

Modified: head/usr.bin/iscsictl/iscsictl.c
==
--- head/usr.bin/iscsictl/iscsictl.cSat Oct 17 15:50:52 2015
(r289458)
+++ head/usr.bin/iscsictl/iscsictl.cSat Oct 17 16:05:42 2015
(r289459)
@@ -597,7 +597,6 @@ kernel_wait(int iscsi_fd, int timeout)
 {
struct iscsi_session_state *states = NULL;
const struct iscsi_session_state *state;
-   const struct iscsi_session_conf *conf;
struct iscsi_session_list isl;
unsigned int i, nentries = 1;
bool all_connected;
@@ -629,7 +628,6 @@ kernel_wait(int iscsi_fd, int timeout)
all_connected = true;
for (i = 0; i < isl.isl_nentries; i++) {
state = &states[i];
-   conf = &state->iss_conf;
 
if (!state->iss_connected) {
all_connected = false;
___
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: r289458 - head/lib/clang

2015-10-17 Thread Bryan Drewery
Author: bdrewery
Date: Sat Oct 17 15:50:52 2015
New Revision: 289458
URL: https://svnweb.freebsd.org/changeset/base/289458

Log:
  Conditionalize the META_MODE tool handling on MK_META_MODE.
  
  It was not being used outside of META_MODE but this should make it more clear
  that it is only for META_MODE.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/clang/clang.build.mk

Modified: head/lib/clang/clang.build.mk
==
--- head/lib/clang/clang.build.mk   Sat Oct 17 14:58:55 2015
(r289457)
+++ head/lib/clang/clang.build.mk   Sat Oct 17 15:50:52 2015
(r289458)
@@ -39,6 +39,7 @@ CXXFLAGS.clang+= -stdlib=libc++
 
 .PATH: ${LLVM_SRCS}/${SRCDIR}
 
+.if ${MK_META_MODE} == "yes"
 .if empty(TOOLSDIR) || !exists(${TOOLSDIR}/usr/bin/clang-tblgen)
 .if ${MACHINE} == "host" && defined(BOOTSTRAPPING_TOOLS)
 .if !empty(LEGACY_TOOLS) && exists(${LEGACY_TOOLS}/usr/bin/tblgen)
@@ -57,6 +58,7 @@ TOOLSDIR?=
 TBLGEN= ${TOOLSDIR}/usr/bin/tblgen
 CLANG_TBLGEN= ${TOOLSDIR}/usr/bin/clang-tblgen
 .endif
+.endif # ${MK_META_MODE} == "yes"
 TBLGEN?=   tblgen
 CLANG_TBLGEN?= clang-tblgen
 
___
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: r289415 - in head: . sys/sys

2015-10-17 Thread Bryan Drewery
On 10/17/2015 12:34 AM, Alexander Motin wrote:
> On 16.10.2015 21:26, Alexander Motin wrote:
>> On 16.10.2015 21:17, Bryan Drewery wrote:
>>> On 10/16/2015 1:57 AM, Alexander Motin wrote:
 Author: mav
 Date: Fri Oct 16 08:57:11 2015
 New Revision: 289415
 URL: https://svnweb.freebsd.org/changeset/base/289415

 Log:
   Bump version and add notice about incompatibility introduced by resumable
   send/receive support in ZFS.

 Modified:
   head/UPDATING
   head/sys/sys/param.h

 Modified: head/UPDATING
 ==
 --- head/UPDATING  Fri Oct 16 08:22:21 2015(r289414)
 +++ head/UPDATING  Fri Oct 16 08:57:11 2015(r289415)
 @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
  
 +20151015:
 +  Added ZFS support for resumable send/receive changed respective
 +  IOCTL API/ABI.  Compatibility ABI shims were provided for other
 +  functionality, while receive require version match between world
 +  and kernel.
>>>
>>> This means for example that 'zfs recv' in a 10.2 jail running on a 11.0
>>> kernel will not work? Can compatibility be added for it?
>>
>> The structures passed as argument for receive are large and completely
>> different. Unfortunately I don't know enough about that code to say
>> whether new one can be forged from the old one. I'll take another look,
>> but can not promise anything.
> 
> My first thought I was wrong. r289445 should fix compatibility.
> 

Thank you! While I don't run this setup I could see it being a common
issue otherwise.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289457 - head/sys/x86/x86

2015-10-17 Thread Jason A. Harmening
Author: jah
Date: Sat Oct 17 14:58:55 2015
New Revision: 289457
URL: https://svnweb.freebsd.org/changeset/base/289457

Log:
  Don't page-align the physical address when calling PHYS_TO_VM_PAGE().
  
  Mbusdma_bounce.c

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cSat Oct 17 14:48:39 2015
(r289456)
+++ head/sys/x86/x86/busdma_bounce.cSat Oct 17 14:58:55 2015
(r289457)
@@ -1006,7 +1006,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
bpage->busaddr |= addr & PAGE_MASK;
}
bpage->datavaddr = vaddr;
-   bpage->datapage = PHYS_TO_VM_PAGE(addr & ~PAGE_MASK);
+   /* PHYS_TO_VM_PAGE() will truncate unaligned addresses. */
+   bpage->datapage = PHYS_TO_VM_PAGE(addr);
bpage->dataoffs = addr & PAGE_MASK;
bpage->datacount = size;
STAILQ_INSERT_TAIL(&(map->bpages), bpage, links);
___
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: r289456 - head/sys/dev/drm2/i915

2015-10-17 Thread Jean-Sébastien Pédron
Author: dumbbell
Date: Sat Oct 17 14:48:39 2015
New Revision: 289456
URL: https://svnweb.freebsd.org/changeset/base/289456

Log:
  drm/i915: Reduce diff with Linux 3.8
  
  There is no functional change. The goal is to ease the future update to
  Linux 3.8's i915 driver.
  
  MFC after:2 months

Modified:
  head/sys/dev/drm2/i915/intel_dp.c
  head/sys/dev/drm2/i915/intel_iic.c

Modified: head/sys/dev/drm2/i915/intel_dp.c
==
--- head/sys/dev/drm2/i915/intel_dp.c   Sat Oct 17 14:07:47 2015
(r289455)
+++ head/sys/dev/drm2/i915/intel_dp.c   Sat Oct 17 14:48:39 2015
(r289456)
@@ -555,12 +555,12 @@ intel_dp_aux_native_read(struct intel_dp
 }
 
 static int
-intel_dp_i2c_aux_ch(device_t idev, int mode, uint8_t write_byte,
-uint8_t *read_byte)
+intel_dp_i2c_aux_ch(device_t adapter, int mode,
+   uint8_t write_byte, uint8_t *read_byte)
 {
-   struct iic_dp_aux_data *data;
-   struct intel_dp *intel_dp;
-   uint16_t address;
+   struct iic_dp_aux_data *data = device_get_softc(adapter);
+   struct intel_dp *intel_dp = data->priv;
+   uint16_t address = data->address;
uint8_t msg[5];
uint8_t reply[2];
unsigned retry;
@@ -568,10 +568,6 @@ intel_dp_i2c_aux_ch(device_t idev, int m
int reply_bytes;
int ret;
 
-   data = device_get_softc(idev);
-   intel_dp = data->priv;
-   address = data->address;
-
intel_dp_check_edp(intel_dp);
/* Set up the command byte */
if (mode & MODE_I2C_READ)
@@ -609,7 +605,7 @@ intel_dp_i2c_aux_ch(device_t idev, int m
  reply, reply_bytes);
if (ret < 0) {
DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
-   return (ret);
+   return ret;
}
 
switch (reply[0] & AUX_NATIVE_REPLY_MASK) {
@@ -620,14 +616,14 @@ intel_dp_i2c_aux_ch(device_t idev, int m
break;
case AUX_NATIVE_REPLY_NACK:
DRM_DEBUG_KMS("aux_ch native nack\n");
-   return (-EREMOTEIO);
+   return -EREMOTEIO;
case AUX_NATIVE_REPLY_DEFER:
DELAY(100);
continue;
default:
DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
  reply[0]);
-   return (-EREMOTEIO);
+   return -EREMOTEIO;
}
 
switch (reply[0] & AUX_I2C_REPLY_MASK) {
@@ -638,19 +634,19 @@ intel_dp_i2c_aux_ch(device_t idev, int m
return (0/*reply_bytes - 1*/);
case AUX_I2C_REPLY_NACK:
DRM_DEBUG_KMS("aux_i2c nack\n");
-   return (-EREMOTEIO);
+   return -EREMOTEIO;
case AUX_I2C_REPLY_DEFER:
DRM_DEBUG_KMS("aux_i2c defer\n");
DELAY(100);
break;
default:
DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]);
-   return (-EREMOTEIO);
+   return -EREMOTEIO;
}
}
 
DRM_ERROR("too many retries, giving up\n");
-   return (-EREMOTEIO);
+   return -EREMOTEIO;
 }
 
 static void ironlake_edp_panel_vdd_on(struct intel_dp *intel_dp);
@@ -660,7 +656,7 @@ static int
 intel_dp_i2c_init(struct intel_dp *intel_dp,
  struct intel_connector *intel_connector, const char *name)
 {
-   int ret;
+   int ret;
 
DRM_DEBUG_KMS("i2c_init %s\n", name);
 
@@ -669,7 +665,7 @@ intel_dp_i2c_init(struct intel_dp *intel
intel_dp_i2c_aux_ch, intel_dp, &intel_dp->dp_iic_bus,
&intel_dp->adapter);
ironlake_edp_panel_vdd_off(intel_dp, false);
-   return (ret);
+   return ret;
 }
 
 static bool
@@ -956,8 +952,7 @@ static void ironlake_wait_panel_status(s
  I915_READ(PCH_PP_STATUS),
  I915_READ(PCH_PP_CONTROL));
 
-   if (_intel_wait_for(dev,
-   (I915_READ(PCH_PP_STATUS) & mask) == value, 5000, 10, "915iwp")) {
+   if (_intel_wait_for(dev, (I915_READ(PCH_PP_STATUS) & mask) == value, 
5000, 10, "915iwp")) {
DRM_ERROR("Panel status timeout: status %08x control %08x\n",
  I915_READ(PCH_PP_STATUS),
  I915_READ(PCH_PP_CONTROL));

Modified: head/sys/dev/drm2/i915/intel_iic.c
==
--- head/sys/dev/drm2/i915/intel_iic.c  Sat Oct 17 14:07:47 2015
(r289455)
+++ head/sys/dev/drm2/i915/intel_iic.c  Sat Oct 17 14:48:39 2015
(r289456)
@@ -96,8 +96,27 @@ struct intel_iic_softc {
uint32_t reg0;
 

svn commit: r289455 - head/sys/arm64/arm64

2015-10-17 Thread Andrew Turner
Author: andrew
Date: Sat Oct 17 14:07:47 2015
New Revision: 289455
URL: https://svnweb.freebsd.org/changeset/base/289455

Log:
  Rename build_block_pagetable to build_l2_block_pagetable in preperation
  for adding support for 4 levels of page tables.
  
  Obtained from:Patrick Wildt 

Modified:
  head/sys/arm64/arm64/locore.S

Modified: head/sys/arm64/arm64/locore.S
==
--- head/sys/arm64/arm64/locore.S   Sat Oct 17 13:20:42 2015
(r289454)
+++ head/sys/arm64/arm64/locore.S   Sat Oct 17 14:07:47 2015
(r289455)
@@ -357,7 +357,7 @@ create_pagetables:
mov x7, #NORMAL_MEM
mov x8, #(KERNBASE & L2_BLOCK_MASK)
mov x9, x28
-   bl  build_block_pagetable
+   bl  build_l2_block_pagetable
 
/* Move to the l1 table */
add x26, x26, #PAGE_SIZE
@@ -427,7 +427,7 @@ build_section_pagetable:
  * Builds an L1 -> L2 table descriptor
  *
  * This is a link for a 1GiB block of memory with up to 2MiB regions mapped
- * within it by build_block_pagetable.
+ * within it by build_l1_block_pagetable.
  *
  *  x6  = L1 table
  *  x8  = Virtual Address
@@ -463,7 +463,7 @@ link_l1_pagetable:
  *  x10 = Entry count (TODO)
  *  x11, x12 and x13 are trashed
  */
-build_block_pagetable:
+build_l2_block_pagetable:
/*
 * Build the L2 table entry.
 */
___
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: r289454 - head/sys/arm64/arm64

2015-10-17 Thread Konstantin Belousov
Author: kib
Date: Sat Oct 17 13:20:42 2015
New Revision: 289454
URL: https://svnweb.freebsd.org/changeset/base/289454

Log:
  Add checks for kernel VA accesses to the copyin(9) and related
  functions on arm64.
  
  Reviewed by:  andrew
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D3907

Modified:
  head/sys/arm64/arm64/copyinout.S
  head/sys/arm64/arm64/genassym.c
  head/sys/arm64/arm64/support.S

Modified: head/sys/arm64/arm64/copyinout.S
==
--- head/sys/arm64/arm64/copyinout.SSat Oct 17 13:06:52 2015
(r289453)
+++ head/sys/arm64/arm64/copyinout.SSat Oct 17 13:20:42 2015
(r289454)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
  */
 ENTRY(copyio_fault)
SET_FAULT_HANDLER(xzr, x1) /* Clear the handler */
+copyio_fault_nopcb:
mov x0, #EFAULT
ret
 END(copyio_fault)
@@ -51,6 +52,10 @@ END(copyio_fault)
  */
 ENTRY(copyout)
cbz x2, 2f  /* If len == 0 then skip loop */
+   add x3, x1, x2
+   ldr x4, =VM_MAXUSER_ADDRESS
+   cmp x3, x4
+   b.hicopyio_fault_nopcb
 
adr x6, copyio_fault /* Get the handler address */
SET_FAULT_HANDLER(x6, x7) /* Set the handler */
@@ -73,6 +78,10 @@ END(copyout)
  */
 ENTRY(copyin)
cbz x2, 2f  /* If len == 0 then skip loop */
+   add x3, x0, x2
+   ldr x4, =VM_MAXUSER_ADDRESS
+   cmp x3, x4
+   b.hicopyio_fault_nopcb
 
adr x6, copyio_fault /* Get the handler address */
SET_FAULT_HANDLER(x6, x7) /* Set the handler */
@@ -97,11 +106,14 @@ ENTRY(copyinstr)
mov x5, xzr /* count = 0 */
mov w4, #1  /* If zero return faulure */
cbz x2, 3f  /* If len == 0 then skip loop */
+   ldr x7, =VM_MAXUSER_ADDRESS
 
adr x6, copyio_fault /* Get the handler address */
SET_FAULT_HANDLER(x6, x7) /* Set the handler */
 
-1: ldrbw4, [x0], #1/* Load from uaddr */
+1: cmp x0, x7
+   b.cscopyio_fault
+   ldrbw4, [x0], #1/* Load from uaddr */
strbw4, [x1], #1/* Store in kaddr */
add x5, x5, #1  /* count++ */
cbz w4, 2f  /* Break when NUL-terminated */

Modified: head/sys/arm64/arm64/genassym.c
==
--- head/sys/arm64/arm64/genassym.c Sat Oct 17 13:06:52 2015
(r289453)
+++ head/sys/arm64/arm64/genassym.c Sat Oct 17 13:20:42 2015
(r289454)
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
 #include 
 
 ASSYM(KERNBASE, KERNBASE);
+ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
+
 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
 

Modified: head/sys/arm64/arm64/support.S
==
--- head/sys/arm64/arm64/support.S  Sat Oct 17 13:06:52 2015
(r289453)
+++ head/sys/arm64/arm64/support.S  Sat Oct 17 13:20:42 2015
(r289454)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
  */
 ENTRY(fsu_fault)
SET_FAULT_HANDLER(xzr, x1)  /* Reset the handler function */
+fsu_fault_nopcb:
mov x0, #-1
ret
 END(fsu_fault)
@@ -49,6 +50,9 @@ END(fsu_fault)
  * int casueword32(volatile uint32_t *, uint32_t, uint32_t *, uint32_t)
  */
 ENTRY(casueword32)
+   ldr x4, =(VM_MAXUSER_ADDRESS-3)
+   cmp x0, x4
+   b.csfsu_fault_nopcb
adr x6, fsu_fault   /* Load the fault handler */
SET_FAULT_HANDLER(x6, x4)   /* And set it */
 1: ldxrw4, [x0]/* Load-exclusive the data */
@@ -67,6 +71,9 @@ END(casueword32)
  * int casueword(volatile u_long *, u_long, u_long *, u_long)
  */
 ENTRY(casueword)
+   ldr x4, =(VM_MAXUSER_ADDRESS-7)
+   cmp x0, x4
+   b.csfsu_fault_nopcb
adr x6, fsu_fault   /* Load the fault handler */
SET_FAULT_HANDLER(x6, x4)   /* And set it */
 1: ldxrx4, [x0]/* Load-exclusive the data */
@@ -85,6 +92,9 @@ END(casueword)
  * int fubyte(volatile const void *)
  */
 ENTRY(fubyte)
+   ldr x1, =VM_MAXUSER_ADDRESS
+   cmp x0, x1
+   b.csfsu_fault_nopcb
adr x6, fsu_fault   /* Load the fault handler */
SET_FAULT_HANDLER(x6, x1)   /* And set it */
ldrbw0, [x0]/* Try loading the data */
@@ -96,6 +106,9 @@ END(fubyte)
  * int fuword(volatile const void *)
  */
 ENTRY(fuword16)
+   ldr x1, =(VM_MAXUSER_ADDRESS-1)
+   cmp x0, x1
+   b.csfsu_fault_nopcb
adr x6, fsu_fault   /* Load the fault handler */
SET_FAULT_HANDLER(x6, x1)   /* And set it */
ldrhw0, [x0]/* Try loading the data */
@@ -107,6 +120,9 

Re: svn commit: r289332 - head/tools/regression/lib/msun

2015-10-17 Thread Konstantin Belousov
On Thu, Oct 15, 2015 at 10:12:03PM +1100, Bruce Evans wrote:
> On Thu, 15 Oct 2015, Konstantin Belousov wrote:
> 
> > On Wed, Oct 14, 2015 at 08:22:12PM +, Garrett Cooper wrote:
> >> Author: ngie
> >> Date: Wed Oct 14 20:22:12 2015
> >> New Revision: 289332
> >> URL: https://svnweb.freebsd.org/changeset/base/289332
> >>
> >> Log:
> >>   Fix test-fenv:test_dfl_env when run on some amd64 CPUs
> >>
> >>   Compare the fields that the AMD [1] and Intel [2] specs say will be
> >>   set once fnstenv returns.
> >>
> >>   Not all amd64 capable processors zero out the env.__x87.__other field
> >>   (example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what 
> >> the
> >>   env.__x87.__other field will contain after fnstenv is executed, so the 
> >> values
> >>   in env.__x87.__other could be filled with arbitrary data depending on 
> >> how the
> >>   CPU-specific implementation of fnstenv.
> > No Intel or AMD CPU write to __other field at all.
> 
> No, they all do.
> 
> Test on old i386 on old A64:
> 
> Initial state for fegetenv():
> X   7F 12 00 00 00 00 80 1F FF FF FF FF 52 3F 67 C0
>  --cw- -mxhi --sw- -mxlo --tw- -pad- fip
> -
> X 0010  08 00 05 01 48 5F 74 C0 10 00 FF FF
>  -fcs- -opc- foff--- -fds- -pad-
>   other[16]--
> 
> This always fails the test:
> cw: passes
> mxhi:   passes
> sw: passes
> pad+tw: passes
> fip:always fails.  The test wants 0, but the value is always the kernel
>  eip for the instruction that is used to avoid the security hole.
>   (The A64 CPU gives the security hole, and the kernel code is
>   pessimal so it apparently runs always on the first use of the
>   NPX by a thread.)
> fcs:always fails.  The test wants 0, but the value is always the kernel
>  cs, as above.
> opc:always fails.  The value is the opcode for the kernel instruction
> foff:   always fails.  The value is the data address for the kernel 
> instruction
> fds:always fails.  The value is the kernel ds extended by padding with 1's
> 
> Modified state for fxsave:
> X 001C  7F 12 00 38 80 00 F0 3F EE EE EE EE EE EE EE EE
> X 002C  EE EE EE EE EE EE EE EE 80 1F 00 00 FF FF 00 00
> 
> Partial result of an fxsave instruction after fld1; fstl in the test
> program to try to change the kernel data.  A byte value of EE indicates
> that the byte was written by memset() and not overwritten by fxsave.
> There are 16 such bytes.  These correspond to __other[16].  You are
> probably thinking of fxsave not writing these, but fegetenv() doesn't
> use fxsave and always writes these.  I think fxsave on all Intel CPUs
> write these (freefall's Xeon does), and all AMD CPUs write these after
> an error.
No, I did not thought about fegetenv() as executing FXSAVE instruction.
I did knew that fegetenv() is a wrapper around FNSAVE, and I was completely
sure that FNSAVE in the long mode, when executed by a 64bit program,
never writes anything into the %eip/data offset portion of the FNSAVE
area.  I suspect that this was motivated by unavoidable 32-bitness of
the store format.

I was unable to find a reference in either Intel SDM or in AMD APM which
would support my statement.  The closest thing is the claim that the FOP
field is not filled, in the SDM.  Still, I wonder how things are really
arranged by hardware for FNSAVE in 64bit mode.

Are your experiments below were done for the 32bit programs, or for 64bit ?
Both FXSAVE and XSAVE area formats and rules would be irrelevant for the
FreeBSD ABI.

> 
> The format is slightly different.  All the other values seem to be the
> same as for fegetenv().
> 
> Modified state for fegetenv():
> X 005C  7F 12 00 00 00 00 80 1F FF FF FF FF 63 82 04 08
>  --cw- -mxhi --sw- -mxlo --tw- -pad- fip
> -
> X 006C  1F 00 1D 05 A0 92 04 08 2F 00 FF FF
>  -fcs- -opc- foff--- -fds- -pad-
>   other[16]--
> 
> This is from the same state as the fxsave.  It has the following
> modifications relative to the initial state:
> - all kernel data changed to user addresses, as intended
> 
> Modified state for fnsave:
> X 003C  7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08
> X 004C  1F 00 1D 05 A0 92 04 08 2F 00 FF FF
> 
> This is from the same state as the fxsave.  It has the same format
> and values as the state saved by fegetenv() except 2 padding
> fields are padded with 1's and not repurposed for mxcsr.
> 
> Modified state for fnstenv:
> X 0078  7F 12 FF FF 00 00 FF FF FF FF FF FF 63 82 04 08
> X 0088  1F 00 1D 05 A0 92 04 08 2F 00 FF FF EE EE EE EE
> 
> This is from the same state as the fxsave.  It has the same format
> and values as the state saved by fnsave.
> 
> So last instruction/data values are always in fenv_t on i386.  They
> are undocumented, but might be

svn commit: r289453 - head/usr.bin/iscsictl

2015-10-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Oct 17 13:06:52 2015
New Revision: 289453
URL: https://svnweb.freebsd.org/changeset/base/289453

Log:
  Add -w flag to iscsictl(8) utility, to make it wait for successfull
  session establishment.  Scripting is kind of hard without it.
  
  Reviewed by:  mav@
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3872

Modified:
  head/usr.bin/iscsictl/iscsictl.8
  head/usr.bin/iscsictl/iscsictl.c

Modified: head/usr.bin/iscsictl/iscsictl.8
==
--- head/usr.bin/iscsictl/iscsictl.8Sat Oct 17 13:00:34 2015
(r289452)
+++ head/usr.bin/iscsictl/iscsictl.8Sat Oct 17 13:06:52 2015
(r289453)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 12, 2014
+.Dd October 17, 2015
 .Dt ISCSICTL 8
 .Os
 .Sh NAME
@@ -36,7 +36,9 @@
 .Sh SYNOPSIS
 .Nm
 .Fl A
-.Fl p Ar portal Fl t Ar target Op Fl u Ar user Fl s Ar secret
+.Fl p Ar portal Fl t Ar target
+.Op Fl u Ar user Fl s Ar secret
+.Op Fl w Ar timeout
 .Nm
 .Fl A
 .Fl d Ar discovery-host Op Fl u Ar user Fl s Ar secret
@@ -70,6 +72,7 @@
 .Nm
 .Fl L
 .Op Fl v
+.Op Fl w Ar timeout
 .Sh DESCRIPTION
 The
 .Nm
@@ -113,6 +116,10 @@ Target name.
 CHAP login.
 .It Fl v
 Verbose mode.
+.It Fl w
+Instead of returning immediately, wait up to
+.Ar timeout
+seconds until all configured sessions are successfully established.
 .El
 .Pp
 Certain parameters are necessary when adding a session.
@@ -132,9 +139,11 @@ via configuration file.
 .Pp
 Since connecting to the target is performed in background, non-zero
 exit status does not mean that the session was successfully established.
-Use
+Use either
 .Nm Fl L
-to check the connection status.
+to check the connection status, or the
+.Fl w
+flag to wait for session establishment.
 .Pp
 Note that in order for the iSCSI initiator to be able to connect to a target,
 the

Modified: head/usr.bin/iscsictl/iscsictl.c
==
--- head/usr.bin/iscsictl/iscsictl.cSat Oct 17 13:00:34 2015
(r289452)
+++ head/usr.bin/iscsictl/iscsictl.cSat Oct 17 13:06:52 2015
(r289453)
@@ -592,12 +592,70 @@ kernel_list(int iscsi_fd, const struct t
return (0);
 }
 
+static int
+kernel_wait(int iscsi_fd, int timeout)
+{
+   struct iscsi_session_state *states = NULL;
+   const struct iscsi_session_state *state;
+   const struct iscsi_session_conf *conf;
+   struct iscsi_session_list isl;
+   unsigned int i, nentries = 1;
+   bool all_connected;
+   int error;
+
+   for (;;) {
+   for (;;) {
+   states = realloc(states,
+   nentries * sizeof(struct iscsi_session_state));
+   if (states == NULL)
+   xo_err(1, "realloc");
+
+   memset(&isl, 0, sizeof(isl));
+   isl.isl_nentries = nentries;
+   isl.isl_pstates = states;
+
+   error = ioctl(iscsi_fd, ISCSISLIST, &isl);
+   if (error != 0 && errno == EMSGSIZE) {
+   nentries *= 4;
+   continue;
+   }
+   break;
+   }
+   if (error != 0) {
+   xo_warn("ISCSISLIST");
+   return (error);
+   }
+
+   all_connected = true;
+   for (i = 0; i < isl.isl_nentries; i++) {
+   state = &states[i];
+   conf = &state->iss_conf;
+
+   if (!state->iss_connected) {
+   all_connected = false;
+   break;
+   }
+   }
+
+   if (all_connected)
+   return (0);
+
+   sleep(1);
+
+   if (timeout > 0) {
+   timeout--;
+   if (timeout == 0)
+   return (1);
+   }
+   }
+}
+
 static void
 usage(void)
 {
 
fprintf(stderr, "usage: iscsictl -A -p portal -t target "
-   "[-u user -s secret]\n");
+   "[-u user -s secret] [-w timeout]\n");
fprintf(stderr, "   iscsictl -A -d discovery-host "
"[-u user -s secret]\n");
fprintf(stderr, "   iscsictl -A -a [-c path]\n");
@@ -609,7 +667,7 @@ usage(void)
fprintf(stderr, "   iscsictl -R [-p portal] [-t target]\n");
fprintf(stderr, "   iscsictl -R -a\n");
fprintf(stderr, "   iscsictl -R -n nickname [-c path]\n");
-   fprintf(stderr, "   iscsictl -L [-v]\n");
+   fprintf(stderr, "   iscsictl -L [-v] [-w timeout]\n");
exit(1);
 }
 
@@ -631,6 +689,7 @@ main(int argc, char **argv)
const char *conf_pat

svn commit: r289452 - head/rescue/rescue

2015-10-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Sat Oct 17 13:00:34 2015
New Revision: 289452
URL: https://svnweb.freebsd.org/changeset/base/289452

Log:
  Add iscsictl(8) and iscsid(8) to rescue(8).  The point is to make it
  easier to build md_root images from rescue(8), to use with iSCSI boot.
  
  The change increases the size of rescue by 62kB, from 8728kB to 8790kB.
  
  Reviewed by:  bapt@
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3865

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Sat Oct 17 09:26:16 2015(r289451)
+++ head/rescue/rescue/Makefile Sat Oct 17 13:00:34 2015(r289452)
@@ -179,7 +179,7 @@ CRUNCH_BUILDOPTS_dhclient= -DRELEASE_CRU
 #
 CRUNCH_SRCDIRS+= usr.bin
 
-CRUNCH_PROGS_usr.bin= head mt nc sed tail tee
+CRUNCH_PROGS_usr.bin= head iscsictl mt nc sed tail tee
 
 CRUNCH_PROGS_usr.bin+= gzip
 CRUNCH_ALIAS_gzip= gunzip gzcat zcat
@@ -214,7 +214,7 @@ CRUNCH_ALIAS_id= groups whoami
 #
 CRUNCH_SRCDIRS+= usr.sbin
 
-CRUNCH_PROGS_usr.sbin+= chroot
+CRUNCH_PROGS_usr.sbin+= chroot iscsid
 
 CRUNCH_PROGS_usr.sbin+= chown
 CRUNCH_ALIAS_chown= chgrp
___
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: r289451 - head/share/zoneinfo

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 09:26:16 2015
New Revision: 289451
URL: https://svnweb.freebsd.org/changeset/base/289451

Log:
  Install share/zoneinfo in a deterministic way by sorting the results from find
  
  This helps produce deterministic METALOG output
  
  PR: 200674
  Submitted by: Fabian Keil 
  Reviewed by: emaste
  MFC after: 1 week
  Obtained from: ElectroBSD

Modified:
  head/share/zoneinfo/Makefile

Modified: head/share/zoneinfo/Makefile
==
--- head/share/zoneinfo/MakefileSat Oct 17 09:07:53 2015
(r289450)
+++ head/share/zoneinfo/MakefileSat Oct 17 09:26:16 2015
(r289451)
@@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA}
 
 beforeinstall:
cd ${TZBUILDDIR} && \
-   find * -type f -print -exec ${INSTALL} \
+   find -s * -type f -print -exec ${INSTALL} \
-o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
\{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
___
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: r289450 - head/lib/libcam

2015-10-17 Thread NGie Cooper

> On Oct 17, 2015, at 02:07, Garrett Cooper  wrote:
> 
> Author: ngie
> Date: Sat Oct 17 09:07:53 2015
> New Revision: 289450
> URL: https://svnweb.freebsd.org/changeset/base/289450
> 
> Log:
>  Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
>  descriptor to avoid trashing valid file descriptors that access dev->fd at a
>  later point in time

That wasn’t a good description — sorry :(.

The cam_close_spec_device API doesn’t free `struct cam_device *dev` by design, 
so something could reuse the structure, or call close on dev->fd (out of band), 
which could trash valid file descriptor(s) by accident.

Thanks!
-NGie
___
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: r289450 - head/lib/libcam

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 09:07:53 2015
New Revision: 289450
URL: https://svnweb.freebsd.org/changeset/base/289450

Log:
  Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
  descriptor to avoid trashing valid file descriptors that access dev->fd at a
  later point in time
  
  PR: 192671
  Submitted by: Scott Ferris 
  MFC after: 1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libcam/camlib.c

Modified: head/lib/libcam/camlib.c
==
--- head/lib/libcam/camlib.cSat Oct 17 08:51:10 2015(r289449)
+++ head/lib/libcam/camlib.cSat Oct 17 09:07:53 2015(r289450)
@@ -676,8 +676,10 @@ cam_close_spec_device(struct cam_device 
if (dev == NULL)
return;
 
-   if (dev->fd >= 0)
+   if (dev->fd >= 0) {
close(dev->fd);
+   dev->fd = -1;
+   }
 }
 
 char *
___
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: r289449 - in head: sbin/mount sys/kern

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 08:51:10 2015
New Revision: 289449
URL: https://svnweb.freebsd.org/changeset/base/289449

Log:
  Replace /dev/acd0 with /dev/cd1
  
  atapicd(4) has been removed since r249083, and if a system has more than one
  optical drive, it will likely be /dev/cd1
  
  Update mount.conf(8) to reflect the change in behavior
  
  MFC after: never
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sbin/mount/mount.conf.8
  head/sys/kern/vfs_mountroot.c

Modified: head/sbin/mount/mount.conf.8
==
--- head/sbin/mount/mount.conf.8Sat Oct 17 08:43:25 2015
(r289448)
+++ head/sbin/mount/mount.conf.8Sat Oct 17 08:51:10 2015
(r289449)
@@ -26,7 +26,7 @@
 .\" $FreeBSD$
 .\"
 .\"
-.Dd July 7, 2013
+.Dd October 17, 2013
 .Dt MOUNT.CONF 8
 .Os
 .Sh NAME
@@ -154,7 +154,7 @@ will direct the kernel to try mounting t
 first as an ISO CD9660 file system on
 .Pa /dev/cd0 ,
 then if that does not work, as an ISO CD9660 file system on
-.Pa /dev/acd0 ,
+.Pa /dev/cd1 ,
 and then if that does not work, as a UFS file system on
 .Pa /dev/ada0s1a .
 If that does not work, a
@@ -167,7 +167,7 @@ Finally if that does not work, the kerne
 .Li .timeout 3
 cd9660:/dev/cd0 ro
 .Li .timeout 0
-cd9660:/dev/acd0 ro
+cd9660:/dev/cd1 ro
 .Li .timeout 3
 ufs:/dev/ada0s1a
 .Li .ask

Modified: head/sys/kern/vfs_mountroot.c
==
--- head/sys/kern/vfs_mountroot.c   Sat Oct 17 08:43:25 2015
(r289448)
+++ head/sys/kern/vfs_mountroot.c   Sat Oct 17 08:51:10 2015
(r289449)
@@ -468,9 +468,9 @@ parse_dir_ask(char **conf)
printf("\n");
printf("eg. ufs:/dev/da0s1a\n");
printf("zfs:tank\n");
-   printf("cd9660:/dev/acd0 ro\n");
+   printf("cd9660:/dev/cd0 ro\n");
printf("  (which is equivalent to: ");
-   printf("mount -t cd9660 -o ro /dev/acd0 /)\n");
+   printf("mount -t cd9660 -o ro /dev/cd0 /)\n");
printf("\n");
printf("  ?   List valid disk boot devices\n");
printf("  .   Yield 1 second (for background tasks)\n");
@@ -837,7 +837,7 @@ vfs_mountroot_conf0(struct sbuf *sb)
if (boothowto & RB_CDROM) {
sbuf_printf(sb, "cd9660:/dev/cd0 ro\n");
sbuf_printf(sb, ".timeout 0\n");
-   sbuf_printf(sb, "cd9660:/dev/acd0 ro\n");
+   sbuf_printf(sb, "cd9660:/dev/cd1 ro\n");
sbuf_printf(sb, ".timeout %d\n", root_mount_timeout);
}
s = kern_getenv("vfs.root.mountfrom");
___
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: r289446 - in head: etc/mtree tests/sys tests/sys/acl tools/regression/acltools

2015-10-17 Thread Garrett Cooper
Author: ngie
Date: Sat Oct 17 08:39:37 2015
New Revision: 289446
URL: https://svnweb.freebsd.org/changeset/base/289446

Log:
  Integrate tools/regression/acltools into the FreeBSD test suite as 
tests/sys/acl
  
  - Make the requirements more complete for the testcases
  - Detect prerequisites so the tests won't fail (zfs.ko is loaded, zpool(1)
is available, ACL support is enabled with UFS, etc).
  - Work with temporary files/directories/mountpoints that work with atf/kyua
  - Limit the testcases to work on temporary filesystems to reduce tainting the
test host
  
  MFC after: 2 weeks
  Reviewed by: trasz (earlier version)
  Differential Revision: https://reviews.freebsd.org/D3810

Added:
  head/tests/sys/acl/
 - copied from r289236, user/ngie/more-tests2/tests/sys/acl/
  head/tests/sys/acl/Makefile
 - copied unchanged from r289325, 
user/ngie/more-tests2/tests/sys/acl/Makefile
Deleted:
  head/tools/regression/acltools/
Modified:
  head/etc/mtree/BSD.tests.dist
  head/tests/sys/Makefile
Directory Properties:
  head/   (props changed)

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Sat Oct 17 07:32:46 2015
(r289445)
+++ head/etc/mtree/BSD.tests.dist   Sat Oct 17 08:39:37 2015
(r289446)
@@ -360,6 +360,8 @@
 ..
 ..
 sys
+acl
+..
 aio
 ..
 fifo

Modified: head/tests/sys/Makefile
==
--- head/tests/sys/Makefile Sat Oct 17 07:32:46 2015(r289445)
+++ head/tests/sys/Makefile Sat Oct 17 08:39:37 2015(r289446)
@@ -4,6 +4,7 @@
 
 TESTSDIR= ${TESTSBASE}/sys
 
+TESTS_SUBDIRS+=acl
 TESTS_SUBDIRS+=aio
 TESTS_SUBDIRS+=fifo
 TESTS_SUBDIRS+=file

Copied: head/tests/sys/acl/Makefile (from r289325, 
user/ngie/more-tests2/tests/sys/acl/Makefile)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/acl/Makefile Sat Oct 17 08:39:37 2015(r289446, copy 
of r289325, user/ngie/more-tests2/tests/sys/acl/Makefile)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+TESTSDIR=  ${TESTSBASE}/sys/acl
+
+BINDIR=${TESTSDIR}
+
+FILES+=tools-crossfs.test
+FILES+=tools-nfs4.test
+FILES+=tools-nfs4-psarc.test
+FILES+=tools-nfs4-trivial.test
+FILES+=tools-posix.test
+
+SCRIPTS+=  run
+
+TAP_TESTS_SH+= 00
+TAP_TESTS_SH+= 01
+TAP_TESTS_SH+= 02
+TAP_TESTS_SH+= 03
+TAP_TESTS_SH+= 04
+
+.for t in ${TAP_TESTS_SH}
+TEST_METADATA.$t+= required_user="root"
+.endfor
+
+.for t in 01 03 04
+TEST_METADATA.$t+= required_programs="/sbin/zpool"
+.endfor
+
+.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"


Re: svn commit: r289445 - in head: . sys/cddl/contrib/opensolaris/common/zfs

2015-10-17 Thread Xin Li


On 10/17/15 00:32, Alexander Motin wrote:
> Author: mav
> Date: Sat Oct 17 07:32:46 2015
> New Revision: 289445
> URL: https://svnweb.freebsd.org/changeset/base/289445
> 
> Log:
>   Fix ZFS ABI compat shims for `zfs receive` after r289362.
>   
>   Difference appeared much less drammatic then seemed originally.

Thanks!

Cheers,



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r289415 - in head: . sys/sys

2015-10-17 Thread Alexander Motin
On 16.10.2015 21:26, Alexander Motin wrote:
> On 16.10.2015 21:17, Bryan Drewery wrote:
>> On 10/16/2015 1:57 AM, Alexander Motin wrote:
>>> Author: mav
>>> Date: Fri Oct 16 08:57:11 2015
>>> New Revision: 289415
>>> URL: https://svnweb.freebsd.org/changeset/base/289415
>>>
>>> Log:
>>>   Bump version and add notice about incompatibility introduced by resumable
>>>   send/receive support in ZFS.
>>>
>>> Modified:
>>>   head/UPDATING
>>>   head/sys/sys/param.h
>>>
>>> Modified: head/UPDATING
>>> ==
>>> --- head/UPDATING   Fri Oct 16 08:22:21 2015(r289414)
>>> +++ head/UPDATING   Fri Oct 16 08:57:11 2015(r289415)
>>> @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
>>> disable the most expensive debugging functionality run
>>> "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
>>>  
>>> +20151015:
>>> +   Added ZFS support for resumable send/receive changed respective
>>> +   IOCTL API/ABI.  Compatibility ABI shims were provided for other
>>> +   functionality, while receive require version match between world
>>> +   and kernel.
>>
>> This means for example that 'zfs recv' in a 10.2 jail running on a 11.0
>> kernel will not work? Can compatibility be added for it?
> 
> The structures passed as argument for receive are large and completely
> different. Unfortunately I don't know enough about that code to say
> whether new one can be forged from the old one. I'll take another look,
> but can not promise anything.

My first thought I was wrong. r289445 should fix compatibility.

-- 
Alexander Motin
___
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: r289445 - in head: . sys/cddl/contrib/opensolaris/common/zfs

2015-10-17 Thread Alexander Motin
Author: mav
Date: Sat Oct 17 07:32:46 2015
New Revision: 289445
URL: https://svnweb.freebsd.org/changeset/base/289445

Log:
  Fix ZFS ABI compat shims for `zfs receive` after r289362.
  
  Difference appeared much less drammatic then seemed originally.

Modified:
  head/UPDATING
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c

Modified: head/UPDATING
==
--- head/UPDATING   Sat Oct 17 05:57:29 2015(r289444)
+++ head/UPDATING   Sat Oct 17 07:32:46 2015(r289445)
@@ -31,12 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
-20151015:
-   Added ZFS support for resumable send/receive changed respective
-   IOCTL API/ABI.  Compatibility ABI shims were provided for other
-   functionality, while receive require version match between world
-   and kernel.
-
 20151012:
If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster
and etcupdate will now use this file. A custom sendmail.cf is now

Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c
==
--- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Sat Oct 
17 05:57:29 2015(r289444)
+++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c Sat Oct 
17 07:32:46 2015(r289445)
@@ -84,6 +84,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_
ZCMD_COPY(zc_share);
ZCMD_COPY(zc_jailid);
ZCMD_COPY(zc_objset_stats);
+   zc->zc_begin_record.drr_u.drr_begin = edbp_c->zc_begin_record;
ZCMD_COPY(zc_inject_record);
ZCMD_COPY(zc_defer_destroy);
ZCMD_COPY(zc_flags);
@@ -126,6 +127,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_
ZCMD_COPY(zc_share);
ZCMD_COPY(zc_jailid);
ZCMD_COPY(zc_objset_stats);
+   zc->zc_begin_record.drr_u.drr_begin = zcmd_c->zc_begin_record;
ZCMD_COPY(zc_inject_record);
 
/* boolean_t -> uint32_t */
@@ -168,6 +170,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_
zc->zc_share = zcdm_c->zc_share;
zc->zc_jailid = zcdm_c->zc_jailid;
zc->zc_objset_stats = zcdm_c->zc_objset_stats;
+   zc->zc_begin_record.drr_u.drr_begin = zcdm_c->zc_begin_record;
zc->zc_defer_destroy = zcdm_c->zc_defer_destroy;
(void)zcdm_c->zc_temphold;
zc->zc_action_handle = zcdm_c->zc_action_handle;
@@ -211,6 +214,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_
zc->zc_share = zc28_c->zc_share;
zc->zc_jailid = zc28_c->zc_jailid;
zc->zc_objset_stats = zc28_c->zc_objset_stats;
+   zc->zc_begin_record.drr_u.drr_begin = zc28_c->zc_begin_record;
zc->zc_defer_destroy = zc28_c->zc_defer_destroy;
(void)zc28_c->zc_temphold;
zc->zc_action_handle = zc28_c->zc_action_handle;
@@ -279,6 +283,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_
zc->zc_share = zc_c->zc_share;
zc->zc_jailid = zc_c->zc_jailid;
zc->zc_objset_stats = zc_c->zc_objset_stats;
+   zc->zc_begin_record.drr_u.drr_begin = zc_c->zc_begin_record;
 
/* zc->zc_inject_record */
zc->zc_inject_record.zi_objset =
@@ -343,6 +348,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_
ZCMD_COPY(zc_share);
ZCMD_COPY(zc_jailid);
ZCMD_COPY(zc_objset_stats);
+   edbp_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin;
ZCMD_COPY(zc_inject_record);
ZCMD_COPY(zc_defer_destroy);
ZCMD_COPY(zc_flags);
@@ -384,6 +390,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_
ZCMD_COPY(zc_share);
ZCMD_COPY(zc_jailid);
ZCMD_COPY(zc_objset_stats);
+   zcmd_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin;
ZCMD_COPY(zc_inject_record);
 
/* boolean_t -> uint32_t */
@@ -425,6 +432,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_
zcdm_c->zc_share = zc->zc_share;
zcdm_c->zc_jailid = zc->zc_jailid;
zcdm_c->zc_objset_stats = zc->zc_objset_stats;
+   zcdm_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin;
zcdm_c->zc_defer_destroy = zc->zc_defer_destroy;
zcdm_c->zc_temphold = 0;
zcdm_c->zc_action_handle = zc->zc_action_handle;
@@ -469,6 +477,7 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_
zc28_c->zc_share = zc->zc_share;
zc28_c->zc_jailid = zc->zc