Re: svn commit: r274709 - head/sys/netpfil/pf

2014-11-25 Thread Dag-Erling Smørgrav
Ermal LuXXi  writes:
> Log:
>   pf(4) needs to have a correct checksum during its processing.
>   Calculate checksums for the IPv6 path when needed before
>   delving into pf(4) code as required.
>   
>   PR: 172648, 179392
>   Reviewed by:glebius@
>   Approved by:gnn@
>   Obtained from:  pfSense
>   MFC after:  1 week
>   Sponsored by:   Netgate

This is wrong, and causes a panic with some network adapters (vtnet, for
one).  It is closely related to 192013 and should not have been
committed without consulting me first.  Please revert, or just #if 0 out
the entire block since the old code is even more wrong than your
version.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r275020 - head/lib/libc/net

2014-11-25 Thread Dag-Erling Smørgrav
Author: des
Date: Tue Nov 25 09:47:15 2014
New Revision: 275020
URL: https://svnweb.freebsd.org/changeset/base/275020

Log:
  The fallback flag in nsdispatch prevents the fallback implementation of
  getgroupmembership() from invoking the correct backend in the compat case.
  Replace it with a nesting depth counter so it only blocks one level (the
  first is the group -> group_compat translation, the second is the actual
  backend).  This is one of two bugs that break getgrouplist() in the compat
  case, the second being that the backend's own getgroupmembership() method
  is ignored.  Unfortunately, that is not easily fixable without a redesign
  of our nss implementation (which is also needed to implement the +@group
  syntax in /etc/passwd).
  
  PR:   190055
  MFC after:1 week

Modified:
  head/lib/libc/net/nsdispatch.c

Modified: head/lib/libc/net/nsdispatch.c
==
--- head/lib/libc/net/nsdispatch.c  Tue Nov 25 08:39:46 2014
(r275019)
+++ head/lib/libc/net/nsdispatch.c  Tue Nov 25 09:47:15 2014
(r275020)
@@ -132,14 +132,17 @@ staticvoid
*nss_cache_cycle_preventio
 #endif
 
 /*
- * When this is set to 1, nsdispatch won't use nsswitch.conf
- * but will consult the 'defaults' source list only.
- * NOTE: nested fallbacks (when nsdispatch calls fallback functions,
- * which in turn calls nsdispatch, which should call fallback
- * function) are not supported
+ * We keep track of nsdispatch() nesting depth in dispatch_depth.  When a
+ * fallback method is invoked from nsdispatch(), we temporarily set
+ * fallback_depth to the current dispatch depth plus one.  Subsequent
+ * calls at that exact depth will run in fallback mode (restricted to the
+ * same source as the call that was handled by the fallback method), while
+ * calls below that depth will be handled normally, allowing fallback
+ * methods to perform arbitrary lookups.
  */
 struct fb_state {
-   int fb_dispatch;
+   int dispatch_depth;
+   int fallback_depth;
 };
 static voidfb_endstate(void *);
 NSS_TLS_HANDLING(fb);
@@ -613,6 +616,7 @@ _nsdispatch(void *retval, const ns_dtab 
void*mdata;
int  isthreaded, serrno, i, result, srclistsize;
struct fb_state *st;
+   int  saved_depth;
 
 #ifdef NS_CACHING
nss_cache_data   cache_data;
@@ -644,7 +648,8 @@ _nsdispatch(void *retval, const ns_dtab 
result = NS_UNAVAIL;
goto fin;
}
-   if (st->fb_dispatch == 0) {
+   ++st->dispatch_depth;
+   if (st->dispatch_depth > st->fallback_depth) {
dbt = vector_search(&database, _nsmap, _nsmapsize, 
sizeof(*_nsmap),
string_compare);
fb_method = nss_method_lookup(NSSRC_FALLBACK, database,
@@ -713,12 +718,13 @@ _nsdispatch(void *retval, const ns_dtab 
break;
} else {
if (fb_method != NULL) {
-   st->fb_dispatch = 1;
+   saved_depth = st->fallback_depth;
+   st->fallback_depth = st->dispatch_depth + 1;
va_start(ap, defaults);
result = fb_method(retval,
(void *)srclist[i].name, ap);
va_end(ap);
-   st->fb_dispatch = 0;
+   st->fallback_depth = saved_depth;
} else
nss_log(LOG_DEBUG, "%s, %s, %s, not found, "
"and no fallback provided",
@@ -750,6 +756,7 @@ _nsdispatch(void *retval, const ns_dtab 
 
if (isthreaded)
(void)_pthread_rwlock_unlock(&nss_lock);
+   --st->dispatch_depth;
 fin:
errno = serrno;
return (result);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275021 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 09:54:05 2014
New Revision: 275021
URL: https://svnweb.freebsd.org/changeset/base/275021

Log:
  libvers and libsl are internal libraries

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 09:47:15 2014
(r275020)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 09:54:05 2014
(r275021)
@@ -29,7 +29,9 @@ _INTERNALIBS= \
netbsd \
ohash \
readline \
-   sm
+   sl \
+   sm \
+   vers
 
 _LIBRARIES=\
${_PRIVATELIBS} \
@@ -110,7 +112,6 @@ _LIBRARIES= \
ulog \
usb \
util \
-   vers \
wind \
wrap \
y \
@@ -281,3 +282,9 @@ LIBSM?= ${LIBSMDIR}/libsm.a
 
 LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd
 LIBNETBSD?=${LIBNETBSDDIR}/libnetbsd.a
+
+LIBVERSDIR?=   ${ROOTOBJDIR}/kerberos5/lib/libvers
+LIBVERS?=  ${LIBVERSDIR}/libvers.a
+
+LIBSLDIR=  ${ROOTOBJDIR}/kerberos5/lib/libsl
+LIBSL?=${LIBSLDIR}/libsl.a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275022 - in head/kerberos5: . lib/libasn1 lib/libgssapi_krb5 lib/libgssapi_ntlm lib/libgssapi_spnego lib/libhdb lib/libheimbase lib/libheimipcc lib/libheimipcs lib/libheimntlm lib/libh...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 09:57:42 2014
New Revision: 275022
URL: https://svnweb.freebsd.org/changeset/base/275022

Log:
  Convert kerberos to LIBADD and reduce overlinking of the kerberos binaries and
  libraries

Modified:
  head/kerberos5/Makefile.inc
  head/kerberos5/lib/libasn1/Makefile
  head/kerberos5/lib/libgssapi_krb5/Makefile
  head/kerberos5/lib/libgssapi_ntlm/Makefile
  head/kerberos5/lib/libgssapi_spnego/Makefile
  head/kerberos5/lib/libhdb/Makefile
  head/kerberos5/lib/libheimbase/Makefile
  head/kerberos5/lib/libheimipcc/Makefile
  head/kerberos5/lib/libheimipcs/Makefile
  head/kerberos5/lib/libheimntlm/Makefile
  head/kerberos5/lib/libheimsqlite/Makefile
  head/kerberos5/lib/libhx509/Makefile
  head/kerberos5/lib/libkadm5clnt/Makefile
  head/kerberos5/lib/libkadm5srv/Makefile
  head/kerberos5/lib/libkafs5/Makefile
  head/kerberos5/lib/libkdc/Makefile
  head/kerberos5/lib/libkrb5/Makefile
  head/kerberos5/lib/libroken/Makefile
  head/kerberos5/lib/libwind/Makefile
  head/kerberos5/libexec/digest-service/Makefile
  head/kerberos5/libexec/hprop/Makefile
  head/kerberos5/libexec/hpropd/Makefile
  head/kerberos5/libexec/ipropd-master/Makefile
  head/kerberos5/libexec/ipropd-slave/Makefile
  head/kerberos5/libexec/kadmind/Makefile
  head/kerberos5/libexec/kcm/Makefile
  head/kerberos5/libexec/kdc/Makefile
  head/kerberos5/libexec/kdigest/Makefile
  head/kerberos5/libexec/kfd/Makefile
  head/kerberos5/libexec/kimpersonate/Makefile
  head/kerberos5/libexec/kpasswdd/Makefile
  head/kerberos5/tools/asn1_compile/Makefile
  head/kerberos5/tools/slc/Makefile
  head/kerberos5/usr.bin/hxtool/Makefile
  head/kerberos5/usr.bin/kadmin/Makefile
  head/kerberos5/usr.bin/kcc/Makefile
  head/kerberos5/usr.bin/kdestroy/Makefile
  head/kerberos5/usr.bin/kf/Makefile
  head/kerberos5/usr.bin/kgetcred/Makefile
  head/kerberos5/usr.bin/kinit/Makefile
  head/kerberos5/usr.bin/kpasswd/Makefile
  head/kerberos5/usr.bin/ksu/Makefile
  head/kerberos5/usr.bin/string2key/Makefile
  head/kerberos5/usr.bin/verify_krb5_conf/Makefile
  head/kerberos5/usr.sbin/iprop-log/Makefile
  head/kerberos5/usr.sbin/kstash/Makefile
  head/kerberos5/usr.sbin/ktutil/Makefile

Modified: head/kerberos5/Makefile.inc
==
--- head/kerberos5/Makefile.inc Tue Nov 25 09:54:05 2014(r275021)
+++ head/kerberos5/Makefile.inc Tue Nov 25 09:57:42 2014(r275022)
@@ -16,9 +16,6 @@ LDAPCFLAGS=   -I${OPENLDAPBASE}/include -D
 LDAPLDFLAGS=   -L${OPENLDAPBASE}/lib -Wl,-rpath,${OPENLDAPBASE}/lib
 .endif
 
-LIBVERS=   ${.OBJDIR}/../../lib/libvers/libvers.a
-LIBSL= ${.OBJDIR}/../../lib/libsl/libsl.a
-
 .if defined(SRCS)
 
 ETSRCS=\

Modified: head/kerberos5/lib/libasn1/Makefile
==
--- head/kerberos5/lib/libasn1/Makefile Tue Nov 25 09:54:05 2014
(r275021)
+++ head/kerberos5/lib/libasn1/Makefile Tue Nov 25 09:57:42 2014
(r275022)
@@ -3,8 +3,7 @@
 LIB=   asn1
 LDFLAGS=   -Wl,--no-undefined
 INCS=  asn1_err.h asn1-common.h heim_asn1.h der.h der-protos.h der-private.h
-LDADD= -lcom_err -lroken
-DPADD= ${LIBCOM_ERR} ${LIBROKEN}
+LIBADD=com_err roken
 VERSION_MAP=   ${.CURDIR}/version.map
 
 SRCS=  asn1_err.c \

Modified: head/kerberos5/lib/libgssapi_krb5/Makefile
==
--- head/kerberos5/lib/libgssapi_krb5/Makefile  Tue Nov 25 09:54:05 2014
(r275021)
+++ head/kerberos5/lib/libgssapi_krb5/Makefile  Tue Nov 25 09:57:42 2014
(r275022)
@@ -2,9 +2,7 @@
 
 LIB=   gssapi_krb5
 LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined
-LDADD= -lgssapi -lkrb5 -lhx509 -lcrypto -lroken -lasn1 -lcom_err -lcrypt
-DPADD= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBCRYPTO} ${LIBROKEN} ${LIBASN1} 
\
-   ${LIBCOM_ERR} ${LIBCRYPT}
+LIBADD=gssapi krb5 crypto roken asn1 com_err
 SHLIB_MAJOR=   10
 
 INCS=  ${KRB5DIR}/lib/gssapi/gssapi/gssapi_krb5.h

Modified: head/kerberos5/lib/libgssapi_ntlm/Makefile
==
--- head/kerberos5/lib/libgssapi_ntlm/Makefile  Tue Nov 25 09:54:05 2014
(r275021)
+++ head/kerberos5/lib/libgssapi_ntlm/Makefile  Tue Nov 25 09:57:42 2014
(r275022)
@@ -2,8 +2,7 @@
 
 LIB=   gssapi_ntlm
 LDFLAGS= -Wl,-Bsymbolic -Wl,--no-undefined
-LDADD= -lcrypto -lgssapi -lkrb5 -lhx509 -lheimntlm -lroken
-DPADD= ${LIBCRYPTO} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} 
${LIBROKEN}
+LIBADD=crypto gssapi krb5 heimntlm roken
 SHLIB_MAJOR=   10
 
 SRCS=  accept_sec_context.c \

Modified: head/kerberos5/lib/libgssapi_spnego/Makefile
==
--- head/kerberos5/lib/libgssapi_spnego/MakefileTue Nov 25 09:54:05 
2014(r275021)
+++ head/kerberos5/lib/libgssapi_spnego/MakefileTue Nov 25 09:57:42 
2014   

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

2014-11-25 Thread Andriy Gapon
On 21/11/2014 22:25, Xin Li wrote:
> On 11/21/14 07:18, Andriy Gapon wrote:
>> On 13/10/2014 23:39, Xin LI wrote:
>>> Author: delphij Date: Mon Oct 13 20:39:51 2014 New Revision:
>>> 273060 URL: https://svnweb.freebsd.org/changeset/base/273060
>>>
>>> Log: Use write_psize instead of write_asize when doing
>>> vdev_space_update. Without this change the accounting of L2ARC
>>> usage would be wrong and give 16EB free space because the number
>>> became negative and overflows.
>>>
>>> Obtained from:  FreeNAS (issue #6239)
> 
>> First, a link to the issue would be more convenient for reviewers.
>> Here it is https://bugs.freenas.org/issues/6239
> 
>> Then, I would like to see a technical explanation for this change. 
>> I could not find any explanation here or in the FreeNAS issue or in
>> the FreeNAS commit.
> 
>> As far as I can see, all calls to vdev_space_update() in the ARC
>> code are passed l2hdr->b_asize or a sum of b_asize fields of
>> multiple buffers. Thus, I am really surprised with this change and
>> would like to see reasoning behind it.
> 
> Hmm I think you are right that my change doesn't make sense but I
> can't remember the details either and suggests there is some other
> issues that was covered up by this.

Maybe you have some other changes in FreeNAS and the change in question is
supposed to work along with them?

Meanwhile, perhaps the discussed commit needs to be reverted?

> It looks like that I was confused because the L2ARC clock hand
> advances by buf_p_sz (unrelated but it should really be called
> buf_a_size) and the way we calculate allocated L2ARC free.

Agree about 'a' vs 'p'.  And, BTW, we have some related changes in ClusterHQ
that I will upstream.

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


Re: svn commit: r274709 - head/sys/netpfil/pf

2014-11-25 Thread Dag-Erling Smørgrav
Dag-Erling Smørgrav  writes:
> This is wrong, and causes a panic with some network adapters (vtnet, for
> one).  It is closely related to 192013 and should not have been
> committed without consulting me first.  Please revert, or just #if 0 out
> the entire block since the old code is even more wrong than your
> version.

Note: I am aware that the patch in 192013 is incorrect as well, which is
why I never committed it, although I should have noted that in the PR.
The current IPv4 code is also slightly wrong, but not as much as the
IPv6 code.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r275023 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:07:03 2014
New Revision: 275023
URL: https://svnweb.freebsd.org/changeset/base/275023

Log:
  Define compiler_rt and ssp_nonshared libraries

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 09:57:42 2014
(r275022)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 11:07:03 2014
(r275023)
@@ -45,10 +45,11 @@ _LIBRARIES= \
cam \
capsicum \
casper \
-   ctf \
com_err \
+   compiler_rt \
crypt \
crypto \
+   ctf \
cuse \
cxxrt \
devstat \
@@ -106,6 +107,7 @@ _LIBRARIES= \
ssl \
stdthreads \
supcplusplus \
+   ssp_nonshared \
tacplus \
termcapw \
ufs \
@@ -115,6 +117,7 @@ _LIBRARIES= \
wind \
wrap \
y \
+   ypclnt \
z
 
 _DP_archive=   z bz2 lzma bsdxml
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275024 - in head/lib: atf/libatf-c++ libarchive libarchive/test libbsnmp/libbsnmp libc libc++ libcam libcapsicum libcasper libcrypt/tests libcuse libdevstat libdpv libdwarf libedit lib...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:07:26 2014
New Revision: 275024
URL: https://svnweb.freebsd.org/changeset/base/275024

Log:
  Convert libraries to use LIBADD
  While here reduce a bit overlinking

Modified:
  head/lib/atf/libatf-c++/Makefile
  head/lib/libarchive/Makefile
  head/lib/libarchive/test/Makefile
  head/lib/libbsnmp/libbsnmp/Makefile
  head/lib/libc++/Makefile
  head/lib/libc/Makefile
  head/lib/libcam/Makefile
  head/lib/libcapsicum/Makefile
  head/lib/libcasper/Makefile
  head/lib/libcrypt/tests/Makefile
  head/lib/libcuse/Makefile
  head/lib/libdevstat/Makefile
  head/lib/libdpv/Makefile
  head/lib/libdwarf/Makefile
  head/lib/libedit/Makefile
  head/lib/libexecinfo/Makefile
  head/lib/libfetch/Makefile
  head/lib/libgeom/Makefile
  head/lib/libldns/Makefile
  head/lib/libmagic/Makefile
  head/lib/libmemstat/Makefile
  head/lib/libmp/Makefile
  head/lib/libmp/tests/Makefile
  head/lib/libnv/tests/Makefile
  head/lib/libopie/Makefile
  head/lib/libpam/modules/Makefile.inc
  head/lib/libpam/modules/pam_krb5/Makefile
  head/lib/libpam/modules/pam_ksu/Makefile
  head/lib/libpam/modules/pam_nologin/Makefile
  head/lib/libpam/modules/pam_opie/Makefile
  head/lib/libpam/modules/pam_opieaccess/Makefile
  head/lib/libpam/modules/pam_passwdqc/Makefile
  head/lib/libpam/modules/pam_radius/Makefile
  head/lib/libpam/modules/pam_ssh/Makefile
  head/lib/libpam/modules/pam_tacplus/Makefile
  head/lib/libpam/modules/pam_unix/Makefile
  head/lib/libpjdlog/Makefile
  head/lib/libproc/Makefile
  head/lib/libprocstat/Makefile
  head/lib/libradius/Makefile
  head/lib/librpcsec_gss/Makefile
  head/lib/librt/Makefile
  head/lib/librt/tests/Makefile
  head/lib/libsmb/Makefile
  head/lib/libsqlite3/Makefile
  head/lib/libstdthreads/Makefile
  head/lib/libtacplus/Makefile
  head/lib/libulog/Makefile
  head/lib/libunbound/Makefile
  head/lib/libusb/Makefile
  head/lib/libutil/tests/Makefile
  head/lib/msun/tests/Makefile
  head/lib/ncurses/form/Makefile
  head/lib/ncurses/menu/Makefile
  head/lib/ncurses/panel/Makefile

Modified: head/lib/atf/libatf-c++/Makefile
==
--- head/lib/atf/libatf-c++/MakefileTue Nov 25 11:07:03 2014
(r275023)
+++ head/lib/atf/libatf-c++/MakefileTue Nov 25 11:07:26 2014
(r275024)
@@ -33,8 +33,7 @@ PRIVATELIB=   true
 SHLIB_MAJOR=   2
 
 # libatf-c++ depends on the C version of the ATF library to build.
-DPADD= ${LIBATF_C}
-LDADD= -latf-c
+LIBADD+=   atf_c
 
 LDFLAGS+=  -L${.OBJDIR}/../libatf-c
 

Modified: head/lib/libarchive/Makefile
==
--- head/lib/libarchive/MakefileTue Nov 25 11:07:03 2014
(r275023)
+++ head/lib/libarchive/MakefileTue Nov 25 11:07:26 2014
(r275024)
@@ -4,19 +4,9 @@
 LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
 
 LIB=   archive
-DPADD= ${LIBZ}
-LDADD= -lz
 
-DPADD+= ${LIBBZ2}
-LDADD+= -lbz2
-CFLAGS+= -DHAVE_BZLIB_H=1
-
-DPADD+= ${LIBLZMA}
-LDADD+= -llzma
-CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
-
-DPADD+= ${LIBBSDXML}
-LDADD+= -lbsdxml
+LIBADD=z bz2 lzma bsdxml
+CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
 
 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
 # It has no real relation to the libarchive version number.
@@ -27,11 +17,9 @@ CFLAGS+= -I${.OBJDIR}
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=   -DWITH_OPENSSL
-DPADD+=${LIBCRYPTO}
-LDADD+=-lcrypto
+LIBADD+=   crypto
 .else
-DPADD+=${LIBMD}
-LDADD+=-lmd
+LIBADD+=   md
 .endif
 
 .if ${MK_ICONV} != "no"

Modified: head/lib/libarchive/test/Makefile
==
--- head/lib/libarchive/test/Makefile   Tue Nov 25 11:07:03 2014
(r275023)
+++ head/lib/libarchive/test/Makefile   Tue Nov 25 11:07:26 2014
(r275024)
@@ -6,9 +6,8 @@ MAN=
 
 PROG=libarchive_test
 INTERNALPROG=yes  # Don't install this; it's just for testing
-DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
 LDADD= -L ${.OBJDIR}/.. -larchive
-LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
+LIBADD=z bz2 lzma md crypto bsdxml
 CFLAGS+= -g
 CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
 CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils

Modified: head/lib/libbsnmp/libbsnmp/Makefile
==
--- head/lib/libbsnmp/libbsnmp/Makefile Tue Nov 25 11:07:03 2014
(r275023)
+++ head/lib/libbsnmp/libbsnmp/Makefile Tue Nov 25 11:07:26 2014
(r275024)
@@ -15,8 +15,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+= -DHAVE_LIBCRYPTO
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD=crypto
 .endif
 
 SRCS=  asn1.c snmp.c snmpagent.c snmpclient.c snmpcrypto.c support.c

Modified: head/lib/libc++/Makefile
==

svn commit: r275025 - head/lib/libsqlite3

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:08:58 2014
New Revision: 275025
URL: https://svnweb.freebsd.org/changeset/base/275025

Log:
  Fix typo

Modified:
  head/lib/libsqlite3/Makefile

Modified: head/lib/libsqlite3/Makefile
==
--- head/lib/libsqlite3/MakefileTue Nov 25 11:07:26 2014
(r275024)
+++ head/lib/libsqlite3/MakefileTue Nov 25 11:08:58 2014
(r275025)
@@ -3,7 +3,7 @@
 PRIVATELIB=yes
 LIB=   sqlite3
 SHLIB_MAJOR?=  0
-LIBADD+=   pthreads
+LIBADD+=   pthread
 
 SRCS=  sqlite3.c
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275026 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:13:21 2014
New Revision: 275026
URL: https://svnweb.freebsd.org/changeset/base/275026

Log:
  Add a definition for libxo

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 11:08:58 2014
(r275025)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 11:13:21 2014
(r275026)
@@ -116,6 +116,7 @@ _LIBRARIES= \
util \
wind \
wrap \
+   xo \
y \
ypclnt \
z
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275027 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:14:42 2014
New Revision: 275027
URL: https://svnweb.freebsd.org/changeset/base/275027

Log:
  Fix recursive problem with libedit dependency, if you depends on ncursesw and
  not on itself

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 11:13:21 2014
(r275026)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 11:14:42 2014
(r275027)
@@ -129,7 +129,7 @@ _DP_archive+=   md
 .endif
 _DP_ssl=   crypto
 _DP_ssh=   crypto crypt
-_DP_edit=  edit
+_DP_edit=  ncursesw
 .if ${MK_OPENSSL} != "no"
 _DP_bsnmp= crypto
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275028 - in head/bin: csh df ed ls pkill ps rmail sh

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:15:40 2014
New Revision: 275028
URL: https://svnweb.freebsd.org/changeset/base/275028

Log:
  Convert bin/ to LIBADD, reduce overlinking allow to build all components as
  static

Modified:
  head/bin/csh/Makefile
  head/bin/df/Makefile
  head/bin/ed/Makefile
  head/bin/ls/Makefile
  head/bin/pkill/Makefile
  head/bin/ps/Makefile
  head/bin/rmail/Makefile
  head/bin/sh/Makefile

Modified: head/bin/csh/Makefile
==
--- head/bin/csh/Makefile   Tue Nov 25 11:14:42 2014(r275027)
+++ head/bin/csh/Makefile   Tue Nov 25 11:15:40 2014(r275028)
@@ -40,8 +40,7 @@ MLINKS= csh.1 tcsh.1
 # utilities of the same name are handled with the associated manpage,
 # builtin.1 in share/man/man1/.
 
-DPADD= ${LIBTERMCAPW} ${LIBCRYPT}
-LDADD= -ltermcapw -lcrypt
+LIBADD=termcapw crypt
 
 LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
 

Modified: head/bin/df/Makefile
==
--- head/bin/df/MakefileTue Nov 25 11:14:42 2014(r275027)
+++ head/bin/df/MakefileTue Nov 25 11:15:40 2014(r275028)
@@ -9,7 +9,6 @@ SRCS=   df.c vfslist.c
 
 CFLAGS+= -I${MOUNT}
 
-DPADD= ${LIBUTIL} ${LIBXO}
-LDADD= -lutil -lxo
+LIBADD=xo util
 
 .include 

Modified: head/bin/ed/Makefile
==
--- head/bin/ed/MakefileTue Nov 25 11:14:42 2014(r275027)
+++ head/bin/ed/MakefileTue Nov 25 11:15:40 2014(r275028)
@@ -9,8 +9,7 @@ MLINKS= ed.1 red.1
 
 .if ${MK_OPENSSL} != "no" && ${MK_ED_CRYPTO} != "no"
 CFLAGS+=-DDES
-DPADD= ${LIBCRYPTO}
-LDADD= -lcrypto
+LIBADD=crypto
 .endif
 
 .include 

Modified: head/bin/ls/Makefile
==
--- head/bin/ls/MakefileTue Nov 25 11:14:42 2014(r275027)
+++ head/bin/ls/MakefileTue Nov 25 11:15:40 2014(r275028)
@@ -5,14 +5,12 @@
 
 PROG=  ls
 SRCS=  cmp.c ls.c print.c util.c
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD=util
 
 .if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
 CFLAGS+= -DCOLORLS
-DPADD+=${LIBTERMCAPW}
-LDADD+=-ltermcapw
+LIBADD+=   termcapw
 .endif
 
 .include 

Modified: head/bin/pkill/Makefile
==
--- head/bin/pkill/Makefile Tue Nov 25 11:14:42 2014(r275027)
+++ head/bin/pkill/Makefile Tue Nov 25 11:15:40 2014(r275028)
@@ -5,8 +5,7 @@
 
 PROG=  pkill
 
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD=kvm
 
 LINKS= ${BINDIR}/pkill ${BINDIR}/pgrep
 MLINKS=pkill.1 pgrep.1

Modified: head/bin/ps/Makefile
==
--- head/bin/ps/MakefileTue Nov 25 11:14:42 2014(r275027)
+++ head/bin/ps/MakefileTue Nov 25 11:15:40 2014(r275028)
@@ -11,7 +11,6 @@ SRCS= fmt.c keyword.c nlist.c print.c ps
 # on large systems.
 #
 CFLAGS+=-DLAZY_PS
-DPADD= ${LIBM} ${LIBKVM} ${LIBJAIL}
-LDADD= -lm -lkvm -ljail
+LIBADD=m kvm jail
 
 .include 

Modified: head/bin/rmail/Makefile
==
--- head/bin/rmail/Makefile Tue Nov 25 11:14:42 2014(r275027)
+++ head/bin/rmail/Makefile Tue Nov 25 11:15:40 2014(r275028)
@@ -14,11 +14,7 @@ MAN= rmail.8
 WARNS?=2
 CFLAGS+=-I${SENDMAIL_DIR}/include -I.
 
-LIBSMDIR=  ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-DPADD= ${LIBSM}
-LDADD= ${LIBSM}
+LIBADD=sm
 
 SRCS+= sm_os.h
 CLEANFILES+=sm_os.h

Modified: head/bin/sh/Makefile
==
--- head/bin/sh/MakefileTue Nov 25 11:14:42 2014(r275027)
+++ head/bin/sh/MakefileTue Nov 25 11:15:40 2014(r275028)
@@ -18,8 +18,7 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
 # utilities of the same name are handled with the associated manpage,
 # builtin.1 in share/man/man1/.
 
-DPADD= ${LIBEDIT} ${LIBTERMCAPW}
-LDADD= -ledit -ltermcapw
+LIBADD=edit
 
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275029 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:22:28 2014
New Revision: 275029
URL: https://svnweb.freebsd.org/changeset/base/275029

Log:
  Define libipf internal library

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 11:15:40 2014
(r275028)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 11:22:28 2014
(r275029)
@@ -25,6 +25,7 @@ _PRIVATELIBS= \
 
 _INTERNALIBS=  \
event \
+   ipf \
mandoc \
netbsd \
ohash \
@@ -207,6 +208,9 @@ LDADD_sqlite3+= ${LDADD_pthread}
 DPADD_atf_cxx+=${DPADD_atf_c}
 LDADD_atf_cxx+=${LDADD_atf_c}
 
+DPADD_ipf+=${DPADD_kvm}
+LDADD_ipf+=${LDADD_kvm}
+
 # The following depends on libraries which are using pthread
 DPADD_hdb+=${DPADD_pthread}
 LDADD_hdb+=${LDADD_pthread}
@@ -292,3 +296,6 @@ LIBVERS?=   ${LIBVERSDIR}/libvers.a
 
 LIBSLDIR=  ${ROOTOBJDIR}/kerberos5/lib/libsl
 LIBSL?=${LIBSLDIR}/libsl.a
+
+LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf
+LIBIPF?=   ${LIBIPFDIR}/libipf.a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275030 - in head/sbin: atm/atmconfig badsect bsdlabel camcontrol casperd ccdconfig ddb devd dhclient dmesg dumpfs fdisk fdisk_pc98 ffsinfo fsck_ffs fsdb gbde geom geom/class/eli geom/c...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 11:23:12 2014
New Revision: 275030
URL: https://svnweb.freebsd.org/changeset/base/275030

Log:
  Convert sbin/ to LIBADD
  Reduce overlinking

Modified:
  head/sbin/atm/atmconfig/Makefile
  head/sbin/badsect/Makefile
  head/sbin/bsdlabel/Makefile
  head/sbin/camcontrol/Makefile
  head/sbin/casperd/Makefile
  head/sbin/ccdconfig/Makefile
  head/sbin/ddb/Makefile
  head/sbin/devd/Makefile
  head/sbin/dhclient/Makefile
  head/sbin/dmesg/Makefile
  head/sbin/dumpfs/Makefile
  head/sbin/fdisk/Makefile
  head/sbin/fdisk_pc98/Makefile
  head/sbin/ffsinfo/Makefile
  head/sbin/fsck_ffs/Makefile
  head/sbin/fsck_ffs/dir.c
  head/sbin/fsdb/Makefile
  head/sbin/gbde/Makefile
  head/sbin/geom/Makefile
  head/sbin/geom/class/eli/Makefile
  head/sbin/geom/class/journal/Makefile
  head/sbin/geom/class/mirror/Makefile
  head/sbin/geom/class/part/Makefile
  head/sbin/geom/class/raid/Makefile
  head/sbin/geom/class/raid3/Makefile
  head/sbin/geom/core/Makefile
  head/sbin/ggate/ggatec/Makefile
  head/sbin/ggate/ggated/Makefile
  head/sbin/ggate/ggatel/Makefile
  head/sbin/growfs/Makefile
  head/sbin/gvinum/Makefile
  head/sbin/hastctl/Makefile
  head/sbin/hastd/Makefile
  head/sbin/ifconfig/Makefile
  head/sbin/init/Makefile
  head/sbin/ipf/Makefile.inc
  head/sbin/ipf/ipf/Makefile
  head/sbin/ipf/ipfstat/Makefile
  head/sbin/ipf/ipsend/Makefile
  head/sbin/ipfw/Makefile
  head/sbin/iscontrol/Makefile
  head/sbin/md5/Makefile
  head/sbin/mdconfig/Makefile
  head/sbin/mount/Makefile
  head/sbin/mount_cd9660/Makefile
  head/sbin/mount_msdosfs/Makefile
  head/sbin/mount_udf/Makefile
  head/sbin/nandfs/Makefile
  head/sbin/natd/Makefile
  head/sbin/newfs/Makefile
  head/sbin/newfs_nandfs/Makefile
  head/sbin/pfctl/Makefile
  head/sbin/pflogd/Makefile
  head/sbin/ping/Makefile
  head/sbin/ping6/Makefile
  head/sbin/quotacheck/Makefile
  head/sbin/rcorder/Makefile
  head/sbin/routed/Makefile
  head/sbin/routed/rtquery/Makefile
  head/sbin/savecore/Makefile
  head/sbin/setkey/Makefile
  head/sbin/sunlabel/Makefile
  head/sbin/swapon/Makefile
  head/sbin/tunefs/Makefile

Modified: head/sbin/atm/atmconfig/Makefile
==
--- head/sbin/atm/atmconfig/MakefileTue Nov 25 11:22:28 2014
(r275029)
+++ head/sbin/atm/atmconfig/MakefileTue Nov 25 11:23:12 2014
(r275030)
@@ -17,11 +17,9 @@ CFLAGS+= -I${.OBJDIR}
 .if !defined(RESCUE) && ${MK_BSNMP} != "no"
 CFLAGS+=   -DWITH_BSNMP
 SRCS+= oid.h atmconfig_device.c
-DPADD+=${LIBBSNMP}
-LDADD+=-lbsnmp
+LIBADD+=   bsnmp
 . if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no"
-DPADD+=${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+=   crypto
 . endif
 .endif
 

Modified: head/sbin/badsect/Makefile
==
--- head/sbin/badsect/Makefile  Tue Nov 25 11:22:28 2014(r275029)
+++ head/sbin/badsect/Makefile  Tue Nov 25 11:23:12 2014(r275030)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PROG=  badsect
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD=ufs
 MAN=   badsect.8
 WARNS?=2
 

Modified: head/sbin/bsdlabel/Makefile
==
--- head/sbin/bsdlabel/Makefile Tue Nov 25 11:22:28 2014(r275029)
+++ head/sbin/bsdlabel/Makefile Tue Nov 25 11:23:12 2014(r275030)
@@ -12,7 +12,6 @@ LINKS=${BINDIR}/bsdlabel ${BINDIR}/disk
 MLINKS=bsdlabel.8 disklabel.8
 .endif
 
-DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD= -lgeom -lbsdxml -lsbuf
+LIBADD=geom
 
 .include 

Modified: head/sbin/camcontrol/Makefile
==
--- head/sbin/camcontrol/Makefile   Tue Nov 25 11:22:28 2014
(r275029)
+++ head/sbin/camcontrol/Makefile   Tue Nov 25 11:23:12 2014
(r275030)
@@ -11,8 +11,7 @@ CFLAGS+= -DMINIMALISTIC
 .if ${MACHINE_CPUARCH} == "arm"
 WARNS?= 3
 .endif
-DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL}
-LDADD= -lcam -lsbuf -lutil
+LIBADD=cam sbuf util
 MAN=   camcontrol.8
 
 .include 

Modified: head/sbin/casperd/Makefile
==
--- head/sbin/casperd/Makefile  Tue Nov 25 11:22:28 2014(r275029)
+++ head/sbin/casperd/Makefile  Tue Nov 25 11:23:12 2014(r275030)
@@ -4,8 +4,7 @@ PROG=   casperd
 
 SRCS=  casperd.c zygote.c
 
-DPADD= ${LIBCASPER} ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL}
-LDADD= -lcasper -lcapsicum -lnv -lpjdlog -lutil
+LIBADD=casper nv pjdlog util
 
 MAN=   casperd.8
 

Modified: head/sbin/ccdconfig/Makefile
==
--- head/sbin/ccdconfig/MakefileTue Nov 25 11:22:28 2014
(r275029)
+++ head/sbin/ccdconfig/MakefileTue Nov 25 11:23:12 2014
(r275030)
@@ -3,7 +3,6 @@
 PROG=  ccdconfig
 MAN

Re: svn commit: r274709 - head/sys/netpfil/pf

2014-11-25 Thread Dag-Erling Smørgrav
Here's a patch that doesn't crash and tries not to break TSO.

Index: sys/netpfil/pf/pf_ioctl.c
===
--- sys/netpfil/pf/pf_ioctl.c   (revision 274791)
+++ sys/netpfil/pf/pf_ioctl.c   (working copy)
@@ -3576,9 +3576,10 @@
int chk;
 
/* We need a proper CSUM befor we start (s. OpenBSD ip_output) */
-   if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
+   if ((*m)->m_pkthdr.csum_flags &
+   ((CSUM_DELAY_IP|CSUM_DELAY_DATA) & ~ifp->if_hwassist)) {
in_delayed_cksum(*m);
-   (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
+   (*m)->m_pkthdr.csum_flags &= ~(CSUM_DELAY_IP|CSUM_DELAY_DATA);
}
 
chk = pf_test(PF_OUT, ifp, m, inp);
@@ -3620,12 +3621,14 @@
int chk;
 
/* We need a proper CSUM before we start (s. OpenBSD ip_output) */
-   if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
+   if ((*m)->m_pkthdr.csum_flags &
+   (CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist)) {
in6_delayed_cksum(*m,
(*m)->m_pkthdr.len - sizeof(struct ip6_hdr),
sizeof(struct ip6_hdr));
(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
}
+
CURVNET_SET(ifp->if_vnet);
chk = pf_test6(PF_OUT, ifp, m, inp);
CURVNET_RESTORE();

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r275032 - head/sys/cam/ctl

2014-11-25 Thread Alexander Motin
Author: mav
Date: Tue Nov 25 12:22:29 2014
New Revision: 275032
URL: https://svnweb.freebsd.org/changeset/base/275032

Log:
  Decouple datamove/done logic from CTL status set.

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

Modified: head/sys/cam/ctl/scsi_ctl.c
==
--- head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 12:19:05 2014(r275031)
+++ head/sys/cam/ctl/scsi_ctl.c Tue Nov 25 12:22:29 2014(r275032)
@@ -86,7 +86,6 @@ struct ctlfe_softc {
 STAILQ_HEAD(, ctlfe_softc) ctlfe_softc_list;
 struct mtx ctlfe_list_mtx;
 static char ctlfe_mtx_desc[] = "ctlfelist";
-static int ctlfe_dma_enabled = 1;
 #ifdef CTLFE_INIT_ENABLE
 static int ctlfe_max_targets = 1;
 static int ctlfe_num_targets = 0;
@@ -101,7 +100,6 @@ struct ctlfe_lun_softc {
struct ctlfe_softc *parent_softc;
struct cam_periph *periph;
ctlfe_lun_flags flags;
-   struct callout dma_callout;
uint64_t ccbs_alloced;
uint64_t ccbs_freed;
uint64_t ctios_sent;
@@ -136,6 +134,7 @@ struct ctlfe_lun_cmd_info {
 #define CTLFE_MAX_SEGS 32
bus_dma_segment_t cam_sglist[CTLFE_MAX_SEGS];
 };
+CTASSERT(sizeof(struct ctlfe_lun_cmd_info) <= CTL_PORT_PRIV_SIZE);
 
 /*
  * When we register the adapter/bus, request that this many ctl_ios be
@@ -181,8 +180,6 @@ struct ctlfe_lun_cmd_info {
 #defineRANDOM_WWNN
 #endif
 
-SYSCTL_INT(_kern_cam_ctl, OID_AUTO, dma_enabled, CTLFLAG_RW,
-  &ctlfe_dma_enabled, 0, "DMA enabled");
 MALLOC_DEFINE(M_CTLFE, "CAM CTL FE", "CAM CTL FE interface");
 
 #defineio_ptr  ppriv_ptr0
@@ -211,8 +208,8 @@ static int  ctlfe_lun_disable(void *arg
  int lun_id);
 static voidctlfe_dump_sim(struct cam_sim *sim);
 static voidctlfe_dump_queue(struct ctlfe_lun_softc *softc);
-static voidctlfe_dma_timeout(void *arg);
-static voidctlfe_datamove_done(union ctl_io *io);
+static voidctlfe_datamove(union ctl_io *io);
+static voidctlfe_done(union ctl_io *io);
 static voidctlfe_dump(void);
 
 static struct periph_driver ctlfe_driver =
@@ -402,8 +399,8 @@ ctlfeasync(void *callback_arg, uint32_t 
port->lun_enable = ctlfe_lun_enable;
port->lun_disable = ctlfe_lun_disable;
port->targ_lun_arg = softc;
-   port->fe_datamove = ctlfe_datamove_done;
-   port->fe_done = ctlfe_datamove_done;
+   port->fe_datamove = ctlfe_datamove;
+   port->fe_done = ctlfe_done;
/*
 * XXX KDM the path inquiry doesn't give us the maximum
 * number of targets supported.
@@ -518,9 +515,6 @@ ctlferegister(struct cam_periph *periph,

TAILQ_INIT(&softc->work_queue);
softc->periph = periph;
-
-   callout_init_mtx(&softc->dma_callout, xpt_path_mtx(periph->path),
-   /*flags*/ 0);
periph->softc = softc;
 
xpt_setup_ccb(&en_lun_ccb.ccb_h, periph->path, CAM_PRIORITY_NONE);
@@ -679,8 +673,6 @@ ctlfecleanup(struct cam_periph *periph)
 * XXX KDM is there anything else that needs to be done here?
 */
 
-   callout_stop(&softc->dma_callout);
-
free(softc, M_CTLFE);
 }
 
@@ -772,260 +764,213 @@ static void
 ctlfestart(struct cam_periph *periph, union ccb *start_ccb)
 {
struct ctlfe_lun_softc *softc;
+   struct ctlfe_lun_cmd_info *cmd_info;
struct ccb_hdr *ccb_h;
+   struct ccb_accept_tio *atio;
+   struct ccb_scsiio *csio;
+   uint8_t *data_ptr;
+   uint32_t dxfer_len;
+   ccb_flags flags;
+   union ctl_io *io;
+   uint8_t scsi_status;
 
softc = (struct ctlfe_lun_softc *)periph->softc;
-
softc->ccbs_alloced++;
 
ccb_h = TAILQ_FIRST(&softc->work_queue);
if (ccb_h == NULL) {
softc->ccbs_freed++;
xpt_release_ccb(start_ccb);
-   } else {
-   struct ccb_accept_tio *atio;
-   struct ccb_scsiio *csio;
-   uint8_t *data_ptr;
-   uint32_t dxfer_len;
-   ccb_flags flags;
-   union ctl_io *io;
-   uint8_t scsi_status;
+   return;
+   }
+
+   /* Take the ATIO off the work queue */
+   TAILQ_REMOVE(&softc->work_queue, ccb_h, periph_links.tqe);
+   atio = (struct ccb_accept_tio *)ccb_h;
+   io = (union ctl_io *)ccb_h->io_ptr;
+   csio = &start_ccb->csio;
 
-   /* Take the ATIO off the work queue */
-   TAILQ_REMOVE(&softc->work_queue, ccb_h, periph_links.tqe);
-   atio = (struct ccb_accept_tio *)ccb_h;
-   io = (union ctl_io *)ccb_h->io_ptr;
-   csio = &start_ccb->csio;
+   flags = atio->ccb_h.flags &
+   (CAM_DIS_DISCONNECT|CAM_TAG_ACTION_VALID|CAM_DIR_MASK);
 
-   flags = atio->ccb_h.flags

Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm

2014-11-25 Thread Ruslan Bukin
On Tue, Nov 25, 2014 at 10:31:45AM +0300, Gleb Smirnoff wrote:
> On Mon, Nov 24, 2014 at 09:16:20PM +, Ruslan Bukin wrote:
> R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote:
> R> > On Mon, Nov 24, 2014 at 06:03:56PM +, Ruslan Bukin wrote:
> R> > R> > I this on stock kernel or on kernel with your modifications ?
> R> > R> 
> R> > R> Stock one. I also checked with no virtio but MDROOT - same problems.
> R> > 
> R> > I could expect a panic with a damaged 'struct buf', but not vm_page.
> R> > 
> R> > Can you please do a clean build pre-r274914, and then again a clean
> R> > build of r274914, and then confirm that the former is stable, but the
> R> > latter panics?
> R> 
> R> Yes, I just proceeded re-check both builds with removing obj dir each time 
> and I still see the problem starting with r274914.
> R> 
> R> Also restoring files like that on latest head makes things happy (no 
> panics):
> R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src 
> sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c 
> sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h
> 
> Can you please try to un-union the struct buf and see if it helps?
> 

Hi,

Un-unioning helps partially: I receive much less panics and able to boot until 
login prompt in ~ 1/3 attempts with patch attached.

Ruslan
Index: sys/sys/buf.h
===
--- sys/sys/buf.h	(revision 275031)
+++ sys/sys/buf.h	(working copy)
@@ -107,6 +107,7 @@
 	off_t	b_offset;		/* Offset into file. */
 	TAILQ_ENTRY(buf) b_bobufs;	/* (V) Buffer's associated vnode. */
 	uint32_t	b_vflags;	/* (V) BV_* flags */
+	TAILQ_ENTRY(buf) b_freelist;	/* (Q) Free list position inactive. */
 	unsigned short b_qindex;	/* (Q) buffer queue index */
 	uint32_t	b_flags;	/* B_* flags. */
 	b_xflags_t b_xflags;		/* extra flags */
@@ -123,16 +124,11 @@
 	struct	ucred *b_rcred;		/* Read credentials reference. */
 	struct	ucred *b_wcred;		/* Write credentials reference. */
 	void	*b_saveaddr;		/* Original b_addr for physio. */
-	union {
-		TAILQ_ENTRY(buf) bu_freelist; /* (Q) */
-		struct {
-			void	(*pg_iodone)(void *, vm_page_t *, int, int);
-			int	pg_reqpage;
-		} bu_pager;
-	} b_union;
-#define	b_freelist	b_union.bu_freelist
-#define	b_pager b_union.bu_pager
-	union	cluster_info {
+	struct	pager_info {
+		void	(*pg_iodone)(void *, vm_page_t *, int, int);
+		int	pg_reqpage;
+	} b_pager;
+	struct	cluster_info {
 		TAILQ_HEAD(cluster_list_head, buf) cluster_head;
 		TAILQ_ENTRY(buf) cluster_entry;
 	} b_cluster;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r275033 - head/contrib/netbsd-tests/lib/libc/sys

2014-11-25 Thread John Baldwin
Author: jhb
Date: Tue Nov 25 12:44:18 2014
New Revision: 275033
URL: https://svnweb.freebsd.org/changeset/base/275033

Log:
  Only pass 6 arguments to the 'run' function on amd64.  amd64's
  makecontext on FreeBSD only supports a maximum of 6 arguments.  This
  fixes the setcontext_link test on amd64.
  
  PR:   194828

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c
==
--- head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c   Tue Nov 25 
12:22:29 2014(r275032)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_getcontext.c   Tue Nov 25 
12:44:18 2014(r275033)
@@ -51,7 +51,11 @@ run(int n, ...)
ATF_REQUIRE_EQ(n, DEPTH - calls - 1);
 
va_start(va, n);
+#if defined(__FreeBSD__) && defined(__amd64__)
+   for (i = 0; i < 5; i++) {
+#else
for (i = 0; i < 9; i++) {
+#endif
ia = va_arg(va, int);
ATF_REQUIRE_EQ(i, ia);
}
@@ -101,13 +105,6 @@ ATF_TC_BODY(setcontext_link, tc)
ucontext_t save;
volatile int i = 0; /* avoid longjmp clobbering */
 
-#ifdef __FreeBSD__
-#ifdef __amd64__
-   atf_tc_expect_fail("setcontext in this testcase fails on "
-   "FreeBSD/amd64 with rc == -1/errno == EINVAL; see PR # 194828");
-#endif
-#endif
-
for (i = 0; i < DEPTH; ++i) {
ATF_REQUIRE_EQ(getcontext(&uc[i]), 0);
 
@@ -115,21 +112,20 @@ ATF_TC_BODY(setcontext_link, tc)
uc[i].uc_stack.ss_size = STACKSZ;
uc[i].uc_link = (i > 0) ? &uc[i - 1] : &save;
 
+#if defined(__FreeBSD__) && defined(__amd64__)
+   /* FreeBSD/amd64 only permits up to 6 arguments. */
+   makecontext(&uc[i], (void *)run, 6, i,
+   0, 1, 2, 3, 4);
+#else
makecontext(&uc[i], (void *)run, 10, i,
0, 1, 2, 3, 4, 5, 6, 7, 8);
+#endif
}
 
ATF_REQUIRE_EQ(getcontext(&save), 0);
 
-#ifdef __FreeBSD__
-   if (calls == 0) {
-   int rc = setcontext(&uc[DEPTH-1]);
-   ATF_REQUIRE_EQ_MSG(rc, 0, "%d != 0; (errno = %d)", rc, errno);
-   }
-#else
if (calls == 0)
ATF_REQUIRE_EQ(setcontext(&uc[DEPTH-1]), 0);
-#endif
 }
 
 ATF_TP_ADD_TCS(tp)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275035 - head/sys/i386/i386

2014-11-25 Thread John Baldwin
Author: jhb
Date: Tue Nov 25 12:52:00 2014
New Revision: 275035
URL: https://svnweb.freebsd.org/changeset/base/275035

Log:
  MFamd64: Check for invalid flags in the machine context in sigreturn()
  and setcontext().

Modified:
  head/sys/i386/i386/machdep.c

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cTue Nov 25 12:45:31 2014
(r275034)
+++ head/sys/i386/i386/machdep.cTue Nov 25 12:52:00 2014
(r275035)
@@ -1060,6 +1060,11 @@ sys_sigreturn(td, uap)
if (error != 0)
return (error);
ucp = &uc;
+   if ((ucp->uc_mcontext.mc_flags & ~_MC_FLAG_MASK) != 0) {
+   uprintf("pid %d (%s): sigreturn mc_flags %x\n", p->p_pid,
+   td->td_name, ucp->uc_mcontext.mc_flags);
+   return (EINVAL);
+   }
regs = td->td_frame;
eflags = ucp->uc_mcontext.mc_eflags;
if (eflags & PSL_VM) {
@@ -3858,7 +3863,8 @@ set_mcontext(struct thread *td, const mc
int eflags, ret;
 
tp = td->td_frame;
-   if (mcp->mc_len != sizeof(*mcp))
+   if (mcp->mc_len != sizeof(*mcp) ||
+   (mcp->mc_flags & ~_MC_FLAG_MASK) != 0)
return (EINVAL);
eflags = (mcp->mc_eflags & PSL_USERCHANGE) |
(tp->tf_eflags & ~PSL_USERCHANGE);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r274709 - head/sys/netpfil/pf

2014-11-25 Thread Ermal Luçi
Hello Dag,

if its working for you i have no issues.
For me these changes are taken into consideration during policy routing on
pf(4).
If you check the pf_route() call it does the same checks as outgoing
processing of the modules.
If they need to be considered after pf(4) does it internal processing
probably should be after the call to pf_test6.
There is no reason to have different behaviour for ipv6 from ipv4
internally in pf(4).
Also this only affects the traffic sourced by the host itself and not
forwarded traffic and
i think this patch will provide a regression for the issues that the
committed patch does.

On Tue, Nov 25, 2014 at 12:38 PM, Dag-Erling Smørgrav  wrote:

> Here's a patch that doesn't crash and tries not to break TSO.
>
> Index: sys/netpfil/pf/pf_ioctl.c
> ===
> --- sys/netpfil/pf/pf_ioctl.c   (revision 274791)
> +++ sys/netpfil/pf/pf_ioctl.c   (working copy)
> @@ -3576,9 +3576,10 @@
> int chk;
>
> /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */
> -   if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
> +   if ((*m)->m_pkthdr.csum_flags &
> +   ((CSUM_DELAY_IP|CSUM_DELAY_DATA) & ~ifp->if_hwassist)) {
> in_delayed_cksum(*m);
> -   (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
> +   (*m)->m_pkthdr.csum_flags &=
> ~(CSUM_DELAY_IP|CSUM_DELAY_DATA);
> }
>
> chk = pf_test(PF_OUT, ifp, m, inp);
> @@ -3620,12 +3621,14 @@
> int chk;
>
> /* We need a proper CSUM before we start (s. OpenBSD ip_output) */
> -   if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
> +   if ((*m)->m_pkthdr.csum_flags &
> +   (CSUM_DELAY_DATA_IPV6 & ~ifp->if_hwassist)) {
> in6_delayed_cksum(*m,
> (*m)->m_pkthdr.len - sizeof(struct ip6_hdr),
> sizeof(struct ip6_hdr));
> (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6;
> }
> +
> CURVNET_SET(ifp->if_vnet);
> chk = pf_test6(PF_OUT, ifp, m, inp);
> CURVNET_RESTORE();
>
> DES
> --
> Dag-Erling Smørgrav - d...@des.no
>



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

Re: svn commit: r274200 - head/share/mk

2014-11-25 Thread Andriy Gapon

[I see that Mark reverted the change almost immediately.]

On 09/11/2014 00:24, Alexander Kabaev wrote:
> Because when building stuff with unwanted debug symbols one should make
> sure they are really gone and the patch basically undoes than promise.
> Whose job is it to strip .o's that end up in as the part of the .a
> archives, for example? DEBUG_FLAGS are there for users to be able to
> specify, khm, own debug flags and stuffing values in there
> automatically is just wrong. Also, there are these bits in our .mk
> files which I did not remember were there:
> 
> .if !defined(DEBUG_FLAGS)
> STRIP?= -s
> .endif
> 
> So, when present, DEBUG_FLAGS do prevent the stripping of binaries
> completely, making the patch as is even more wrong that I thought
> originally.

Yes, I see now.  You are right.
So, probably we need a new make variable, e.g. CTF_DEBUG_FLAGS, where we would
put C compiler flags required to produce objects suitable for generating CTF
data, if requested.  Then expansion of this variable should be on C compiler
command line(s).  And finally, CTFFLAGS should include -g option only if
DEBUG_FLAGS have it.

Does this sound about right?

Also, I think that there is a possible interaction between build options to be
kept in mind: WITH_CTF vs WITH_DEBUG_FILES.  For example, the latter is careful
enough to add -g specifically to SHARED_CFLAGS, but it also adds that option to
CTFFLAGS as well.  So, if "static" .o files are compiled with debug data because
of WITH_CTF, then the debug data may be left around because of WITH_DEBUG_FILES.

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


Re: svn commit: r274709 - head/sys/netpfil/pf

2014-11-25 Thread Dag-Erling Smørgrav
Ermal Luçi  writes:
> Also this only affects the traffic sourced by the host itself and not
> forwarded traffic and I think this patch will provide a regression for
> the issues that the committed patch does.

How?

The code as it stands (after your commit) is incorrect and will trigger
an assertion in vtnet(4).  You could argue that it is less incorrect
than the original, but the cure is worse than the disease.

My patch fixes the panic as well as two preexisting bugs (not taking the
IP checksum into account in the IPv4 path, and ignoring hardware
offloading).  See https://bugs.freebsd.org/192013#c10 for an explanation
of what it does and why.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

svn commit: r275041 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 14:28:15 2014
New Revision: 275041
URL: https://svnweb.freebsd.org/changeset/base/275041

Log:
  Defines all the libraries needed for usr.bin

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 13:47:53 2014
(r275040)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 14:28:15 2014
(r275041)
@@ -32,6 +32,9 @@ _INTERNALIBS= \
readline \
sl \
sm \
+   smdb \
+   smutil \
+   telnet \
vers
 
 _LIBRARIES=\
@@ -40,9 +43,13 @@ _LIBRARIES=  \
alias \
archive \
asn1 \
+   begemot \
+   bluetooth \
bsdxml \
bsnmp \
+   bsm \
bz2 \
+   calendar \
cam \
capsicum \
casper \
@@ -63,6 +70,7 @@ _LIBRARIES=   \
fetch \
figpar \
geom \
+   gnuregex \
gssapi \
hdb \
heimbase \
@@ -88,6 +96,8 @@ _LIBRARIES=   \
memstat \
mp \
nandfs \
+   netgraph \
+   ngatm \
ncursesw \
nv \
opie \
@@ -101,8 +111,10 @@ _LIBRARIES=\
readline \
roken \
rpcsec_gss \
+   rpcsvc \
rt \
sbuf \
+   sdp \
sm \
smb \
ssl \
@@ -114,6 +126,7 @@ _LIBRARIES= \
ufs \
ulog \
usb \
+   usbhid \
util \
wind \
wrap \
@@ -175,6 +188,17 @@ _DP_dialog=ncursesw m
 _DP_cuse=  pthread
 _DP_atf_cxx=   atf_c
 _DP_devstat=   kvm
+_DP_pam=   radius tacplus opie md util
+.if ${MK_KERBEROS} != "no"
+_DP_pam+=  krb5
+.endif
+.if ${MK_OPENSSH} != "no"
+_DP_pam+=  ssh
+.endif
+.if ${MK_NIS} != "no"
+_DP_pam+=  ypclnt
+.endif
+_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
 
 # Define spacial cases
 LDADD_supcplusplus=-lsupc++
@@ -288,6 +312,12 @@ LIBSMDIR=  ${ROOTOBJDIR}/lib/libsm
 LDSM?= ${LIBSMDIR}/libsm.a
 LIBSM?=${LIBSMDIR}/libsm.a
 
+LIBSMDBDIR=${ROOTOBJDIR}/lib/libsmdb
+LIBSMDB?=  ${LIBSMDBDIR}/libsmdb.a
+
+LIBSMUTILDIR=  ${ROOTOBJDIR}/lib/libsmutil
+LIBSMUTIL?=${LIBSMDBDIR}/libsmutil.a
+
 LIBNETBSDDIR?= ${ROOTOBJDIR}/lib/libnetbsd
 LIBNETBSD?=${LIBNETBSDDIR}/libnetbsd.a
 
@@ -299,3 +329,6 @@ LIBSL?= ${LIBSLDIR}/libsl.a
 
 LIBIPFDIR= ${ROOTOBJDIR}/sbin/ipf/libipf
 LIBIPF?=   ${LIBIPFDIR}/libipf.a
+
+LIBTELNETDIR=  ${ROOTOBJDIR}/lib/libtelnet
+LIBTELNET?=${LIBIPFDIR}/libtelnet.a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275042 - in head/usr.bin: . apply ar atm/sscop awk bc bluetooth/bthost bluetooth/btsockstat bluetooth/rfcomm_sppd bsdiff/bsdiff bsdiff/bspatch bzip2 calendar chkey chpass colldef compi...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 14:29:10 2014
New Revision: 275042
URL: https://svnweb.freebsd.org/changeset/base/275042

Log:
  Convert to usr.bin/ to LIBADD
  Reduce overlinking

Modified:
  head/usr.bin/Makefile
  head/usr.bin/apply/Makefile
  head/usr.bin/ar/Makefile
  head/usr.bin/atm/sscop/Makefile
  head/usr.bin/awk/Makefile
  head/usr.bin/bc/Makefile
  head/usr.bin/bluetooth/bthost/Makefile
  head/usr.bin/bluetooth/btsockstat/Makefile
  head/usr.bin/bluetooth/rfcomm_sppd/Makefile
  head/usr.bin/bsdiff/bsdiff/Makefile
  head/usr.bin/bsdiff/bspatch/Makefile
  head/usr.bin/bzip2/Makefile
  head/usr.bin/calendar/Makefile
  head/usr.bin/chkey/Makefile
  head/usr.bin/chpass/Makefile
  head/usr.bin/colldef/Makefile
  head/usr.bin/compile_et/Makefile
  head/usr.bin/cpio/Makefile
  head/usr.bin/cpio/test/Makefile
  head/usr.bin/dc/Makefile
  head/usr.bin/dpv/Makefile
  head/usr.bin/drill/Makefile
  head/usr.bin/du/Makefile
  head/usr.bin/ee/Makefile
  head/usr.bin/enigma/Makefile
  head/usr.bin/fetch/Makefile
  head/usr.bin/file/Makefile
  head/usr.bin/fstat/Makefile
  head/usr.bin/ftp/Makefile
  head/usr.bin/gcore/Makefile
  head/usr.bin/grep/Makefile
  head/usr.bin/gzip/Makefile
  head/usr.bin/host/Makefile
  head/usr.bin/ipcrm/Makefile
  head/usr.bin/ipcs/Makefile
  head/usr.bin/iscsictl/Makefile
  head/usr.bin/kdump/Makefile
  head/usr.bin/keylogin/Makefile
  head/usr.bin/killall/Makefile
  head/usr.bin/ktrdump/Makefile
  head/usr.bin/less/Makefile
  head/usr.bin/limits/Makefile
  head/usr.bin/lock/Makefile
  head/usr.bin/login/Makefile
  head/usr.bin/lzmainfo/Makefile
  head/usr.bin/m4/Makefile
  head/usr.bin/makewhatis/Makefile
  head/usr.bin/minigzip/Makefile
  head/usr.bin/ministat/Makefile
  head/usr.bin/mkimg/Makefile
  head/usr.bin/mkulzma/Makefile
  head/usr.bin/mkuzip/Makefile
  head/usr.bin/msgs/Makefile
  head/usr.bin/nc/Makefile
  head/usr.bin/ncal/Makefile
  head/usr.bin/netstat/Makefile
  head/usr.bin/newgrp/Makefile
  head/usr.bin/newkey/Makefile
  head/usr.bin/nfsstat/Makefile
  head/usr.bin/opieinfo/Makefile
  head/usr.bin/opiekey/Makefile
  head/usr.bin/opiepasswd/Makefile
  head/usr.bin/pamtest/Makefile
  head/usr.bin/passwd/Makefile
  head/usr.bin/procstat/Makefile
  head/usr.bin/quota/Makefile
  head/usr.bin/rctl/Makefile
  head/usr.bin/rup/Makefile
  head/usr.bin/rusers/Makefile
  head/usr.bin/script/Makefile
  head/usr.bin/seq/Makefile
  head/usr.bin/smbutil/Makefile
  head/usr.bin/sort/Makefile
  head/usr.bin/split/Makefile
  head/usr.bin/su/Makefile
  head/usr.bin/systat/Makefile
  head/usr.bin/tabs/Makefile
  head/usr.bin/talk/Makefile
  head/usr.bin/tar/Makefile
  head/usr.bin/telnet/Makefile
  head/usr.bin/tftp/Makefile
  head/usr.bin/top/Makefile
  head/usr.bin/tput/Makefile
  head/usr.bin/truncate/Makefile
  head/usr.bin/tset/Makefile
  head/usr.bin/ul/Makefile
  head/usr.bin/units/Makefile
  head/usr.bin/unzip/Makefile
  head/usr.bin/usbhidaction/Makefile
  head/usr.bin/usbhidctl/Makefile
  head/usr.bin/vacation/Makefile
  head/usr.bin/vi/Makefile
  head/usr.bin/vmstat/Makefile
  head/usr.bin/w/Makefile
  head/usr.bin/wc/Makefile
  head/usr.bin/xinstall/Makefile
  head/usr.bin/xlint/lint1/Makefile
  head/usr.bin/xo/Makefile
  head/usr.bin/xz/Makefile
  head/usr.bin/xzdec/Makefile

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Tue Nov 25 14:28:15 2014(r275041)
+++ head/usr.bin/Makefile   Tue Nov 25 14:29:10 2014(r275042)
@@ -134,7 +134,6 @@ SUBDIR= alias \
printenv \
printf \
procstat \
-   protect \
rctl \
renice \
rev \

Modified: head/usr.bin/apply/Makefile
==
--- head/usr.bin/apply/Makefile Tue Nov 25 14:28:15 2014(r275041)
+++ head/usr.bin/apply/Makefile Tue Nov 25 14:29:10 2014(r275042)
@@ -4,8 +4,8 @@
 .include 
 
 PROG=  apply
-DPADD= ${LIBSBUF}
-LDADD= -lsbuf
+
+LIBADD=sbuf
 
 .if ${MK_TESTS} != "no"
 SUBDIR+= tests

Modified: head/usr.bin/ar/Makefile
==
--- head/usr.bin/ar/MakefileTue Nov 25 14:28:15 2014(r275041)
+++ head/usr.bin/ar/MakefileTue Nov 25 14:29:10 2014(r275042)
@@ -5,8 +5,7 @@
 PROG=  ar
 SRCS=  ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h
 
-DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBZ}
-LDADD= -larchive -lelf -lz
+LIBADD=archive elf
 
 NO_WMISSING_VARIABLE_DECLARATIONS=
 

Modified: head/usr.bin/atm/sscop/Makefile
==
--- head/usr.bin/atm/sscop/Makefile Tue Nov 25 14:28:15 2014
(r275041)
+++ head/usr.bin/atm/sscop/Makefile Tue Nov 25 14:29:10 2014
(r275042)
@@ -8,7 +8,6 @@ PROG=   sscop
 SRCS=  common.c sscop_main.c
 CFLAGS+= -I${CONTRIB} -DUSE_LIBBEGEMOT
 
-DPADD= ${LIBBEGEMOT

svn commit: r275043 - head/usr.bin

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 14:40:38 2014
New Revision: 275043
URL: https://svnweb.freebsd.org/changeset/base/275043

Log:
  Readd protect(2) removed by mistake
  
  Reported by:  emaste

Modified:
  head/usr.bin/Makefile

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Tue Nov 25 14:29:10 2014(r275042)
+++ head/usr.bin/Makefile   Tue Nov 25 14:40:38 2014(r275043)
@@ -134,6 +134,7 @@ SUBDIR= alias \
printenv \
printf \
procstat \
+   protect \
rctl \
renice \
rev \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275044 - head/lib/libc/net

2014-11-25 Thread Sergey Kandaurov
Author: pluknet
Date: Tue Nov 25 15:09:34 2014
New Revision: 275044
URL: https://svnweb.freebsd.org/changeset/base/275044

Log:
  Fix ifa_data description.
  
  PR:   176583
  Discussed with:   glebius
  MFC after:1 week
  Sponsored by: Nginx, Inc.

Modified:
  head/lib/libc/net/getifaddrs.3

Modified: head/lib/libc/net/getifaddrs.3
==
--- head/lib/libc/net/getifaddrs.3  Tue Nov 25 14:40:38 2014
(r275043)
+++ head/lib/libc/net/getifaddrs.3  Tue Nov 25 15:09:34 2014
(r275044)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 21, 2013
+.Dd November 25, 2014
 .Dt GETIFADDRS 3
 .Os
 .Sh NAME
@@ -110,19 +110,17 @@ if one exists, otherwise it is NULL.
 .Pp
 The
 .Li ifa_data
-field references address family specific data.
-For
-.Dv AF_LINK
-addresses it contains a pointer to the
+field references address family specific data
+in a pointer to the
 .Fa struct if_data
 (as defined in include file
-.In net/if.h )
-which contains various interface attributes and statistics.
-For all other address families, it contains a pointer to the
-.Fa struct ifa_data
-(as defined in include file
-.In net/if.h )
-which contains per-address interface statistics.
+.In net/if.h ) .
+For
+.Dv AF_LINK
+addresses,
+it contains various interface attributes and statistics.
+For all other address families,
+it contains per-address interface statistics.
 .Pp
 The data returned by
 .Fn getifaddrs
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275045 - in head: share/man/man9 sys/sys

2014-11-25 Thread Andriy Gapon
Author: avg
Date: Tue Nov 25 15:21:21 2014
New Revision: 275045
URL: https://svnweb.freebsd.org/changeset/base/275045

Log:
  callout(9): add sbt flavors of callout_schedule
  
  Differential Revision:https://reviews.freebsd.org/D1161 (partial)
  Reviewed by:  jhb, markj
  MFC after:1 week

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/timeout.9
  head/sys/sys/callout.h

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileTue Nov 25 15:09:34 2014
(r275044)
+++ head/share/man/man9/MakefileTue Nov 25 15:21:21 2014
(r275045)
@@ -1576,12 +1576,16 @@ MLINKS+=timeout.9 callout.9 \
timeout.9 callout_pending.9 \
timeout.9 callout_reset.9 \
timeout.9 callout_reset_curcpu.9 \
-   timeout.9 callout_reset_sbt.9 \
timeout.9 callout_reset_on.9 \
+   timeout.9 callout_reset_sbt.9 \
+   timeout.9 callout_reset_sbt_curcpu.9 \
timeout.9 callout_reset_sbt_on.9 \
timeout.9 callout_schedule.9 \
timeout.9 callout_schedule_curcpu.9 \
timeout.9 callout_schedule_on.9 \
+   timeout.9 callout_schedule_sbt.9 \
+   timeout.9 callout_schedule_sbt_curcpu.9 \
+   timeout.9 callout_schedule_sbt_on.9 \
timeout.9 callout_stop.9 \
timeout.9 untimeout.9
 MLINKS+=ucred.9 cred_update_thread.9 \

Modified: head/share/man/man9/timeout.9
==
--- head/share/man/man9/timeout.9   Tue Nov 25 15:09:34 2014
(r275044)
+++ head/share/man/man9/timeout.9   Tue Nov 25 15:21:21 2014
(r275045)
@@ -51,6 +51,9 @@
 .Nm callout_schedule ,
 .Nm callout_schedule_curcpu ,
 .Nm callout_schedule_on ,
+.Nm callout_schedule_sbt ,
+.Nm callout_schedule_sbt_curcpu ,
+.Nm callout_schedule_sbt_on ,
 .Nm callout_stop ,
 .Nm timeout ,
 .Nm untimeout
@@ -106,6 +109,15 @@ struct callout_handle handle = CALLOUT_H
 .Ft int
 .Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu"
 .Ft int
+.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int flags"
+.Ft int
+.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int flags"
+.Ft int
+.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \
+"sbintime_t pr" "int cpu" "int flags"
+.Ft int
 .Fn callout_stop "struct callout *c"
 .Ft struct callout_handle
 .Fn timeout "timeout_t *func" "void *arg" "int ticks"
@@ -386,21 +398,24 @@ callouts are assigned to CPU 0.
 The
 .Fn callout_reset_on ,
 .Fn callout_reset_sbt_on ,
-and
 .Fn callout_schedule_on
+and
+.Fn callout_schedule_sbt_on
 functions assign the callout to CPU
 .Fa cpu .
 The
 .Fn callout_reset_curcpu ,
 .Fn callout_reset_sbt_curpu ,
-and
 .Fn callout_schedule_curcpu
+and
+.Fn callout_schedule_sbt_curcpu
 functions assign the callout to the current CPU.
 The
 .Fn callout_reset ,
 .Fn callout_reset_sbt ,
-and
 .Fn callout_schedule
+and
+.Fn callout_schedule_sbt
 functions schedule the callout to execute in the softclock thread of the CPU
 to which it is currently assigned.
 .Pp

Modified: head/sys/sys/callout.h
==
--- head/sys/sys/callout.h  Tue Nov 25 15:09:34 2014(r275044)
+++ head/sys/sys/callout.h  Tue Nov 25 15:21:21 2014(r275045)
@@ -91,6 +91,13 @@ int  callout_reset_sbt_on(struct callout 
 callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu)
 #definecallout_reset_curcpu(c, on_tick, fn, arg)   
\
 callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid))
+#definecallout_schedule_sbt_on(c, sbt, pr, cpu, flags) 
\
+callout_reset_sbt_on((c), (sbt), (pr), (c)->c_func, (c)->c_arg,\
+(cpu), (flags))
+#definecallout_schedule_sbt(c, sbt, pr, flags) 
\
+callout_schedule_sbt_on((c), (sbt), (pr), (c)->c_cpu, (flags))
+#definecallout_schedule_sbt_curcpu(c, sbt, pr, flags)  
\
+callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags))
 intcallout_schedule(struct callout *, int);
 intcallout_schedule_on(struct callout *, int, int);
 #definecallout_schedule_curcpu(c, on_tick) 
\
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275046 - head/sys/sys

2014-11-25 Thread Andriy Gapon
Author: avg
Date: Tue Nov 25 15:24:05 2014
New Revision: 275046
URL: https://svnweb.freebsd.org/changeset/base/275046

Log:
  whitespace and cosmetic changes in callout_reset family of macros
  
  - add parentheses around macro parameters for consistent style
  - remove redundant parentheses around an expression
  - use tab before a line continuation symbol
  
  Differential Revision:https://reviews.freebsd.org/D1161 (partial)
  Reviewed by:  markj
  MFC after:1 week

Modified:
  head/sys/sys/callout.h

Modified: head/sys/sys/callout.h
==
--- head/sys/sys/callout.h  Tue Nov 25 15:21:21 2014(r275045)
+++ head/sys/sys/callout.h  Tue Nov 25 15:24:05 2014(r275046)
@@ -81,11 +81,12 @@ void_callout_init_lock(struct callout *
 intcallout_reset_sbt_on(struct callout *, sbintime_t, sbintime_t,
void (*)(void *), void *, int, int);
 #definecallout_reset_sbt(c, sbt, pr, fn, arg, flags)   
\
-callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, flags)
+callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, (flags))
 #definecallout_reset_sbt_curcpu(c, sbt, pr, fn, arg, flags)
\
-callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid), flags)
+callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid),\
+(flags))
 #definecallout_reset_on(c, to_ticks, fn, arg, cpu) 
\
-callout_reset_sbt_on((c), (tick_sbt * (to_ticks)), 0, (fn), (arg), \
+callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg),   \
 (cpu), C_HARDCLOCK)
 #definecallout_reset(c, on_tick, fn, arg)  
\
 callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm

2014-11-25 Thread Gleb Smirnoff
On Tue, Nov 25, 2014 at 12:27:54PM +, Ruslan Bukin wrote:
R> On Tue, Nov 25, 2014 at 10:31:45AM +0300, Gleb Smirnoff wrote:
R> > On Mon, Nov 24, 2014 at 09:16:20PM +, Ruslan Bukin wrote:
R> > R> On Mon, Nov 24, 2014 at 10:29:02PM +0300, Gleb Smirnoff wrote:
R> > R> > On Mon, Nov 24, 2014 at 06:03:56PM +, Ruslan Bukin wrote:
R> > R> > R> > I this on stock kernel or on kernel with your modifications ?
R> > R> > R> 
R> > R> > R> Stock one. I also checked with no virtio but MDROOT - same 
problems.
R> > R> > 
R> > R> > I could expect a panic with a damaged 'struct buf', but not vm_page.
R> > R> > 
R> > R> > Can you please do a clean build pre-r274914, and then again a clean
R> > R> > build of r274914, and then confirm that the former is stable, but the
R> > R> > latter panics?
R> > R> 
R> > R> Yes, I just proceeded re-check both builds with removing obj dir each 
time and I still see the problem starting with r274914.
R> > R> 
R> > R> Also restoring files like that on latest head makes things happy (no 
panics):
R> > R> svnlite up -r274913 sys/kern/vfs_default.c sys/kern/vnode_if.src 
sys/sys/buf.h sys/sys/vnode.h sys/ufs/ffs/ffs_vnops.c sys/vm/swap_pager.c 
sys/vm/vm_pager.h sys/vm/vnode_pager.c sys/vm/vnode_pager.h
R> > 
R> > Can you please try to un-union the struct buf and see if it helps?
R> > 
R> 
R> Hi,
R> 
R> Un-unioning helps partially: I receive much less panics and able to boot 
until login prompt in ~ 1/3 attempts with patch attached.

What happens then? Same panic as w/o patch?

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


svn commit: r275048 - head/sys/dev/beri/virtio

2014-11-25 Thread Ruslan Bukin
Author: br
Date: Tue Nov 25 15:58:59 2014
New Revision: 275048
URL: https://svnweb.freebsd.org/changeset/base/275048

Log:
  Add BERI-specific virtio block backend device driver.
  This part intended to operate on ARM side in heterogeneous
  (ARM/BERI) system on crystal.

Added:
  head/sys/dev/beri/virtio/virtio.c   (contents, props changed)
  head/sys/dev/beri/virtio/virtio.h   (contents, props changed)
  head/sys/dev/beri/virtio/virtio_block.c   (contents, props changed)

Added: head/sys/dev/beri/virtio/virtio.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/beri/virtio/virtio.c   Tue Nov 25 15:58:59 2014
(r275048)
@@ -0,0 +1,183 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * 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.
+ */
+
+/*
+ * BERI virtio mmio backend common methods
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+int
+vq_ring_ready(struct vqueue_info *vq)
+{
+
+   return (vq->vq_flags & VQ_ALLOC);
+}
+
+int
+vq_has_descs(struct vqueue_info *vq)
+{
+
+   return (vq_ring_ready(vq) && vq->vq_last_avail !=
+   be16toh(vq->vq_avail->idx));
+}
+
+void *
+paddr_map(uint32_t offset, uint32_t phys, uint32_t size)
+{
+   bus_space_handle_t bsh;
+
+   if (bus_space_map(fdtbus_bs_tag, (phys + offset),
+   size, 0, &bsh) != 0) {
+   panic("Couldn't map 0x%08x\n", (phys + offset));
+   }
+
+   return (void *)(bsh);
+}
+
+void
+paddr_unmap(void *phys, uint32_t size)
+{
+
+   bus_space_unmap(fdtbus_bs_tag, (bus_space_handle_t)phys, size);
+}
+
+static inline void
+_vq_record(uint32_t offs, int i, volatile struct vring_desc *vd,
+   struct iovec *iov, int n_iov, uint16_t *flags) {
+
+   if (i >= n_iov)
+   return;
+
+   iov[i].iov_base = paddr_map(offs, be64toh(vd->addr),
+   be32toh(vd->len));
+   iov[i].iov_len = be32toh(vd->len);
+   if (flags != NULL)
+   flags[i] = be16toh(vd->flags);
+}
+
+int
+vq_getchain(uint32_t offs, struct vqueue_info *vq,
+   struct iovec *iov, int n_iov, uint16_t *flags)
+{
+   volatile struct vring_desc *vdir, *vindir, *vp;
+   int idx, ndesc, n_indir;
+   int head, next;
+   int i;
+
+   idx = vq->vq_last_avail;
+   ndesc = (be16toh(vq->vq_avail->idx) - idx);
+   if (ndesc == 0)
+   return (0);
+
+   head = be16toh(vq->vq_avail->ring[idx & (vq->vq_qsize - 1)]);
+   next = head;
+
+   for (i = 0; i < VQ_MAX_DESCRIPTORS; next = be16toh(vdir->next)) {
+   vdir = &vq->vq_desc[next];
+   if ((be16toh(vdir->flags) & VRING_DESC_F_INDIRECT) == 0) {
+   _vq_record(offs, i, vdir, iov, n_iov, flags);
+   i++;
+   } else {
+   n_indir = be32toh(vdir->len) / 16;
+   vindir = paddr_map(offs, be64toh(vdir->addr),
+   be32toh(vdir->len));
+   next = 0;
+   for (;;) {
+   vp = &vindir[next];
+ 

svn commit: r275049 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm dev/beri/virtio

2014-11-25 Thread Ruslan Bukin
Author: br
Date: Tue Nov 25 16:06:19 2014
New Revision: 275049
URL: https://svnweb.freebsd.org/changeset/base/275049

Log:
  o Add PIO and vtblk mmio device info to the tree
  o Add FPGA memory window to static dev mappings
  o Fix whitespace

Modified:
  head/sys/arm/altera/socfpga/socfpga_machdep.c
  head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts
  head/sys/dev/beri/virtio/virtio.h

Modified: head/sys/arm/altera/socfpga/socfpga_machdep.c
==
--- head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Nov 25 15:58:59 
2014(r275048)
+++ head/sys/arm/altera/socfpga/socfpga_machdep.c   Tue Nov 25 16:06:19 
2014(r275049)
@@ -95,6 +95,9 @@ platform_devmap_init(void)
/* scu */
arm_devmap_add_entry(0xfff0, 0x10);
 
+   /* FPGA memory window, 256MB */
+   arm_devmap_add_entry(0xd000, 0x1000);
+
return (0);
 }
 

Modified: head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts
==
--- head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts   Tue Nov 25 15:58:59 
2014(r275048)
+++ head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts   Tue Nov 25 16:06:19 
2014(r275049)
@@ -38,8 +38,8 @@
model = "Terasic SoCKit";
compatible = "altr,socfpga-cyclone5", "altr,socfpga";
 
-   /* Reserve first page for secondary CPU trampoline code */
-   memreserve = < 0x 0x1000 >;
+   memreserve = < 0x 0x1000 >, /* SMP trampoline */
+< 0x1000 0x1000 >; /* virtio block */
 
memory {
device_type = "memory";
@@ -69,6 +69,8 @@
};
 
mmc: dwmmc@ff704000 {
+   #address-cells = <1>;
+   #size-cells = <0>;
status = "okay";
num-slots = <1>;
supports-highspeed;
@@ -81,9 +83,34 @@
};
};
 
-   beri_mem: mem@d000 {
+   beri_mem0: mem@d000 {
compatible = "sri-cambridge,beri-mem";
-   reg = <0xd000 0x1000>;
+   reg = <0xd000 0x1000>; /* 256mb */
+   status = "okay";
+   };
+
+   pio0: pio@c002 {
+   compatible = "altr,pio";
+   reg = <0xc002 0x1000>; /* recv */
+   interrupts = < 76 >;
+   interrupt-parent = <&GIC>;
+   status = "okay";
+   };
+
+   pio1: pio@c0021000 {
+   compatible = "altr,pio";
+   reg = <0xc0021000 0x1000>; /* send */
+   interrupts = < 82 >; /* not in use on arm side */
+   interrupt-parent = <&GIC>;
+   status = "okay";
+   };
+
+   beri_vtblk: vtblk@1000 {
+   compatible = "sri-cambridge,beri-vtblk";
+   reg = <0x1000 0x1000>;
+   pio-recv = <&pio0>;
+   pio-send = <&pio1>;
+   beri-mem = <&beri_mem0>;
status = "okay";
};
 

Modified: head/sys/dev/beri/virtio/virtio.h
==
--- head/sys/dev/beri/virtio/virtio.h   Tue Nov 25 15:58:59 2014
(r275048)
+++ head/sys/dev/beri/virtio/virtio.h   Tue Nov 25 16:06:19 2014
(r275049)
@@ -39,7 +39,7 @@
 #define WRITE4(_sc, _reg, _val) \
bus_write_4((_sc)->res[0], _reg, _val)
 
-#define PAGE_SHIFT 12
+#definePAGE_SHIFT  12
 #defineVRING_ALIGN 4096
 #defineNUM_QUEUES  1
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275050 - in head/sys: arm/altera/socfpga arm/conf conf

2014-11-25 Thread Ruslan Bukin
Author: br
Date: Tue Nov 25 16:24:31 2014
New Revision: 275050
URL: https://svnweb.freebsd.org/changeset/base/275050

Log:
  Add new devices to the config.

Modified:
  head/sys/arm/altera/socfpga/files.socfpga
  head/sys/arm/conf/SOCKIT-BERI
  head/sys/conf/files

Modified: head/sys/arm/altera/socfpga/files.socfpga
==
--- head/sys/arm/altera/socfpga/files.socfpga   Tue Nov 25 16:06:19 2014
(r275049)
+++ head/sys/arm/altera/socfpga/files.socfpga   Tue Nov 25 16:24:31 2014
(r275050)
@@ -26,3 +26,5 @@ dev/mmc/host/dwmmc.c  optional dwmmc
 # BERI specific
 dev/beri/beri_ring.c   optional beri_ring
 dev/beri/beri_mem.coptional beri_mem
+dev/beri/virtio/virtio.c   optional beri_vtblk
+dev/beri/virtio/virtio_block.c optional beri_vtblk

Modified: head/sys/arm/conf/SOCKIT-BERI
==
--- head/sys/arm/conf/SOCKIT-BERI   Tue Nov 25 16:06:19 2014
(r275049)
+++ head/sys/arm/conf/SOCKIT-BERI   Tue Nov 25 16:24:31 2014
(r275050)
@@ -122,6 +122,8 @@ device  spibus
 # BERI specific
 device beri_ring
 device beri_mem
+device beri_vtblk
+device altera_pio
 
 # Ethernet
 device ether

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Nov 25 16:06:19 2014(r275049)
+++ head/sys/conf/files Tue Nov 25 16:24:31 2014(r275050)
@@ -660,6 +660,8 @@ dev/altera/sdcard/altera_sdcard_disk.c  o
 dev/altera/sdcard/altera_sdcard_io.c   optional altera_sdcard
 dev/altera/sdcard/altera_sdcard_fdt.c  optional altera_sdcard fdt
 dev/altera/sdcard/altera_sdcard_nexus.coptional altera_sdcard
+dev/altera/pio/pio.c   optional altera_pio
+dev/altera/pio/pio_if.moptional altera_pio
 dev/amdpm/amdpm.c  optional amdpm pci | nfpm pci
 dev/amdsmb/amdsmb.coptional amdsmb pci
 dev/amr/amr.c  optional amr
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275052 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 16:51:06 2014
New Revision: 275052
URL: https://svnweb.freebsd.org/changeset/base/275052

Log:
  Defined the needed library to convert usr.sbin to LIBADD

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 16:45:40 2014
(r275051)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 16:51:06 2014
(r275052)
@@ -24,11 +24,19 @@ _PRIVATELIBS=   \
unbound
 
 _INTERNALIBS=  \
+   amu \
+   bsnmptools \
+   cron \
event \
+   fifolog \
ipf \
+   lpr \
mandoc \
netbsd \
+   ntp \
ohash \
+   opts \
+   parse \
readline \
sl \
sm \
@@ -43,6 +51,7 @@ _LIBRARIES=   \
alias \
archive \
asn1 \
+   auditd \
begemot \
bluetooth \
bsdxml \
@@ -60,6 +69,7 @@ _LIBRARIES=   \
ctf \
cuse \
cxxrt \
+   devinfo \
devstat \
dialog \
dpv \
@@ -103,7 +113,9 @@ _LIBRARIES= \
opie \
pam \
pcap \
+   pcsclite \
pjdlog \
+   pmc \
proc \
procstat \
pthread \
@@ -123,11 +135,13 @@ _LIBRARIES=   \
ssp_nonshared \
tacplus \
termcapw \
+   ugidfw \
ufs \
ulog \
usb \
usbhid \
util \
+   vmmapi \
wind \
wrap \
xo \
@@ -332,3 +346,27 @@ LIBIPF?=   ${LIBIPFDIR}/libipf.a
 
 LIBTELNETDIR=  ${ROOTOBJDIR}/lib/libtelnet
 LIBTELNET?=${LIBIPFDIR}/libtelnet.a
+
+LIBCRONDIR=${ROOTOBJDIR}/usr.sbin/cron/lib
+LIBCRON?=  ${LIBCRONDIR}/libcron.a
+
+LIBNTPDIR= ${ROOTOBJDIR}/usr.sbin/ntp/libntp
+LIBNTP?=   ${LIBNTPDIR}/libntp.a
+
+LIBOPTSDIR=${ROOTOBJDIR}/usr.sbin/ntp/libopts
+LIBOTPS?=  ${LIBOPTSDIR}/libopts.a
+
+LIBPARSEDIR=   ${ROOTOBJDIR}/usr.sbin/ntp/libparse
+LIBPARSE?= ${LIBOPTSDIR}/libparse.a
+
+LIBLPRDIR= ${ROOTOBJDIR}/usr.sbin/lpr/common_source
+LIBLPR?=   ${LIBOPTSDIR}/liblpr.a
+
+LIBFIFOLOGDIR= ${ROOTOBJDIR}/usr.sbin/fifolog/lib
+LIBFIFOLOG?=   ${LIBOPTSDIR}/libfifolog.a
+
+LIBBSNMPTOOLSDIR=  ${ROOTOBJDIR}/usr.sbin/bsnmpd/tools/libbsnmptools
+LIBBSNMPTOOLS?=${LIBBSNMPTOOLSDIR}/libbsnmptools.a
+
+LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu
+LIBAMU?=   ${LIBAMUDIR}/libamu/libamu.a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275053 - head/sys/conf

2014-11-25 Thread Ruslan Bukin
Author: br
Date: Tue Nov 25 16:53:22 2014
New Revision: 275053
URL: https://svnweb.freebsd.org/changeset/base/275053

Log:
  o Add Virtio MMIO bus driver to config
  o Move Virtio-related to common config file

Modified:
  head/sys/conf/files
  head/sys/conf/files.amd64
  head/sys/conf/files.i386

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Nov 25 16:51:06 2014(r275052)
+++ head/sys/conf/files Tue Nov 25 16:53:22 2014(r275053)
@@ -2572,6 +2572,19 @@ dev/utopia/suni.coptional utopia
 dev/utopia/utopia.coptional utopia
 dev/vge/if_vge.c   optional vge
 dev/viapm/viapm.c  optional viapm pci
+dev/virtio/virtio.coptionalvirtio
+dev/virtio/virtqueue.c optionalvirtio
+dev/virtio/virtio_bus_if.m optionalvirtio
+dev/virtio/virtio_if.m optionalvirtio
+dev/virtio/pci/virtio_pci.coptionalvirtio_pci
+dev/virtio/mmio/virtio_mmio.c  optionalvirtio_mmio
+dev/virtio/mmio/virtio_mmio_if.m   optionalvirtio_mmio
+dev/virtio/network/if_vtnet.c  optionalvtnet
+dev/virtio/block/virtio_blk.c  optionalvirtio_blk
+dev/virtio/balloon/virtio_balloon.coptionalvirtio_balloon
+dev/virtio/scsi/virtio_scsi.c  optionalvirtio_scsi
+dev/virtio/random/virtio_random.c  optionalvirtio_random
+dev/virtio/console/virtio_console.coptionalvirtio_console
 dev/vkbd/vkbd.coptional vkbd
 dev/vr/if_vr.c optional vr pci
 dev/vt/colors/vt_termcolors.c  optional vt

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Tue Nov 25 16:51:06 2014(r275052)
+++ head/sys/conf/files.amd64   Tue Nov 25 16:53:22 2014(r275053)
@@ -445,17 +445,6 @@ dev/isci/scil/scif_sas_task_request.c  
 dev/isci/scil/scif_sas_task_request_state_handlers.c   optional isci
 dev/isci/scil/scif_sas_task_request_states.c   optional isci
 dev/isci/scil/scif_sas_timer.c optional isci
-dev/virtio/virtio.coptionalvirtio
-dev/virtio/virtqueue.c optionalvirtio
-dev/virtio/virtio_bus_if.m optionalvirtio
-dev/virtio/virtio_if.m optionalvirtio
-dev/virtio/pci/virtio_pci.coptionalvirtio_pci
-dev/virtio/network/if_vtnet.c  optionalvtnet
-dev/virtio/block/virtio_blk.c  optionalvirtio_blk
-dev/virtio/balloon/virtio_balloon.coptionalvirtio_balloon
-dev/virtio/scsi/virtio_scsi.c  optionalvirtio_scsi
-dev/virtio/random/virtio_random.c  optionalvirtio_random
-dev/virtio/console/virtio_console.coptionalvirtio_console
 isa/syscons_isa.c  optionalsc
 isa/vga_isa.c  optionalvga
 kern/kern_clocksource.cstandard

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Tue Nov 25 16:51:06 2014(r275052)
+++ head/sys/conf/files.i386Tue Nov 25 16:53:22 2014(r275053)
@@ -392,17 +392,6 @@ dev/isci/scil/scif_sas_task_request.c  
 dev/isci/scil/scif_sas_task_request_state_handlers.c   optional isci
 dev/isci/scil/scif_sas_task_request_states.c   optional isci
 dev/isci/scil/scif_sas_timer.c optional isci
-dev/virtio/virtio.coptionalvirtio
-dev/virtio/virtqueue.c optionalvirtio
-dev/virtio/virtio_bus_if.m optionalvirtio
-dev/virtio/virtio_if.m optionalvirtio
-dev/virtio/pci/virtio_pci.coptionalvirtio_pci
-dev/virtio/network/if_vtnet.c  optionalvtnet
-dev/virtio/block/virtio_blk.c  optionalvirtio_blk
-dev/virtio/balloon/virtio_balloon.coptionalvirtio_balloon
-dev/virtio/scsi/virtio_scsi.c  optionalvirtio_scsi
-dev/virtio/random/virtio_random.c  optionalvirtio_random
-dev/virtio/console/virtio_console.coptionalvirtio_console
 i386/acpica/acpi_machdep.c optional acpi
 acpi_wakecode.ooptional acpi   
\
dependency  "$S/i386/acpica/acpi_wakecode.S assym.s"\
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275054 - in head/usr.sbin: acpi/acpidb amd amd/amd amd/amq amd/fixmount amd/fsinfo amd/hlfsd amd/mk-amd-map amd/pawd amd/wire-test ancontrol apmd asf audit auditd auditdistd auditreduc...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 16:57:27 2014
New Revision: 275054
URL: https://svnweb.freebsd.org/changeset/base/275054

Log:
  Convert usr.sbin to LIBADD
  Reduce overlinking

Deleted:
  head/usr.sbin/cron/Makefile.inc
  head/usr.sbin/fifolog/Makefile.inc
Modified:
  head/usr.sbin/acpi/acpidb/Makefile
  head/usr.sbin/amd/Makefile.inc
  head/usr.sbin/amd/amd/Makefile
  head/usr.sbin/amd/amq/Makefile
  head/usr.sbin/amd/fixmount/Makefile
  head/usr.sbin/amd/fsinfo/Makefile
  head/usr.sbin/amd/hlfsd/Makefile
  head/usr.sbin/amd/mk-amd-map/Makefile
  head/usr.sbin/amd/pawd/Makefile
  head/usr.sbin/amd/wire-test/Makefile
  head/usr.sbin/ancontrol/Makefile
  head/usr.sbin/apmd/Makefile
  head/usr.sbin/asf/Makefile
  head/usr.sbin/audit/Makefile
  head/usr.sbin/auditd/Makefile
  head/usr.sbin/auditdistd/Makefile
  head/usr.sbin/auditreduce/Makefile
  head/usr.sbin/authpf/Makefile
  head/usr.sbin/autofs/Makefile
  head/usr.sbin/bhyve/Makefile
  head/usr.sbin/bhyvectl/Makefile
  head/usr.sbin/bhyveload/Makefile
  head/usr.sbin/bluetooth/ath3kfw/Makefile
  head/usr.sbin/bluetooth/bt3cfw/Makefile
  head/usr.sbin/bluetooth/bthidcontrol/Makefile
  head/usr.sbin/bluetooth/bthidd/Makefile
  head/usr.sbin/bluetooth/btpand/Makefile
  head/usr.sbin/bluetooth/hccontrol/Makefile
  head/usr.sbin/bluetooth/hcsecd/Makefile
  head/usr.sbin/bluetooth/hcseriald/Makefile
  head/usr.sbin/bluetooth/l2control/Makefile
  head/usr.sbin/bluetooth/l2ping/Makefile
  head/usr.sbin/bluetooth/rfcomm_pppd/Makefile
  head/usr.sbin/bluetooth/sdpcontrol/Makefile
  head/usr.sbin/boot0cfg/Makefile
  head/usr.sbin/boot98cfg/Makefile
  head/usr.sbin/bsdinstall/distextract/Makefile
  head/usr.sbin/bsdinstall/distfetch/Makefile
  head/usr.sbin/bsdinstall/partedit/Makefile
  head/usr.sbin/bsnmpd/bsnmpd/Makefile
  head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile
  head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
  head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
  head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile
  head/usr.sbin/cdcontrol/Makefile
  head/usr.sbin/ckdist/Makefile
  head/usr.sbin/clear_locks/Makefile
  head/usr.sbin/config/Makefile
  head/usr.sbin/cron/cron/Makefile
  head/usr.sbin/cron/crontab/Makefile
  head/usr.sbin/ctladm/Makefile
  head/usr.sbin/ctld/Makefile
  head/usr.sbin/ctm/ctm/Makefile
  head/usr.sbin/ctm/mkCTM/Makefile
  head/usr.sbin/daemon/Makefile
  head/usr.sbin/dconschat/Makefile
  head/usr.sbin/devinfo/Makefile
  head/usr.sbin/diskinfo/Makefile
  head/usr.sbin/editmap/Makefile
  head/usr.sbin/edquota/Makefile
  head/usr.sbin/fifolog/fifolog_create/Makefile
  head/usr.sbin/fifolog/fifolog_reader/Makefile
  head/usr.sbin/fifolog/fifolog_writer/Makefile
  head/usr.sbin/flowctl/Makefile
  head/usr.sbin/ftp-proxy/Makefile
  head/usr.sbin/gssd/Makefile
  head/usr.sbin/gstat/Makefile
  head/usr.sbin/ifmcstat/Makefile
  head/usr.sbin/inetd/Makefile
  head/usr.sbin/iostat/Makefile
  head/usr.sbin/ipfwpcap/Makefile
  head/usr.sbin/iscsid/Makefile
  head/usr.sbin/jail/Makefile
  head/usr.sbin/jexec/Makefile
  head/usr.sbin/jls/Makefile
  head/usr.sbin/kbdcontrol/Makefile
  head/usr.sbin/keyserv/Makefile
  head/usr.sbin/kgmon/Makefile
  head/usr.sbin/lmcconfig/Makefile
  head/usr.sbin/lpr/Makefile.inc
  head/usr.sbin/lpr/chkprintcap/Makefile
  head/usr.sbin/lpr/lpc/Makefile
  head/usr.sbin/lpr/lpd/Makefile
  head/usr.sbin/lpr/lpq/Makefile
  head/usr.sbin/lpr/lpr/Makefile
  head/usr.sbin/lpr/lprm/Makefile
  head/usr.sbin/lpr/pac/Makefile
  head/usr.sbin/mailstats/Makefile
  head/usr.sbin/mailwrapper/Makefile
  head/usr.sbin/makemap/Makefile
  head/usr.sbin/mfiutil/Makefile
  head/usr.sbin/mount_smbfs/Makefile
  head/usr.sbin/mountd/Makefile
  head/usr.sbin/moused/Makefile
  head/usr.sbin/mptutil/Makefile
  head/usr.sbin/mtree/Makefile
  head/usr.sbin/nandtool/Makefile
  head/usr.sbin/ndiscvt/Makefile
  head/usr.sbin/ngctl/Makefile
  head/usr.sbin/nghook/Makefile
  head/usr.sbin/nmtree/Makefile
  head/usr.sbin/nscd/Makefile
  head/usr.sbin/ntp/Makefile.inc
  head/usr.sbin/ntp/ntp-keygen/Makefile
  head/usr.sbin/ntp/ntpd/Makefile
  head/usr.sbin/ntp/ntpdate/Makefile
  head/usr.sbin/ntp/ntpdc/Makefile
  head/usr.sbin/ntp/ntpq/Makefile
  head/usr.sbin/ntp/ntptime/Makefile
  head/usr.sbin/ntp/sntp/Makefile
  head/usr.sbin/pkg/Makefile
  head/usr.sbin/pmccontrol/Makefile
  head/usr.sbin/pmcstat/Makefile
  head/usr.sbin/powerd/Makefile
  head/usr.sbin/ppp/Makefile
  head/usr.sbin/pppctl/Makefile
  head/usr.sbin/praliases/Makefile
  head/usr.sbin/praudit/Makefile
  head/usr.sbin/pstat/Makefile
  head/usr.sbin/quotaon/Makefile
  head/usr.sbin/rarpd/Makefile
  head/usr.sbin/repquota/Makefile
  head/usr.sbin/rpc.lockd/Makefile
  head/usr.sbin/rpc.statd/Makefile
  head/usr.sbin/rpc.yppasswdd/Makefile
  head/usr.sbin/rpc.ypupdated/Makefile
  head/usr.sbin/rpc.ypxfrd/Makefile
  head/usr.sbin/rpcbind/Makefile
  head/usr.sbin/rrenumd/Makefile
  head/usr.sbin/rtadvd/Makefile
  head/usr.sbin/rtsold/Makefile
  head/usr.sbin/sendmail/Makefile
  head/usr.

svn commit: r275057 - head/sys/mips/conf

2014-11-25 Thread Sean Bruno
Author: sbruno
Date: Tue Nov 25 17:33:22 2014
New Revision: 275057
URL: https://svnweb.freebsd.org/changeset/base/275057

Log:
  Add support for Buffalo WZR-HP-AG300H atheros MIPS router.
  
  Special thanks to Nicholas Esborn for the loaner router to get this
  target bootstrapped.
  
  Review:  D777
  Reviewed by:adrian
  Sponsored by:   Nicholas Esborn 

Added:
  head/sys/mips/conf/WZR-HPAG300H   (contents, props changed)
  head/sys/mips/conf/WZR-HPAG300H.hints   (contents, props changed)

Added: head/sys/mips/conf/WZR-HPAG300H
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/WZR-HPAG300H Tue Nov 25 17:33:22 2014
(r275057)
@@ -0,0 +1,49 @@
+#
+# Specific board setup for the Buffalo Airstation WZR-HPAG300H
+#
+# The WZR-HPAG300H has the following hardware:
+#
+# + AR7161 CPU SoC
+# + 2x AR9280 5GHz 11n
+# + AR8136 Gigabit switch
+# + 2 m25ll128(really w25q128)  based 16MB flash
+# + 128MB RAM
+# + uboot environment
+
+# $FreeBSD$
+
+include"AR71XX_BASE"
+ident  "WZR-HPAG300H"
+hints  "WZR-HPAG300H.hints"
+
+optionsAR71XX_REALMEM=128*1024*1024
+
+optionsAR71XX_ENV_UBOOT
+
+optionsBOOTVERBOSE
+
+# GEOM modules
+device geom_uncompress # compressed in-memory filesystem hackery!
+device geom_map# to get access to the SPI flash partitions
+
+optionsROOTDEVNAME=\"ufs:/dev/map/rootfs.uncompress\"
+
+optionsAR71XX_ATH_EEPROM   # Fetch EEPROM/PCI config from flash
+optionsATH_EEPROM_FIRMWARE # Use EEPROM from flash
+device firmware# Used by the above
+
+# Options required for miiproxy and mdiobus
+options ARGE_MDIO   # Export an MDIO bus separate from arge
+device  miiproxy# MDIO bus <-> MII PHY rendezvous
+
+device  etherswitch
+device  arswitch
+
+# hwpmc
+device hwpmc_mips24k
+device hwpmc
+
+# load these via modules, shrink kernel
+nodevice   if_bridge
+nodevice   bridgestp
+nodevice   random

Added: head/sys/mips/conf/WZR-HPAG300H.hints
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/mips/conf/WZR-HPAG300H.hints   Tue Nov 25 17:33:22 2014
(r275057)
@@ -0,0 +1,132 @@
+# $FreeBSD$
+
+# arge0 is connected to the LAN side of the switch PHY.
+# arge1 is connected to the single port WAN side of the switch PHY.
+
+# arge1 MDIO bus
+hint.argemdio.0.at="nexus0"
+hint.argemdio.0.maddr=0x1a00
+hint.argemdio.0.msize=0x1000
+hint.argemdio.0.order=0
+
+hint.arge.0.phymask=0x0
+hint.arge.0.media=1000
+hint.arge.0.fduplex=1
+hint.arge.0.eeprommac=0x1f05120c
+hint.arge.0.mdio=mdioproxy0 # .. off of the switch mdiobus
+hint.arge.0.miimode=3 
+
+hint.arge.1.phymask=0x10
+hint.arge.1.media=1000
+hint.arge.1.fduplex=1
+hint.arge.1.eeprommac=0x1f05520c
+hint.arge.1.mdio=mdioproxy0 # .. off of the switch mdiobus
+hint.arge.1.miimode=3 
+#
+# AR7240 switch config
+#
+hint.arswitch.0.at="mdio0"
+hint.arswitch.0.is_7240=0   # We need to be explicitly told this
+hint.arswitch.0.numphys=4   # 5 active switch PHYs (PHY 0 -> 4)
+hint.arswitch.0.phy4cpu=0   # No, PHY 4 == dedicated PHY
+hint.arswitch.0.is_rgmii=1  # Yes, is RGMII
+hint.arswitch.0.is_gmii=0   # No, not GMII
+
+# ath0 - slot 17
+hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1f051000
+hint.pcib.0.bus.0.17.0.ath_fixup_size=4096
+
+# ath1 - slot 18
+hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1f055000
+hint.pcib.0.bus.0.18.0.ath_fixup_size=4096
+# .. and now, telling each ath(4) NIC where to find the firmware
+# image.
+hint.ath.0.eeprom_firmware="pcib.0.bus.0.17.0.eeprom_firmware"
+hint.ath.1.eeprom_firmware="pcib.0.bus.0.18.0.eeprom_firmware"
+
+# Inherited from AR71XX_BASE.hints
+#hint.mx25l.0.at="spibus0"
+#hint.mx25l.0.cs=0
+# This board has two 16 MB flash devices on difference Chip Select pins
+hint.mx25l.1.at="spibus0"
+hint.mx25l.1.cs=1
+
+
+# Geom MAP
+
+hint.map.0.at="flash/spi0"
+hint.map.0.start=0x
+hint.map.0.end=0x0004
+hint.map.0.name="uboot"
+hint.map.0.readonly=1
+
+hint.map.1.at="flash/spi0"
+hint.map.1.start=0x0004
+hint.map.1.end=0x0005
+hint.map.1.name="u-boot-env"
+hint.map.1.readonly=1
+
+hint.map.2.at="flash/spi0"
+hint.map.2.start=0x0005
+hint.map.2.end=0x0006
+hint.map.2.name="ART"
+hint.map.2.readonly=1
+
+# requires a 1M alignment and padding in the image.
+# make sure you are using conv=sync and bs=1M in your dd
+hint.map.3.at="flash/spi0"
+hint.map.3.start=0x0006
+hint.map.3.end="search:0x0016:0x10:.!/bin/sh"
+hint.map.3.name="kernel"
+hint.map.3.readonly=1
+
+hint.map.4.at="flash/spi0"
+hint.map.4.start="search:0x0016:0x10:.!/bin/sh"
+hint.map.4.end=0x0100
+hint.map.4.name="rootfs"
+hint.map.4.re

Re: svn commit: r274914 - in head/sys: kern sys ufs/ffs vm

2014-11-25 Thread Ruslan Bukin
On Tue, Nov 25, 2014 at 06:29:22PM +0300, Gleb Smirnoff wrote:
> R> Un-unioning helps partially: I receive much less panics and able to boot 
> until login prompt in ~ 1/3 attempts with patch attached.
> 
> What happens then? Same panic as w/o patch?
> 

Same random panics:

[..]
Starting file system checks:
/dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% 
fragmentation)
MAP: No valid partition found at vtbd0
MAP: No valid partition found at md0
MAP: No valid partition found at md0
panic: vm_page_insert_after: msucc doesn't succeed pindex
KDB: enter: panic
[ thread pid 53 tid 100030 ]
Stopped at  kdb_enter+0x8c: lui at,0x0
db> bt
Tracing pid 53 tid 100030 td 0x98b8f000
db_trace_thread+40 (?,?,?,?) ra 80117654 sp c56d90f0 sz 16
801174c8+18c (0,?,,?) ra 80116730 sp c56d9100 
sz 48
801162a8+488 (?,?,?,?) ra 801169fc sp c56d9130 sz 192
db_command_loop+f4 (?,?,?,?) ra 8011a570 sp c56d91f0 sz 16
8011a3c8+1a8 (?,?,?,?) ra 80282338 sp c56d9200 sz 816
kdb_trap+188 (?,?,?,?) ra 804b10a4 sp c56d9530 sz 64
trap+1114 (?,?,?,?) ra 8049c63c sp c56d9570 sz 288
MipsKernGenException+154 (0,4,804f60d0,12f) ra 80281ed4 sp 
c56d9690 sz 368
kdb_enter+8c (?,?,?,?) ra 80234398 sp c56d9800 sz 16
802341e8+1b0 (?,?,?,?) ra 802344c8 sp c56d9810 sz 32
kassert_panic+c8 (?,4,b82c00,3d7) ra 8047c580 sp c56d9830 sz 96
8047c460+120 (?,?,?,?) ra 8047ff28 sp c56d9890 sz 64
vm_page_alloc+7f8 (?,?,?,?) ra 80464524 sp c56d98d0 sz 80
80463a00+b24 (?,?,?,?) ra 0 sp c56d9920 sz 272
pid 53

Starting file system checks:
/dev/vtbd0: 344 files, 22588 used, 3419 free (3 frags, 427 blocks, 0.0% 
fragmentation)
MAP: No valid partition found at vtbd0
MAP: No valid partition found at md0
MAP: No valid partition found at md0
panic: Bad link elm 0x98bb3000 prev->next != elm
KDB: enter: panic
[ thread pid 44 tid 100030 ]
Stopped at  kdb_enter+0x8c: lui at,0x0
db> bt
Tracing pid 44 tid 100030 td 0x98b8f000
db_trace_thread+40 (?,?,?,?) ra 80117654 sp c56d8ea0 sz 16
801174c8+18c (0,?,,?) ra 80116730 sp c56d8eb0 
sz 48
801162a8+488 (?,?,?,?) ra 801169fc sp c56d8ee0 sz 192
db_command_loop+f4 (?,?,?,?) ra 8011a570 sp c56d8fa0 sz 16
8011a3c8+1a8 (?,?,?,?) ra 80282338 sp c56d8fb0 sz 816
kdb_trap+188 (?,?,?,?) ra 804b10a4 sp c56d92e0 sz 64
trap+1114 (?,?,?,?) ra 8049c63c sp c56d9320 sz 288
MipsKernGenException+154 (0,4,804f60d0,12f) ra 80281ed4 sp 
c56d9440 sz 368
kdb_enter+8c (?,?,?,?) ra 80234398 sp c56d95b0 sz 16
802341e8+1b0 (?,?,?,?) ra 80234400 sp c56d95c0 sz 32
panic+30 (?,bb3000,8051f738,8051f738) ra 804790c8 sp c56d95e0 
sz 96
vm_object_deallocate+960 (?,?,?,?) ra 8046b184 sp c56d9640 sz 96
8046b158+2c (?,?,?,?) ra 8046b2a4 sp c56d96a0 sz 32
8046b1e8+bc (?,?,?,?) ra 8046b308 sp c56d96c0 sz 32
_vm_map_unlock+40 (?,?,?,?) ra 8046d990 sp c56d96e0 sz 16
vm_map_remove+98 (?,?,?,?) ra 801eb2e4 sp c56d96f0 sz 32
exec_new_vmspace+274 (?,?,?,?) ra 801c4ea0 sp c56d9710 sz 80
801c4828+678 (?,?,?,?) ra 801eb81c sp c56d9760 sz 304
kern_execve+404 (?,?,?,?) ra 801ec6b4 sp c56d9890 sz 784
sys_execve+44 (?,?,?,?) ra 804b0a88 sp c56d9ba0 sz 80
trap+af8 (?,?,?,?) ra 8049c880 sp c56d9bf0 sz 288
MipsUserGenException+13c (?,?,?,600e30b4) ra 0 sp c56d9d10 sz 0
pid 44
db> 

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


svn commit: r275058 - head/sys/cam/ctl

2014-11-25 Thread Alexander Motin
Author: mav
Date: Tue Nov 25 17:53:35 2014
New Revision: 275058
URL: https://svnweb.freebsd.org/changeset/base/275058

Log:
  Coalesce last data move and command status for read commands.
  
  Make CTL core and block backend set success status before initiating last
  data move for read commands.  Make CAM target and iSCSI frontends detect
  such condition and send command status together with data.  New I/O flag
  allows to skip duplicate status sending on later fe_done() call.
  
  For Fibre Channel this change saves one of three interrupts per read command,
  increasing performance from 126K to 160K IOPS.  For iSCSI this change saves
  one of three PDUs per read command, increasing performance from 1M to 1.2M
  IOPS.
  
  MFC after:1 month
  Sponsored by: iXsystems, Inc.

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_backend_block.c
  head/sys/cam/ctl/ctl_backend_ramdisk.c
  head/sys/cam/ctl/ctl_frontend_iscsi.c
  head/sys/cam/ctl/ctl_io.h
  head/sys/cam/ctl/ctl_tpc.c
  head/sys/cam/ctl/scsi_ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Tue Nov 25 17:33:22 2014(r275057)
+++ head/sys/cam/ctl/ctl.c  Tue Nov 25 17:53:35 2014(r275058)
@@ -4996,23 +4996,13 @@ ctl_config_move_done(union ctl_io *io)
 {
int retval;
 
-   retval = CTL_RETVAL_COMPLETE;
-
-
CTL_DEBUG_PRINT(("ctl_config_move_done\n"));
-   /*
-* XXX KDM this shouldn't happen, but what if it does?
-*/
-   if (io->io_hdr.io_type != CTL_IO_SCSI)
-   panic("I/O type isn't CTL_IO_SCSI!");
+   KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
+   ("Config I/O type isn't CTL_IO_SCSI (%d)!", io->io_hdr.io_type));
 
-   if ((io->io_hdr.port_status == 0)
-&& ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
-&& ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE))
-   io->io_hdr.status = CTL_SUCCESS;
-   else if ((io->io_hdr.port_status != 0)
- && ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0)
- && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)){
+   if ((io->io_hdr.port_status != 0) &&
+   ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE ||
+(io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) {
/*
 * For hardware error sense keys, the sense key
 * specific value is defined to be a retry count,
@@ -5025,15 +5015,12 @@ ctl_config_move_done(union ctl_io *io)
 /*sks_valid*/ 1,
 /*retry_count*/
 io->io_hdr.port_status);
-   if (io->io_hdr.flags & CTL_FLAG_ALLOCATED)
-   free(io->scsiio.kern_data_ptr, M_CTL);
-   ctl_done(io);
-   goto bailout;
}
 
-   if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN)
-|| ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS)
-|| ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)) {
+   if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) ||
+   ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE &&
+(io->io_hdr.status & CTL_STATUS_MASK) != CTL_SUCCESS) ||
+   ((io->io_hdr.flags & CTL_FLAG_ABORT) != 0)) {
/*
 * XXX KDM just assuming a single pointer here, and not a
 * S/G list.  If we start using S/G lists for config data,
@@ -5041,8 +5028,8 @@ ctl_config_move_done(union ctl_io *io)
 */
if (io->io_hdr.flags & CTL_FLAG_ALLOCATED)
free(io->scsiio.kern_data_ptr, M_CTL);
-   /* Hopefully the user has already set the status... */
ctl_done(io);
+   retval = CTL_RETVAL_COMPLETE;
} else {
/*
 * XXX KDM now we need to continue data movement.  Some
@@ -5065,7 +5052,6 @@ ctl_config_move_done(union ctl_io *io)
 */
retval = ctl_scsiio(&io->scsiio);
}
-bailout:
return (retval);
 }
 
@@ -5211,13 +5197,12 @@ ctl_scsi_release(struct ctl_scsiio *ctsi
 
mtx_unlock(&lun->lun_lock);
 
-   ctl_set_success(ctsio);
-
if (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) {
free(ctsio->kern_data_ptr, M_CTL);
ctsio->io_hdr.flags &= ~CTL_FLAG_ALLOCATED;
}
 
+   ctl_set_success(ctsio);
ctl_done((union ctl_io *)ctsio);
return (CTL_RETVAL_COMPLETE);
 }
@@ -5681,9 +5666,9 @@ ctl_read_buffer(struct ctl_scsiio *ctsio
ctsio->kern_data_resid = 0;
ctsio->kern_rel_offset = 0;
ctsio->kern_sg_entries = 0;
+   ctl_set_success(ctsio);
ctsio->be_move_done = ctl_config_move_done;
ctl_datamove((union ctl_io *)ctsio);
-
r

svn commit: r275059 - head/sys/boot/i386/boot2

2014-11-25 Thread Roman Divacky
Author: rdivacky
Date: Tue Nov 25 18:35:47 2014
New Revision: 275059
URL: https://svnweb.freebsd.org/changeset/base/275059

Log:
  Shrink boot2 by a couple more bytes.
  
  Reviewed by:jhb
  Tested by:  me, dim

Modified:
  head/sys/boot/i386/boot2/boot2.c

Modified: head/sys/boot/i386/boot2/boot2.c
==
--- head/sys/boot/i386/boot2/boot2.cTue Nov 25 17:53:35 2014
(r275058)
+++ head/sys/boot/i386/boot2/boot2.cTue Nov 25 18:35:47 2014
(r275059)
@@ -323,7 +323,8 @@ load(void)
 caddr_t p;
 ufs_ino_t ino;
 uint32_t addr;
-int i, j;
+uint8_t i, j;
+int k;
 
 if (!(ino = lookup(kname))) {
if (!ls)
@@ -344,7 +345,7 @@ load(void)
return;
 } else if (IS_ELF(hdr.eh)) {
fs_off = hdr.eh.e_phoff;
-   for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) {
+   for (j = k = 0; k < hdr.eh.e_phnum && j < 2; k++) {
if (xfsread(ino, ep + j, sizeof(ep[0])))
return;
if (ep[j].p_type == PT_LOAD)
@@ -393,7 +394,9 @@ parse()
 char *ep, *p, *q;
 const char *cp;
 unsigned int drv;
-int c, i, j;
+uint8_t i;
+int c, j;
+size_t k;
 
 while ((c = *arg++)) {
if (c == ' ' || c == '\t' || c == '\n')
@@ -416,7 +419,7 @@ parse()
 #if SERIAL
} else if (c == 'S') {
j = 0;
-   while ((unsigned int)(i = *arg++ - '0') <= 9)
+   while ((i = *arg++ - '0') <= 9)
j = j * 10 + i;
if (j > 0 && i == -'0') {
comspeed = j;
@@ -479,10 +482,10 @@ parse()
 ? DRV_HARD : 0) + drv;
dsk_meta = 0;
}
-   if ((i = ep - arg)) {
-   if ((size_t)i >= sizeof(knamebuf))
+   if (k = ep - arg) {
+   if (k >= sizeof(knamebuf))
return -1;
-   memcpy(knamebuf, arg, i + 1);
+   memcpy(knamebuf, arg, k + 1);
kname = knamebuf;
}
}
@@ -605,8 +608,10 @@ drvread(void *buf, unsigned lba, unsigne
 {
 static unsigned c = 0x2d5c7c2f;
 
-if (!OPT_CHECK(RBX_QUIET))
-   printf("%c\b", c = c << 8 | c >> 24);
+if (!OPT_CHECK(RBX_QUIET)) {
+   xputc(c = c << 8 | c >> 24);
+   xputc('\b');
+}
 v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
 v86.addr = XREADORG;   /* call to xread in boot1 */
 v86.es = VTOPSEG(buf);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275060 - head/lib/libc/net

2014-11-25 Thread Ed Maste
Author: emaste
Date: Tue Nov 25 18:39:37 2014
New Revision: 275060
URL: https://svnweb.freebsd.org/changeset/base/275060

Log:
  Fix b64_pton output buffer overrun test for exact-sized buffer
  
  b64_pton would sometimes erroneously fail to decode a base64 string into
  a precisely sized buffer. The overflow check was a little too greedy.
  
  Reported by:  Ted Unangst on freebsd-hackers@
  Reviewed by:  loos, trasz
  Obtained from:OpenBSD
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential Revision: https://reviews.freebsd.org/D1218

Modified:
  head/lib/libc/net/base64.c

Modified: head/lib/libc/net/base64.c
==
--- head/lib/libc/net/base64.c  Tue Nov 25 18:35:47 2014(r275059)
+++ head/lib/libc/net/base64.c  Tue Nov 25 18:39:37 2014(r275060)
@@ -199,6 +199,7 @@ b64_pton(src, target, targsize)
size_t targsize;
 {
int tarindex, state, ch;
+   u_char nextbyte;
char *pos;
 
state = 0;
@@ -226,22 +227,28 @@ b64_pton(src, target, targsize)
break;
case 1:
if (target) {
-   if ((size_t)tarindex + 1 >= targsize)
+   if ((size_t)tarindex >= targsize)
return (-1);
target[tarindex]   |=  (pos - Base64) >> 4;
-   target[tarindex+1]  = ((pos - Base64) & 0x0f)
-   << 4 ;
+   nextbyte = ((pos - Base64) & 0x0f) << 4;
+   if ((size_t)tarindex + 1 < targsize)
+   target[tarindex + 1] = nextbyte;
+   else if (nextbyte)
+   return (-1);
}
tarindex++;
state = 2;
break;
case 2:
if (target) {
-   if ((size_t)tarindex + 1 >= targsize)
+   if ((size_t)tarindex >= targsize)
return (-1);
target[tarindex]   |=  (pos - Base64) >> 2;
-   target[tarindex+1]  = ((pos - Base64) & 0x03)
-   << 6;
+   nextbyte = ((pos - Base64) & 0x03) << 6;
+   if ((size_t)tarindex + 1 < targsize)
+   target[tarindex + 1] = nextbyte;
+   else if (nextbyte)
+   return (-1);
}
tarindex++;
state = 3;
@@ -299,7 +306,8 @@ b64_pton(src, target, targsize)
 * zeros.  If we don't check them, they become a
 * subliminal channel.
 */
-   if (target && target[tarindex] != 0)
+   if (target && (size_t)tarindex < targsize &&
+   target[tarindex] != 0)
return (-1);
}
} else {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275061 - head/sys/boot/i386/boot2

2014-11-25 Thread Roman Divacky
Author: rdivacky
Date: Tue Nov 25 18:53:17 2014
New Revision: 275061
URL: https://svnweb.freebsd.org/changeset/base/275061

Log:
  Fix style(9).
  
  Suggested by: jkim

Modified:
  head/sys/boot/i386/boot2/boot2.c

Modified: head/sys/boot/i386/boot2/boot2.c
==
--- head/sys/boot/i386/boot2/boot2.cTue Nov 25 18:39:37 2014
(r275060)
+++ head/sys/boot/i386/boot2/boot2.cTue Nov 25 18:53:17 2014
(r275061)
@@ -394,9 +394,9 @@ parse()
 char *ep, *p, *q;
 const char *cp;
 unsigned int drv;
-uint8_t i;
 int c, j;
 size_t k;
+uint8_t i;
 
 while ((c = *arg++)) {
if (c == ' ' || c == '\t' || c == '\n')
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275062 - head/sys/boot/i386/boot2

2014-11-25 Thread Roman Divacky
Author: rdivacky
Date: Tue Nov 25 18:58:40 2014
New Revision: 275062
URL: https://svnweb.freebsd.org/changeset/base/275062

Log:
  Fix style(9).
  
  Suggested by: jkim

Modified:
  head/sys/boot/i386/boot2/boot2.c

Modified: head/sys/boot/i386/boot2/boot2.c
==
--- head/sys/boot/i386/boot2/boot2.cTue Nov 25 18:53:17 2014
(r275061)
+++ head/sys/boot/i386/boot2/boot2.cTue Nov 25 18:58:40 2014
(r275062)
@@ -323,8 +323,8 @@ load(void)
 caddr_t p;
 ufs_ino_t ino;
 uint32_t addr;
-uint8_t i, j;
 int k;
+uint8_t i, j;
 
 if (!(ino = lookup(kname))) {
if (!ls)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275064 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 19:07:31 2014
New Revision: 275064
URL: https://svnweb.freebsd.org/changeset/base/275064

Log:
  Remove duplicated krb5
  
  Reported by:  markj

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 19:01:49 2014
(r275063)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 19:07:31 2014
(r275064)
@@ -94,7 +94,6 @@ _LIBRARIES=   \
kafs5 \
kdc \
kiconv \
-   krb5 \
kvm \
krb5 \
l \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r275064 - head/share/mk

2014-11-25 Thread Benjamin Kaduk
On Tue, Nov 25, 2014 at 2:07 PM, Baptiste Daroussin 
wrote:

> Author: bapt
> Date: Tue Nov 25 19:07:31 2014
> New Revision: 275064
> URL: https://svnweb.freebsd.org/changeset/base/275064
>
> Log:
>   Remove duplicated krb5
>

Removing the other one would have left things sorted...

-Ben


> Modified: head/share/mk/src.libnames.mk
>
> ==
> --- head/share/mk/src.libnames.mk   Tue Nov 25 19:01:49 2014
> (r275063)
> +++ head/share/mk/src.libnames.mk   Tue Nov 25 19:07:31 2014
> (r275064)
> @@ -94,7 +94,6 @@ _LIBRARIES=   \
> kafs5 \
> kdc \
> kiconv \
> -   krb5 \
> kvm \
> krb5 \
> l \
> ___
> svn-src-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
>
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275065 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 19:13:03 2014
New Revision: 275065
URL: https://svnweb.freebsd.org/changeset/base/275065

Log:
  Sort libraries definitions
  
  Reported by:  bjk

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 19:07:31 2014
(r275064)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 19:13:03 2014
(r275065)
@@ -55,8 +55,8 @@ _LIBRARIES=   \
begemot \
bluetooth \
bsdxml \
-   bsnmp \
bsm \
+   bsnmp \
bz2 \
calendar \
cam \
@@ -94,8 +94,8 @@ _LIBRARIES=   \
kafs5 \
kdc \
kiconv \
-   kvm \
krb5 \
+   kvm \
l \
lzma \
m \
@@ -105,9 +105,9 @@ _LIBRARIES= \
memstat \
mp \
nandfs \
+   ncursesw \
netgraph \
ngatm \
-   ncursesw \
nv \
opie \
pam \
@@ -129,13 +129,13 @@ _LIBRARIES=   \
sm \
smb \
ssl \
+   ssp_nonshared \
stdthreads \
supcplusplus \
-   ssp_nonshared \
tacplus \
termcapw \
-   ugidfw \
ufs \
+   ugidfw \
ulog \
usb \
usbhid \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275071 - head/lib/libc/gen

2014-11-25 Thread Xin LI
Author: delphij
Date: Tue Nov 25 20:59:22 2014
New Revision: 275071
URL: https://svnweb.freebsd.org/changeset/base/275071

Log:
  Reinstitate send() after syslogd restarts.
  
  In r228193 the test of CONNPRIV have been moved to before the _usleep
  and send in vsyslog().  When syslogd restarts, this would prevent the
  message being logged after the disconnect/connect dance for
  scenario #1.
  
  PR:   194751
  Submitted by: Peter Creath 
  Reviewed By:  glebius
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D1227

Modified:
  head/lib/libc/gen/syslog.c

Modified: head/lib/libc/gen/syslog.c
==
--- head/lib/libc/gen/syslog.c  Tue Nov 25 19:45:28 2014(r275070)
+++ head/lib/libc/gen/syslog.c  Tue Nov 25 20:59:22 2014(r275071)
@@ -261,26 +261,45 @@ vsyslog(int pri, const char *fmt, va_lis
connectlog();
 
/*
-* If the send() failed, there are two likely scenarios: 
+* If the send() fails, there are two likely scenarios: 
 *  1) syslogd was restarted
 *  2) /var/run/log is out of socket buffer space, which
 * in most cases means local DoS.
-* We attempt to reconnect to /var/run/log[priv] to take care of
-* case #1 and keep send()ing data to cover case #2
-* to give syslogd a chance to empty its socket buffer.
+* If the error does not indicate a full buffer, we address
+* case #1 by attempting to reconnect to /var/run/log[priv]
+* and resending the message once.
 *
-* If we are working with a priveleged socket, then take
-* only one attempt, because we don't want to freeze a
+* If we are working with a privileged socket, the retry
+* attempts end there, because we don't want to freeze a
 * critical application like su(1) or sshd(8).
 *
+* Otherwise, we address case #2 by repeatedly retrying the
+* send() to give syslogd a chance to empty its socket buffer.
 */
 
if (send(LogFile, tbuf, cnt, 0) < 0) {
if (errno != ENOBUFS) {
+   /*
+* Scenario 1: syslogd was restarted
+* reconnect and resend once
+*/
disconnectlog();
connectlog();
+   if (send(LogFile, tbuf, cnt, 0) >= 0) {
+   THREAD_UNLOCK();
+   return;
+   }
+   /*
+* if the resend failed, fall through to
+* possible scenario 2
+*/
}
-   do {
+   while (errno == ENOBUFS) {
+   /*
+* Scenario 2: out of socket buffer space
+* possible DoS, fail fast on a privileged
+* socket
+*/
if (status == CONNPRIV)
break;
_usleep(1);
@@ -288,7 +307,7 @@ vsyslog(int pri, const char *fmt, va_lis
THREAD_UNLOCK();
return;
}
-   } while (errno == ENOBUFS);
+   }
} else {
THREAD_UNLOCK();
return;
@@ -350,7 +369,7 @@ connectlog(void)
SyslogAddr.sun_family = AF_UNIX;
 
/*
-* First try priveleged socket. If no success,
+* First try privileged socket. If no success,
 * then try default socket.
 */
(void)strncpy(SyslogAddr.sun_path, _PATH_LOG_PRIV,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275073 - in head: lib/libjail usr.sbin/jail

2014-11-25 Thread Jamie Gritton
Author: jamie
Date: Tue Nov 25 21:01:08 2014
New Revision: 275073
URL: https://svnweb.freebsd.org/changeset/base/275073

Log:
  In preparation for using clang's -Wcast-qual:
  
  Use __DECONST (instead of my own attempted re-invention) for the iov
  parameters to jail_get/set(2).  Similarly remove the decost-ish hack
  from execvp's argv, except the __DECONST is only added at very end.
  
  While I'm at it, remove an unused variable and fix a comment typo.

Modified:
  head/lib/libjail/jail.c
  head/lib/libjail/jail_getid.c
  head/usr.sbin/jail/command.c
  head/usr.sbin/jail/jail.c
  head/usr.sbin/jail/state.c

Modified: head/lib/libjail/jail.c
==
--- head/lib/libjail/jail.c Tue Nov 25 21:00:58 2014(r275072)
+++ head/lib/libjail/jail.c Tue Nov 25 21:01:08 2014(r275073)
@@ -531,7 +531,7 @@ jailparam_set(struct jailparam *jp, unsi
}
i++;
}
-   *(const void **)&jiov[i].iov_base = "errmsg";
+   jiov[i].iov_base = __DECONST(char *, "errmsg");
jiov[i].iov_len = sizeof("errmsg");
i++;
jiov[i].iov_base = jail_errmsg;
@@ -601,7 +601,7 @@ jailparam_get(struct jailparam *jp, unsi
jiov[ki].iov_len = (jp_key->jp_ctltype & CTLTYPE) == CTLTYPE_STRING
? strlen(jp_key->jp_value) + 1 : jp_key->jp_valuelen;
ki++;
-   *(const void **)&jiov[ki].iov_base = "errmsg";
+   jiov[ki].iov_base = __DECONST(char *, "errmsg");
jiov[ki].iov_len = sizeof("errmsg");
ki++;
jiov[ki].iov_base = jail_errmsg;

Modified: head/lib/libjail/jail_getid.c
==
--- head/lib/libjail/jail_getid.c   Tue Nov 25 21:00:58 2014
(r275072)
+++ head/lib/libjail/jail_getid.c   Tue Nov 25 21:01:08 2014
(r275073)
@@ -53,12 +53,12 @@ jail_getid(const char *name)
jid = strtoul(name, &ep, 10);
if (*name && !*ep)
return jid;
-   *(const void **)&jiov[0].iov_base = "name";
+   jiov[0].iov_base = __DECONST(char *, "name");
jiov[0].iov_len = sizeof("name");
jiov[1].iov_len = strlen(name) + 1;
jiov[1].iov_base = alloca(jiov[1].iov_len);
strcpy(jiov[1].iov_base, name);
-   *(const void **)&jiov[2].iov_base = "errmsg";
+   jiov[2].iov_base = __DECONST(char *, "errmsg");
jiov[2].iov_len = sizeof("errmsg");
jiov[3].iov_base = jail_errmsg;
jiov[3].iov_len = JAIL_ERRMSGLEN;
@@ -80,15 +80,15 @@ jail_getname(int jid)
char *name;
char namebuf[MAXHOSTNAMELEN];
 
-   *(const void **)&jiov[0].iov_base = "jid";
+   jiov[0].iov_base = __DECONST(char *, "jid");
jiov[0].iov_len = sizeof("jid");
jiov[1].iov_base = &jid;
jiov[1].iov_len = sizeof(jid);
-   *(const void **)&jiov[2].iov_base = "name";
+   jiov[2].iov_base = __DECONST(char *, "name");
jiov[2].iov_len = sizeof("name");
jiov[3].iov_base = namebuf;
jiov[3].iov_len = sizeof(namebuf);
-   *(const void **)&jiov[4].iov_base = "errmsg";
+   jiov[4].iov_base = __DECONST(char *, "errmsg");
jiov[4].iov_len = sizeof("errmsg");
jiov[5].iov_base = jail_errmsg;
jiov[5].iov_len = JAIL_ERRMSGLEN;

Modified: head/usr.sbin/jail/command.c
==
--- head/usr.sbin/jail/command.cTue Nov 25 21:00:58 2014
(r275072)
+++ head/usr.sbin/jail/command.cTue Nov 25 21:01:08 2014
(r275073)
@@ -260,8 +260,8 @@ run_command(struct cfjail *j)
const struct passwd *pwd;
const struct cfstring *comstring, *s;
login_cap_t *lcap;
-   char **argv;
-   char *cs, *comcs, *devpath;
+   const char **argv;
+   char *acs, *cs, *comcs, *devpath;
const char *jidstr, *conslog, *path, *ruleset, *term, *username;
enum intparam comparam;
size_t comlen;
@@ -332,27 +332,26 @@ run_command(struct cfjail *j)
}
 
argv = alloca((8 + argc) * sizeof(char *));
-   *(const char **)&argv[0] = _PATH_IFCONFIG;
+   argv[0] = _PATH_IFCONFIG;
if ((cs = strchr(val, '|'))) {
-   argv[1] = alloca(cs - val + 1);
-   strlcpy(argv[1], val, cs - val + 1);
+   argv[1] = acs = alloca(cs - val + 1);
+   strlcpy(acs, val, cs - val + 1);
addr = cs + 1;
} else {
-   *(const char **)&argv[1] =
-   string_param(j->intparams[IP_INTERFACE]);
+   argv[1] = string_param(j->intparams[IP_INTERFACE]);
addr = val;
}
-   *(const char **)&argv[2] = "inet";
+   argv[2] = "inet";
if (!(cs = strc

svn commit: r275076 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 21:16:44 2014
New Revision: 275076
URL: https://svnweb.freebsd.org/changeset/base/275076

Log:
  Define missing libraries to be able to convert gnu, cddl and secure to LIBADD

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 21:08:31 2014
(r275075)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 21:16:44 2014
(r275076)
@@ -58,6 +58,8 @@ _LIBRARIES=   \
bsm \
bsnmp \
bz2 \
+   c \
+   c_pic \
calendar \
cam \
capsicum \
@@ -82,6 +84,7 @@ _LIBRARIES=   \
geom \
gnuregex \
gssapi \
+   gssapi_krb5 \
hdb \
heimbase \
heimntlm \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275077 - in head: gnu/lib/libdialog gnu/lib/libgcc gnu/lib/libreadline/readline gnu/lib/libstdc++ gnu/usr.bin/dialog gnu/usr.bin/diff gnu/usr.bin/gdb/gdb gnu/usr.bin/gdb/gdbtui gnu/usr...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 21:18:18 2014
New Revision: 275077
URL: https://svnweb.freebsd.org/changeset/base/275077

Log:
  Convert to LIBADD
  Reduce overlinking

Modified:
  head/gnu/lib/libdialog/Makefile
  head/gnu/lib/libgcc/Makefile
  head/gnu/lib/libreadline/readline/Makefile
  head/gnu/lib/libstdc++/Makefile
  head/gnu/usr.bin/dialog/Makefile
  head/gnu/usr.bin/diff/Makefile
  head/gnu/usr.bin/gdb/gdb/Makefile
  head/gnu/usr.bin/gdb/gdbtui/Makefile
  head/gnu/usr.bin/gdb/kgdb/Makefile
  head/gnu/usr.bin/grep/Makefile
  head/libexec/atf/atf-check/Makefile
  head/libexec/atf/atf-sh/Makefile
  head/libexec/atrun/Makefile
  head/libexec/casper/dns/Makefile
  head/libexec/casper/grp/Makefile
  head/libexec/casper/pwd/Makefile
  head/libexec/casper/random/Makefile
  head/libexec/casper/sysctl/Makefile
  head/libexec/dma/Makefile
  head/libexec/fingerd/Makefile
  head/libexec/ftpd/Makefile
  head/libexec/getty/Makefile
  head/libexec/mail.local/Makefile
  head/libexec/pppoed/Makefile
  head/libexec/rlogind/Makefile
  head/libexec/rpc.rquotad/Makefile
  head/libexec/rpc.rstatd/Makefile
  head/libexec/rpc.rusersd/Makefile
  head/libexec/rpc.rwalld/Makefile
  head/libexec/rpc.sprayd/Makefile
  head/libexec/rshd/Makefile
  head/libexec/rtld-elf/Makefile
  head/libexec/smrsh/Makefile
  head/libexec/tcpd/Makefile
  head/libexec/telnetd/Makefile
  head/libexec/tftpd/Makefile
  head/libexec/ulog-helper/Makefile
  head/libexec/ypxfr/Makefile
  head/secure/lib/libssh/Makefile
  head/secure/lib/libssl/Makefile
  head/secure/libexec/sftp-server/Makefile
  head/secure/libexec/ssh-keysign/Makefile
  head/secure/libexec/ssh-pkcs11-helper/Makefile
  head/secure/usr.bin/bdes/Makefile
  head/secure/usr.bin/openssl/Makefile
  head/secure/usr.bin/scp/Makefile
  head/secure/usr.bin/sftp/Makefile
  head/secure/usr.bin/ssh-add/Makefile
  head/secure/usr.bin/ssh-agent/Makefile
  head/secure/usr.bin/ssh-keygen/Makefile
  head/secure/usr.bin/ssh-keyscan/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile

Modified: head/gnu/lib/libdialog/Makefile
==
--- head/gnu/lib/libdialog/Makefile Tue Nov 25 21:16:44 2014
(r275076)
+++ head/gnu/lib/libdialog/Makefile Tue Nov 25 21:18:18 2014
(r275077)
@@ -13,8 +13,7 @@ SRCS= argv.c arrows.c buildlist.c butto
 INCS=  dialog.h dlg_colors.h dlg_config.h dlg_keys.h
 MAN=   dialog.3
 
-DPADD= ${LIBNCURSESW} ${LIBM}
-LDADD= -lncursesw -lm
+LIBADD=ncursesw m
 
 CFLAGS+=   -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED 
-DGCC_UNUSED=__unused
 .PATH: ${DIALOG}

Modified: head/gnu/lib/libgcc/Makefile
==
--- head/gnu/lib/libgcc/MakefileTue Nov 25 21:16:44 2014
(r275076)
+++ head/gnu/lib/libgcc/MakefileTue Nov 25 21:18:18 2014
(r275077)
@@ -28,8 +28,7 @@ CFLAGS+=  -DIN_GCC -DIN_LIBGCC2 -D__GCC_F
-I${.CURDIR}/../../usr.bin/cc/cc_tools
 
 LDFLAGS+=  -nodefaultlibs
-DPADD+=${LIBC}
-LDADD+=-lc
+LIBADD+=   c
 
 OBJS=  # added to below in various ways depending on TARGET_CPUARCH
 
@@ -119,8 +118,7 @@ LIB1ASMSRC =lib1funcs.asm
 LIB1ASMFUNCS =  _dvmd_tls _bb_init_func
 LIB2ADDEH =unwind-arm.c libunwind.S pr-support.c unwind-c.c
 # Some compilers generate __aeabi_ functions libgcc_s is missing
-DPADD+=${LIBCOMPILER_RT}
-LDADD+=-lcompiler_rt
+LIBADD+=   compiler_rt
 .endif
 
 .if ${TARGET_CPUARCH} == mips

Modified: head/gnu/lib/libreadline/readline/Makefile
==
--- head/gnu/lib/libreadline/readline/Makefile  Tue Nov 25 21:16:44 2014
(r275076)
+++ head/gnu/lib/libreadline/readline/Makefile  Tue Nov 25 21:18:18 2014
(r275077)
@@ -23,7 +23,6 @@ ${.OBJDIR}/${_h}: ${SRCDIR}/${_h}
${INSTALL} ${.ALLSRC} ${.TARGET}
 .endfor
 
-DPADD= ${LIBTERMCAPW}
-LDADD= -ltermcapw
+LIBADD=ncursesw
 
 .include 

Modified: head/gnu/lib/libstdc++/Makefile
==
--- head/gnu/lib/libstdc++/Makefile Tue Nov 25 21:16:44 2014
(r275076)
+++ head/gnu/lib/libstdc++/Makefile Tue Nov 25 21:18:18 2014
(r275077)
@@ -23,8 +23,8 @@ CXXFLAGS+=-fno-implicit-templates -ffun
-Wno-deprecated
 PO_CXXFLAGS=   ${CXXFLAGS:N-ffunction-sections}
 
-DPADD= ${LIBM}
-LDADD= -lm  -Wl,-f,libsupc++.so.1
+LIBADD+=   m
+LDADD= -Wl,-f,libsupc++.so.1
 
 # libstdc++ sources
 SRCS+= bitmap_allocator.cc pool_allocator.cc \

Modified: head/gnu/usr.bin/dialog/Makefile
==
--- head/gnu/usr.bin/dialog/MakefileTue Nov 25 21:16:44 201

svn commit: r275079 - in head/usr.bin/svn: svn svnadmin svndumpfilter svnlook svnmucc svnrdump svnserve svnsync svnversion

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 21:43:51 2014
New Revision: 275079
URL: https://svnweb.freebsd.org/changeset/base/275079

Log:
  Convert svn to LIBADD reduce overlinking

Modified:
  head/usr.bin/svn/svn/Makefile
  head/usr.bin/svn/svnadmin/Makefile
  head/usr.bin/svn/svndumpfilter/Makefile
  head/usr.bin/svn/svnlook/Makefile
  head/usr.bin/svn/svnmucc/Makefile
  head/usr.bin/svn/svnrdump/Makefile
  head/usr.bin/svn/svnserve/Makefile
  head/usr.bin/svn/svnsync/Makefile
  head/usr.bin/svn/svnversion/Makefile

Modified: head/usr.bin/svn/svn/Makefile
==
--- head/usr.bin/svn/svn/Makefile   Tue Nov 25 21:43:01 2014
(r275078)
+++ head/usr.bin/svn/svn/Makefile   Tue Nov 25 21:43:51 2014
(r275079)
@@ -39,18 +39,14 @@ LDADD=  -L${LIBSVN_CLIENTDIR} -lsvn_clien
-L${LIBSVN_SUBRDIR} -lsvn_subr \
-L${LIBSERFDIR} -lserf \
-L${LIBAPR_UTILDIR} -lapr-util \
-   -lbsdxml \
-   -L${LIBAPRDIR} -lapr \
-   ${LDSQLITE3} \
-   -lz -lcrypt -lmagic -lcrypto -lssl -lpthread
+   -L${LIBAPRDIR} -lapr
+LIBADD+=   bsdxml sqlite3 z magic crypto ssl pthread
 
 DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${LIBSVN_RA} ${LIBSVN_RA_LOCAL} \
${LIBSVN_RA_SVN} ${LIBSVN_RA_SERF} ${LIBSVN_REPOS} \
${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} ${LIBSVN_DELTA} \
${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBSERF} ${LIBAPR_UTIL} \
-   ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBMAGIC} \
-   ${LIBCRYPTO} ${LIBSSL} ${LIBPTHREAD}
-USEPRIVATELIB= sqlite3
+   ${LIBAPR}
 
 CLEANFILES+=   svnlite.1
 .if(defined(ORGANIZATION) && !empty(ORGANIZATION))

Modified: head/usr.bin/svn/svnadmin/Makefile
==
--- head/usr.bin/svn/svnadmin/Makefile  Tue Nov 25 21:43:01 2014
(r275078)
+++ head/usr.bin/svn/svnadmin/Makefile  Tue Nov 25 21:43:51 2014
(r275079)
@@ -25,15 +25,11 @@ LDADD=  -L${LIBSVN_REPOSDIR} -lsvn_repos 
-L${LIBSVN_DELTADIR} -lsvn_delta \
-L${LIBSVN_SUBRDIR} -lsvn_subr \
-L${LIBAPR_UTILDIR} -lapr-util \
-   -lbsdxml \
-   -L${LIBAPRDIR} -lapr \
-   ${LDSQLITE3} \
-   -lz -lcrypt -lpthread
+   -L${LIBAPRDIR} -lapr
+LIBADD+=   bsdxml sqlite3 z pthread
 
 DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
-   ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD}
-
-USEPRIVATELIB= sqlite3
+   ${LIBAPR}
 
 .include 

Modified: head/usr.bin/svn/svndumpfilter/Makefile
==
--- head/usr.bin/svn/svndumpfilter/Makefile Tue Nov 25 21:43:01 2014
(r275078)
+++ head/usr.bin/svn/svndumpfilter/Makefile Tue Nov 25 21:43:51 2014
(r275079)
@@ -25,14 +25,11 @@ LDADD=  -L${LIBSVN_REPOSDIR} -lsvn_repos 
-L${LIBSVN_DELTADIR} -lsvn_delta \
-L${LIBSVN_SUBRDIR} -lsvn_subr \
-L${LIBAPR_UTILDIR} -lapr-util \
-   -lbsdxml \
-   -L${LIBAPRDIR} -lapr \
-   ${LDSQLITE3} \
-   -lz -lcrypt -lpthread
+   -L${LIBAPRDIR} -lapr
+LIBADD+=   bsdxml sqlite3 z crypt pthread
 
 DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
-   ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD}
-USEPRIVATELIB= sqlite3
+   ${LIBAPR}
 
 .include 

Modified: head/usr.bin/svn/svnlook/Makefile
==
--- head/usr.bin/svn/svnlook/Makefile   Tue Nov 25 21:43:01 2014
(r275078)
+++ head/usr.bin/svn/svnlook/Makefile   Tue Nov 25 21:43:51 2014
(r275079)
@@ -26,14 +26,11 @@ LDADD=  -L${LIBSVN_REPOSDIR} -lsvn_repos 
-L${LIBSVN_DIFFDIR} -lsvn_diff \
-L${LIBSVN_SUBRDIR} -lsvn_subr \
-L${LIBAPR_UTILDIR} -lapr-util \
-   -lbsdxml \
-   -L${LIBAPRDIR} -lapr \
-   ${LDSQLITE3} \
-   -lz -lcrypt -lpthread
+   -L${LIBAPRDIR} -lapr
+LIBADD+=   bsdxml sqlite3 z pthread
 
 DPADD= ${LIBSVN_REPOS} ${LIBSVN_FS} ${LIBSVN_FS_FS} ${LIBSVN_FS_UTIL} \
${LIBSVN_DELTA} ${LIBSVN_DIFF} ${LIBSVN_SUBR} ${LIBAPR_UTIL} \
-   ${LIBBSDXML} ${LIBAPR} ${LIBSQLITE3} ${LIBZ} ${LIBCRYPT} ${LIBPTHREAD}
-USEPRIVATELIB= sqlite3
+   ${LIBAPR}
 
 .include 

Modified: head/usr.bin/svn/svnmucc/Makefile
==
--- head/usr.bin/svn/svnmucc/Makefile   Tue Nov 25 21:43:01 2014
(r275078)
+++ head/usr.bin/svn/svnmucc/Makefile   Tue Nov 25 21:43:51 2014
(r275079)
@@ -31,16 +31,12 @@ LDADD=  -L${LIBSVN_CLIENTDIR} -lsvn_clien
-L${LIBSVN_SUBRDIR} -lsvn_subr \
-L${LIBSERFDIR} -lserf \
-L${LIBAPR_UTILDIR} -lapr-util \
-   -lbsdxml

svn commit: r275080 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:10:31 2014
New Revision: 275080
URL: https://svnweb.freebsd.org/changeset/base/275080

Log:
  Defines the libssh dependencies

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 21:43:51 2014
(r275079)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 22:10:31 2014
(r275080)
@@ -159,6 +159,9 @@ _DP_archive+=   md
 .endif
 _DP_ssl=   crypto
 _DP_ssh=   crypto crypt
+.if ${MK_LDNS} != "no"
+_DP_ssh+=  ldns z
+.endif
 _DP_edit=  ncursesw
 .if ${MK_OPENSSL} != "no"
 _DP_bsnmp= crypto
@@ -372,3 +375,4 @@ LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libb
 
 LIBAMUDIR= ${ROOTOBJDIR}/usr.sbin/amd/libamu
 LIBAMU?=   ${LIBAMUDIR}/libamu/libamu.a
+
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275082 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:17:31 2014
New Revision: 275082
URL: https://svnweb.freebsd.org/changeset/base/275082

Log:
  Register the explicit (pthread) and implicit (for static) dependencies for
  kerberos

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 22:16:43 2014
(r275081)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 22:17:31 2014
(r275082)
@@ -217,7 +217,9 @@ _DP_pam+=   ssh
 .if ${MK_NIS} != "no"
 _DP_pam+=  ypclnt
 .endif
-_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
+_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \
+   pthread
+_DP_gssapi_krb5+=  gssapi krb5 crypto roken asn1 com_err
 
 # Define spacial cases
 LDADD_supcplusplus=-lsupc++
@@ -259,6 +261,10 @@ DPADD_hdb+=${DPADD_pthread}
 LDADD_hdb+=${LDADD_pthread}
 DPADD_kadm5srv+=   ${DPADD_pthread}
 LDADD_kadm5srv+=   ${LDADD_pthread}
+DPADD_krb5+=   ${DPADD_pthread}
+LDADD_krb5+=   ${LDADD_pthread}
+DPADD_gssapi_krb5+=${DPADD_pthread}
+LDADD_gssapi_krb5+=${LDADD_pthread}
 
 .for _l in ${LIBADD}
 .if ${_PRIVATELIBS:M${_l}}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275083 - in head/secure: lib/libssh libexec/sftp-server libexec/ssh-keysign libexec/ssh-pkcs11-helper usr.bin/scp usr.bin/sftp usr.bin/ssh usr.bin/ssh-add usr.bin/ssh-agent usr.bin/ssh...

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:25:13 2014
New Revision: 275083
URL: https://svnweb.freebsd.org/changeset/base/275083

Log:
  Reduce overlinking
  The framework now ensure by itself that pthread is added to the link chain
  as the last component if linked to kerberos hence avoid with out any explicit
  addition prevent issue like CVE-2014-8475

Modified:
  head/secure/lib/libssh/Makefile
  head/secure/libexec/sftp-server/Makefile
  head/secure/libexec/ssh-keysign/Makefile
  head/secure/libexec/ssh-pkcs11-helper/Makefile
  head/secure/usr.bin/scp/Makefile
  head/secure/usr.bin/sftp/Makefile
  head/secure/usr.bin/ssh-add/Makefile
  head/secure/usr.bin/ssh-agent/Makefile
  head/secure/usr.bin/ssh-keygen/Makefile
  head/secure/usr.bin/ssh-keyscan/Makefile
  head/secure/usr.bin/ssh/Makefile
  head/secure/usr.sbin/sshd/Makefile

Modified: head/secure/lib/libssh/Makefile
==
--- head/secure/lib/libssh/Makefile Tue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/lib/libssh/Makefile Tue Nov 25 22:25:13 2014
(r275083)
@@ -41,7 +41,6 @@ CFLAGS+= -I${SSHDIR} -include ssh_namesp
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
 CFLAGS+= -include krb5_config.h
-LIBADD+=   gssapi krb5 hx509 asn1 com_err md roken
 .endif
 
 .if ${MK_OPENSSH_NONE_CIPHER} != "no"

Modified: head/secure/libexec/sftp-server/Makefile
==
--- head/secure/libexec/sftp-server/MakefileTue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/libexec/sftp-server/MakefileTue Nov 25 22:25:13 2014
(r275083)
@@ -21,8 +21,6 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypto crypto z
-
 .include 
 
 .PATH: ${SSHDIR}

Modified: head/secure/libexec/ssh-keysign/Makefile
==
--- head/secure/libexec/ssh-keysign/MakefileTue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/libexec/ssh-keysign/MakefileTue Nov 25 22:25:13 2014
(r275083)
@@ -17,7 +17,7 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypt crypto z
+LIBADD+=   crypto
 
 .include 
 

Modified: head/secure/libexec/ssh-pkcs11-helper/Makefile
==
--- head/secure/libexec/ssh-pkcs11-helper/Makefile  Tue Nov 25 22:17:31 
2014(r275082)
+++ head/secure/libexec/ssh-pkcs11-helper/Makefile  Tue Nov 25 22:25:13 
2014(r275083)
@@ -21,7 +21,7 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypt crypto z
+LIBADD+=   crypto
 
 .include 
 

Modified: head/secure/usr.bin/scp/Makefile
==
--- head/secure/usr.bin/scp/MakefileTue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/usr.bin/scp/MakefileTue Nov 25 22:25:13 2014
(r275083)
@@ -20,8 +20,6 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypt crypto z
-
 .include 
 
 .PATH: ${SSHDIR}

Modified: head/secure/usr.bin/sftp/Makefile
==
--- head/secure/usr.bin/sftp/Makefile   Tue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/usr.bin/sftp/Makefile   Tue Nov 25 22:25:13 2014
(r275083)
@@ -20,8 +20,6 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIABDD+=   crypt crypto z
-
 .include 
 
 .PATH: ${SSHDIR}

Modified: head/secure/usr.bin/ssh-add/Makefile
==
--- head/secure/usr.bin/ssh-add/MakefileTue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/usr.bin/ssh-add/MakefileTue Nov 25 22:25:13 2014
(r275083)
@@ -20,8 +20,6 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypt crypto z
-
 .include 
 
 .PATH: ${SSHDIR}

Modified: head/secure/usr.bin/ssh-agent/Makefile
==
--- head/secure/usr.bin/ssh-agent/Makefile  Tue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/usr.bin/ssh-agent/Makefile  Tue Nov 25 22:25:13 2014
(r275083)
@@ -20,7 +20,7 @@ CFLAGS+=  -DHAVE_LDNS=1
 #USEPRIVATELIB+= ldns
 .endif
 
-LIBADD+=   crypt crypto z
+LIBADD+=   crypto
 
 .include 
 

Modified: head/secure/usr.bin/ssh-keygen/Makefile
==
--- head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 22:17:31 2014
(r275082)
+++ head/secure/usr.bin/ssh-keygen/Makefile Tue Nov 25 22:25:13 2014
(r275083)
@@ -15,10 +15,9 @@ LIBADD=  ssh
 
 .if ${MK_LDNS} != "no"
 CFLAGS+=   -DHAVE_LDNS=1
-LIBADD+=   ldns
 .endif
 
-LIBADD+=   crypt crypto 

svn commit: r275084 - in head/tools/tools: ath/athaggrstats ath/athstats net80211/wlanstats

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:37:27 2014
New Revision: 275084
URL: https://svnweb.freebsd.org/changeset/base/275084

Log:
  Convert to LIBADD

Modified:
  head/tools/tools/ath/athaggrstats/Makefile
  head/tools/tools/ath/athstats/Makefile
  head/tools/tools/net80211/wlanstats/Makefile

Modified: head/tools/tools/ath/athaggrstats/Makefile
==
--- head/tools/tools/ath/athaggrstats/Makefile  Tue Nov 25 22:25:13 2014
(r275083)
+++ head/tools/tools/ath/athaggrstats/Makefile  Tue Nov 25 22:37:27 2014
(r275084)
@@ -12,8 +12,7 @@ CLEANFILES+=  opt_ah.h
 
 CFLAGS+=-DATH_SUPPORT_ANI
 CFLAGS+=-DATH_SUPPORT_TDMA
-USEPRIVATELIB=  bsdstat
-LDADD= ${LDBSDSTAT}
+LIBADD+=   bsdstat
 
 opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h

Modified: head/tools/tools/ath/athstats/Makefile
==
--- head/tools/tools/ath/athstats/Makefile  Tue Nov 25 22:25:13 2014
(r275083)
+++ head/tools/tools/ath/athstats/Makefile  Tue Nov 25 22:37:27 2014
(r275084)
@@ -23,9 +23,7 @@ CFLAGS+=-DATH_SUPPORT_TDMA
 
 CFLAGS.clang+= -fbracket-depth=512
 
-USEPRIVATELIB= bsdstat
-
-LDADD= ${LDBSDSTAT}
+LIBADD=bsdstat
 
 opt_ah.h:
echo "#define AH_DEBUG 1" > opt_ah.h

Modified: head/tools/tools/net80211/wlanstats/Makefile
==
--- head/tools/tools/net80211/wlanstats/MakefileTue Nov 25 22:25:13 
2014(r275083)
+++ head/tools/tools/net80211/wlanstats/MakefileTue Nov 25 22:37:27 
2014(r275084)
@@ -5,8 +5,7 @@
 PROG=  wlanstats
 BINDIR=/usr/local/bin
 MAN=
-USEPRIVATELIB=  bsdstat
-LDADD=  ${LDBSDSTAT}
+LIBADD=bsdstat
 
 SRCS=  wlanstats.c main.c
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275086 - head/share/mk

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:39:59 2014
New Revision: 275086
URL: https://svnweb.freebsd.org/changeset/base/275086

Log:
  Remove all remnant ugly LD but atf one until the aft framework knows
  about LIBADD

Modified:
  head/share/mk/src.libnames.mk

Modified: head/share/mk/src.libnames.mk
==
--- head/share/mk/src.libnames.mk   Tue Nov 25 22:38:16 2014
(r275085)
+++ head/share/mk/src.libnames.mk   Tue Nov 25 22:39:59 2014
(r275086)
@@ -287,54 +287,42 @@ LDATF_CXX?=   ${LIBATF_CXXDIR}/libatf-c++.
 LIBATF_CXX?=   ${LIBATF_CXXDIR}/libatf-c++.a
 
 LIBBSDSTATDIR= ${ROOTOBJDIR}/lib/libbsdstat
-LDBSDSTAT?=${LIBBSDSTATDIR}/libbsdstat.so
 LIBBSDSTAT?=   ${LIBBSDSTATDIR}/libbsdstat.a
 
 LIBEVENTDIR=   ${ROOTOBJDIR}/lib/libevent
-LDEVENT?=  ${LIBEVENTDIR}/libevent.a
 LIBEVENT?= ${LIBEVENTDIR}/libevent.a
 
 LIBHEIMIPCCDIR=${ROOTOBJDIR}/kerberos5/lib/libheimipcc
-LDHEIMIPCC?=   ${LIBHEIMIPCCDIR}/libheimipcc.so
 LIBHEIMIPCC?=  ${LIBHEIMIPCCDIR}/libheimipcc.a
 
 LIBHEIMIPCSDIR=${ROOTOBJDIR}/kerberos5/lib/libheimipcs
-LDHEIMIPCS?=   ${LIBHEIMIPCSDIR}/libheimipcs.so
 LIBHEIMIPCS?=  ${LIBHEIMIPCSDIR}/libheimipcs.a
 
 LIBLDNSDIR=${ROOTOBJDIR}/lib/libldns
-LDLDNS?=   ${LIBLDNSDIR}/libldns.so
 LIBLDNS?=  ${LIBLDNSDIR}/libldns.a
 
 LIBSSHDIR= ${ROOTOBJDIR}/secure/lib/libssh
-LDSSH?=${LIBSSHDIR}/libssh.so
 LIBSSH?=   ${LIBSSHDIR}/libssh.a
 
 LIBUNBOUNDDIR= ${ROOTOBJDIR}/lib/libunbound
-LDUNBOUND?=${LIBUNBOUNDDIR}/libunbound.so
 LIBUNBOUND?=   ${LIBUNBOUNDDIR}/libunbound.a
 
 LIBUCLDIR= ${ROOTOBJDIR}/lib/libucl
-LDUCL?=${LIBUCLDIR}/libucl.so
 LIBUCL?=   ${LIBUCLDIR}/libucl.a
 
 LIBREADLINEDIR=${ROOTOBJDIR}/gnu/lib/libreadline/readline
-LDREADLINE?=   ${LIBREADLINEDIR}/libreadline.a
 LIBREADLINE?=  ${LIBREADLINEDIR}/libreadline.a
 
 LIBOHASHDIR=   ${ROOTOBJDIR}/lib/libohash
-LDOHASH?=  ${LIBOHASHDIR}/libohash.a
 LIBOHASH?= ${LIBOHASHDIR}/libohash.a
 
 LIBSQLITE3DIR= ${ROOTOBJDIR}/lib/libsqlite3
-LDSQLITE3?=${LIBSQLITE3DIR}/libsqlite3.so
 LIBSQLITE3?=   ${LIBSQLITE3DIR}/libsqlite3.a
 
 LIBMANDOCDIR=  ${ROOTOBJDIR}/lib/libmandoc
 LIBMANDOC?=${LIBMANDOCDIR}/libmandoc.a
 
 LIBSMDIR=  ${ROOTOBJDIR}/lib/libsm
-LDSM?= ${LIBSMDIR}/libsm.a
 LIBSM?=${LIBSMDIR}/libsm.a
 
 LIBSMDBDIR=${ROOTOBJDIR}/lib/libsmdb
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r274966 - head/sys/net

2014-11-25 Thread John-Mark Gurney
Philip Paeps wrote this message on Mon, Nov 24, 2014 at 21:18 +0100:
> On 2014-11-24 22:40:22 (+0300), Gleb Smirnoff  wrote:
> > On Mon, Nov 24, 2014 at 02:00:28PM +, Philip Paeps wrote:
> > P> Author: philip
> > P> Date: Mon Nov 24 14:00:27 2014
> > P> New Revision: 274966
> > P> URL: https://svnweb.freebsd.org/changeset/base/274966
> > P> 
> > P> Log:
> > P>   Add a sysctl `net.link.tap.deladdrs_on_close' to configure whether tap
> > P>   should delete configured addresses and routes when the interface is
> > P>   closed.  Default is enabled (preserve current behaviour).
> > P> 
> > P>   MFC after: 1 week
> > 
> > Any time I see yet another sysctl knob added I ask myself: what if I want
> > this feature on tap0 but doesn't want it on tap1? What if want it on host,
> > but doesn't want it on vmnet-enabled jail? Where from could I learn about
> > this sysctl if I am not subscribed to svn-src-*@?
> 
> I admit that this one was a hack written in anger a while back.  When I
> hacked this, I was struggling with a bunch of bhyve instances with
> fiddly point to point routes and every time I restarted a bhyve, I'd
> have to fix my routing table again.  That got frustrating quickly.  Not
> an excuse.  Just an explanation.
> 
> > Of course adding a sysctl knob is faster and easier for a FreeBSD hacker.
> > But is it a better for a FreeBSD user? Are we making OS for just ourselves?
> > 
> > Look, we've got tapifioctl(). If you are too lazy to introduce new
> > ioctl command and code it support in ifconfig, in this case you can just
> > use any of IFF_LINK0, IFF_LINK1, IFF_LINK2 flag to toggle this feature
> > via SIOCSIFFLAGS.  And then document it in tap(4).
> 
> Note that I semi-purposely didn't document this in tap(4).  I should
> have pointed that out in the commit message, sorry.  When I wrote this,

Can you update the description of the sysctl?  That way when we want
to remove it, we can...  Any sysctl that makes a release is an API that
we need to provide compatibility for... :(

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

 "All that I will do, has been done, All that I have, has not."
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275087 - head/kerberos5/lib/libkrb5

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:43:17 2014
New Revision: 275087
URL: https://svnweb.freebsd.org/changeset/base/275087

Log:
  Remove now useless USEPRIVATELIB

Modified:
  head/kerberos5/lib/libkrb5/Makefile

Modified: head/kerberos5/lib/libkrb5/Makefile
==
--- head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 22:39:59 2014
(r275086)
+++ head/kerberos5/lib/libkrb5/Makefile Tue Nov 25 22:43:17 2014
(r275087)
@@ -626,4 +626,3 @@ CFLAGS+=-I${KRB5DIR}/lib/krb5 \
 .include 
 
 .PATH: ${KRB5DIR}/lib/krb5 ${KRB5DIR}/lib/asn1 ${KRB5DIR}/include 
${.CURDIR}/../../include ${KRB5DIR}/doc/doxyout/krb5/man/man3/
-USEPRIVATELIB= heimipcc
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275088 - in head/tools/tools: mwl/mwlstats npe/npestats

2014-11-25 Thread Baptiste Daroussin
Author: bapt
Date: Tue Nov 25 22:45:35 2014
New Revision: 275088
URL: https://svnweb.freebsd.org/changeset/base/275088

Log:
  Convert to LIBADD

Modified:
  head/tools/tools/mwl/mwlstats/Makefile
  head/tools/tools/npe/npestats/Makefile

Modified: head/tools/tools/mwl/mwlstats/Makefile
==
--- head/tools/tools/mwl/mwlstats/Makefile  Tue Nov 25 22:43:17 2014
(r275087)
+++ head/tools/tools/mwl/mwlstats/Makefile  Tue Nov 25 22:45:35 2014
(r275088)
@@ -5,8 +5,7 @@ BINDIR= /usr/local/bin
 MAN=
 
 SRCS=  main.c mwlstats.c
-USEPRIVATELIB=
-LDADD=-lbsdstat
+LIBADD=bsdstat
 
 .include 
 

Modified: head/tools/tools/npe/npestats/Makefile
==
--- head/tools/tools/npe/npestats/Makefile  Tue Nov 25 22:43:17 2014
(r275087)
+++ head/tools/tools/npe/npestats/Makefile  Tue Nov 25 22:45:35 2014
(r275088)
@@ -4,7 +4,6 @@ PROG=   npestats
 SRCS=  main.c npestats.c
 BINDIR=/usr/local/bin
 MAN=
-USEPRIVATELIB=
-LDADD= -lbsdstat
+LIBADD=bsdstat
 
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2014-11-25 Thread Xin LI
Author: delphij
Date: Wed Nov 26 02:20:25 2014
New Revision: 275096
URL: https://svnweb.freebsd.org/changeset/base/275096

Log:
  Revert r273060 per discussion with avg@ as we need to make L2ARC
  aware of 4K devices and this one is not the right fix anyway.

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Nov 26 
00:58:36 2014(r275095)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Wed Nov 26 
02:20:25 2014(r275096)
@@ -5274,7 +5274,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_de
ARCSTAT_INCR(arcstat_l2_write_bytes, write_asize);
ARCSTAT_INCR(arcstat_l2_size, write_sz);
ARCSTAT_INCR(arcstat_l2_asize, write_asize);
-   vdev_space_update(dev->l2ad_vdev, write_psize, 0, 0);
+   vdev_space_update(dev->l2ad_vdev, write_asize, 0, 0);
 
/*
 * Bump device hand to the device start if it is approaching the end.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r275101 - in head/sys/dev: ahci ata ata/chipsets ichsmb ichwd sound/pci/hda uart usb/controller

2014-11-25 Thread Alexander Motin
Author: mav
Date: Wed Nov 26 04:23:21 2014
New Revision: 275101
URL: https://svnweb.freebsd.org/changeset/base/275101

Log:
  Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
  
  MFC after:1 week

Modified:
  head/sys/dev/ahci/ahci_pci.c
  head/sys/dev/ata/ata-pci.h
  head/sys/dev/ata/chipsets/ata-intel.c
  head/sys/dev/ichsmb/ichsmb_pci.c
  head/sys/dev/ichwd/ichwd.c
  head/sys/dev/ichwd/ichwd.h
  head/sys/dev/sound/pci/hda/hdac.c
  head/sys/dev/sound/pci/hda/hdac.h
  head/sys/dev/uart/uart_bus_pci.c
  head/sys/dev/usb/controller/ehci_pci.c
  head/sys/dev/usb/controller/xhci_pci.c

Modified: head/sys/dev/ahci/ahci_pci.c
==
--- head/sys/dev/ahci/ahci_pci.cWed Nov 26 03:38:12 2014
(r275100)
+++ head/sys/dev/ahci/ahci_pci.cWed Nov 26 04:23:21 2014
(r275101)
@@ -148,6 +148,14 @@ static struct {
{0x8c078086, 0x00, "Intel Lynx Point (RAID)",   0},
{0x8c0e8086, 0x00, "Intel Lynx Point (RAID)",   0},
{0x8c0f8086, 0x00, "Intel Lynx Point (RAID)",   0},
+   {0x8c828086, 0x00, "Intel Wildcat Point",   0},
+   {0x8c838086, 0x00, "Intel Wildcat Point",   0},
+   {0x8c848086, 0x00, "Intel Wildcat Point (RAID)",0},
+   {0x8c858086, 0x00, "Intel Wildcat Point (RAID)",0},
+   {0x8c868086, 0x00, "Intel Wildcat Point (RAID)",0},
+   {0x8c878086, 0x00, "Intel Wildcat Point (RAID)",0},
+   {0x8c8e8086, 0x00, "Intel Wildcat Point (RAID)",0},
+   {0x8c8f8086, 0x00, "Intel Wildcat Point (RAID)",0},
{0x8d028086, 0x00, "Intel Wellsburg",   0},
{0x8d048086, 0x00, "Intel Wellsburg (RAID)",0},
{0x8d068086, 0x00, "Intel Wellsburg (RAID)",0},

Modified: head/sys/dev/ata/ata-pci.h
==
--- head/sys/dev/ata/ata-pci.h  Wed Nov 26 03:38:12 2014(r275100)
+++ head/sys/dev/ata/ata-pci.h  Wed Nov 26 04:23:21 2014(r275101)
@@ -275,6 +275,19 @@ struct ata_pci_controller {
 #define ATA_LPT_R5 0x8c0e8086
 #define ATA_LPT_R6 0x8c0f8086
 
+#define ATA_WCPT_S10x8c808086
+#define ATA_WCPT_S20x8c818086
+#define ATA_WCPT_AH1   0x8c828086
+#define ATA_WCPT_AH2   0x8c838086
+#define ATA_WCPT_R10x8c848086
+#define ATA_WCPT_R20x8c858086
+#define ATA_WCPT_R30x8c868086
+#define ATA_WCPT_R40x8c878086
+#define ATA_WCPT_S30x8c888086
+#define ATA_WCPT_S40x8c898086
+#define ATA_WCPT_R50x8c8e8086
+#define ATA_WCPT_R60x8c8f8086
+
 #define ATA_WELLS_S1   0x8d008086
 #define ATA_WELLS_S2   0x8d088086
 #define ATA_WELLS_S3   0x8d608086

Modified: head/sys/dev/ata/chipsets/ata-intel.c
==
--- head/sys/dev/ata/chipsets/ata-intel.c   Wed Nov 26 03:38:12 2014
(r275100)
+++ head/sys/dev/ata/chipsets/ata-intel.c   Wed Nov 26 04:23:21 2014
(r275101)
@@ -227,6 +227,18 @@ ata_intel_probe(device_t dev)
  { ATA_LPT_S4,   0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" },
  { ATA_LPT_R5,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
  { ATA_LPT_R6,   0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" },
+ { ATA_WCPT_S1,  0, INTEL_6CH,  0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_S2,  0, INTEL_6CH,  0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R1,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R2,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R3,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R4,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_S3,  0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_S4,  0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R5,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
+ { ATA_WCPT_R6,  0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" },
  { ATA_WELLS_S1, 0, INTEL_6CH,  0, ATA_SA300, "Wellsburg" },
  { ATA_WELLS_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Wellsburg" },
  { ATA_WELLS_S3, 0, INTEL_6CH,  0, ATA_SA300, "Wellsburg" },

Modified: head/sys/dev/ichsmb/ichsmb_pci.c
==
--- head/sys/dev/ichsmb/ichsmb_pci.cWed Nov 26 03:38:12 2014
(r275100)
+++ head/sys/dev/ichsmb/ichsmb_pci.cWed Nov 26 04:23:21 2014
(r275101)
@@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$");
 #define ID_AVOTON  0x1f3c8086
 #define ID_COLETOCRK   0x23B08086 
 #define ID_LPT