svn commit: r297005 - head

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 02:59:10 2016
New Revision: 297005
URL: https://svnweb.freebsd.org/changeset/base/297005

Log:
  Forgot lib32 libdevinfo.so.5

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Fri Mar 18 02:56:07 2016(r297004)
+++ head/ObsoleteFiles.inc  Fri Mar 18 02:59:10 2016(r297005)
@@ -40,6 +40,7 @@
 
 # 20160317: rman_res_t size bump to uintmax_t
 OLD_LIBS+=usr/lib/libdevinfo.so.5
+OLD_LIBS+=usr/lib32/libdevinfo.so.5
 # 20160305: new clang import which bumps version from 3.7.1 to 3.8.0.
 OLD_FILES+=usr/bin/macho-dump
 OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296968 - in head/contrib/libxo: . bin build libxo

2016-03-19 Thread David E. O'Brien
Author: obrien
Date: Wed Mar 16 23:59:29 2016
New Revision: 296968
URL: https://svnweb.freebsd.org/changeset/base/296968

Log:
  Bring down 0.4.5 vendor files and other catchups with the distribution 
tarball.
  
  Reviewed by:  phil

Added:
 - copied unchanged from r296967, 
vendor/Juniper/libxo/dist/libxo/xo_config.h.in
Directory Properties:
  head/contrib/libxo/libxo/xo_config.h.in   (props changed)
Deleted:
  head/contrib/libxo/bin/
  head/contrib/libxo/build/
Modified:
  head/contrib/libxo/install-sh

Modified: head/contrib/libxo/install-sh
==
--- head/contrib/libxo/install-sh   Wed Mar 16 23:50:41 2016
(r296967)
+++ head/contrib/libxo/install-sh   Wed Mar 16 23:59:29 2016
(r296968)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""   $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-if (set -f) 2>/dev/null; then
-  posix_glob=
-else
-  posix_glob=:
-fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
 -d) dir_arg=true;;
 
 -g) chgrpcmd="$chgrpprog $2"
-   shift;;
+shift;;
 
 --help) echo "$usage"; exit $?;;
 
 -m) mode=$2
-   case $mode in
- *' '* | *''* | *'
-'*   | *'*'* | *'?'* | *'['*)
-   echo "$0: invalid mode: $mode" >&2
-   exit 1;;
-   esac
-   shift;;
+case $mode in
+  *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+echo "$0: invalid mode: $mode" >&2
+exit 1;;
+esac
+shift;;
 
 -o) chowncmd="$chownprog $2"
-   shift;;
+shift;;
 
 -s) stripcmd=$stripprog;;
 
--t) dst_arg=$2
-   # Protect names problematic for 'test' and other utilities.
-   case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
-   esac
-   shift;;
+-t)
+is_target_a_directory=always
+dst_arg=$2
+# Protect names problematic for 'test' and other utilities.
+case $dst_arg in
+  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+esac
+shift;;
 
--T) no_target_directory=true;;
+-T) is_target_a_directory=never;;
 
 --version) echo "$0 $scriptversion"; exit $?;;
 
---)shift
-   break;;
+--) shift
+break;;
 
--*)echo "$0: invalid option: $1" >&2
-   exit 1;;
+-*) echo "$0: invalid option: $1" >&2
+exit 1;;
 
 *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+echo "$0: target directory not allowed when installing a directory." >&2
+exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+if test ! -d "$dst_arg"; then
+  echo "$0: $dst_arg: Is not a directory." >&2
+  exit 1
+fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
 *[0-7])
   if test -z "$stripcmd"; then
-   u_plus_rw=
+u_plus_rw=
   else
-   u_plus_rw='% 200'
+u_plus_rw='% 200'
   fi
   cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
 *)
   if test -z "$stripcmd"; then
-   u_plus_rw=
+u_plus_rw=
   else
-   u_plus_rw=,u+rw
+u_plus_rw=,u+rw
   fi
   cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 

svn commit: r297058 - in head/sys: dev/urtwn dev/usb/wlan modules modules/urtwn modules/urtwnfw modules/usb modules/usb/urtwn modules/usb/urtwnfw

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Sun Mar 20 03:54:57 2016
New Revision: 297058
URL: https://svnweb.freebsd.org/changeset/base/297058

Log:
  [urtwn] migrate urtwn out into sys/dev/urtwn/ .
  
  There's some upcoming work to add new chipset support here and I'd
  like to only add 802.11n support to one driver, instead of both
  urtwn and rtwn.
  
  There's also missing support for things like 802.11n, some powersave
  work, bluetooth integration/coexistence, etc, and also newer parts
  (like 8192EU, maybe some 11ac parts, not sure yet.)
  
  So, this is hopefully the first step in a longer set of steps to unify
  rtwn/urtwn and extend it with more interesting chipset and functionality
  support.
  
  Reviewed by:  kevlo

Added:
  head/sys/dev/urtwn/
  head/sys/dev/urtwn/if_urtwn.c
 - copied, changed from r297057, head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/urtwn/if_urtwnreg.h
 - copied unchanged from r297057, head/sys/dev/usb/wlan/if_urtwnreg.h
  head/sys/dev/urtwn/if_urtwnvar.h
 - copied unchanged from r297057, head/sys/dev/usb/wlan/if_urtwnvar.h
  head/sys/modules/urtwn/
 - copied from r297057, head/sys/modules/usb/urtwn/
  head/sys/modules/urtwnfw/
 - copied from r297057, head/sys/modules/usb/urtwnfw/
Deleted:
  head/sys/dev/usb/wlan/if_urtwn.c
  head/sys/dev/usb/wlan/if_urtwnreg.h
  head/sys/dev/usb/wlan/if_urtwnvar.h
  head/sys/modules/usb/urtwn/
  head/sys/modules/usb/urtwnfw/
Modified:
  head/sys/modules/Makefile
  head/sys/modules/urtwn/Makefile
  head/sys/modules/urtwnfw/Makefile.inc
  head/sys/modules/usb/Makefile

Copied and modified: head/sys/dev/urtwn/if_urtwn.c (from r297057, 
head/sys/dev/usb/wlan/if_urtwn.c)
==
--- head/sys/dev/usb/wlan/if_urtwn.cSun Mar 20 03:27:06 2016
(r297057, copy source)
+++ head/sys/dev/urtwn/if_urtwn.c   Sun Mar 20 03:54:57 2016
(r297058)
@@ -78,8 +78,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#include 
-#include 
+#include 
+#include 
 
 #ifdef USB_DEBUG
 enum {

Copied: head/sys/dev/urtwn/if_urtwnreg.h (from r297057, 
head/sys/dev/usb/wlan/if_urtwnreg.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/urtwn/if_urtwnreg.hSun Mar 20 03:54:57 2016
(r297058, copy of r297057, head/sys/dev/usb/wlan/if_urtwnreg.h)
@@ -0,0 +1,2176 @@
+/*-
+ * Copyright (c) 2010 Damien Bergamini 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ * 
+ * $OpenBSD: if_urtwnreg.h,v 1.3 2010/11/16 18:02:59 damien Exp $
+ * $FreeBSD$
+ */
+
+#define URTWN_CONFIG_INDEX 0
+#define URTWN_IFACE_INDEX  0
+
+#defineURTWN_NOISE_FLOOR   -95
+
+#define R92C_MAX_CHAINS2
+
+/* Maximum number of output pipes is 3. */
+#define R92C_MAX_EPOUT 3
+
+#define R92C_MAX_TX_PWR0x3f
+
+#define R92C_PUBQ_NPAGES   231
+#define R92C_TXPKTBUF_COUNT256
+#define R92C_TX_PAGE_COUNT 248
+#define R92C_TX_PAGE_BOUNDARY  (R92C_TX_PAGE_COUNT + 1)
+#define R88E_TXPKTBUF_COUNT177
+#define R88E_TX_PAGE_COUNT 169
+#define R88E_TX_PAGE_BOUNDARY  (R88E_TX_PAGE_COUNT + 1)
+
+#define R92C_H2C_NBOX  4
+
+/* USB Requests. */
+#define R92C_REQ_REGS  0x05
+
+/*
+ * MAC registers.
+ */
+/* System Configuration. */
+#define R92C_SYS_ISO_CTRL  0x000
+#define R92C_SYS_FUNC_EN   0x002
+#define R92C_APS_FSMCO 0x004
+#define R92C_SYS_CLKR  0x008
+#define R92C_AFE_MISC  0x010
+#define R92C_SPS0_CTRL 0x011
+#define R92C_SPS_OCP_CFG   0x018
+#define R92C_RSV_CTRL  0x01c
+#define R92C_RF_CTRL   0x01f
+#define R92C_LDOA15_CTRL   0x020
+#define R92C_LDOV12D_CTRL  0x021
+#define R92C_LDOHCI12_CTRL 0x022
+#define R92C_LPLDO_CTRL0x023
+#define R92C_AFE_XTAL_CTRL 0x024
+#define R92C_AFE_PLL_CTRL  0x028
+#define R92C_EFUSE_CTRL0x030
+#define R92C_EFUSE_TEST0x034
+#define R92C_PWR_DATA  0x038
+#define R92C_CAL_TIMER 0x03c
+#define R92C_ACLK_MON  0x03e

svn commit: r297037 - head/sys/kern

2016-03-19 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Mar 18 19:04:01 2016
New Revision: 297037
URL: https://svnweb.freebsd.org/changeset/base/297037

Log:
  aio_qphysio(): Avoid uninitialized pointer read on error.
  
  For the !unmap case it may happen that pbuf gets called unreferenced
  when vm_fault_quick_hold_pages() fails.
  Initialize it so it doesn't cause trouble.
  
  CID:  1352776
  Reviewed by:  jhb
  MFC after:1 week

Modified:
  head/sys/kern/vfs_aio.c

Modified: head/sys/kern/vfs_aio.c
==
--- head/sys/kern/vfs_aio.c Fri Mar 18 18:26:07 2016(r297036)
+++ head/sys/kern/vfs_aio.c Fri Mar 18 19:04:01 2016(r297037)
@@ -1226,7 +1226,8 @@ aio_qphysio(struct proc *p, struct kaioc
if (!unmap) {
job->pbuf = pbuf = (struct buf *)getpbuf(NULL);
BUF_KERNPROC(pbuf);
-   }
+   } else
+   pbuf = NULL;
 
AIO_LOCK(ki);
if (!unmap)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297016 - head/etc/autofs

2016-03-19 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Mar 18 09:54:09 2016
New Revision: 297016
URL: https://svnweb.freebsd.org/changeset/base/297016

Log:
  Add a special case for NTFS to the -media autofs(5) map.
  
  Submitted by: lme@ (earlier version)
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/etc/autofs/special_media

Modified: head/etc/autofs/special_media
==
--- head/etc/autofs/special_media   Fri Mar 18 09:17:54 2016
(r297015)
+++ head/etc/autofs/special_media   Fri Mar 18 09:54:09 2016
(r297016)
@@ -32,6 +32,26 @@ print_available() {
 }
 
 # Print a single map entry.
+print_map_entry() {
+   local _fstype _p
+
+   _fstype="$1"
+   _p="$2"
+
+   if [ "${_fstype}" = "ntfs" ]; then
+   if [ -f "/usr/local/bin/ntfs-3g" ]; then
+   echo 
"-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid:/dev/${_p}" 
+   else
+   /usr/bin/logger -p info -t "special_media[$$]" \
+   "Cannot mount ${_fstype} formatted device 
/dev/${_p}: Install sysutils/fusefs-ntfs first"
+   exit 1
+   fi
+   else
+   echo "-fstype=${_fstype},nosuid :/dev/${_p}" 
+   fi
+}
+
+# Determine map entry contents for the given key and print out the entry.
 print_one() {
local _fstype _fstype_and_label _label _key _p
 
@@ -39,7 +59,7 @@ print_one() {
 
_fstype="$(fstyp "/dev/${_key}" 2> /dev/null)"
if [ $? -eq 0 ]; then
-   echo "-fstype=${_fstype},nosuid :/dev/${_key}" 
+   print_map_entry "${_fstype}" "${_key}"
return
fi
 
@@ -67,7 +87,7 @@ print_one() {
continue
fi
 
-   echo "-fstype=${_fstype},nosuid :/dev/${_p}" 
+   print_map_entry "${_fstype}" "${_p}"
done
 
# No matching device - don't print anything, autofs will handle it.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296909 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2016-03-19 Thread John Baldwin
On Wednesday, March 16, 2016 03:37:09 PM Adrian Chadd wrote:
> I've fought this problem in USB drivers. Ideally you'd also have the
> detach path /also/ take said lock and drain anyone currently doing
> anything active (tx, rx, ioctls, net80211 methods, etc) to completion
> before continuing.
> 
> A lot of drivers don't do this very well, or at all.

There isn't a lock to take in detach to hold over drains.  Instead, the
various detach APIs (like if_detach) need to drain internally.  Only the
ifnet layer can keep track of if an ifnet is currently "busy" (any methods
currently executing for example).  You can't do that in the driver.  This is
why bus_teardown_intr() does a drain for example (as well as
callout_drain()).  destroy_dev() also handles this more correctly as it
does a drain (and drivers can even provide a d_purge callback to wakeup any
waiters inside of cdevsw methods during the drain).  if_detach() doesn't do
any drain at all and is broken.  It has to be fixed in the ifnet layer.
Changes in drivers are just band-aids (the current band-aids in this commit
and in other NIC drivers previously only hide witness warnings, they do
nothing to solve the problem of some thread that is already inside of
an if_foo method still running when detach is called, particularly if an
if_foo method can sleep).

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


svn commit: r297057 - head/usr.bin/localedef

2016-03-19 Thread Pedro F. Giffuni
Author: pfg
Date: Sun Mar 20 03:27:06 2016
New Revision: 297057
URL: https://svnweb.freebsd.org/changeset/base/297057

Log:
  localedef(1): minor sorting to match Illumos.
  
  Illumos recently included space in 'print' class. We already had
  this but the code had slight sorting differences. Move it some
  lines up to reduce diffs with Illumos.
  
  No functional change.
  
  Reference:
  https://illumos.org/issues/5227

Modified:
  head/usr.bin/localedef/ctype.c

Modified: head/usr.bin/localedef/ctype.c
==
--- head/usr.bin/localedef/ctype.c  Sun Mar 20 03:09:01 2016
(r297056)
+++ head/usr.bin/localedef/ctype.c  Sun Mar 20 03:27:06 2016
(r297057)
@@ -332,14 +332,14 @@ dump_ctype(void)
ctn->ctype |= _ISLOWER;
if ((wc >= '0') && (wc <= '9'))
ctn->ctype |= _ISDIGIT;
+   if (wc == ' ')
+   ctn->ctype |= _ISPRINT;
if (strchr(" \f\n\r\t\v", (char)wc) != NULL)
ctn->ctype |= _ISSPACE;
if (strchr("0123456789ABCDEFabcdef", (char)wc) != NULL)
ctn->ctype |= _ISXDIGIT;
if (strchr(" \t", (char)wc))
ctn->ctype |= _ISBLANK;
-   if (wc == ' ')
-   ctn->ctype |= _ISPRINT;
 
/*
 * Technically these settings are only
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297008 - head/sys/net80211

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 18 04:00:57 2016
New Revision: 297008
URL: https://svnweb.freebsd.org/changeset/base/297008

Log:
  [net80211] IE 127 is not MESHEXTCAP, just EXTCAP.
  
  It's not a mesh extended capabilities; it's just extended capabilities.
  This is from 802.11-2012 8.4.2.29 (Extended Capabilities element.)

Modified:
  head/sys/net80211/ieee80211.h
  head/sys/net80211/ieee80211_input.c

Modified: head/sys/net80211/ieee80211.h
==
--- head/sys/net80211/ieee80211.h   Fri Mar 18 03:55:57 2016
(r297007)
+++ head/sys/net80211/ieee80211.h   Fri Mar 18 04:00:57 2016
(r297008)
@@ -877,7 +877,7 @@ enum {
IEEE80211_ELEMID_MESHGANN   = 125,
IEEE80211_ELEMID_MESHRANN   = 126,
/* 127 Extended Capabilities */
-   IEEE80211_ELEMID_MESHEXTCAP = 127,
+   IEEE80211_ELEMID_EXTCAP = 127,
/* 128-129 reserved */
IEEE80211_ELEMID_MESHPREQ   = 130,
IEEE80211_ELEMID_MESHPREP   = 131,

Modified: head/sys/net80211/ieee80211_input.c
==
--- head/sys/net80211/ieee80211_input.c Fri Mar 18 03:55:57 2016
(r297007)
+++ head/sys/net80211/ieee80211_input.c Fri Mar 18 04:00:57 2016
(r297008)
@@ -603,9 +603,10 @@ ieee80211_parse_beacon(struct ieee80211_
case IEEE80211_ELEMID_MESHCONF:
scan->meshconf = frm;
break;
-   case IEEE80211_ELEMID_MESHEXTCAP:
-   break;
 #endif
+   /* Extended capabilities; nothing handles it for now */
+   case IEEE80211_ELEMID_EXTCAP:
+   break;
case IEEE80211_ELEMID_VENDOR:
if (iswpaoui(frm))
scan->wpa = frm;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296881 - in head: contrib/bsnmp/snmp_mibII sys/netinet

2016-03-19 Thread Shawn Webb
On Wed, Mar 16, 2016 at 04:14:22PM +0100, Hans Petter Selasky wrote:
> On 03/16/16 16:05, Shawn Webb wrote:
> > This breaks the build on amd64:
> 
> I believe this is fixed by r296935.

You're right. My src tree was outdated. Thanks!

-- 
Shawn Webb
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: svn commit: r296927 - in head: share/man/man9 sys/kern sys/sys

2016-03-19 Thread Bjoern A. Zeeb

On Wed, 16 Mar 2016, Conrad E. Meyer wrote:


Author: cem
Date: Wed Mar 16 04:22:32 2016
New Revision: 296927
URL: https://svnweb.freebsd.org/changeset/base/296927

Log:
 fail(9): Upstreaming some fail point enhancements

 This is several year's worth of fail point upgrades done at EMC Isilon. They
 are interdependent enough that it makes sense to put a single diff up for them.
 Primarily, we added:

 - Changing all mainline execution paths to be lockless, which lets us use fail
   points in more sleep-sensitive areas, and allows more parallel execution
 - A number of additional commands, including 'pause' that lets us do some
   interesting deterministic repros of race conditions
 - The ability to dump the stacks of all threads sleeping on a fail point
 - A number of other API changes to allow marking up the fail point's context in
   the code, and firing callbacks before and after execution
 - A man page update

 Submitted by:  Matthew Bryan 
 Reviewed by:   cem (earlier version), jhb, kib, pho
 With feedback from:bdrewery
 Sponsored by:  EMC / Isilon Storage Division
 Differential Revision: https://reviews.freebsd.org/D5427

Modified:
 head/share/man/man9/fail.9
 head/sys/kern/kern_fail.c
 head/sys/kern/subr_sleepqueue.c
 head/sys/sys/fail.h
 head/sys/sys/sleepqueue.h


This seems to have broken a few kernel configs (just one example);

linking kernel.full
subr_sleepqueue.o: In function `sleepq_sbuf_print_stacks':
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448): undefined 
reference to `stack_create'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448): relocation 
truncated to fit: R_MIPS_26 against `stack_create'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504): undefined 
reference to `stack_save_td'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504): relocation 
truncated to fit: R_MIPS_26 against `stack_save_td'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598): undefined 
reference to `stack_sbuf_print'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598): relocation 
truncated to fit: R_MIPS_26 against `stack_sbuf_print'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0): undefined 
reference to `stack_destroy'
/scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0): relocation 
truncated to fit: R_MIPS_26 against `stack_destroy'
--- kernel.full ---
*** [kernel.full] Error code 1

bmake[5]: stopped in 
/storage/head/obj/mips.mipsn32/scratch/tmp/bz/head.svn/sys/XLPN32
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296950 - head/sys/dev/cxgbe/firmware

2016-03-19 Thread Navdeep Parhar
Author: np
Date: Wed Mar 16 19:41:00 2016
New Revision: 296950
URL: https://svnweb.freebsd.org/changeset/base/296950

Log:
  cxgbe(4): Update some register settings in the default configuration
  files to match the "uwire" configuration.

Modified:
  head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
  head/sys/dev/cxgbe/firmware/t5fw_cfg.txt

Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:36:11 2016
(r296949)
+++ head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:41:00 2016
(r296950)
@@ -10,7 +10,7 @@
 
 [global]
rss_glb_config_mode = basicvirtual
-   rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp
+   rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
 
sge_timer_value = 1, 5, 10, 50, 100, 200# usecs
 
@@ -20,28 +20,29 @@
# disable TP_PARA_REG3.RxFragEn
reg[0x7d6c] = 0x/0x7000
 
-   # TP_SHIFT_CNT
-   reg[0x7dc0] = 0x62f8849
+   reg[0x7dc0] = 0x0e2f8849# TP_SHIFT_CNT
 
filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
filterMask = protocol, fcoe
 
-   # TP rx and tx channels (0 = auto).
+   tp_pmrx = 38, 512
+   tp_pmrx_pagesize = 64K
+
+   # TP number of RX channels (0 = auto)
tp_nrxch = 0
-   tp_ntxch = 0
 
-   # TP rx and tx payload memory (% of the total EDRAM + DDR3).
-   tp_pmrx = 38, 512
tp_pmtx = 60, 512
-   tp_pmrx_pagesize = 64K
tp_pmtx_pagesize = 64K
 
-   # cluster, lan, or wan.
-   tp_tcptuning = lan
+   # TP number of TX channels (0 = auto)
+   tp_ntxch = 0
 
# TP OFLD MTUs
tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 
4096, 4352, 8192, 9000, 9600
 
+   # cluster, lan, or wan.
+   tp_tcptuning = lan
+
 # PFs 0-3.  These get 8 MSI/8 MSI-X vectors each.  VFs are supported by
 # these 4 PFs only.  Not used here at all.
 [function "0"]
@@ -166,7 +167,7 @@
 
 [fini]
version = 0x1
-   checksum = 0x98210e18
+   checksum = 0x5a34a3ce
 #
 # $FreeBSD$
 #

Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:36:11 2016
(r296949)
+++ head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:41:00 2016
(r296950)
@@ -10,12 +10,33 @@
 
 [global]
rss_glb_config_mode = basicvirtual
-   rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp
+   rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp
 
# PL_TIMEOUT register
-   pl_timeout_value = 200  # the timeout value in units of us
+   pl_timeout_value = 1# the timeout value in units of us
 
-   sge_timer_value = 1, 5, 10, 50, 100, 200# usecs
+   # SGE_THROTTLE_CONTROL
+   bar2throttlecount = 500 # bar2throttlecount in us
+
+   sge_timer_value = 1, 5, 10, 50, 100, 200# SGE_TIMER_VALUE* in 
usecs
+
+   reg[0x1124] = 0x0400/0x0400 # SGE_CONTROL2, enable VFIFO; if
+   # SGE_VFIFO_SIZE is not set, then
+   # firmware will set it up in function
+   # of number of egress queues used
+
+   reg[0x1130] = 0x00d5ffeb# SGE_DBP_FETCH_THRESHOLD, fetch
+   # threshold set to queue depth
+   # minus 128-entries for FL and HP
+   # queues, and 0xfff for LP which
+   # prompts the firmware to set it up
+   # in function of egress queues
+   # used
+
+   reg[0x113c] = 0x0002ffc0# SGE_VFIFO_SIZE, set to 0x2ffc0 which
+   # prompts the firmware to set it up in
+   # function of number of egress queues
+   # used 
 
# enable TP_OUT_CONFIG.IPIDSPLITMODE
reg[0x7d04] = 0x0001/0x0001
@@ -26,34 +47,38 @@
# enable TP_PARA_REG6.EnableCSnd
reg[0x7d78] = 0x0400/0x
 
-   # TP_SHIFT_CNT
-   reg[0x7dc0] = 0x62f8849
-
-   # TP_GLOBAL_CONFIG
-   reg[0x7d08] = 0x0800/0x0800 # set IssFromCplEnable
-
-   # TP_PARA_REG0
-   reg[0x7d60] = 0x0600/0x0700 # set InitCWND to 6
+   reg[0x7dc0] = 0x0e2f8849# TP_SHIFT_CNT
 
filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
filterMask = protocol, fcoe
 
-   # TP rx and tx channels (0 = auto).
+   tp_pmrx = 38, 512
+   tp_pmrx_pagesize = 64K
+
+   # TP number of RX 

Re: svn commit: r296909 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2016-03-19 Thread Hans Petter Selasky

On 03/15/16 18:43, John Baldwin wrote:

On Tuesday, March 15, 2016 03:47:26 PM Hans Petter Selasky wrote:

Author: hselasky
Date: Tue Mar 15 15:47:26 2016
New Revision: 296909
URL: https://svnweb.freebsd.org/changeset/base/296909

Log:
   Fix witness panic in the ipoib_ioctl() function when unloading the
   ipoib module.

   The bpfdetach() function is trying to turn off promiscious mode on the
   network interface it is attached to while holding a mutex. The fix
   consists of ignoring any further calls to the ipoib_ioctl() function
   when the network interface is going to be detached. The ipoib_ioctl()
   function might sleep.

   Sponsored by:Mellanox Technologies
   MFC after:   1 week


In all of the other NIC drivers I have worked on the fix has been to call
if_detach (or ether_ifdetach) as the first step in your detach method before
you try to stop the interface.  The idea is to remove external connections
from your driver first, and the only after those have drained do you actually
shut down the hardware.  Given you are calling if_detach() just before
if_free() below, ipoib just seems to be broken here.


Hi John,

It is a problem that if_ioctl() callbacks come from various places 
without proper refcounting and unknown context properties, like sleeping 
allowed or not.


The WITNESS assert I'm trying to solve is this one:


db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe04661876c0
ipoib_ioctl() at ipoib_ioctl+0x29/frame 0xfe0466187700
if_setflag() at if_setflag+0xd5/frame 0xfe0466187760
ifpromisc() at ifpromisc+0x2c/frame 0xfe0466187790
bpf_detachd_locked() at bpf_detachd_locked+0x1e8/frame 0xfe04661877d0
bpfdetach() at bpfdetach+0x152/frame 0xfe0466187810
ipoib_detach() at ipoib_detach+0x42/frame 0xfe0466187830
ipoib_remove_one() at ipoib_remove_one+0x19e/frame 0xfe04661878a0
ib_unregister_client() at ib_unregister_client+0x5e/frame 0xfe04661878e0
ipoib_cleanup_module() at ipoib_cleanup_module+0x52/frame 0xfe04661878f0
_module_run() at _module_run+0x7b/frame 0xfe0466187920
linker_file_unload() at linker_file_unload+0x45f/frame 0xfe0466187970
kern_kldunload() at kern_kldunload+0xbc/frame 0xfe04661879a0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfe0466187ab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe0466187ab0



As you can see bpfdetach() is calling ifpromisc() locked, which 
basically means we cannot do anything there with regard to ipoib.


ipoib is not a NIC driver, but an IP-bearer only.

Comparing with PCI devices is not valid here, because with a PCI device 
you usually only need to write a PCI register to switch promiscious mode 
on/off, but with IPOIB it involves commands towards the infiniband stack 
which might sleep.



For example, detach in a typical NIC driver does this:

struct foo_softc *sc;

sc = device_get_softc(dev);
ether_ifdetach(sc->sc_ifp);
FOO_LOCK(sc);
foo_stop(sc);
FOO_UNLOCK(sc);
callout_drain(>timer);
bus_teardown_intr(...);
bus_release_resource(...);
if_free(sc->sc_ifp);

Similarly, devices with a character device in /dev should be calling
destroy_dev() first before shutting down hardware, etc.


Right. The problem is not really the detach sequence, but that 
bpfdetach() calls ifpromisc() locked. I'm not sure if we can change that.


--HPS

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


Re: svn commit: r296918 - head/sys/fs/autofs

2016-03-19 Thread Edward Tomasz Napierala
You're right.  I've added the explicit cast to void, let's see
if that helps.

On 0315T1346, Conrad Meyer wrote:
> Instead you will get, "warning: unused but set variable 'error'" on
> -NODEBUG builds.  Maybe add:
> 
> (void)error;
> 
> Best,
> Conrad
> 
> On Tue, Mar 15, 2016 at 1:42 PM, Edward Tomasz Napierala
>  wrote:
> > Author: trasz
> > Date: Tue Mar 15 20:42:36 2016
> > New Revision: 296918
> > URL: https://svnweb.freebsd.org/changeset/base/296918
> >
> > Log:
> >   Pacify Coverity.
> >
> >   MFC after:1 month
> >   Sponsored by: The FreeBSD Foundation
> >
> > Modified:
> >   head/sys/fs/autofs/autofs_vnops.c
> >
> > Modified: head/sys/fs/autofs/autofs_vnops.c
> > ==
> > --- head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 19:45:24 2016
> > (r296917)
> > +++ head/sys/fs/autofs/autofs_vnops.c   Tue Mar 15 20:42:36 2016
> > (r296918)
> > @@ -370,8 +370,10 @@ static size_t
> >  autofs_dirent_reclen(const char *name)
> >  {
> > size_t reclen;
> > +   int error;
> >
> > -   autofs_readdir_one(NULL, name, -1, );
> > +   error = autofs_readdir_one(NULL, name, -1, );
> > +   KASSERT(error == 0, ("autofs_readdir_one() failed"));
> >
> > return (reclen);
> >  }
> >
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297017 - head/sys/arm64/include

2016-03-19 Thread Andrew Turner
Author: andrew
Date: Fri Mar 18 10:01:25 2016
New Revision: 297017
URL: https://svnweb.freebsd.org/changeset/base/297017

Log:
  Remove the invalid L0_BLOCK definition. ARMv8 doesn't support block
  translation in the level 0 descriptor.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/include/pte.h

Modified: head/sys/arm64/include/pte.h
==
--- head/sys/arm64/include/pte.hFri Mar 18 09:54:09 2016
(r297016)
+++ head/sys/arm64/include/pte.hFri Mar 18 10:01:25 2016
(r297017)
@@ -74,7 +74,7 @@ typedef   uint64_tpt_entry_t; /* page 
ta
 /* Level 0 table, 512GiB per entry */
 #defineL0_SHIFT39
 #defineL0_INVAL0x0 /* An invalid address */
-#defineL0_BLOCK0x1 /* A block */
+   /* 0x1 Level 0 doesn't support block translation */
/* 0x2 also marks an invalid address */
 #defineL0_TABLE0x3 /* A next-level table */
 
@@ -83,16 +83,16 @@ typedef uint64_tpt_entry_t; /* page 
ta
 #defineL1_SIZE (1 << L1_SHIFT)
 #defineL1_OFFSET   (L1_SIZE - 1)
 #defineL1_INVALL0_INVAL
-#defineL1_BLOCKL0_BLOCK
+#defineL1_BLOCK0x1
 #defineL1_TABLEL0_TABLE
 
 /* Level 2 table, 2MiB per entry */
 #defineL2_SHIFT21
 #defineL2_SIZE (1 << L2_SHIFT)
 #defineL2_OFFSET   (L2_SIZE - 1)
-#defineL2_INVALL0_INVAL
-#defineL2_BLOCKL0_BLOCK
-#defineL2_TABLEL0_TABLE
+#defineL2_INVALL1_INVAL
+#defineL2_BLOCKL1_BLOCK
+#defineL2_TABLEL1_TABLE
 
 #defineL2_BLOCK_MASK   UINT64_C(0xffe0)
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2016-03-19 Thread Julian Elischer
Author: julian
Date: Fri Mar 18 09:17:54 2016
New Revision: 297015
URL: https://svnweb.freebsd.org/changeset/base/297015

Log:
  Change a little to match what appears to be the right way of specifying an 
argument
  (from looking at other man pages)
  
  MFC after:1 week
  Sponsored by:  Panzura inc

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

Modified: head/share/man/man9/SYSCALL_MODULE.9
==
--- head/share/man/man9/SYSCALL_MODULE.9Fri Mar 18 09:03:00 2016
(r297014)
+++ head/share/man/man9/SYSCALL_MODULE.9Fri Mar 18 09:17:54 2016
(r297015)
@@ -57,7 +57,9 @@ A pointer to an
 which saves the offset in
 .Vt "struct sysent"
 where the syscall is allocated.
-If the location pointed to by offset holds a non 0 number it will be used if 
possible.
+If the location pointed to by
+.Fa offset
+holds a non 0 number it will be used if possible.
 If it holds 0 then one will be assigned.
 .It Fa new_sysent
 is a pointer to a structure that specifies the function implementing
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296999 - head/sys/sys

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 01:26:55 2016
New Revision: 296999
URL: https://svnweb.freebsd.org/changeset/base/296999

Log:
  Add ummax()/ummin() to libkern.
  
  This is committed in isolation from a larger patch so that it can be MFC'd
  separately if needed.

Modified:
  head/sys/sys/libkern.h

Modified: head/sys/sys/libkern.h
==
--- head/sys/sys/libkern.h  Fri Mar 18 00:02:46 2016(r296998)
+++ head/sys/sys/libkern.h  Fri Mar 18 01:26:55 2016(r296999)
@@ -65,6 +65,16 @@ static __inline u_quad_t uqmax(u_quad_t 
 static __inline u_quad_t uqmin(u_quad_t a, u_quad_t b) { return (a < b ? a : 
b); }
 static __inline u_long ulmax(u_long a, u_long b) { return (a > b ? a : b); }
 static __inline u_long ulmin(u_long a, u_long b) { return (a < b ? a : b); }
+static __inline __uintmax_t ummax(__uintmax_t a, __uintmax_t b)
+{
+
+   return (a > b ? a : b);
+}
+static __inline __uintmax_t ummin(__uintmax_t a, __uintmax_t b)
+{
+
+   return (a < b ? a : b);
+}
 static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); }
 static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296947 - head/share/man/man9

2016-03-19 Thread Bryan Drewery
On 3/16/2016 11:45 AM, Konstantin Belousov wrote:
> On Wed, Mar 16, 2016 at 06:39:48PM +, Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Wed Mar 16 18:39:48 2016
>> New Revision: 296947
>> URL: https://svnweb.freebsd.org/changeset/base/296947
>>
>> Log:
>>   Remove incorrect BUGS entry about asserting lock not held.
>>   
>>   For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
>>   made to panic in r126316.
>>   
>>   MFC after: 1 week
>>
>> Modified:
>>   head/share/man/man9/sx.9
>>
>> Modified: head/share/man/man9/sx.9
>> ==
>> --- head/share/man/man9/sx.9 Wed Mar 16 17:35:55 2016(r296946)
>> +++ head/share/man/man9/sx.9 Wed Mar 16 18:39:48 2016(r296947)
>> @@ -26,7 +26,7 @@
>>  .\"
>>  .\" $FreeBSD$
>>  .\"
>> -.Dd March 13, 2016
>> +.Dd March 16, 2016
>>  .Dt SX 9
>>  .Os
>>  .Sh NAME
>> @@ -320,11 +320,6 @@ end up sleeping while holding a mutex, w
>>  .Xr rwlock 9 ,
>>  .Xr sema 9
>>  .Sh BUGS
>> -Currently there is no way to assert that a lock is not held.
>> -This is not possible in the
>> -.No non- Ns Dv WITNESS
>> -case for asserting that this thread
>> -does not hold a shared lock.
>>  In the
>>  .No non- Ns Dv WITNESS
>>  case, the
> The removed text was not quite correct, but its removal is not quite correct
> either.  sx (and rw) locks do not track shared owners, so in non-witness
> case only exclusive ownership by curthread triggers panic for SA_UNLOCKED
> case.  Shared ownership is silently ignored by the assert.
> 

Yes you're right. The original change for this in r125421 was checking
shared count:

> Index: head/sys/kern/kern_sx.c
> ===
> --- head/sys/kern/kern_sx.c (revision 125420)
> +++ head/sys/kern/kern_sx.c (revision 125421)
> @@ -344,6 +344,17 @@
> sx->sx_object.lo_name, file, line);
> mtx_unlock(sx->sx_lock);
> break;
> +   case SX_UNLOCKED:
> +#ifdef WITNESS
> +   witness_assert(>sx_object, what, file, line);
> +#else
> +   mtx_lock(sx->sx_lock);
> +   if (sx->sx_cnt != 0 && sx->sx_xholder == curthread)
> +   printf("Lock %s locked @ %s:%d\n",
> +   sx->sx_object.lo_name, file, line);
> +   mtx_unlock(sx->sx_lock);
> +#endif
> +   break;
> default:
> panic("Unknown sx lock assertion: %d @ %s:%d", what, file,
> line);

But it was later removed in r126003:

> Index: head/sys/kern/kern_sx.c
> ===
> --- head/sys/kern/kern_sx.c (revision 126002)
> +++ head/sys/kern/kern_sx.c (revision 126003)
> @@ -348,8 +348,12 @@
>  #ifdef WITNESS
> witness_assert(>sx_object, what, file, line);
>  #else
> +   /*
> +* We are able to check only exclusive lock here,
> +* we cannot assert that *this* thread owns slock.
> +*/
> mtx_lock(sx->sx_lock);
> -   if (sx->sx_cnt != 0 && sx->sx_xholder == curthread)
> +   if (sx->sx_xholder == curthread)
> printf("Lock %s locked @ %s:%d\n",
> sx->sx_object.lo_name, file, line);
> mtx_unlock(sx->sx_lock);


I incorrectly was looking at only the original code and the panic fix,
rather than current code to ensure it still was checking shared lock
holders.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r296967 - in head: contrib/libxo/libxo lib/libxo

2016-03-19 Thread Phil Shafer
Author: phil
Date: Wed Mar 16 23:50:41 2016
New Revision: 296967
URL: https://svnweb.freebsd.org/changeset/base/296967

Log:
  Move generated file from contrib to build directory.
  
  Reviewed by:  obrien
  Approved by:  sjg

Added:
  head/lib/libxo/xo_config.h
 - copied unchanged from r296966, head/contrib/libxo/libxo/xo_config.h
Deleted:
  head/contrib/libxo/libxo/xo_config.h
Modified:
  head/lib/libxo/Makefile

Modified: head/lib/libxo/Makefile
==
--- head/lib/libxo/Makefile Wed Mar 16 23:42:57 2016(r296966)
+++ head/lib/libxo/Makefile Wed Mar 16 23:50:41 2016(r296967)
@@ -13,7 +13,7 @@ SHLIB_MAJOR=0
 
 SRCS=  libxo.c xo_encoder.c xo_syslog.c
 
-CFLAGS+=-I${LIBXOSRC}/libxo
+CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR}
 CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\"
 
 INCS=  xo.h xo_encoder.h

Copied: head/lib/libxo/xo_config.h (from r296966, 
head/contrib/libxo/libxo/xo_config.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libxo/xo_config.h  Wed Mar 16 23:50:41 2016(r296967, copy 
of r296966, head/contrib/libxo/libxo/xo_config.h)
@@ -0,0 +1,247 @@
+/* libxo/xo_config.h.  Generated from xo_config.h.in by configure.  */
+/* libxo/xo_config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have  and it should be used (not on Ultrix).
+   */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the `asprintf' function. */
+#define HAVE_ASPRINTF 1
+
+/* Define to 1 if you have the `bzero' function. */
+#define HAVE_BZERO 1
+
+/* Define to 1 if you have the `ctime' function. */
+#define HAVE_CTIME 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the declaration of `__isthreaded', and to 0 if you
+   don't. */
+#define HAVE_DECL___ISTHREADED 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `dlfunc' function. */
+#define HAVE_DLFUNC 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the `fdopen' function. */
+#define HAVE_FDOPEN 1
+
+/* Define to 1 if you have the `flock' function. */
+#define HAVE_FLOCK 1
+
+/* Define to 1 if you have the `getpass' function. */
+#define HAVE_GETPASS 1
+
+/* Define to 1 if you have the `getprogname' function. */
+#define HAVE_GETPROGNAME 1
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* gettext(3) */
+/* #undef HAVE_GETTEXT */
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* humanize_number(3) */
+#define HAVE_HUMANIZE_NUMBER 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#define HAVE_LIBCRYPTO 1
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_LIBUTIL_H 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_MEMORY_H 1
+
+/* Support printflike */
+/* #undef HAVE_PRINTFLIKE */
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#define HAVE_REALLOC 1
+
+/* Define to 1 if you have the `srand' function. */
+#define HAVE_SRAND 1
+
+/* Define to 1 if you have the `sranddev' function. */
+#define HAVE_SRANDDEV 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the  header file. */
+/* #undef HAVE_STDIO_EXT_H */
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the  header file. */
+/* #undef HAVE_STDTIME_TZFILE_H */
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strcspn' function. */
+#define HAVE_STRCSPN 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the  header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define 

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

2016-03-19 Thread Andrew Turner
Author: andrew
Date: Fri Mar 18 16:32:22 2016
New Revision: 297030
URL: https://svnweb.freebsd.org/changeset/base/297030

Log:
  Move the opt_ files to be included first so their definitions can be used
  from within all further included files.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/nexus.c

Modified: head/sys/arm64/arm64/nexus.c
==
--- head/sys/arm64/arm64/nexus.cFri Mar 18 16:29:58 2016
(r297029)
+++ head/sys/arm64/arm64/nexus.cFri Mar 18 16:32:22 2016
(r297030)
@@ -39,6 +39,9 @@
  * and I/O memory address space.
  */
 
+#include "opt_acpi.h"
+#include "opt_platform.h"
+
 #include 
 __FBSDID("$FreeBSD$");
 
@@ -60,9 +63,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "opt_acpi.h"
-#include "opt_platform.h"
-
 #ifdef FDT
 #include 
 #include "ofw_bus_if.h"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296966 - head/contrib/libxo

2016-03-19 Thread David E. O'Brien
Author: obrien
Date: Wed Mar 16 23:42:57 2016
New Revision: 296966
URL: https://svnweb.freebsd.org/changeset/base/296966

Log:
  Block the r296965 vendor/Juniper/libxo cleanup (to match the release tarball)
  from being merged in -- backing out FreeBSD localizations.

Modified:
Directory Properties:
  head/contrib/libxo/   (props changed)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2016-03-19 Thread Bryan Drewery
Author: bdrewery
Date: Wed Mar 16 18:39:48 2016
New Revision: 296947
URL: https://svnweb.freebsd.org/changeset/base/296947

Log:
  Remove incorrect BUGS entry about asserting lock not held.
  
  For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
  made to panic in r126316.
  
  MFC after:1 week

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

Modified: head/share/man/man9/sx.9
==
--- head/share/man/man9/sx.9Wed Mar 16 17:35:55 2016(r296946)
+++ head/share/man/man9/sx.9Wed Mar 16 18:39:48 2016(r296947)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 13, 2016
+.Dd March 16, 2016
 .Dt SX 9
 .Os
 .Sh NAME
@@ -320,11 +320,6 @@ end up sleeping while holding a mutex, w
 .Xr rwlock 9 ,
 .Xr sema 9
 .Sh BUGS
-Currently there is no way to assert that a lock is not held.
-This is not possible in the
-.No non- Ns Dv WITNESS
-case for asserting that this thread
-does not hold a shared lock.
 In the
 .No non- Ns Dv WITNESS
 case, the
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296970 - head/lib/libxo/tests

2016-03-19 Thread Simon J. Gerraty
NGie Cooper  wrote:
> > SUBDIR+=encoder
> > 
> > +.if ${MACHINE} == "host"
> > +# make it easy to test without install
> > +TESTSDIR=${.OBJDIR}
> > +CFLAGS+=-I${.CURDIR:H}
> > +.endif
> > +
> > .include 
> 
> This commit seems unnecessary -- have you tried make check yet?

That appears to require installing things before you test that they
work - seems a bit backwards?

Note the above is only relevant when building with DIRDEPS.
Where we want to be able to build and run relevant tests as part of the
build as we go - when MACHINE = "host" that is.

Phil wants to fix this so that it runs all his test suite properly and
also need to arrange to auto-update the makefile here as new tests are
added to the distribution.
Probably need somthing like bmake's after-import target.

Anyway, being able to have this work in context of DIRDEPS_BUILD will
help (I haven't added the MK_TESTS hooks yet).

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


Re: svn commit: r296933 - in head: share/man/man9 sys/sys

2016-03-19 Thread Hans Petter Selasky

On 03/16/16 21:36, Gleb Smirnoff wrote:

On Wed, Mar 16, 2016 at 08:37:52AM +, Hans Petter Selasky wrote:
H> Modified: head/sys/sys/sysctl.h
H> 
==
H> --- head/sys/sys/sysctl.h Wed Mar 16 06:42:15 2016(r296932)
H> +++ head/sys/sys/sysctl.h Wed Mar 16 08:37:52 2016(r296933)
H> @@ -654,8 +654,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e
H>   SYSCTL_OID(parent, nbr, name,   \
H>   CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \
H>   (ptr), (len), sysctl_handle_counter_u64_array, "S", descr);   \
H> - CTASSERT(((access) & CTLTYPE) == 0 ||   \
H> - ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE)
H> + CTASSERTaccess) & CTLTYPE) == 0 ||  \
H> + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) &&\
H> + sizeof(counter_u64_t) == sizeof(*(ptr)) &&  \
H> + sizeof(uint64_t) == sizeof(**(ptr)))

I don't agree with the last line. Does it assert that counter_u64_t is
implemented using uint64_t? That is true, but that is internal detail,
that might be changed in future.



Yes, it asserts that counter_u64_t is a 64-bit counter, as the name of 
the typedef hints at.


From the past experience there has been several cases where someone has 
changed a field in structure which is exported as a sysctl, and then the 
sysctls were never updated.


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


svn commit: r297000 - in head: . sys/arm/xscale/ixp425 sys/arm/xscale/pxa sys/compat/ndis sys/dev/acpica sys/dev/advansys sys/dev/atkbdc sys/dev/bxe sys/dev/cardbus sys/dev/ctau sys/dev/ed sys/dev/...

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 01:28:41 2016
New Revision: 297000
URL: https://svnweb.freebsd.org/changeset/base/297000

Log:
  Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
  
  On some architectures, u_long isn't large enough for resource definitions.
  Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
  type `long' is only 32-bit.  This extends rman's resources to uintmax_t.  With
  this change, any resource can feasibly be placed anywhere in physical memory
  (within the constraints of the driver).
  
  Why uintmax_t and not something machine dependent, or uint64_t?  Though it's
  possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
  32-bit architectures.  64-bit architectures should have plenty of RAM to 
absorb
  the increase on resource sizes if and when this occurs, and the number of
  resources on memory-constrained systems should be sufficiently small as to not
  pose a drastic overhead.  That being said, uintmax_t was chosen for source
  clarity.  If it's specified as uint64_t, all printf()-like calls would either
  need casts to uintmax_t, or be littered with PRI*64 macros.  Casts to 
uintmax_t
  aren't horrible, but it would also bake into the API for
  resource_list_print_type() either a hidden assumption that entries get cast to
  uintmax_t for printing, or these calls would need the PRI*64 macros.  Since
  source code is meant to be read more often than written, I chose the clearest
  path of simply using uintmax_t.
  
  Tested on a PowerPC p5020-based board, which places all device resources in
  0xf, and has 8GB RAM.
  Regression tested on qemu-system-i386
  Regression tested on qemu-system-mips (malta profile)
  
  Tested PAE and devinfo on virtualbox (live CD)
  
  Special thanks to bz for his testing on ARM.
  
  Reviewed By: bz, jhb (previous)
  Relnotes: Yes
  Sponsored by: Alex Perez/Inertial Computing
  Differential Revision: https://reviews.freebsd.org/D4544

Modified:
  head/UPDATING
  head/sys/arm/xscale/ixp425/avila_ata.c
  head/sys/arm/xscale/ixp425/ixp425.c
  head/sys/arm/xscale/pxa/pxa_obio.c
  head/sys/compat/ndis/kern_ndis.c
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_hpet.c
  head/sys/dev/acpica/acpi_timer.c
  head/sys/dev/advansys/adv_isa.c
  head/sys/dev/atkbdc/atkbdc_subr.c
  head/sys/dev/bxe/bxe.c
  head/sys/dev/cardbus/cardbus_cis.c
  head/sys/dev/ctau/if_ct.c
  head/sys/dev/ed/if_ed_3c503.c
  head/sys/dev/ed/if_ed_cbus.c
  head/sys/dev/fdt/simplebus.c
  head/sys/dev/iir/iir_pci.c
  head/sys/dev/mca/mca_bus.c
  head/sys/dev/mxge/if_mxge.c
  head/sys/dev/ofw/ofwbus.c
  head/sys/dev/pccard/pccard.c
  head/sys/dev/pccard/pccard_cis.c
  head/sys/dev/pccbb/pccbb.c
  head/sys/dev/pccbb/pccbb_pci.c
  head/sys/dev/pci/pci.c
  head/sys/dev/pci/pci_pci.c
  head/sys/dev/pci/pci_subr.c
  head/sys/dev/ppc/ppc.c
  head/sys/dev/proto/proto_bus_isa.c
  head/sys/dev/sound/isa/ad1816.c
  head/sys/dev/sound/isa/ess.c
  head/sys/dev/sound/isa/mss.c
  head/sys/dev/sound/isa/sb16.c
  head/sys/dev/sound/isa/sb8.c
  head/sys/dev/sound/pci/als4000.c
  head/sys/dev/sound/pci/atiixp.c
  head/sys/dev/sound/pci/aureal.c
  head/sys/dev/sound/pci/cmi.c
  head/sys/dev/sound/pci/cs4281.c
  head/sys/dev/sound/pci/csapcm.c
  head/sys/dev/sound/pci/ds1.c
  head/sys/dev/sound/pci/emu10k1.c
  head/sys/dev/sound/pci/emu10kx.c
  head/sys/dev/sound/pci/envy24.c
  head/sys/dev/sound/pci/envy24ht.c
  head/sys/dev/sound/pci/es137x.c
  head/sys/dev/sound/pci/fm801.c
  head/sys/dev/sound/pci/hdspe-pcm.c
  head/sys/dev/sound/pci/ich.c
  head/sys/dev/sound/pci/maestro.c
  head/sys/dev/sound/pci/maestro3.c
  head/sys/dev/sound/pci/neomagic.c
  head/sys/dev/sound/pci/solo.c
  head/sys/dev/sound/pci/t4dwave.c
  head/sys/dev/sound/pci/via8233.c
  head/sys/dev/sound/pci/via82c686.c
  head/sys/dev/sound/pci/vibes.c
  head/sys/dev/wl/if_wl.c
  head/sys/dev/xe/if_xe.c
  head/sys/dev/xe/if_xe_pccard.c
  head/sys/kern/subr_rman.c
  head/sys/mips/atheros/apb.c
  head/sys/mips/mips/nexus.c
  head/sys/mips/nlm/xlp_pci.c
  head/sys/mips/nlm/xlp_simplebus.c
  head/sys/mips/rmi/iodi.c
  head/sys/mips/rmi/xlr_pci.c
  head/sys/powerpc/mpc85xx/lbc.c
  head/sys/powerpc/ofw/ofw_pci.c
  head/sys/powerpc/powermac/uninorth.c
  head/sys/powerpc/powerpc/nexus.c
  head/sys/sparc64/pci/apb.c
  head/sys/sys/_types.h
  head/sys/sys/param.h
  head/sys/x86/x86/io_apic.c
  head/usr.sbin/devinfo/devinfo.c

Modified: head/UPDATING
==
--- head/UPDATING   Fri Mar 18 01:26:55 2016(r296999)
+++ head/UPDATING   Fri Mar 18 01:28:41 2016(r297000)
@@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160317:
+   Resource range types have grown from unsigned long to uintmax_t.  All
+   drivers, and anything using 

Re: svn commit: r296927 - in head: share/man/man9 sys/kern sys/sys

2016-03-19 Thread Conrad Meyer
Sorry.  I guess that whole routine needs to be wrapped in #if
defined(STACK).  I'll work to put together a patch soon.

Thanks,
Conrad


On Wed, Mar 16, 2016 at 3:02 PM, Bjoern A. Zeeb
 wrote:
> On Wed, 16 Mar 2016, Conrad E. Meyer wrote:
>
>> Author: cem
>> Date: Wed Mar 16 04:22:32 2016
>> New Revision: 296927
>> URL: https://svnweb.freebsd.org/changeset/base/296927
>>
>> Log:
>>  fail(9): Upstreaming some fail point enhancements
>>
>>  This is several year's worth of fail point upgrades done at EMC Isilon.
>> They
>>  are interdependent enough that it makes sense to put a single diff up for
>> them.
>>  Primarily, we added:
>>
>>  - Changing all mainline execution paths to be lockless, which lets us use
>> fail
>>points in more sleep-sensitive areas, and allows more parallel
>> execution
>>  - A number of additional commands, including 'pause' that lets us do some
>>interesting deterministic repros of race conditions
>>  - The ability to dump the stacks of all threads sleeping on a fail point
>>  - A number of other API changes to allow marking up the fail point's
>> context in
>>the code, and firing callbacks before and after execution
>>  - A man page update
>>
>>  Submitted by:  Matthew Bryan 
>>  Reviewed by:   cem (earlier version), jhb, kib, pho
>>  With feedback from:bdrewery
>>  Sponsored by:  EMC / Isilon Storage Division
>>  Differential Revision: https://reviews.freebsd.org/D5427
>>
>> Modified:
>>  head/share/man/man9/fail.9
>>  head/sys/kern/kern_fail.c
>>  head/sys/kern/subr_sleepqueue.c
>>  head/sys/sys/fail.h
>>  head/sys/sys/sleepqueue.h
>
>
> This seems to have broken a few kernel configs (just one example);
>
> linking kernel.full
> subr_sleepqueue.o: In function `sleepq_sbuf_print_stacks':
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448): undefined
> reference to `stack_create'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448):
> relocation truncated to fit: R_MIPS_26 against `stack_create'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504): undefined
> reference to `stack_save_td'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504):
> relocation truncated to fit: R_MIPS_26 against `stack_save_td'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598): undefined
> reference to `stack_sbuf_print'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598):
> relocation truncated to fit: R_MIPS_26 against `stack_sbuf_print'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0): undefined
> reference to `stack_destroy'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0):
> relocation truncated to fit: R_MIPS_26 against `stack_destroy'
> --- kernel.full ---
> *** [kernel.full] Error code 1
>
> bmake[5]: stopped in
> /storage/head/obj/mips.mipsn32/scratch/tmp/bz/head.svn/sys/XLPN32
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296881 - in head: contrib/bsnmp/snmp_mibII sys/netinet

2016-03-19 Thread Shawn Webb
On Tue, Mar 15, 2016 at 12:15:10AM +, Gleb Smirnoff wrote:
> Author: glebius
> Date: Tue Mar 15 00:15:10 2016
> New Revision: 296881
> URL: https://svnweb.freebsd.org/changeset/base/296881
> 
> Log:
>   Redo r294869. The array of counters for TCP states doesn't belong to
>   struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
>   and of course running connection counts shouldn't be touched.
>   
>   Place running connection counts into separate array, and provide
>   separate read-only sysctl oid for it.
> 
> Modified:
>   head/contrib/bsnmp/snmp_mibII/mibII_tcp.c
>   head/sys/netinet/tcp_input.c
>   head/sys/netinet/tcp_subr.c
>   head/sys/netinet/tcp_syncache.c
>   head/sys/netinet/tcp_timewait.c
>   head/sys/netinet/tcp_usrreq.c
>   head/sys/netinet/tcp_var.h
> 

[snip]

> 
> Modified: head/sys/netinet/tcp_input.c
> ==
> --- head/sys/netinet/tcp_input.c  Tue Mar 15 00:05:00 2016
> (r296880)
> +++ head/sys/netinet/tcp_input.c  Tue Mar 15 00:15:10 2016
> (r296881)
> @@ -235,16 +235,39 @@ VNET_DEFINE(struct inpcbhead, tcb);
>  VNET_DEFINE(struct inpcbinfo, tcbinfo);
>  
>  /*
> - * TCP statistics are stored in an "array" of counter(9)s.
> + * TCP statistics are stored in an array of counter(9)s, which size matches
> + * size of struct tcpstat.  TCP running connection count is a regular array.
>   */
>  VNET_PCPUSTAT_DEFINE(struct tcpstat, tcpstat);
> -VNET_PCPUSTAT_SYSINIT(tcpstat);
>  SYSCTL_VNET_PCPUSTAT(_net_inet_tcp, TCPCTL_STATS, stats, struct tcpstat,
>  tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
> +VNET_DEFINE(counter_u64_t, tcps_states[TCP_NSTATES]);
> +SYSCTL_COUNTER_U64_ARRAY(_net_inet_tcp, TCPCTL_STATES, states, CTLFLAG_RD |
> +CTLFLAG_VNET, _NAME(tcps_states), TCP_NSTATES,
> +"TCP connection counts by TCP state");

This breaks the build on amd64:

/usr/src/sys/netinet/tcp_input.c:245:1: error: static_assert failed 
"compile-time assertion failed"
SYSCTL_COUNTER_U64_ARRAY(_net_inet_tcp, TCPCTL_STATES, states, CTLFLAG_RD |
^~~
/usr/src/sys/sys/sysctl.h:657:2: note: expanded from macro 
'SYSCTL_COUNTER_U64_ARRAY'
CTASSERTaccess) & CTLTYPE) == 0 ||  \
^
/usr/src/sys/sys/systm.h:103:21: note: expanded from macro 'CTASSERT'
#define CTASSERT(x) _Static_assert(x, "compile-time assertion failed")
^  ~
-- 
Shawn Webb
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


svn commit: r296951 - in head/sys/dev/cxgbe: . firmware

2016-03-19 Thread Navdeep Parhar
Author: np
Date: Wed Mar 16 19:43:44 2016
New Revision: 296951
URL: https://svnweb.freebsd.org/changeset/base/296951

Log:
  cxgbe(4): Enable additional capabilities in the default configuration
  files.  All features with FreeBSD drivers of some kind are now in the
  default configuration.

Modified:
  head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
  head/sys/dev/cxgbe/firmware/t5fw_cfg.txt
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:41:00 2016
(r296950)
+++ head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:43:44 2016
(r296951)
@@ -25,13 +25,13 @@
filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
filterMask = protocol, fcoe
 
-   tp_pmrx = 38, 512
+   tp_pmrx = 36, 512
tp_pmrx_pagesize = 64K
 
# TP number of RX channels (0 = auto)
tp_nrxch = 0
 
-   tp_pmtx = 60, 512
+   tp_pmtx = 46, 512
tp_pmtx_pagesize = 64K
 
# TP number of TX channels (0 = auto)
@@ -92,10 +92,14 @@
pmask = all
 
# driver will mask off features it won't use
-   protocol = ofld
+   protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu
 
tp_l2t = 4096
tp_ddp = 2
+   tp_ddp_iscsi = 2
+   tp_stag = 2
+   tp_pbl = 5
+   tp_rq = 7
 
# TCAM has 8K cells; each region must start at a multiple of 128 cell.
# Each entry in these categories takes 4 cells each.  nhash will use the
@@ -167,7 +171,7 @@
 
 [fini]
version = 0x1
-   checksum = 0x5a34a3ce
+   checksum = 0x76b034e0
 #
 # $FreeBSD$
 #

Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:41:00 2016
(r296950)
+++ head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:43:44 2016
(r296951)
@@ -52,13 +52,13 @@
filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe
filterMask = protocol, fcoe
 
-   tp_pmrx = 38, 512
+   tp_pmrx = 36, 512
tp_pmrx_pagesize = 64K
 
# TP number of RX channels (0 = auto)
tp_nrxch = 0
 
-   tp_pmtx = 60, 512
+   tp_pmtx = 46, 512
tp_pmtx_pagesize = 64K
 
# TP number of TX channels (0 = auto)
@@ -136,10 +136,14 @@
pmask = all
 
# driver will mask off features it won't use
-   protocol = ofld
+   protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu, 
iscsi_t10dif
 
tp_l2t = 4096
tp_ddp = 2
+   tp_ddp_iscsi = 2
+   tp_stag = 2
+   tp_pbl = 5
+   tp_rq = 7
 
# TCAM has 8K cells; each region must start at a multiple of 128 cell.
# Each entry in these categories takes 4 cells each.  nhash will use the
@@ -211,7 +215,7 @@
 
 [fini]
version = 0x1
-   checksum = 0xdd685b
+   checksum = 0xebb87494
 #
 # $FreeBSD$
 #

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cWed Mar 16 19:41:00 2016
(r296950)
+++ head/sys/dev/cxgbe/t4_main.cWed Mar 16 19:43:44 2016
(r296951)
@@ -334,7 +334,8 @@ TUNABLE_INT("hw.cxgbe.nbmcaps_allowed", 
 static int t4_linkcaps_allowed = 0;/* No DCBX, PPP, etc. by default */
 TUNABLE_INT("hw.cxgbe.linkcaps_allowed", _linkcaps_allowed);
 
-static int t4_switchcaps_allowed = 0;
+static int t4_switchcaps_allowed = FW_CAPS_CONFIG_SWITCH_INGRESS |
+FW_CAPS_CONFIG_SWITCH_EGRESS;
 TUNABLE_INT("hw.cxgbe.switchcaps_allowed", _switchcaps_allowed);
 
 static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC;
@@ -343,13 +344,13 @@ TUNABLE_INT("hw.cxgbe.niccaps_allowed", 
 static int t4_toecaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.toecaps_allowed", _toecaps_allowed);
 
-static int t4_rdmacaps_allowed = 0;
+static int t4_rdmacaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.rdmacaps_allowed", _rdmacaps_allowed);
 
 static int t4_tlscaps_allowed = 0;
 TUNABLE_INT("hw.cxgbe.tlscaps_allowed", _tlscaps_allowed);
 
-static int t4_iscsicaps_allowed = 0;
+static int t4_iscsicaps_allowed = -1;
 TUNABLE_INT("hw.cxgbe.iscsicaps_allowed", _iscsicaps_allowed);
 
 static int t4_fcoecaps_allowed = 0;
@@ -9103,9 +9104,26 @@ tweak_tunables(void)
 
if (t4_toecaps_allowed == -1)
t4_toecaps_allowed = FW_CAPS_CONFIG_TOE;
+
+   if (t4_rdmacaps_allowed == -1) {
+   t4_rdmacaps_allowed = FW_CAPS_CONFIG_RDMA_RDDP |
+   FW_CAPS_CONFIG_RDMA_RDMAC;
+   }
+
+   if (t4_iscsicaps_allowed == -1) {
+   t4_iscsicaps_allowed = FW_CAPS_CONFIG_ISCSI_INITIATOR_PDU |
+   FW_CAPS_CONFIG_ISCSI_TARGET_PDU |
+   FW_CAPS_CONFIG_ISCSI_T10DIF;
+   }
 #else
  

Re: svn commit: r296970 - head/lib/libxo/tests

2016-03-19 Thread Simon J. Gerraty
Bryan Drewery  wrote:
> Btw I recently hooked up MK_TESTS to DIRDEPS_BUILD and added them all
> (at the time) to targets/.

Hmm how did you do that?

In our build local.dirdeps.mk checks each DEP_RELDIR to see if there is
a tests/Makefile.depend.host below it, and if so adds it to the
dependency graph - but not to the dependencies of DEP_RELDIR - which
could introduced circular dependencies.
[It also has to check if ${DEP_RELDIR}/tests is listed as broken for the
current host os - not all tests can run on all build hosts]

Thus we build all the tests (and only the tests) relevant to what we are
building.

And since when building tests for "host" we run them immediately, if any
fail the build fails.

Hooking all the tests into a tests target is useful too of course.

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


Re: svn commit: r296881 - in head: contrib/bsnmp/snmp_mibII sys/netinet

2016-03-19 Thread Hans Petter Selasky

On 03/16/16 16:05, Shawn Webb wrote:

This breaks the build on amd64:


I believe this is fixed by r296935.

--HPS


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


svn commit: r296973 - in head/sys: kern sys

2016-03-19 Thread Conrad E. Meyer
Author: cem
Date: Thu Mar 17 01:05:53 2016
New Revision: 296973
URL: https://svnweb.freebsd.org/changeset/base/296973

Log:
  fail(9): Only gather/print stacks if STACK is enabled
  
  This is a follow-up fix to the earlier r296927.
  
  Reported by:  bz
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/kern/kern_fail.c
  head/sys/kern/subr_sleepqueue.c
  head/sys/sys/sleepqueue.h

Modified: head/sys/kern/kern_fail.c
==
--- head/sys/kern/kern_fail.c   Thu Mar 17 01:02:34 2016(r296972)
+++ head/sys/kern/kern_fail.c   Thu Mar 17 01:05:53 2016(r296973)
@@ -52,6 +52,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_stack.h"
+
 #include 
 #include 
 #include 
@@ -708,6 +710,7 @@ fail_point_get(struct fail_point *fp, st
 
fp_free(fp_entry_cpy);
if (verbose) {
+#ifdef STACK
/* Print number of sleeping threads. queue=0 is the argument
 * used by msleep when sending our threads to sleep. */
sbuf_printf(sb, "\nsleeping_thread_stacks = {\n");
@@ -715,14 +718,17 @@ fail_point_get(struct fail_point *fp, st
_sleeping);
 
sbuf_printf(sb, "},\n");
+#endif
sbuf_printf(sb, "sleeping_thread_count = %d,\n",
cnt_sleeping);
 
+#ifdef STACK
sbuf_printf(sb, "paused_thread_stacks = {\n");
sleepq_sbuf_print_stacks(sb, FP_PAUSE_CHANNEL(fp), 0,
_sleeping);
 
sbuf_printf(sb, "},\n");
+#endif
sbuf_printf(sb, "paused_thread_count = %d\n",
cnt_sleeping);
}

Modified: head/sys/kern/subr_sleepqueue.c
==
--- head/sys/kern/subr_sleepqueue.c Thu Mar 17 01:02:34 2016
(r296972)
+++ head/sys/kern/subr_sleepqueue.c Thu Mar 17 01:05:53 2016
(r296973)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_sleepqueue_profiling.h"
 #include "opt_ddb.h"
 #include "opt_sched.h"
+#include "opt_stack.h"
 
 #include 
 #include 
@@ -1042,6 +1043,7 @@ sleepq_abort(struct thread *td, int intr
  * printed.  Typically, this will equal the number of threads sleeping on the
  * queue, but may be less if sb overflowed before all stacks were printed.
  */
+#ifdef STACK
 int
 sleepq_sbuf_print_stacks(struct sbuf *sb, void *wchan, int queue,
 int *count_stacks_printed)
@@ -1149,6 +1151,7 @@ loop_end:
 
return (error);
 }
+#endif
 
 #ifdef SLEEPQUEUE_PROFILING
 #defineSLEEPQ_PROF_LOCATIONS   1024

Modified: head/sys/sys/sleepqueue.h
==
--- head/sys/sys/sleepqueue.h   Thu Mar 17 01:02:34 2016(r296972)
+++ head/sys/sys/sleepqueue.h   Thu Mar 17 01:05:53 2016(r296973)
@@ -107,9 +107,11 @@ intsleepq_type(void *wchan);
 void   sleepq_wait(void *wchan, int pri);
 intsleepq_wait_sig(void *wchan, int pri);
 
-#include 
+#ifdef STACK
+struct sbuf;
 int sleepq_sbuf_print_stacks(struct sbuf *sb, void *wchan, int queue,
 int *count_stacks_printed);
+#endif
 
 #endif /* _KERNEL */
 #endif /* !_SYS_SLEEPQUEUE_H_ */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296982 - head/sys/arm/allwinner

2016-03-19 Thread Michal Meloun
Author: mmel
Date: Thu Mar 17 08:57:41 2016
New Revision: 296982
URL: https://svnweb.freebsd.org/changeset/base/296982

Log:
  A20: Gpiobus can be attached only after full gpio driver initialization.
  While i'm in, remove now unused global variable.
  
  Submited by:  Emmanuel Vadot 

Modified:
  head/sys/arm/allwinner/a10_gpio.c

Modified: head/sys/arm/allwinner/a10_gpio.c
==
--- head/sys/arm/allwinner/a10_gpio.c   Thu Mar 17 08:40:58 2016
(r296981)
+++ head/sys/arm/allwinner/a10_gpio.c   Thu Mar 17 08:57:41 2016
(r296982)
@@ -136,8 +136,6 @@ extern const struct allwinner_padconf a3
 #defineA10_GPIO_GP_INT_STA 0x214
 #defineA10_GPIO_GP_INT_DEB 0x218
 
-static struct a10_gpio_softc *a10_gpio_sc;
-
 #defineA10_GPIO_WRITE(_sc, _off, _val) \
 bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val)
 #defineA10_GPIO_READ(_sc, _off)\
@@ -562,12 +560,6 @@ a10_gpio_attach(device_t dev)
/* Node is not a GPIO controller. */
goto fail;
 
-   a10_gpio_sc = sc;
-   sc->sc_busdev = gpiobus_attach_bus(dev);
-   if (sc->sc_busdev == NULL)
-   goto fail;
-
-
/* Use the right pin data for the current SoC */
switch (allwinner_soc_type()) {
 #ifdef SOC_ALLWINNER_A10
@@ -594,6 +586,10 @@ a10_gpio_attach(device_t dev)
return (ENOENT);
}
 
+   sc->sc_busdev = gpiobus_attach_bus(dev);
+   if (sc->sc_busdev == NULL)
+   goto fail;
+
/*
 * Register as a pinctrl device
 */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296956 - head/sys/amd64/amd64

2016-03-19 Thread Gleb Smirnoff
Author: glebius
Date: Wed Mar 16 22:33:12 2016
New Revision: 296956
URL: https://svnweb.freebsd.org/changeset/base/296956

Log:
  Due to invalid use of a signed intermediate value in the bounds checking
  during argument validity verification, unbound zero'ing of the process LDT
  and adjacent memory can be initiated from usermode.
  
  Submitted by: CORE Security
  Patch by: kib
  Security: SA-16:15

Modified:
  head/sys/amd64/amd64/sys_machdep.c

Modified: head/sys/amd64/amd64/sys_machdep.c
==
--- head/sys/amd64/amd64/sys_machdep.c  Wed Mar 16 22:31:04 2016
(r296955)
+++ head/sys/amd64/amd64/sys_machdep.c  Wed Mar 16 22:33:12 2016
(r296956)
@@ -580,8 +580,8 @@ amd64_set_ldt(td, uap, descs)
struct i386_ldt_args *uap;
struct user_segment_descriptor *descs;
 {
-   int error = 0, i;
-   int largest_ld;
+   int error = 0;
+   unsigned int largest_ld, i;
struct mdproc *mdp = >td_proc->p_md;
struct proc_ldt *pldt;
struct user_segment_descriptor *dp;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297013 - head/lib/libc/sys

2016-03-19 Thread Julian Elischer
Author: julian
Date: Fri Mar 18 08:47:17 2016
New Revision: 297013
URL: https://svnweb.freebsd.org/changeset/base/297013

Log:
  Use the right argumant name
  
  MFC after:1 week
  Sponsored by: Panzura inc

Modified:
  head/lib/libc/sys/modfind.2

Modified: head/lib/libc/sys/modfind.2
==
--- head/lib/libc/sys/modfind.2 Fri Mar 18 07:59:38 2016(r297012)
+++ head/lib/libc/sys/modfind.2 Fri Mar 18 08:47:17 2016(r297013)
@@ -49,7 +49,7 @@ The
 .Fn modfind
 system call
 returns the modid of the kernel module referenced by
-.Fa file .
+.Fa modname .
 Upon error,
 .Fn modfind
 returns -1 and sets
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r297000 - in head: . sys/arm/xscale/ixp425 sys/arm/xscale/pxa sys/compat/ndis sys/dev/acpica sys/dev/advansys sys/dev/atkbdc sys/dev/bxe sys/dev/cardbus sys/dev/ctau sys/dev/ed sys/dev

2016-03-19 Thread John Baldwin
On Friday, March 18, 2016 01:28:41 AM Justin Hibbits wrote:
> Author: jhibbits
> Date: Fri Mar 18 01:28:41 2016
> New Revision: 297000
> URL: https://svnweb.freebsd.org/changeset/base/297000
> 
> Log:
>   Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
>   
>   On some architectures, u_long isn't large enough for resource definitions.
>   Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, 
> but
>   type `long' is only 32-bit.  This extends rman's resources to uintmax_t.  
> With
>   this change, any resource can feasibly be placed anywhere in physical memory
>   (within the constraints of the driver).
>   
>   Why uintmax_t and not something machine dependent, or uint64_t?  Though it's
>   possible for uintmax_t to grow, it's highly unlikely it will become 128-bit 
> on
>   32-bit architectures.  64-bit architectures should have plenty of RAM to 
> absorb
>   the increase on resource sizes if and when this occurs, and the number of
>   resources on memory-constrained systems should be sufficiently small as to 
> not
>   pose a drastic overhead.  That being said, uintmax_t was chosen for source
>   clarity.  If it's specified as uint64_t, all printf()-like calls would 
> either
>   need casts to uintmax_t, or be littered with PRI*64 macros.  Casts to 
> uintmax_t
>   aren't horrible, but it would also bake into the API for
>   resource_list_print_type() either a hidden assumption that entries get cast 
> to
>   uintmax_t for printing, or these calls would need the PRI*64 macros.  Since
>   source code is meant to be read more often than written, I chose the 
> clearest
>   path of simply using uintmax_t.
>   
>   Tested on a PowerPC p5020-based board, which places all device resources in
>   0xf, and has 8GB RAM.
>   Regression tested on qemu-system-i386
>   Regression tested on qemu-system-mips (malta profile)
>   
>   Tested PAE and devinfo on virtualbox (live CD)
>   
>   Special thanks to bz for his testing on ARM.
>   
>   Reviewed By: bz, jhb (previous)
>   Relnotes:   Yes
>   Sponsored by:   Alex Perez/Inertial Computing
>   Differential Revision: https://reviews.freebsd.org/D4544

Thank you for chasing this down to completion.  It removes quite a few hacks
from the PAE case.  Thank you also for being patient when I asked you to split
the changes up, rearrange things, etc. :)

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


svn commit: r297007 - head/sbin/ifconfig

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 18 03:55:57 2016
New Revision: 297007
URL: https://svnweb.freebsd.org/changeset/base/297007

Log:
  Decode VHTCAP, VHTINFO and BSSLOAD.
  
  BSSLOAD is based on work from Idwer Vollering.
  
  Obtained from:Idwer Vollering  (bssload)

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cFri Mar 18 03:55:00 2016
(r297006)
+++ head/sbin/ifconfig/ifieee80211.cFri Mar 18 03:55:57 2016
(r297007)
@@ -2534,6 +2534,45 @@ printwmeinfo(const char *tag, const u_in
 }
 
 static void
+printvhtcap(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
+{
+   printf("%s", tag);
+   if (verbose) {
+   const struct ieee80211_ie_vhtcap *vhtcap =
+   (const struct ieee80211_ie_vhtcap *) ie;
+   uint32_t vhtcap_info = LE_READ_4(>vht_cap_info);
+
+   printf("supp_mcs.rx_mcs_map));
+   printf(" rx_highest %d",
+   LE_READ_2(>supp_mcs.rx_highest) & 0x1fff);
+   printf(" tx_mcs_map 0x%x",
+   LE_READ_2(>supp_mcs.tx_mcs_map));
+   printf(" tx_highest %d",
+   LE_READ_2(>supp_mcs.tx_highest) & 0x1fff);
+
+   printf(">");
+   }
+}
+
+static void
+printvhtinfo(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
+{
+   printf("%s", tag);
+   if (verbose) {
+   const struct ieee80211_ie_vht_operation *vhtinfo =
+   (const struct ieee80211_ie_vht_operation *) ie;
+
+   printf("",
+   vhtinfo->chan_width,
+   vhtinfo->center_freq_seg1_idx,
+   vhtinfo->center_freq_seg2_idx,
+   LE_READ_2(>basic_mcs_set));
+   }
+}
+
+static void
 printhtcap(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
 {
printf("%s", tag);
@@ -2674,6 +2713,20 @@ do { 
\
 #undef MATCHOUI
 }
 
+static void
+printbssload(const char *tag, const uint8_t *ie, size_t ielen, int maxlen)
+{
+   printf("%s", tag);
+   if (verbose) {
+   const struct ieee80211_bss_load_ie *bssload =
+   (const struct ieee80211_bss_load_ie *) ie;
+   printf("",
+   LE_READ_2(>sta_count),
+   bssload->chan_load,
+   bssload->aac);
+   }
+}
+
 static const char *
 wpa_cipher(const u_int8_t *sel)
 {
@@ -3154,6 +3207,15 @@ printies(const u_int8_t *vp, int ielen, 
case IEEE80211_ELEMID_MESHCONF:
printmeshconf(" MESHCONF", vp, 2+vp[1], maxcols);
break;
+   case IEEE80211_ELEMID_VHT_CAP:
+   printvhtcap(" VHTCAP", vp, 2+vp[1], maxcols);
+   break;
+   case IEEE80211_ELEMID_VHT_OPMODE:
+   printvhtinfo(" VHTOPMODE", vp, 2+vp[1], maxcols);
+   break;
+   case IEEE80211_ELEMID_BSSLOAD:
+   printbssload(" BSSLOAD", vp, 2+vp[1], maxcols);
+   break;
default:
if (verbose)
printie(iename(vp[0]), vp, 2+vp[1], maxcols);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r287445 - in head: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools

2016-03-19 Thread Sean Fagan
As I recall, from ZFS, but I’m not positive.  Either that, or something else 
was using 0x40.

Sean.
> On Mar 16, 2016, at 9:29 PM, Xin LI  wrote:
> 
> +sef who created the patch...
> 
> On Wed, Mar 16, 2016 at 3:40 PM, Alan Somers  wrote:
>> 
>> 
>> On Thu, Sep 3, 2015 at 6:14 PM, Xin LI  wrote:
>>> 
>>> Author: delphij
>>> Date: Fri Sep  4 00:14:20 2015
>>> New Revision: 287445
>>> URL: https://svnweb.freebsd.org/changeset/base/287445
>>> 
>>> Log:
>>>  Expose an interface to determine if an ACE is inherited.
>>> 
>>>  Submitted by: sef
>>>  Reviewed by:  trasz
>>>  MFC after:2 weeks
>>>  Differential Revision:https://reviews.freebsd.org/D3540
>>> 
>>> Modified:
>>>  head/bin/setfacl/setfacl.1
>>>  head/lib/libc/posix1e/acl_add_flag_np.3
>>>  head/lib/libc/posix1e/acl_support_nfs4.c
>>>  head/share/man/man9/acl.9
>>>  head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c
>>>  head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
>>>  head/sys/kern/subr_acl_nfs4.c
>>>  head/sys/sys/acl.h
>>>  head/tools/regression/acltools/tools-crossfs.test
>>>  head/tools/regression/acltools/tools-nfs4-psarc.test
>>>  head/tools/regression/acltools/tools-nfs4-trivial.test
>>>  head/tools/regression/acltools/tools-nfs4.test
>> 
>> 
>> ...
>> 
>>> 
>>> Modified: head/sys/sys/acl.h
>>> 
>>> ==
>>> --- head/sys/sys/acl.h  Thu Sep  3 22:15:56 2015(r287444)
>>> +++ head/sys/sys/acl.h  Fri Sep  4 00:14:20 2015(r287445)
>>> @@ -249,11 +249,12 @@ typedef void *acl_t;
>>> #defineACL_ENTRY_INHERIT_ONLY  0x0008
>>> #defineACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
>>> #defineACL_ENTRY_FAILED_ACCESS 0x0020
>>> +#defineACL_ENTRY_INHERITED 0x0080
>>> 
>>> #defineACL_FLAGS_BITS  (ACL_ENTRY_FILE_INHERIT |
>>> \
>>> ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
>>> ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
>>> -ACL_ENTRY_FAILED_ACCESS)
>>> +ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
>>> 
>>> /*
>>>  * Undefined value in ae_id field.  ae_id should be set to this value
>> 
>> 
>> Out of curiosity, why did you choose 0x0080 for ACL_ENTRY_INHERITED instead
>> of 0x0040 ?
>> 
> 
> 
> 
> -- 
> Xin LI  https://www.delphij.net/
> FreeBSD - The Power to Serve! Live free or die

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

svn commit: r297024 - head/sbin/ping

2016-03-19 Thread Maxim Konovalov
Author: maxim
Date: Fri Mar 18 15:06:50 2016
New Revision: 297024
URL: https://svnweb.freebsd.org/changeset/base/297024

Log:
  o No need to resolve a mask that we get with ICMP_MASKREPLY,
  pass it directly to inet_ntoa(3).

Modified:
  head/sbin/ping/ping.c

Modified: head/sbin/ping/ping.c
==
--- head/sbin/ping/ping.c   Fri Mar 18 14:49:11 2016(r297023)
+++ head/sbin/ping/ping.c   Fri Mar 18 15:06:50 2016(r297024)
@@ -1201,7 +1201,7 @@ pr_pack(char *buf, int cc, struct sockad
if (options & F_MASK) {
/* Just prentend this cast isn't ugly */
(void)printf(" mask=%s",
-   pr_addr(*(struct in_addr 
*)&(icp->icmp_mask)));
+   inet_ntoa(*(struct in_addr 
*)&(icp->icmp_mask)));
}
if (options & F_TIME) {
(void)printf(" tso=%s", 
pr_ntime(icp->icmp_otime));
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296933 - in head: share/man/man9 sys/sys

2016-03-19 Thread Hans Petter Selasky

On 03/16/16 21:32, Gleb Smirnoff wrote:

On Wed, Mar 16, 2016 at 08:37:52AM +, Hans Petter Selasky wrote:
H> Author: hselasky
H> Date: Wed Mar 16 08:37:52 2016
H> New Revision: 296933
H> URL: https://svnweb.freebsd.org/changeset/base/296933
H>
H> Log:
H>   Improve the implementation and documentation of the
H>   SYSCTL_COUNTER_U64_ARRAY() macro.
H>
H>   - Add proper asserts to the SYSCTL_COUNTER_U64_ARRAY() macro that checks
H> the size of the first element of the array.
H>   - Add an example to the counter(9) manual page how to use the
H> SYSCTL_COUNTER_U64_ARRAY() macro.
H>   - Add some missing symbolic links for counter(9) while at it.

...

H> +.Sh EXAMPLES
H> +The following example creates a static counter array exported to
H> +userspace through a sysctl:
H> +.Bd -literal -offset indent
H> +#define MY_SIZE 8
H> +static counter_u64_t array[MY_SIZE];
H> +SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW,
H> +[0], MY_SIZE, "Test counter array");

I always wondered what is stylistically better: array or [0]? I
usually prefer the former.



A question: If you pass "array" why do you need a length argument in the 
SYSCTL macro. Can't you get the length of the array like 
sizeof(array)/sizeof((array)[0]) inside the macro?


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


Re: svn commit: r297025 - head/sbin/ping

2016-03-19 Thread Maxim Konovalov
On Fri, 18 Mar 2016, 10:27-0500, Benjamin Kaduk wrote:

> On Fri, Mar 18, 2016 at 10:07 AM, Maxim Konovalov  wrote:
>
> > Author: maxim
> > Date: Fri Mar 18 15:07:43 2016
> > New Revision: 297025
> > URL: https://svnweb.freebsd.org/changeset/base/297025
> >
> > Log:
> >   o Kill EoL whitespaces.
> >
> > Modified:
> >   head/sbin/ping/ping.c
> >
> > Modified: head/sbin/ping/ping.c
> >
> > ==
> > --- head/sbin/ping/ping.c   Fri Mar 18 15:06:50 2016(r297024)
> > +++ head/sbin/ping/ping.c   Fri Mar 18 15:07:43 2016(r297025)
> > @@ -794,7 +794,7 @@ main(int argc, char *const *argv)
> >  #endif
> > if (sweepmax) {
> > if (sweepmin > sweepmax)
> > -   errx(EX_USAGE, "Maximum packet size must be no
> > less than the minimum packet size");
> > +   errx(EX_USAGE,"Maximum packet size must be no less
> > than the minimum packet size");
> >
>
> Looks like the space immediately after the comma was also lost.
>
> -Ben
>
That's strange.  Thanks, will fix that.

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


svn commit: r296949 - head/sys/dev/cxgbe

2016-03-19 Thread Navdeep Parhar
Author: np
Date: Wed Mar 16 19:36:11 2016
New Revision: 296949
URL: https://svnweb.freebsd.org/changeset/base/296949

Log:
  cxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
  Do not display range if start = stop (this is a workaround for some
  unused regions).

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cWed Mar 16 18:55:17 2016
(r296948)
+++ head/sys/dev/cxgbe/t4_main.cWed Mar 16 19:36:11 2016
(r296949)
@@ -6287,6 +6287,9 @@ mem_region_show(struct sbuf *sb, const c
 {
unsigned int size;
 
+   if (from == to)
+   return;
+
size = to - from + 1;
if (size == 0)
return;
@@ -6390,13 +6393,10 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS)
md++;
 
if (t4_read_reg(sc, A_LE_DB_CONFIG) & F_HASHEN) {
-   if (chip_id(sc) <= CHELSIO_T5) {
-   hi = t4_read_reg(sc, A_LE_DB_TID_HASHBASE) / 4;
+   if (chip_id(sc) <= CHELSIO_T5)
md->base = t4_read_reg(sc, A_LE_DB_HASH_TID_BASE);
-   } else {
-   hi = t4_read_reg(sc, A_LE_DB_HASH_TID_BASE);
+   else
md->base = t4_read_reg(sc, A_LE_DB_HASH_TBL_BASE_ADDR);
-   }
md->limit = 0;
} else {
md->base = 0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297029 - in head/sys/arm64: arm64 include

2016-03-19 Thread Andrew Turner
Author: andrew
Date: Fri Mar 18 16:29:58 2016
New Revision: 297029
URL: https://svnweb.freebsd.org/changeset/base/297029

Log:
  Rename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/mp_machdep.c
  head/sys/arm64/include/smp.h

Modified: head/sys/arm64/arm64/mp_machdep.c
==
--- head/sys/arm64/arm64/mp_machdep.c   Fri Mar 18 16:18:29 2016
(r297028)
+++ head/sys/arm64/arm64/mp_machdep.c   Fri Mar 18 16:29:58 2016
(r297029)
@@ -179,7 +179,7 @@ release_aps(void *dummy __unused)
int cpu, i;
 
/* Setup the IPI handler */
-   for (i = 0; i < COUNT_IPI; i++)
+   for (i = 0; i < INTR_IPI_COUNT; i++)
arm_setup_ipihandler(ipi_handler, i);
 
atomic_store_rel_int(_ready, 1);
@@ -238,7 +238,7 @@ init_secondary(uint64_t cpu)
/* Configure the interrupt controller */
arm_init_secondary();
 
-   for (i = 0; i < COUNT_IPI; i++)
+   for (i = 0; i < INTR_IPI_COUNT; i++)
arm_unmask_ipi(i);
 
/* Start per-CPU event timers. */
@@ -277,7 +277,7 @@ ipi_handler(void *arg)
u_int cpu, ipi;
 
arg = (void *)((uintptr_t)arg & ~(1 << 16));
-   KASSERT((uintptr_t)arg < COUNT_IPI,
+   KASSERT((uintptr_t)arg < INTR_IPI_COUNT,
("Invalid IPI %ju", (uintptr_t)arg));
 
cpu = PCPU_GET(cpuid);

Modified: head/sys/arm64/include/smp.h
==
--- head/sys/arm64/include/smp.hFri Mar 18 16:18:29 2016
(r297028)
+++ head/sys/arm64/include/smp.hFri Mar 18 16:29:58 2016
(r297029)
@@ -42,7 +42,7 @@ enum {
IPI_STOP,
IPI_STOP_HARD,
IPI_HARDCLOCK,
-   COUNT_IPI,
+   INTR_IPI_COUNT,
 };
 
 void   ipi_all_but_self(u_int ipi);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296952 - head/sys/dev/cxgbe/firmware

2016-03-19 Thread Navdeep Parhar
Author: np
Date: Wed Mar 16 19:46:22 2016
New Revision: 296952
URL: https://svnweb.freebsd.org/changeset/base/296952

Log:
  cxgbe(4): Enable PFs 0-3, and allow creation of SR-IOV VFs on these PFs
  in the default configuration files.

Modified:
  head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
  head/sys/dev/cxgbe/firmware/t5fw_cfg.txt

Modified: head/sys/dev/cxgbe/firmware/t4fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:43:44 2016
(r296951)
+++ head/sys/dev/cxgbe/firmware/t4fw_cfg.txtWed Mar 16 19:46:22 2016
(r296952)
@@ -44,38 +44,58 @@
tp_tcptuning = lan
 
 # PFs 0-3.  These get 8 MSI/8 MSI-X vectors each.  VFs are supported by
-# these 4 PFs only.  Not used here at all.
+# these 4 PFs only.
 [function "0"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "0/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all
+   nvi = 2
+   rssnvi = 2
+   niqflint = 4
+   nethctrl = 4
+   neq = 8
+   nexactf = 4
+   cmask = all
+   pmask = 0x1
 
 [function "1"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "1/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all
+   nvi = 2
+   rssnvi = 2
+   niqflint = 4
+   nethctrl = 4
+   neq = 8
+   nexactf = 4
+   cmask = all
+   pmask = 0x2
 
 [function "2"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "2/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all
+   nvi = 2
+   rssnvi = 2
+   niqflint = 4
+   nethctrl = 4
+   neq = 8
+   nexactf = 4
+   cmask = all
+   pmask = 0x4
 
 [function "3"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "3/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all
+   nvi = 2
+   rssnvi = 2
+   niqflint = 4
+   nethctrl = 4
+   neq = 8
+   nexactf = 4
+   cmask = all
+   pmask = 0x8
 
 # PF4 is the resource-rich PF that the bus/nexus driver attaches to.
 # It gets 32 MSI/128 MSI-X vectors.
@@ -87,7 +107,7 @@
niqflint = 512
nethctrl = 1024
neq = 2048
-   nexactf = 328
+   nexactf = 280
cmask = all
pmask = all
 
@@ -135,6 +155,60 @@
nexactf = 8
nfilter = 16
 
+# For Virtual functions, we only allow NIC functionality and we only allow
+# access to one port (1 << PF).  Note that because of limitations in the
+# Scatter Gather Engine (SGE) hardware which checks writes to VF KDOORBELL
+# and GTS registers, the number of Ingress and Egress Queues must be a power
+# of 2.
+#
+[function "0/*"]
+   wx_caps = 0x82
+   r_caps = 0x86
+   nvi = 1
+   rssnvi = 1
+   niqflint = 2
+   nethctrl = 2
+   neq = 4
+   nexactf = 2
+   cmask = all
+   pmask = 0x1
+
+[function "1/*"]
+   wx_caps = 0x82
+   r_caps = 0x86
+   nvi = 1
+   rssnvi = 1
+   niqflint = 2
+   nethctrl = 2
+   neq = 4
+   nexactf = 2
+   cmask = all
+   pmask = 0x2
+
+[function "2/*"]
+   wx_caps = 0x82
+   r_caps = 0x86
+   nvi = 1
+   rssnvi = 1
+   niqflint = 2
+   nethctrl = 2
+   neq = 4
+   nexactf = 2
+   cmask = all
+   pmask = 0x4
+
+[function "3/*"]
+   wx_caps = 0x82
+   r_caps = 0x86
+   nvi = 1
+   rssnvi = 1
+   niqflint = 2
+   nethctrl = 2
+   neq = 4
+   nexactf = 2
+   cmask = all
+   pmask = 0x8
+
 # MPS has 192K buffer space for ingress packets from the wire as well as
 # loopback path of the L2 switch.
 [port "0"]
@@ -171,7 +245,7 @@
 
 [fini]
version = 0x1
-   checksum = 0x76b034e0
+   checksum = 0xbec0621
 #
 # $FreeBSD$
 #

Modified: head/sys/dev/cxgbe/firmware/t5fw_cfg.txt
==
--- head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:43:44 2016
(r296951)
+++ head/sys/dev/cxgbe/firmware/t5fw_cfg.txtWed Mar 16 19:46:22 2016
(r296952)
@@ -88,38 +88,58 @@
# TPT error.
 
 # PFs 0-3.  These get 8 MSI/8 MSI-X vectors each.  VFs are supported by
-# these 4 PFs only.  Not used here at all.
+# these 4 PFs only.
 [function "0"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "0/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all
+   nvi = 2
+   rssnvi = 2
+   niqflint = 4
+   nethctrl = 4
+   neq = 8
+   nexactf = 4
+   cmask = all
+   pmask = 0x1
 
 [function "1"]
-   nvf = 16
-   nvi = 1
-   rssnvi = 0
-[function "1/*"]
-   nvi = 1
-   rssnvi = 0
+   nvf = 4
+   wx_caps = all
+   r_caps = all

svn commit: r297010 - head/sbin/ifconfig

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 18 04:22:07 2016
New Revision: 297010
URL: https://svnweb.freebsd.org/changeset/base/297010

Log:
  Add parsing for AP channel report IE.
  
  Eg:
  
  TP-LINK_D579 60:e3:27:e1:d5:79   10   54M  -72:-95   100 
EP   SSID RATES
  DSPARMS<10> XRATES<12,24,48,96> COUNTRY APCHANREP APCHANREP
  TIM<05040001> ERP<0x4> HTCAP HTINFO
  ???<4a0e14000a002c01c800140005001900> RSN
  WME
  BSSLOAD VEN

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cFri Mar 18 04:09:27 2016
(r297009)
+++ head/sbin/ifconfig/ifieee80211.cFri Mar 18 04:22:07 2016
(r297010)
@@ -2727,6 +2727,26 @@ printbssload(const char *tag, const uint
}
 }
 
+static void
+printapchanrep(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
+{
+   printf("%s", tag);
+   if (verbose) {
+   const struct ieee80211_ap_chan_report_ie *ap =
+   (const struct ieee80211_ap_chan_report_ie *) ie;
+   const char *sep = "";
+   int i;
+
+   printf("i_class);
+
+   for (i = 3; i < ielen; i++) {
+   printf("%s%u", sep, ie[i]);
+   sep = ",";
+   }
+   printf("]>");
+   }
+}
+
 static const char *
 wpa_cipher(const u_int8_t *sel)
 {
@@ -3129,11 +3149,8 @@ iename(int elemid)
case IEEE80211_ELEMID_MEASREP:  return " MEASREP";
case IEEE80211_ELEMID_QUIET:return " QUIET";
case IEEE80211_ELEMID_IBSSDFS:  return " IBSSDFS";
-   case IEEE80211_ELEMID_APCHANREP:return " APCHANREP";
case IEEE80211_ELEMID_TPC:  return " TPC";
case IEEE80211_ELEMID_CCKM: return " CCKM";
-   case IEEE80211_ELEMID_VHT_CAP:  return " VHTCAP";
-   case IEEE80211_ELEMID_VHT_OPMODE:   return " VHTOPMODE";
case IEEE80211_ELEMID_VHT_PWR_ENV:  return " VHTPWRENV";
}
return " ???";
@@ -3208,6 +3225,9 @@ printies(const u_int8_t *vp, int ielen, 
case IEEE80211_ELEMID_BSSLOAD:
printbssload(" BSSLOAD", vp, 2+vp[1], maxcols);
break;
+   case IEEE80211_ELEMID_APCHANREP:
+   printapchanrep(" APCHANREP", vp, 2+vp[1], maxcols);
+   break;
default:
if (verbose)
printie(iename(vp[0]), vp, 2+vp[1], maxcols);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296967 - in head: contrib/libxo/libxo lib/libxo

2016-03-19 Thread Bryan Drewery
On 3/16/16 4:50 PM, Phil Shafer wrote:
> Author: phil
> Date: Wed Mar 16 23:50:41 2016
> New Revision: 296967
> URL: https://svnweb.freebsd.org/changeset/base/296967
> 
> Log:
>   Move generated file from contrib to build directory.
>   
>   Reviewed by:obrien
>   Approved by:sjg
> 
> Added:
>   head/lib/libxo/xo_config.h
>  - copied unchanged from r296966, head/contrib/libxo/libxo/xo_config.h
> Deleted:
>   head/contrib/libxo/libxo/xo_config.h
> Modified:
>   head/lib/libxo/Makefile
> 
> Modified: head/lib/libxo/Makefile
> ==
> --- head/lib/libxo/Makefile   Wed Mar 16 23:42:57 2016(r296966)
> +++ head/lib/libxo/Makefile   Wed Mar 16 23:50:41 2016(r296967)
> @@ -13,7 +13,7 @@ SHLIB_MAJOR=0
>  
>  SRCS=libxo.c xo_encoder.c xo_syslog.c
>  
> -CFLAGS+=-I${LIBXOSRC}/libxo
> +CFLAGS+=-I${LIBXOSRC}/libxo -I${.CURDIR}
>  CFLAGS+=-DXO_ENCODERDIR=\"/usr/lib/libxo/encoder\"
>  
>  INCS=xo.h xo_encoder.h

This breaks the build for usr.bin/xo and lib/libxo/tests.

https://lists.freebsd.org/pipermail/freebsd-current/2016-March/060181.html

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


svn commit: r297004 - head

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 02:56:07 2016
New Revision: 297004
URL: https://svnweb.freebsd.org/changeset/base/297004

Log:
  Add old libdevinfo.so version to OLD_LIBS

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Fri Mar 18 01:53:00 2016(r297003)
+++ head/ObsoleteFiles.inc  Fri Mar 18 02:56:07 2016(r297004)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20160317: rman_res_t size bump to uintmax_t
+OLD_LIBS+=usr/lib/libdevinfo.so.5
 # 20160305: new clang import which bumps version from 3.7.1 to 3.8.0.
 OLD_FILES+=usr/bin/macho-dump
 OLD_FILES+=usr/lib/clang/3.7.1/include/sanitizer/allocator_interface.h
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296984 - head/sys/netinet6

2016-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Thu Mar 17 10:59:30 2016
New Revision: 296984
URL: https://svnweb.freebsd.org/changeset/base/296984

Log:
  Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
  IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.
  
  Submitted by: n_hibma
  MFC after:2 weeks

Modified:
  head/sys/netinet6/in6_src.c

Modified: head/sys/netinet6/in6_src.c
==
--- head/sys/netinet6/in6_src.c Thu Mar 17 09:04:07 2016(r296983)
+++ head/sys/netinet6/in6_src.c Thu Mar 17 10:59:30 2016(r296984)
@@ -256,19 +256,27 @@ in6_selectsrc(uint32_t fibnum, struct so
(inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0)
return (error);
 
-   ia6 = (struct in6_ifaddr *)ifa_ifwithaddr(
-   (struct sockaddr *));
-   if (ia6 == NULL ||
-   (ia6->ia6_flags & (IN6_IFF_ANYCAST | IN6_IFF_NOTREADY))) {
-   if (ia6 != NULL)
-   ifa_free(>ia_ifa);
-   return (EADDRNOTAVAIL);
-   }
+   /*
+* If IPV6_BINDANY socket option is set, we allow to specify
+* non local addresses as source address in IPV6_PKTINFO
+* ancillary data.
+*/
+   if ((inp->inp_flags & INP_BINDANY) == 0) {
+   ia6 = (struct in6_ifaddr *)ifa_ifwithaddr(
+   (struct sockaddr *));
+   if (ia6 == NULL || (ia6->ia6_flags & (IN6_IFF_ANYCAST |
+   IN6_IFF_NOTREADY))) {
+   if (ia6 != NULL)
+   ifa_free(>ia_ifa);
+   return (EADDRNOTAVAIL);
+   }
+   bcopy(>ia_addr.sin6_addr, srcp, sizeof(*srcp));
+   ifa_free(>ia_ifa);
+   } else
+   bcopy(_addr, srcp, sizeof(*srcp));
pi->ipi6_addr = srcsock.sin6_addr; /* XXX: this overrides pi */
if (ifpp)
*ifpp = ifp;
-   bcopy(>ia_addr.sin6_addr, srcp, sizeof(*srcp));
-   ifa_free(>ia_ifa);
return (0);
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297052 - in head: lib/libfetch usr.bin/fetch

2016-03-19 Thread Michael Gmelin
Author: grembo (ports committer)
Date: Sat Mar 19 11:55:21 2016
New Revision: 297052
URL: https://svnweb.freebsd.org/changeset/base/297052

Log:
  Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles
  
  Reviewed by:  wblock
  Approved by:  wblock
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D5558

Modified:
  head/lib/libfetch/fetch.3
  head/usr.bin/fetch/fetch.1

Modified: head/lib/libfetch/fetch.3
==
--- head/lib/libfetch/fetch.3   Sat Mar 19 11:48:06 2016(r297051)
+++ head/lib/libfetch/fetch.3   Sat Mar 19 11:55:21 2016(r297052)
@@ -1,6 +1,6 @@
 .\"-
 .\" Copyright (c) 1998-2013 Dag-Erling Smørgrav
-.\" Copyright (c) 2013 Michael Gmelin 
+.\" Copyright (c) 2013-2016 Michael Gmelin 
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 29, 2015
+.Dd March 18, 2016
 .Dt FETCH 3
 .Os
 .Sh NAME
@@ -396,8 +396,15 @@ is currently unimplemented.
 .Sh HTTPS SCHEME
 Based on HTTP SCHEME.
 By default the peer is verified using the CA bundle located in
-.Pa /etc/ssl/cert.pem .
-The file may contain multiple CA certificates.
+.Pa /usr/local/etc/ssl/cert.pem .
+If this file does not exist,
+.Pa /etc/ssl/cert.pem
+is used instead.
+If neither file exists, and
+.Ev SSL_CA_CERT_PATH
+has not been set,
+OpenSSL's default CA cert and path settings apply.
+The certificate bundle can contain multiple CA certificates.
 A common source of a current CA bundle is
 .Pa \%security/ca_root_nss .
 .Pp
@@ -428,10 +435,11 @@ Client certificate based authentication 
 The environment variable
 .Ev SSL_CLIENT_CERT_FILE
 should be set to point to a file containing key and client certificate
-to be used in PEM format. In case the key is stored in a separate
-file, the environment variable
+to be used in PEM format.
+When a PEM-format key is in a separate file from the client certificate,
+the environment variable
 .Ev SSL_CLIENT_KEY_FILE
-can be set to point to the key in PEM format.
+can be set to point to the key file.
 In case the key uses a password, the user will be prompted on standard
 input (see
 .Xr PEM 3 ) .
@@ -531,7 +539,7 @@ Invalid URL
 .El
 .Pp
 The accompanying error message includes a protocol-specific error code
-and message, e.g.\& "File is not available (404 Not Found)"
+and message, like "File is not available (404 Not Found)"
 .Sh ENVIRONMENT
 .Bl -tag -width ".Ev FETCH_BIND_ADDRESS"
 .It Ev FETCH_BIND_ADDRESS
@@ -648,8 +656,7 @@ for compatibility.
 Allow SSL version 3 when negotiating the connection (not recommended).
 .It Ev SSL_CA_CERT_FILE
 CA certificate bundle containing trusted CA certificates.
-Default value:
-.Pa /etc/ssl/cert.pem .
+Default value: See HTTPS SCHEME above.
 .It Ev SSL_CA_CERT_PATH
 Path containing trusted CA hashes.
 .It Ev SSL_CLIENT_CERT_FILE

Modified: head/usr.bin/fetch/fetch.1
==
--- head/usr.bin/fetch/fetch.1  Sat Mar 19 11:48:06 2016(r297051)
+++ head/usr.bin/fetch/fetch.1  Sat Mar 19 11:55:21 2016(r297052)
@@ -1,6 +1,6 @@
 .\"-
 .\" Copyright (c) 2000-2014 Dag-Erling Smørgrav
-.\" Copyright (c) 2013 Michael Gmelin 
+.\" Copyright (c) 2013-2016 Michael Gmelin 
 .\" All rights reserved.
 .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used
 .\" by permission.
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 25, 2015
+.Dd March 18, 2016
 .Dt FETCH 1
 .Os
 .Sh NAME
@@ -134,11 +134,17 @@ only.
 [SSL]
 Path to certificate bundle containing trusted CA certificates.
 If not specified,
-.Pa /etc/ssl/cert.pem
+.Pa /usr/local/etc/ssl/cert.pem
 is used.
-The file may contain multiple CA certificates. The port
+If this file does not exist,
+.Pa /etc/ssl/cert.pem
+is used instead.
+If neither file exists and no CA path has been configured,
+OpenSSL's default CA cert and path settings apply.
+The certificate bundle can contain multiple CA certificates.
+The
 .Pa security/ca_root_nss
-is a common source of a current CA bundle.
+port is a common source of a current CA bundle.
 .It Fl -ca-path= Ns Ar dir
 [SSL]
 The directory
@@ -218,10 +224,16 @@ altogether, or a comma- or whitespace-se
 which proxies should not be used.
 .It Fl -no-sslv3
 [SSL]
-Don't allow SSL version 3 when negotiating the connection.
+Do not allow SSL version 3 when negotiating the connection.
+This option is deprecated and is provided for backward compatibility
+only.
+SSLv3 is disabled by default.
+Set
+.Ev SSL_ALLOW_SSL3
+to change this behavior.
 .It Fl -no-tlsv1
 [SSL]
-Don't allow TLS version 1 when negotiating the connection.
+Do not allow TLS version 1 when negotiating the connection.
 .It Fl -no-verify-hostname
 [SSL]
 Do not verify that the hostname matches the subject of the
@@ 

svn commit: r297051 - head/sys/rpc

2016-03-19 Thread Alexander Motin
Author: mav
Date: Sat Mar 19 11:48:06 2016
New Revision: 297051
URL: https://svnweb.freebsd.org/changeset/base/297051

Log:
  Fix incorrect (fortunately bigger) malloc size.
  
  Submitted by: pfg
  MFC after:1 week

Modified:
  head/sys/rpc/svc.c

Modified: head/sys/rpc/svc.c
==
--- head/sys/rpc/svc.c  Sat Mar 19 11:35:53 2016(r297050)
+++ head/sys/rpc/svc.c  Sat Mar 19 11:48:06 2016(r297051)
@@ -560,7 +560,7 @@ svc_loss_reg(SVCXPRT *xprt, void (*dispa
mtx_unlock(>sp_lock);
return (TRUE);
}
-   s = malloc(sizeof (struct svc_callout), M_RPC, M_NOWAIT);
+   s = malloc(sizeof(struct svc_loss_callout), M_RPC, M_NOWAIT);
if (s == NULL) {
mtx_unlock(>sp_lock);
return (FALSE);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296970 - head/lib/libxo/tests

2016-03-19 Thread Simon J. Gerraty
Author: sjg
Date: Thu Mar 17 00:37:04 2016
New Revision: 296970
URL: https://svnweb.freebsd.org/changeset/base/296970

Log:
  We need libutil
  
  and make it feasible to at least build the tests in situ

Modified:
  head/lib/libxo/tests/Makefile

Modified: head/lib/libxo/tests/Makefile
==
--- head/lib/libxo/tests/Makefile   Thu Mar 17 00:32:29 2016
(r296969)
+++ head/lib/libxo/tests/Makefile   Thu Mar 17 00:37:04 2016
(r296970)
@@ -242,8 +242,14 @@ PROGS+= test_11
 
 CFLAGS+=   -I${LIBXOSRC}/libxo
 
-LIBADD=xo
+LIBADD=xo util 
 
 SUBDIR+=   encoder
 
+.if ${MACHINE} == "host"
+# make it easy to test without install
+TESTSDIR=  ${.OBJDIR}
+CFLAGS+=   -I${.CURDIR:H}
+.endif
+
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296936 - in head/sys: arm/conf arm/nvidia arm/nvidia/tegra124 boot/fdt/dts/arm

2016-03-19 Thread Michal Meloun
Author: mmel
Date: Wed Mar 16 13:01:48 2016
New Revision: 296936
URL: https://svnweb.freebsd.org/changeset/base/296936

Log:
  Import basic support for Nvidia Jetson TK1 board and tegra124 SoC.
  The following pheripherals are supported: UART, MMC, AHCI, EHCI, PCIe, I2C,
  PMIC, GPIO, CPU temperature and clock.
  
  Note: The PCIe driver is pure mash at this moment. It will be reworked
  immediately when both D5237 and D2579 enter the current tree.

Added:
  head/sys/arm/conf/JETSON-TK1   (contents, props changed)
  head/sys/arm/conf/TEGRA124.common   (contents, props changed)
  head/sys/arm/nvidia/
  head/sys/arm/nvidia/as3722.c   (contents, props changed)
  head/sys/arm/nvidia/as3722.h   (contents, props changed)
  head/sys/arm/nvidia/as3722_gpio.c   (contents, props changed)
  head/sys/arm/nvidia/as3722_regulators.c   (contents, props changed)
  head/sys/arm/nvidia/as3722_rtc.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/
  head/sys/arm/nvidia/tegra124/files.tegra124   (contents, props changed)
  head/sys/arm/nvidia/tegra124/std.tegra124   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_car.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_car.h   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_clk_per.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_clk_super.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_coretemp.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_cpufreq.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_machdep.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_mp.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_mp.h   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_pmc.c   (contents, props changed)
  head/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_abpmisc.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_ahci.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_efuse.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_efuse.h   (contents, props changed)
  head/sys/arm/nvidia/tegra_ehci.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_gpio.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_i2c.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_lic.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_pcie.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_pinmux.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_pmc.h   (contents, props changed)
  head/sys/arm/nvidia/tegra_rtc.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_sdhci.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_soctherm.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_soctherm_if.m   (contents, props changed)
  head/sys/arm/nvidia/tegra_uart.c   (contents, props changed)
  head/sys/arm/nvidia/tegra_usbphy.c   (contents, props changed)
  head/sys/boot/fdt/dts/arm/tegra124-jetson-tk1-fbsd.dts   (contents, props 
changed)

Added: head/sys/arm/conf/JETSON-TK1
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/JETSON-TK1Wed Mar 16 13:01:48 2016
(r296936)
@@ -0,0 +1,37 @@
+# Kernel configuration for Jetson TK1 board
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include"TEGRA124.common"
+ident  JETSON-TK1
+
+# Flattened Device Tree
+optionsFDT_DTB_STATIC
+makeoptionsFDT_DTS_FILE=tegra124-jetson-tk1-fbsd.dts
+
+makeoptions MODULES_OVERRIDE=""
+#options   BOOTVERBOSE
+#options   BOOTHOWTO=RB_SINGLE
+
+#options   ROOTDEVNAME=\"ufs:mmcsd0s2a\"
+optionsROOTDEVNAME=\"ufs:ada0s1a\"
+
+# CTF doesn't works yet
+makeoptionsWITHOUT_CTF=1

Added: head/sys/arm/conf/TEGRA124.common
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/TEGRA124.common   Wed Mar 16 13:01:48 2016
(r296936)
@@ -0,0 +1,154 @@
+#
+# Kernel 

Re: svn commit: r296909 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2016-03-19 Thread Gleb Smirnoff
On Tue, Mar 15, 2016 at 10:43:53AM -0700, John Baldwin wrote:
J> > Log:
J> >   Fix witness panic in the ipoib_ioctl() function when unloading the
J> >   ipoib module.
J> >   
J> >   The bpfdetach() function is trying to turn off promiscious mode on the
J> >   network interface it is attached to while holding a mutex. The fix
J> >   consists of ignoring any further calls to the ipoib_ioctl() function
J> >   when the network interface is going to be detached. The ipoib_ioctl()
J> >   function might sleep.
J> >   
J> >   Sponsored by:Mellanox Technologies
J> >   MFC after:   1 week
J> 
J> In all of the other NIC drivers I have worked on the fix has been to call
J> if_detach (or ether_ifdetach) as the first step in your detach method before
J> you try to stop the interface.  The idea is to remove external connections
J> from your driver first, and the only after those have drained do you actually
J> shut down the hardware.  Given you are calling if_detach() just before
J> if_free() below, ipoib just seems to be broken here.
J> 
J> For example, detach in a typical NIC driver does this:
J> 
J>  struct foo_softc *sc;
J> 
J>  sc = device_get_softc(dev);
J>  ether_ifdetach(sc->sc_ifp);
J>  FOO_LOCK(sc);
J>  foo_stop(sc);
J>  FOO_UNLOCK(sc);
J>  callout_drain(>timer);
J>  bus_teardown_intr(...);
J>  bus_release_resource(...);
J>  if_free(sc->sc_ifp);
J> 
J> Similarly, devices with a character device in /dev should be calling
J> destroy_dev() first before shutting down hardware, etc.

In the new KPI in the projects/ifnet branch, I am doing the following:

- there is only one if_detach(), that does both detach and free
- if_detach() is called at the very last stage, after stopping hardware (if hw 
is still present)
- driver is responsible to be ready to be called from upper half of the stack,
  regardless of the state of hardware. Ususally it means that it should lock 
internal mutex,
  and check internal RUNNING flag.

Note, that hardware can go away asynchronously, so demand to call if_detach()
before stopping hardware can't be fulfiled.

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


svn commit: r297014 - head/sys/netipsec

2016-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Fri Mar 18 09:03:00 2016
New Revision: 297014
URL: https://svnweb.freebsd.org/changeset/base/297014

Log:
  Fix handling of net.inet.ipsec.dfbit=2 variable.
  IP_DF macro is in host bytes order, but ip_off field is in network bytes
  order. So, use htons() for correct check.

Modified:
  head/sys/netipsec/ipsec_output.c

Modified: head/sys/netipsec/ipsec_output.c
==
--- head/sys/netipsec/ipsec_output.cFri Mar 18 08:47:17 2016
(r297013)
+++ head/sys/netipsec/ipsec_output.cFri Mar 18 09:03:00 2016
(r297014)
@@ -441,7 +441,7 @@ ipsec_encap(struct mbuf **mp, struct sec
setdf = V_ip4_ipsec_dfbit;
break;
default:/* propagate to outer header */
-   setdf = (ip->ip_off & ntohs(IP_DF)) != 0;
+   setdf = (ip->ip_off & htons(IP_DF)) != 0;
}
itos = ip->ip_tos;
break;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296981 - head/sys/arm/arm

2016-03-19 Thread Andrew Turner
Author: andrew
Date: Thu Mar 17 08:40:58 2016
New Revision: 296981
URL: https://svnweb.freebsd.org/changeset/base/296981

Log:
  Make it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10.
  We changed the ABI for ARM in 10, an removed support for the old ABI in 11,
  as such binaries from these releases are unable to be run on a head kernel.
  
  Reviewed by:  bz, emast
  Sponsored by: ABT Systems Ltd
  Differential Revision:https://reviews.freebsd.org/D5652

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

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Thu Mar 17 06:23:48 2016(r296980)
+++ head/sys/arm/arm/machdep.c  Thu Mar 17 08:40:58 2016(r296981)
@@ -178,6 +178,12 @@ DB_SHOW_COMMAND(vtop, db_show_vtop)
 #definedebugf(fmt, args...)
 #endif
 
+#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
+defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) || \
+defined(COMPAT_FREEBSD9)
+#error FreeBSD/arm doesn't provide compatibility with releases prior to 10
+#endif
+
 struct pcpu __pcpu[MAXCPU];
 struct pcpu *pcpup = &__pcpu[0];
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296891 - in head/sys: cam dev/arcmsr dev/iir dev/isci dev/ncr dev/ppbus

2016-03-19 Thread Andrew Turner
On Tue, 15 Mar 2016 05:17:29 + (UTC)
Warner Losh  wrote:
...
> Modified: head/sys/dev/ppbus/vpo.c
> ==
> --- head/sys/dev/ppbus/vpo.c  Tue Mar 15 04:56:39 2016
> (r296890) +++ head/sys/dev/ppbus/vpo.cTue Mar 15 05:17:29
> 2016  (r296891) @@ -187,17 +187,19 @@ vpo_intr(struct vpo_data
...

> @@ -307,11 +309,15 @@ vpo_action(struct cam_sim *sim, union cc
>  
>   csio = >csio;
>  
> + if (ccb->ccb_h.flags & CAM_CDB_PHYS) {
> + ccb->ccb_h.status = CAM_REQ_INVALID;
> + xpt_done(ccb);
> + break;
> + }
>  #ifdef VP0_DEBUG
>   device_printf(vpo->vpo_dev, "XPT_SCSI_IO (0x%x)
> request\n",
> - csio->cdb_io.cdb_bytes[0]);
> + scsiio_cdb_ptr(csio));

This is broken, scsiio_cdb_ptr returns a uint8_t * while %x expects an
int.

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


svn commit: r297018 - head/sys/dev/iscsi

2016-03-19 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Mar 18 13:26:16 2016
New Revision: 297018
URL: https://svnweb.freebsd.org/changeset/base/297018

Log:
  Add lock assertion.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==
--- head/sys/dev/iscsi/iscsi.c  Fri Mar 18 10:01:25 2016(r297017)
+++ head/sys/dev/iscsi/iscsi.c  Fri Mar 18 13:26:16 2016(r297018)
@@ -288,6 +288,8 @@ iscsi_session_terminate_task(struct iscs
 struct iscsi_outstanding *io, bool requeue)
 {
 
+   ISCSI_SESSION_LOCK_ASSERT(is);
+
if (io->io_ccb != NULL) {
io->io_ccb->ccb_h.status &= ~(CAM_SIM_QUEUED | CAM_STATUS_MASK);
if (requeue)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2016-03-19 Thread John Baldwin
Author: jhb
Date: Fri Mar 18 19:48:49 2016
New Revision: 297039
URL: https://svnweb.freebsd.org/changeset/base/297039

Log:
  Check IPI status more frequently when waiting.
  
  An IPI cannot be sent via the local APIC if a previous IPI is still
  being delivered.  Attempts to send an IPI will wait for a pending IPI
  to clear.  Prior to r278325 these checks used a spin loop with a
  hardcoded maximum count which broke AP startup on some systems.
  However, r278325 also enforced a minimum latency of 5 microseconds if an
  IPI was still pending which resulted in a measurable performance hit.
  This change reduces that minimum latency to 1 microsecond.
  
  Tested by:stas
  MFC after:3 days

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

Modified: head/sys/x86/x86/local_apic.c
==
--- head/sys/x86/x86/local_apic.c   Fri Mar 18 19:36:43 2016
(r297038)
+++ head/sys/x86/x86/local_apic.c   Fri Mar 18 19:48:49 2016
(r297039)
@@ -1641,11 +1641,11 @@ native_lapic_ipi_wait(int delay)
return (1);
}
 
-   for (x = 0; x < delay; x += 5) {
+   for (x = 0; x < delay; x++) {
if ((lapic_read_icr_lo() & APIC_DELSTAT_MASK) ==
APIC_DELSTAT_IDLE)
return (1);
-   DELAY(5);
+   DELAY(1);
}
return (0);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r287445 - in head: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools

2016-03-19 Thread Alan Somers
Do you happen to know if ACL_ENTRY_INHERITED is written to disk, or does it
only exist in-core?

On Wed, Mar 16, 2016 at 10:37 PM, Sean Fagan  wrote:

> As I recall, from ZFS, but I’m not positive.  Either that, or something
> else was using 0x40.
>
> Sean.
> > On Mar 16, 2016, at 9:29 PM, Xin LI  wrote:
> >
> > +sef who created the patch...
> >
> > On Wed, Mar 16, 2016 at 3:40 PM, Alan Somers 
> wrote:
> >>
> >>
> >> On Thu, Sep 3, 2015 at 6:14 PM, Xin LI  wrote:
> >>>
> >>> Author: delphij
> >>> Date: Fri Sep  4 00:14:20 2015
> >>> New Revision: 287445
> >>> URL: https://svnweb.freebsd.org/changeset/base/287445
> >>>
> >>> Log:
> >>>  Expose an interface to determine if an ACE is inherited.
> >>>
> >>>  Submitted by: sef
> >>>  Reviewed by:  trasz
> >>>  MFC after:2 weeks
> >>>  Differential Revision:https://reviews.freebsd.org/D3540
> >>>
> >>> Modified:
> >>>  head/bin/setfacl/setfacl.1
> >>>  head/lib/libc/posix1e/acl_add_flag_np.3
> >>>  head/lib/libc/posix1e/acl_support_nfs4.c
> >>>  head/share/man/man9/acl.9
> >>>  head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c
> >>>  head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
> >>>  head/sys/kern/subr_acl_nfs4.c
> >>>  head/sys/sys/acl.h
> >>>  head/tools/regression/acltools/tools-crossfs.test
> >>>  head/tools/regression/acltools/tools-nfs4-psarc.test
> >>>  head/tools/regression/acltools/tools-nfs4-trivial.test
> >>>  head/tools/regression/acltools/tools-nfs4.test
> >>
> >>
> >> ...
> >>
> >>>
> >>> Modified: head/sys/sys/acl.h
> >>>
> >>>
> ==
> >>> --- head/sys/sys/acl.h  Thu Sep  3 22:15:56 2015(r287444)
> >>> +++ head/sys/sys/acl.h  Fri Sep  4 00:14:20 2015(r287445)
> >>> @@ -249,11 +249,12 @@ typedef void *acl_t;
> >>> #defineACL_ENTRY_INHERIT_ONLY  0x0008
> >>> #defineACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
> >>> #defineACL_ENTRY_FAILED_ACCESS 0x0020
> >>> +#defineACL_ENTRY_INHERITED 0x0080
> >>>
> >>> #defineACL_FLAGS_BITS  (ACL_ENTRY_FILE_INHERIT
> |
> >>> \
> >>> ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
> >>> ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
> >>> -ACL_ENTRY_FAILED_ACCESS)
> >>> +ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
> >>>
> >>> /*
> >>>  * Undefined value in ae_id field.  ae_id should be set to this value
> >>
> >>
> >> Out of curiosity, why did you choose 0x0080 for ACL_ENTRY_INHERITED
> instead
> >> of 0x0040 ?
> >>
> >
> >
> >
> > --
> > Xin LI  https://www.delphij.net/
> > FreeBSD - The Power to Serve! Live free or die
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Re: svn commit: r296927 - in head: share/man/man9 sys/kern sys/sys

2016-03-19 Thread Conrad Meyer
Fixed in r296973.

On Wed, Mar 16, 2016 at 3:02 PM, Bjoern A. Zeeb
 wrote:
> On Wed, 16 Mar 2016, Conrad E. Meyer wrote:
>
>> Author: cem
>> Date: Wed Mar 16 04:22:32 2016
>> New Revision: 296927
>> URL: https://svnweb.freebsd.org/changeset/base/296927
>>
>> Log:
>>  fail(9): Upstreaming some fail point enhancements
>>
>>  This is several year's worth of fail point upgrades done at EMC Isilon.
>> They
>>  are interdependent enough that it makes sense to put a single diff up for
>> them.
>>  Primarily, we added:
>>
>>  - Changing all mainline execution paths to be lockless, which lets us use
>> fail
>>points in more sleep-sensitive areas, and allows more parallel
>> execution
>>  - A number of additional commands, including 'pause' that lets us do some
>>interesting deterministic repros of race conditions
>>  - The ability to dump the stacks of all threads sleeping on a fail point
>>  - A number of other API changes to allow marking up the fail point's
>> context in
>>the code, and firing callbacks before and after execution
>>  - A man page update
>>
>>  Submitted by:  Matthew Bryan 
>>  Reviewed by:   cem (earlier version), jhb, kib, pho
>>  With feedback from:bdrewery
>>  Sponsored by:  EMC / Isilon Storage Division
>>  Differential Revision: https://reviews.freebsd.org/D5427
>>
>> Modified:
>>  head/share/man/man9/fail.9
>>  head/sys/kern/kern_fail.c
>>  head/sys/kern/subr_sleepqueue.c
>>  head/sys/sys/fail.h
>>  head/sys/sys/sleepqueue.h
>
>
> This seems to have broken a few kernel configs (just one example);
>
> linking kernel.full
> subr_sleepqueue.o: In function `sleepq_sbuf_print_stacks':
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448): undefined
> reference to `stack_create'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x448):
> relocation truncated to fit: R_MIPS_26 against `stack_create'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504): undefined
> reference to `stack_save_td'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x504):
> relocation truncated to fit: R_MIPS_26 against `stack_save_td'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598): undefined
> reference to `stack_sbuf_print'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x598):
> relocation truncated to fit: R_MIPS_26 against `stack_sbuf_print'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0): undefined
> reference to `stack_destroy'
> /scratch/tmp/bz/head.svn/sys/kern/subr_sleepqueue.c:(.text+0x5f0):
> relocation truncated to fit: R_MIPS_26 against `stack_destroy'
> --- kernel.full ---
> *** [kernel.full] Error code 1
>
> bmake[5]: stopped in
> /storage/head/obj/mips.mipsn32/scratch/tmp/bz/head.svn/sys/XLPN32
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296909 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2016-03-19 Thread Adrian Chadd
I've fought this problem in USB drivers. Ideally you'd also have the
detach path /also/ take said lock and drain anyone currently doing
anything active (tx, rx, ioctls, net80211 methods, etc) to completion
before continuing.

A lot of drivers don't do this very well, or at all.



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


svn commit: r297047 - head/sys/conf

2016-03-19 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Mar 18 23:55:25 2016
New Revision: 297047
URL: https://svnweb.freebsd.org/changeset/base/297047

Log:
  Allow pci_host_generic to be compiled into ARM kernels, used, e.g., in
  simulators.
  
  Sponsored by: DARPA/AFRL

Modified:
  head/sys/conf/files.arm

Modified: head/sys/conf/files.arm
==
--- head/sys/conf/files.arm Fri Mar 18 22:52:11 2016(r297046)
+++ head/sys/conf/files.arm Fri Mar 18 23:55:25 2016(r297047)
@@ -103,6 +103,7 @@ dev/hwpmc/hwpmc_arm.c   optionalhwpmc
 dev/hwpmc/hwpmc_armv7.coptionalhwpmc armv6
 dev/iicbus/twsi/twsi.c optionaltwsi
 dev/ofw/ofw_cpu.c  optionalfdt
+dev/pci/pci_host_generic.c optionalpci fdt
 dev/psci/psci.coptionalpsci
 dev/psci/psci_arm.Soptionalpsci
 dev/syscons/scgfbrndr.coptionalsc
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296983 - head/release/doc/en_US.ISO8859-1/relnotes

2016-03-19 Thread Alexander Motin
Author: mav
Date: Thu Mar 17 09:04:07 2016
New Revision: 296983
URL: https://svnweb.freebsd.org/changeset/base/296983

Log:
  Add paragraph about isp(4) improvements.

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Mar 17 
08:57:41 2016(r296982)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Mar 17 
09:04:07 2016(r296983)
@@ -1168,6 +1168,11 @@
 
   The  driver has been updated
to support CD-ROM and removable devices.
+
+  The  driver has
+   been updated and improved: added support for 16Gbps FC cards,
+   improved target mode support, completed Multi-ID (NPIV)
+   functionality.
 
 
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r287445 - in head: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools

2016-03-19 Thread Xin LI
+sef who created the patch...

On Wed, Mar 16, 2016 at 3:40 PM, Alan Somers  wrote:
>
>
> On Thu, Sep 3, 2015 at 6:14 PM, Xin LI  wrote:
>>
>> Author: delphij
>> Date: Fri Sep  4 00:14:20 2015
>> New Revision: 287445
>> URL: https://svnweb.freebsd.org/changeset/base/287445
>>
>> Log:
>>   Expose an interface to determine if an ACE is inherited.
>>
>>   Submitted by: sef
>>   Reviewed by:  trasz
>>   MFC after:2 weeks
>>   Differential Revision:https://reviews.freebsd.org/D3540
>>
>> Modified:
>>   head/bin/setfacl/setfacl.1
>>   head/lib/libc/posix1e/acl_add_flag_np.3
>>   head/lib/libc/posix1e/acl_support_nfs4.c
>>   head/share/man/man9/acl.9
>>   head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c
>>   head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
>>   head/sys/kern/subr_acl_nfs4.c
>>   head/sys/sys/acl.h
>>   head/tools/regression/acltools/tools-crossfs.test
>>   head/tools/regression/acltools/tools-nfs4-psarc.test
>>   head/tools/regression/acltools/tools-nfs4-trivial.test
>>   head/tools/regression/acltools/tools-nfs4.test
>
>
> ...
>
>>
>> Modified: head/sys/sys/acl.h
>>
>> ==
>> --- head/sys/sys/acl.h  Thu Sep  3 22:15:56 2015(r287444)
>> +++ head/sys/sys/acl.h  Fri Sep  4 00:14:20 2015(r287445)
>> @@ -249,11 +249,12 @@ typedef void *acl_t;
>>  #defineACL_ENTRY_INHERIT_ONLY  0x0008
>>  #defineACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
>>  #defineACL_ENTRY_FAILED_ACCESS 0x0020
>> +#defineACL_ENTRY_INHERITED 0x0080
>>
>>  #defineACL_FLAGS_BITS  (ACL_ENTRY_FILE_INHERIT |
>> \
>>  ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
>>  ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
>> -ACL_ENTRY_FAILED_ACCESS)
>> +ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
>>
>>  /*
>>   * Undefined value in ae_id field.  ae_id should be set to this value
>
>
> Out of curiosity, why did you choose 0x0080 for ACL_ENTRY_INHERITED instead
> of 0x0040 ?
>



-- 
Xin LI  https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296947 - head/share/man/man9

2016-03-19 Thread Bryan Drewery
On 3/16/2016 3:12 PM, John Baldwin wrote:
> On Wednesday, March 16, 2016 06:39:48 PM Bryan Drewery wrote:
>> Author: bdrewery
>> Date: Wed Mar 16 18:39:48 2016
>> New Revision: 296947
>> URL: https://svnweb.freebsd.org/changeset/base/296947
>>
>> Log:
>>   Remove incorrect BUGS entry about asserting lock not held.
>>   
>>   For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
>>   made to panic in r126316.
>>   
>>   MFC after: 1 week
> Eh, how can this possibly work?

Kib and I discussed it on here already. I have a fix in
https://reviews.freebsd.org/D5659

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r296933 - in head: share/man/man9 sys/sys

2016-03-19 Thread Gleb Smirnoff
On Thu, Mar 17, 2016 at 08:21:12AM +0100, Hans Petter Selasky wrote:
H> On 03/16/16 21:32, Gleb Smirnoff wrote:
H> > On Wed, Mar 16, 2016 at 08:37:52AM +, Hans Petter Selasky wrote:
H> > H> Author: hselasky
H> > H> Date: Wed Mar 16 08:37:52 2016
H> > H> New Revision: 296933
H> > H> URL: https://svnweb.freebsd.org/changeset/base/296933
H> > H>
H> > H> Log:
H> > H>   Improve the implementation and documentation of the
H> > H>   SYSCTL_COUNTER_U64_ARRAY() macro.
H> > H>
H> > H>   - Add proper asserts to the SYSCTL_COUNTER_U64_ARRAY() macro that 
checks
H> > H> the size of the first element of the array.
H> > H>   - Add an example to the counter(9) manual page how to use the
H> > H> SYSCTL_COUNTER_U64_ARRAY() macro.
H> > H>   - Add some missing symbolic links for counter(9) while at it.
H> >
H> > ...
H> >
H> > H> +.Sh EXAMPLES
H> > H> +The following example creates a static counter array exported to
H> > H> +userspace through a sysctl:
H> > H> +.Bd -literal -offset indent
H> > H> +#define MY_SIZE 8
H> > H> +static counter_u64_t array[MY_SIZE];
H> > H> +SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW,
H> > H> +[0], MY_SIZE, "Test counter array");
H> >
H> > I always wondered what is stylistically better: array or [0]? I
H> > usually prefer the former.
H> >
H> 
H> A question: If you pass "array" why do you need a length argument in the 
H> SYSCTL macro. Can't you get the length of the array like 
H> sizeof(array)/sizeof((array)[0]) inside the macro?

IMHO, that's a good idea for the static sysctl declaration. I can't imagine
a good case when size in array declaration and in the SYSCTL declaration
would differ.

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


svn commit: r296974 - head/sys/net80211

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Thu Mar 17 01:09:21 2016
New Revision: 296974
URL: https://svnweb.freebsd.org/changeset/base/296974

Log:
  [net80211] Add some more missing IEs.
  
  There are a /lot/ more missing; I'll chase these down over time.
  
  Obtained from:802.11-2012 standard

Modified:
  head/sys/net80211/ieee80211.h

Modified: head/sys/net80211/ieee80211.h
==
--- head/sys/net80211/ieee80211.h   Thu Mar 17 01:05:53 2016
(r296973)
+++ head/sys/net80211/ieee80211.h   Thu Mar 17 01:09:21 2016
(r296974)
@@ -710,6 +710,8 @@ enum {
IEEE80211_ELEMID_IBSSPARMS  = 6,
IEEE80211_ELEMID_COUNTRY= 7,
IEEE80211_ELEMID_BSSLOAD= 11,
+   IEEE80211_ELEMID_TSPEC  = 13,
+   IEEE80211_ELEMID_TCLAS  = 14,
IEEE80211_ELEMID_CHALLENGE  = 16,
/* 17-31 reserved for challenge text extension */
IEEE80211_ELEMID_PWRCNSTR   = 32,
@@ -729,6 +731,17 @@ enum {
IEEE80211_ELEMID_XRATES = 50,
IEEE80211_ELEMID_APCHANREP  = 51,
IEEE80211_ELEMID_HTINFO = 61,
+   IEEE80211_ELEMID_SECCHAN_OFFSET = 62,
+   IEEE80211_ELEMID_RRM_ENACAPS= 70,
+   IEEE80211_ELEMID_MULTIBSSID = 71,
+   IEEE80211_ELEMID_COEX_2040  = 72,
+   IEEE80211_ELEMID_INTOL_CHN_REPORT   = 73,
+   IEEE80211_ELEMID_OVERLAP_BSS_SCAN_PARAM = 74,
+   IEEE80211_ELEMID_TSF_REQ= 91,
+   IEEE80211_ELEMID_TSF_RESP   = 92,
+   IEEE80211_ELEMID_WNM_SLEEP_MODE = 93,
+   IEEE80211_ELEMID_TIM_BCAST_REQ  = 94,
+   IEEE80211_ELEMID_TIM_BCAST_RESP = 95,
IEEE80211_ELEMID_TPC= 150,
IEEE80211_ELEMID_CCKM   = 156,
IEEE80211_ELEMID_VENDOR = 221,  /* vendor private */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296947 - head/share/man/man9

2016-03-19 Thread John Baldwin
On Wednesday, March 16, 2016 06:39:48 PM Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Mar 16 18:39:48 2016
> New Revision: 296947
> URL: https://svnweb.freebsd.org/changeset/base/296947
> 
> Log:
>   Remove incorrect BUGS entry about asserting lock not held.
>   
>   For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
>   made to panic in r126316.
>   
>   MFC after:  1 week

Eh, how can this possibly work?

That is, suppose I have this code:

sx_slock();
sx_assert(, SA_UNLOCKED);

How does that safely work without WITNESS?  It needs to not panic in the case
that some other thread does sx_slock().  In fact, the comment (modulo the
spelling nit) says this explicitly:

case SA_UNLOCKED:
#ifdef WITNESS
witness_assert(>lock_object, what, file, line);
#else
/*
 * If we hold an exclusve lock fail.  We can't
 * reliably check to see if we hold a shared lock or
 * not.
 */
if (sx_xholder(sx) == curthread)
panic("Lock %s exclusively locked @ %s:%d\n",
sx->lock_object.lo_name, file, line);
#endif
break;

You could perhaps reword the bug to say that SA_UNLOCKED will panic if the lock
is exclusively locked in the non-WITNESS case, but will fail to panic if the
thread holds a shared lock.

The wording in rwlock(9) is better than sx(9) though it should mention that
RA_UNLOCKED can detect a write lock.  That wording could then be used in sx(9).

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


svn commit: r297049 - head/sys/dev/usb/controller

2016-03-19 Thread Alexander Motin
Author: mav
Date: Sat Mar 19 09:20:18 2016
New Revision: 297049
URL: https://svnweb.freebsd.org/changeset/base/297049

Log:
  Add IDs for Intel Wellsburg USB controllers.
  
  MFC after:1 week

Modified:
  head/sys/dev/usb/controller/ehci_pci.c
  head/sys/dev/usb/controller/xhci_pci.c

Modified: head/sys/dev/usb/controller/ehci_pci.c
==
--- head/sys/dev/usb/controller/ehci_pci.c  Sat Mar 19 04:37:33 2016
(r297048)
+++ head/sys/dev/usb/controller/ehci_pci.c  Sat Mar 19 09:20:18 2016
(r297049)
@@ -168,6 +168,10 @@ ehci_pci_match(device_t self)
return ("Intel Wildcat Point USB 2.0 controller USB-A");
case 0x8cad8086:
return ("Intel Wildcat Point USB 2.0 controller USB-B");
+   case 0x8d268086:
+   return ("Intel Wellsburg USB 2.0 controller");
+   case 0x8d2d8086:
+   return ("Intel Wellsburg USB 2.0 controller");
case 0x9c268086:
return ("Intel Lynx Point LP USB 2.0 controller USB");
 

Modified: head/sys/dev/usb/controller/xhci_pci.c
==
--- head/sys/dev/usb/controller/xhci_pci.c  Sat Mar 19 04:37:33 2016
(r297048)
+++ head/sys/dev/usb/controller/xhci_pci.c  Sat Mar 19 09:20:18 2016
(r297049)
@@ -115,6 +115,8 @@ xhci_pci_match(device_t self)
return ("Intel Lynx Point USB 3.0 controller");
case 0x8cb18086:
return ("Intel Wildcat Point USB 3.0 controller");
+   case 0x8d318086:
+   return ("Intel Wellsburg USB 3.0 controller");
case 0x9cb18086:
return ("Broadwell Integrated PCH-LP chipset USB 3.0 
controller");
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297026 - head/sys/arm/conf

2016-03-19 Thread Michal Meloun
Author: mmel
Date: Fri Mar 18 15:27:57 2016
New Revision: 297026
URL: https://svnweb.freebsd.org/changeset/base/297026

Log:
  TEGRA: Connect TEGRA124 to universe build.

Added:
  head/sys/arm/conf/TEGRA124
 - copied, changed from r297025, head/sys/arm/conf/TEGRA124.common
Deleted:
  head/sys/arm/conf/TEGRA124.common
Modified:
  head/sys/arm/conf/JETSON-TK1

Modified: head/sys/arm/conf/JETSON-TK1
==
--- head/sys/arm/conf/JETSON-TK1Fri Mar 18 15:07:43 2016
(r297025)
+++ head/sys/arm/conf/JETSON-TK1Fri Mar 18 15:27:57 2016
(r297026)
@@ -19,7 +19,7 @@
 
 #NO_UNIVERSE
 
-include"TEGRA124.common"
+include"TEGRA124"
 ident  JETSON-TK1
 
 # Flattened Device Tree

Copied and modified: head/sys/arm/conf/TEGRA124 (from r297025, 
head/sys/arm/conf/TEGRA124.common)
==
--- head/sys/arm/conf/TEGRA124.common   Fri Mar 18 15:07:43 2016
(r297025, copy source)
+++ head/sys/arm/conf/TEGRA124  Fri Mar 18 15:27:57 2016(r297026)
@@ -21,6 +21,8 @@
 include"std.armv6"
 include"../nvidia/tegra124/std.tegra124"
 
+ident  TEGRA124
+
 optionsHZ=100  # Scheduling quantum is 10 milliseconds.
 optionsSCHED_ULE   # ULE scheduler
 optionsPLATFORM# Platform based SoC
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297001 - head/sys/powerpc/include

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 01:30:58 2016
New Revision: 297001
URL: https://svnweb.freebsd.org/changeset/base/297001

Log:
  Increase booke bus max address to 36-bits.
  
  Sponsored by: Alex Perez/Inertial Computing

Modified:
  head/sys/powerpc/include/bus.h

Modified: head/sys/powerpc/include/bus.h
==
--- head/sys/powerpc/include/bus.h  Fri Mar 18 01:28:41 2016
(r297000)
+++ head/sys/powerpc/include/bus.h  Fri Mar 18 01:30:58 2016
(r297001)
@@ -79,9 +79,14 @@
 #define BUS_SPACE_MAXADDR  0xUL
 #define BUS_SPACE_MAXSIZE  0xUL
 #else
+#ifdef BOOKE
+#define BUS_SPACE_MAXADDR  0xFULL
+#define BUS_SPACE_MAXSIZE  0xUL
+#else
 #define BUS_SPACE_MAXADDR  0xUL
 #define BUS_SPACE_MAXSIZE  0xUL
 #endif
+#endif
 
 #defineBUS_SPACE_MAP_CACHEABLE 0x01
 #defineBUS_SPACE_MAP_LINEAR0x02
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296986 - head/sys/netinet6

2016-03-19 Thread Andrey V. Elsukov
Author: ae
Date: Thu Mar 17 11:10:44 2016
New Revision: 296986
URL: https://svnweb.freebsd.org/changeset/base/296986

Log:
  Reduce the number of local variables. Remove redundant check that inp
  pointer isn't NULL, it is safe, because we are handling IPV6_PKTINFO
  socket option in this block of code. Also, use in6ifa_withaddr() instead
  of ifa_withaddr().

Modified:
  head/sys/netinet6/in6_src.c

Modified: head/sys/netinet6/in6_src.c
==
--- head/sys/netinet6/in6_src.c Thu Mar 17 11:06:43 2016(r296985)
+++ head/sys/netinet6/in6_src.c Thu Mar 17 11:10:44 2016(r296986)
@@ -226,9 +226,6 @@ in6_selectsrc(uint32_t fibnum, struct so
 */
if (opts && (pi = opts->ip6po_pktinfo) &&
!IN6_IS_ADDR_UNSPECIFIED(>ipi6_addr)) {
-   struct sockaddr_in6 srcsock;
-   struct in6_ifaddr *ia6;
-
/* get the outgoing interface */
if ((error = in6_selectif(dstsock, opts, mopts, , oifp,
fibnum))
@@ -242,18 +239,14 @@ in6_selectsrc(uint32_t fibnum, struct so
 * the interface must be specified; otherwise, ifa_ifwithaddr()
 * will fail matching the address.
 */
-   bzero(, sizeof(srcsock));
-   srcsock.sin6_family = AF_INET6;
-   srcsock.sin6_len = sizeof(srcsock);
-   srcsock.sin6_addr = pi->ipi6_addr;
+   tmp = pi->ipi6_addr;
if (ifp) {
-   error = in6_setscope(_addr, ifp, NULL);
+   error = in6_setscope(, ifp, );
if (error)
return (error);
}
if (cred != NULL && (error = prison_local_ip6(cred,
-   _addr, (inp != NULL &&
-   (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0))) != 0)
+   , (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0)
return (error);
 
/*
@@ -262,19 +255,18 @@ in6_selectsrc(uint32_t fibnum, struct so
 * ancillary data.
 */
if ((inp->inp_flags & INP_BINDANY) == 0) {
-   ia6 = (struct in6_ifaddr *)ifa_ifwithaddr(
-   (struct sockaddr *));
-   if (ia6 == NULL || (ia6->ia6_flags & (IN6_IFF_ANYCAST |
+   ia = in6ifa_ifwithaddr(, odstzone);
+   if (ia == NULL || (ia->ia6_flags & (IN6_IFF_ANYCAST |
IN6_IFF_NOTREADY))) {
-   if (ia6 != NULL)
-   ifa_free(>ia_ifa);
+   if (ia != NULL)
+   ifa_free(>ia_ifa);
return (EADDRNOTAVAIL);
}
-   bcopy(>ia_addr.sin6_addr, srcp, sizeof(*srcp));
-   ifa_free(>ia_ifa);
+   bcopy(>ia_addr.sin6_addr, srcp, sizeof(*srcp));
+   ifa_free(>ia_ifa);
} else
-   bcopy(_addr, srcp, sizeof(*srcp));
-   pi->ipi6_addr = srcsock.sin6_addr; /* XXX: this overrides pi */
+   bcopy(, srcp, sizeof(*srcp));
+   pi->ipi6_addr = tmp; /* XXX: this overrides pi */
if (ifpp)
*ifpp = ifp;
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297003 - head/lib/libdevinfo

2016-03-19 Thread Justin Hibbits
Author: jhibbits
Date: Fri Mar 18 01:53:00 2016
New Revision: 297003
URL: https://svnweb.freebsd.org/changeset/base/297003

Log:
  Bump libdevinfo SHLIB_MAJOR, forgotten in r297000.
  
  Spotted by:   bapt

Modified:
  head/lib/libdevinfo/Makefile

Modified: head/lib/libdevinfo/Makefile
==
--- head/lib/libdevinfo/MakefileFri Mar 18 01:35:03 2016
(r297002)
+++ head/lib/libdevinfo/MakefileFri Mar 18 01:53:00 2016
(r297003)
@@ -5,6 +5,8 @@ SRCS=   devinfo.c
 INCS=  devinfo.h
 MAN=   devinfo.3
 
+SHLIB_MAJOR=   6
+
 WARNS?=3
 
 .include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296979 - in head: lib/libxo/tests usr.bin/xo

2016-03-19 Thread Simon J. Gerraty
Author: sjg
Date: Thu Mar 17 04:21:57 2016
New Revision: 296979
URL: https://svnweb.freebsd.org/changeset/base/296979

Log:
  xo_config.h no longer in contrib, so -I's needed
  
  PR:   /homes/sjg/commit-logs/freebsd/libxo/xo_config.diff
  Reviewed by:  jkim

Modified:
  head/lib/libxo/tests/Makefile
  head/usr.bin/xo/Makefile

Modified: head/lib/libxo/tests/Makefile
==
--- head/lib/libxo/tests/Makefile   Thu Mar 17 03:57:39 2016
(r296978)
+++ head/lib/libxo/tests/Makefile   Thu Mar 17 04:21:57 2016
(r296979)
@@ -240,7 +240,7 @@ PROGS+= test_09
 PROGS+= test_10
 PROGS+= test_11
 
-CFLAGS+=   -I${LIBXOSRC}/libxo
+CFLAGS+=   -I${LIBXOSRC}/libxo -I${.CURDIR:H}
 
 LIBADD=xo util 
 
@@ -249,7 +249,6 @@ SUBDIR+=encoder
 .if ${MACHINE} == "host"
 # make it easy to test without install
 TESTSDIR=  ${.OBJDIR}
-CFLAGS+=   -I${.CURDIR:H}
 .endif
 
 .include 

Modified: head/usr.bin/xo/Makefile
==
--- head/usr.bin/xo/MakefileThu Mar 17 03:57:39 2016(r296978)
+++ head/usr.bin/xo/MakefileThu Mar 17 04:21:57 2016(r296979)
@@ -12,7 +12,10 @@ MAN= xo.1
 # XXX For xoversion.h
 CFLAGS+=-I${LIBXOSRC}/libxo
 
-LIBADD=xo
+# XXX For xo_config.h
+CFLAGS+=-I${SRCTOP}/lib/libxo
+
+LIBADD=xo util
 
 .if ${MK_TESTS} != "no"
 SUBDIR+=   tests
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296933 - in head: share/man/man9 sys/sys

2016-03-19 Thread Gleb Smirnoff
On Thu, Mar 17, 2016 at 08:19:50AM +0100, Hans Petter Selasky wrote:
H> On 03/16/16 21:36, Gleb Smirnoff wrote:
H> > On Wed, Mar 16, 2016 at 08:37:52AM +, Hans Petter Selasky wrote:
H> > H> Modified: head/sys/sys/sysctl.h
H> > H> 
==
H> > H> --- head/sys/sys/sysctl.h   Wed Mar 16 06:42:15 2016
(r296932)
H> > H> +++ head/sys/sys/sysctl.h   Wed Mar 16 08:37:52 2016
(r296933)
H> > H> @@ -654,8 +654,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e
H> > H> SYSCTL_OID(parent, nbr, name,   
\
H> > H> CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), 
\
H> > H> (ptr), (len), sysctl_handle_counter_u64_array, "S", descr); 
\
H> > H> -   CTASSERT(((access) & CTLTYPE) == 0 ||   
\
H> > H> -   ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE)
H> > H> +   CTASSERTaccess) & CTLTYPE) == 0 ||  
\
H> > H> +   ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) &&
\
H> > H> +   sizeof(counter_u64_t) == sizeof(*(ptr)) &&  
\
H> > H> +   sizeof(uint64_t) == sizeof(**(ptr)))
H> >
H> > I don't agree with the last line. Does it assert that counter_u64_t is
H> > implemented using uint64_t? That is true, but that is internal detail,
H> > that might be changed in future.
H> >
H> 
H> Yes, it asserts that counter_u64_t is a 64-bit counter, as the name of 
H> the typedef hints at.
H> 
H>  From the past experience there has been several cases where someone has 
H> changed a field in structure which is exported as a sysctl, and then the 
H> sysctls were never updated.

It could be that counter_u64_t becomes a machine dependent typedef, being
different size on different machines. Unlikely, but possible.

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


svn commit: r297040 - in head: contrib/bmake contrib/bmake/mk share/mk usr.bin/bmake

2016-03-19 Thread Simon J. Gerraty
Author: sjg
Date: Fri Mar 18 20:03:09 2016
New Revision: 297040
URL: https://svnweb.freebsd.org/changeset/base/297040

Log:
  Update to bmake-20160315
  
  Archive member handling works again
  meta mode, treat missing reads as for writes.
  
  Update dirdeps.mk - much improved startup time.
  Update meta.stage.mk - avoid ln when chmod required.

Modified:
  head/contrib/bmake/ChangeLog
  head/contrib/bmake/Makefile
  head/contrib/bmake/bmake.1
  head/contrib/bmake/bmake.cat1
  head/contrib/bmake/make.1
  head/contrib/bmake/meta.c
  head/contrib/bmake/mk/ChangeLog
  head/contrib/bmake/mk/dirdeps.mk
  head/contrib/bmake/mk/install-mk
  head/contrib/bmake/mk/meta.autodep.mk
  head/contrib/bmake/mk/meta.stage.mk
  head/contrib/bmake/mk/sys.dependfile.mk
  head/contrib/bmake/parse.c
  head/contrib/bmake/suff.c
  head/contrib/bmake/var.c
  head/share/mk/dirdeps.mk
  head/share/mk/meta.stage.mk
  head/usr.bin/bmake/Makefile
Directory Properties:
  head/contrib/bmake/   (props changed)

Modified: head/contrib/bmake/ChangeLog
==
--- head/contrib/bmake/ChangeLogFri Mar 18 19:48:49 2016
(r297039)
+++ head/contrib/bmake/ChangeLogFri Mar 18 20:03:09 2016
(r297040)
@@ -1,3 +1,20 @@
+2016-03-15  Simon J. Gerraty  
+
+   * Makefile (_MAKE_VERSION): 20160315
+ Merge with NetBSD make, pick up
+ o fix handling of archive members
+
+2016-03-13  Simon J. Gerraty  
+
+   * Makefile (_MAKE_VERSION): rename variable to avoid interference
+ with checks for ${MAKE_VERSION}
+
+2016-03-10  Simon J. Gerraty  
+
+   * Makefile (MAKE_VERSION): 20160310
+ Merge with NetBSD make, pick up
+ o meta.c: treat missing Read file same as Write, incase we Delete it.
+
 2016-03-07  Simon J. Gerraty  
 
* Makefile (MAKE_VERSION): 20160307

Modified: head/contrib/bmake/Makefile
==
--- head/contrib/bmake/Makefile Fri Mar 18 19:48:49 2016(r297039)
+++ head/contrib/bmake/Makefile Fri Mar 18 20:03:09 2016(r297040)
@@ -1,7 +1,7 @@
-#  $Id: Makefile,v 1.55 2016/03/07 22:02:47 sjg Exp $
+#  $Id: Makefile,v 1.58 2016/03/15 23:39:12 sjg Exp $
 
 # Base version on src date
-MAKE_VERSION= 20160307
+_MAKE_VERSION= 20160315
 
 PROG=  bmake
 
@@ -76,7 +76,7 @@ CFLAGS+= ${CPPFLAGS}
 CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
 CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
 CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
-COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
+COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""
 
 # meta mode can be useful even without filemon 
 FILEMON_H ?= /usr/include/dev/filemon/filemon.h

Modified: head/contrib/bmake/bmake.1
==
--- head/contrib/bmake/bmake.1  Fri Mar 18 19:48:49 2016(r297039)
+++ head/contrib/bmake/bmake.1  Fri Mar 18 20:03:09 2016(r297040)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.254 2016/02/20 01:43:28 wiz Exp $
+.\"$NetBSD: make.1,v 1.255 2016/03/14 07:42:15 matthias Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -685,6 +685,9 @@ or it will not be recognized.
 .It Va .TARGET
 The name of the target; also known as
 .Ql Va @ .
+For compatibility with other makes this is an alias for
+.Ic .ARCHIVE
+in archive member rules.
 .El
 .Pp
 The shorter forms

Modified: head/contrib/bmake/bmake.cat1
==
--- head/contrib/bmake/bmake.cat1   Fri Mar 18 19:48:49 2016
(r297039)
+++ head/contrib/bmake/bmake.cat1   Fri Mar 18 20:03:09 2016
(r297040)
@@ -438,7 +438,9 @@ VVAARRIIAABBLLEE AASSSSIIGG
  suffixes declared with ..SSUUFFFFIIXXEESS or it 
will not be recog-
  nized.
 
-   _._T_A_R_G_E_T   The name of the target; also known as `_@'.
+   _._T_A_R_G_E_T   The name of the target; also known as 
`_@'.  For compati-
+ bility with other makes this is an alias for 
..AARRCCHHIIVVEE in
+ archive member rules.
 
  The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') 
are permitted
  for backward compatibility with historical makefiles and legacy POSIX

Modified: head/contrib/bmake/make.1
==
--- head/contrib/bmake/make.1   Fri Mar 18 19:48:49 2016(r297039)
+++ head/contrib/bmake/make.1   Fri Mar 18 20:03:09 2016(r297040)
@@ -1,4 +1,4 @@
-.\"$NetBSD: make.1,v 1.254 2016/02/20 01:43:28 wiz Exp $
+.\"$NetBSD: make.1,v 1.255 2016/03/14 07:42:15 matthias Exp 

svn commit: r297025 - head/sbin/ping

2016-03-19 Thread Maxim Konovalov
Author: maxim
Date: Fri Mar 18 15:07:43 2016
New Revision: 297025
URL: https://svnweb.freebsd.org/changeset/base/297025

Log:
  o Kill EoL whitespaces.

Modified:
  head/sbin/ping/ping.c

Modified: head/sbin/ping/ping.c
==
--- head/sbin/ping/ping.c   Fri Mar 18 15:06:50 2016(r297024)
+++ head/sbin/ping/ping.c   Fri Mar 18 15:07:43 2016(r297025)
@@ -794,7 +794,7 @@ main(int argc, char *const *argv)
 #endif
if (sweepmax) {
if (sweepmin > sweepmax)
-   errx(EX_USAGE, "Maximum packet size must be no less 
than the minimum packet size");  
+   errx(EX_USAGE,"Maximum packet size must be no less than 
the minimum packet size");
 
if (datalen != DEFDATALEN)
errx(EX_USAGE, "Packet size and ping sweep are mutually 
exclusive");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296937 - head/sys/fs/autofs

2016-03-19 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Mar 16 14:00:45 2016
New Revision: 296937
URL: https://svnweb.freebsd.org/changeset/base/296937

Log:
  Pacify Coverity in a better way, to avoid write-only variable when building
  without INVARIANTS.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/fs/autofs/autofs_vnops.c

Modified: head/sys/fs/autofs/autofs_vnops.c
==
--- head/sys/fs/autofs/autofs_vnops.c   Wed Mar 16 13:01:48 2016
(r296936)
+++ head/sys/fs/autofs/autofs_vnops.c   Wed Mar 16 14:00:45 2016
(r296937)
@@ -370,10 +370,8 @@ static size_t
 autofs_dirent_reclen(const char *name)
 {
size_t reclen;
-   int error;
 
-   error = autofs_readdir_one(NULL, name, -1, );
-   KASSERT(error == 0, ("autofs_readdir_one() failed"));
+   (void)autofs_readdir_one(NULL, name, -1, );
 
return (reclen);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r296970 - head/lib/libxo/tests

2016-03-19 Thread Bryan Drewery
On 3/16/16 9:04 PM, Simon J. Gerraty wrote:
> NGie Cooper  wrote:
>>> SUBDIR+=encoder
>>>
>>> +.if ${MACHINE} == "host"
>>> +# make it easy to test without install
>>> +TESTSDIR=${.OBJDIR}
>>> +CFLAGS+=-I${.CURDIR:H}
>>> +.endif
>>> +
>>> .include 
>>
>> This commit seems unnecessary -- have you tried make check yet?
> 
> That appears to require installing things before you test that they
> work - seems a bit backwards?
> 
> Note the above is only relevant when building with DIRDEPS.
> Where we want to be able to build and run relevant tests as part of the
> build as we go - when MACHINE = "host" that is.
> 
> Phil wants to fix this so that it runs all his test suite properly and
> also need to arrange to auto-update the makefile here as new tests are
> added to the distribution.
> Probably need somthing like bmake's after-import target.
> 
> Anyway, being able to have this work in context of DIRDEPS_BUILD will
> help (I haven't added the MK_TESTS hooks yet).
> 
> 

Btw I recently hooked up MK_TESTS to DIRDEPS_BUILD and added them all
(at the time) to targets/.

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


svn commit: r297042 - head/sys/arm/ti/cpsw

2016-03-19 Thread Luiz Otavio O Souza
Author: loos
Date: Fri Mar 18 20:09:54 2016
New Revision: 297042
URL: https://svnweb.freebsd.org/changeset/base/297042

Log:
  Increase the arbitrary limit of TX segments.
  
  Sponsored by: Rubicon Communications (Netgate)

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==
--- head/sys/arm/ti/cpsw/if_cpsw.c  Fri Mar 18 20:04:34 2016
(r297041)
+++ head/sys/arm/ti/cpsw/if_cpsw.c  Fri Mar 18 20:09:54 2016
(r297042)
@@ -153,7 +153,7 @@ static int cpsw_stats_sysctl(SYSCTL_HAND
  * Packets with more segments than this will be defragmented before
  * they are queued.
  */
-#defineCPSW_TXFRAGS8
+#defineCPSW_TXFRAGS16
 
 /* Shared resources. */
 static device_method_t cpsw_methods[] = {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r297025 - head/sbin/ping

2016-03-19 Thread Benjamin Kaduk
On Fri, Mar 18, 2016 at 10:07 AM, Maxim Konovalov  wrote:

> Author: maxim
> Date: Fri Mar 18 15:07:43 2016
> New Revision: 297025
> URL: https://svnweb.freebsd.org/changeset/base/297025
>
> Log:
>   o Kill EoL whitespaces.
>
> Modified:
>   head/sbin/ping/ping.c
>
> Modified: head/sbin/ping/ping.c
>
> ==
> --- head/sbin/ping/ping.c   Fri Mar 18 15:06:50 2016(r297024)
> +++ head/sbin/ping/ping.c   Fri Mar 18 15:07:43 2016(r297025)
> @@ -794,7 +794,7 @@ main(int argc, char *const *argv)
>  #endif
> if (sweepmax) {
> if (sweepmin > sweepmax)
> -   errx(EX_USAGE, "Maximum packet size must be no
> less than the minimum packet size");
> +   errx(EX_USAGE,"Maximum packet size must be no less
> than the minimum packet size");
>

Looks like the space immediately after the comma was also lost.

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


svn commit: r296963 - in head/sys/boot: . common geli i386/common i386/gptboot i386/gptzfsboot i386/libi386 i386/loader i386/zfsboot zfs

2016-03-19 Thread Allan Jude
Author: allanjude
Date: Wed Mar 16 23:12:19 2016
New Revision: 296963
URL: https://svnweb.freebsd.org/changeset/base/296963

Log:
  Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot
  
  Allows booting from a GELI encrypted root file system, via UFS or ZFS
  
  Reviewed by:  gnn, smh (previous version), delphij (previous version)
  Relnotes: yes
  Sponsored by: ScaleEngine Inc.
  Differential Revision:https://reviews.freebsd.org/D4593

Added:
  head/sys/boot/geli/
  head/sys/boot/geli/Makefile   (contents, props changed)
  head/sys/boot/geli/geliboot.c   (contents, props changed)
  head/sys/boot/geli/geliboot.h   (contents, props changed)
  head/sys/boot/geli/geliboot_crypto.c   (contents, props changed)
  head/sys/boot/geli/pwgets.c   (contents, props changed)
 - copied, changed from r292837, head/lib/libstand/gets.c
Modified:
  head/sys/boot/Makefile.amd64
  head/sys/boot/Makefile.i386
  head/sys/boot/common/disk.c
  head/sys/boot/common/disk.h
  head/sys/boot/common/gpt.c
  head/sys/boot/common/gpt.h
  head/sys/boot/i386/common/bootargs.h
  head/sys/boot/i386/common/cons.c
  head/sys/boot/i386/common/drv.c
  head/sys/boot/i386/common/drv.h
  head/sys/boot/i386/gptboot/Makefile
  head/sys/boot/i386/gptboot/gptboot.c
  head/sys/boot/i386/gptzfsboot/Makefile
  head/sys/boot/i386/libi386/Makefile
  head/sys/boot/i386/libi386/biosdisk.c
  head/sys/boot/i386/loader/Makefile
  head/sys/boot/i386/loader/main.c
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/zfs/libzfs.h

Modified: head/sys/boot/Makefile.amd64
==
--- head/sys/boot/Makefile.amd64Wed Mar 16 23:06:34 2016
(r296962)
+++ head/sys/boot/Makefile.amd64Wed Mar 16 23:12:19 2016
(r296963)
@@ -3,6 +3,7 @@
 SUBDIR+=   efi
 SUBDIR+=   libstand32
 SUBDIR+=   zfs
+SUBDIR+=   geli
 SUBDIR+=   userboot
 
 .if ${MK_FORTH} != "no"

Modified: head/sys/boot/Makefile.i386
==
--- head/sys/boot/Makefile.i386 Wed Mar 16 23:06:34 2016(r296962)
+++ head/sys/boot/Makefile.i386 Wed Mar 16 23:12:19 2016(r296963)
@@ -3,3 +3,4 @@
 SUBDIR+=   efi
 SUBDIR+=   libstand32
 SUBDIR+=   zfs
+SUBDIR+=   geli

Modified: head/sys/boot/common/disk.c
==
--- head/sys/boot/common/disk.c Wed Mar 16 23:06:34 2016(r296962)
+++ head/sys/boot/common/disk.c Wed Mar 16 23:12:19 2016(r296963)
@@ -170,7 +170,7 @@ display_size(uint64_t size, u_int sector
return (buf);
 }
 
-static int
+int
 ptblread(void *d, void *buf, size_t blocks, off_t offset)
 {
struct disk_devdesc *dev;

Modified: head/sys/boot/common/disk.h
==
--- head/sys/boot/common/disk.h Wed Mar 16 23:06:34 2016(r296962)
+++ head/sys/boot/common/disk.h Wed Mar 16 23:12:19 2016(r296963)
@@ -107,6 +107,7 @@ extern int disk_read(struct disk_devdesc
 u_int blocks);
 extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset,
 u_int blocks);
+extern int ptblread(void *d, void *buf, size_t blocks, off_t offset);
 
 /*
  * Print information about slices on a disk.

Modified: head/sys/boot/common/gpt.c
==
--- head/sys/boot/common/gpt.c  Wed Mar 16 23:06:34 2016(r296962)
+++ head/sys/boot/common/gpt.c  Wed Mar 16 23:12:19 2016(r296963)
@@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$");
 #include "util.h"
 #include "gpt.h"
 
-#defineMAXTBLENTS  128
-
 static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr;
 static uint64_t hdr_primary_lba, hdr_backup_lba;
 static struct gpt_ent table_primary[MAXTBLENTS], table_backup[MAXTBLENTS];

Modified: head/sys/boot/common/gpt.h
==
--- head/sys/boot/common/gpt.h  Wed Mar 16 23:06:34 2016(r296962)
+++ head/sys/boot/common/gpt.h  Wed Mar 16 23:12:19 2016(r296963)
@@ -32,6 +32,8 @@
 #include 
 #include 
 
+#defineMAXTBLENTS  128
+
 int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf);
 int gptfind(const uuid_t *uuid, struct dsk *dskp, int part);
 void gptbootfailed(struct dsk *dskp);

Added: head/sys/boot/geli/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/geli/Makefile Wed Mar 16 23:12:19 2016(r296963)
@@ -0,0 +1,52 @@
+# $FreeBSD$
+# libgeliboot
+
+MAN=
+
+.include 
+MK_SSP=no
+
+LIB=   geliboot
+INTERNALLIB=
+MK_PROFILE=no
+NO_PIC=
+
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} 

Re: svn commit: r296947 - head/share/man/man9

2016-03-19 Thread Konstantin Belousov
On Wed, Mar 16, 2016 at 06:39:48PM +, Bryan Drewery wrote:
> Author: bdrewery
> Date: Wed Mar 16 18:39:48 2016
> New Revision: 296947
> URL: https://svnweb.freebsd.org/changeset/base/296947
> 
> Log:
>   Remove incorrect BUGS entry about asserting lock not held.
>   
>   For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
>   made to panic in r126316.
>   
>   MFC after:  1 week
> 
> Modified:
>   head/share/man/man9/sx.9
> 
> Modified: head/share/man/man9/sx.9
> ==
> --- head/share/man/man9/sx.9  Wed Mar 16 17:35:55 2016(r296946)
> +++ head/share/man/man9/sx.9  Wed Mar 16 18:39:48 2016(r296947)
> @@ -26,7 +26,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd March 13, 2016
> +.Dd March 16, 2016
>  .Dt SX 9
>  .Os
>  .Sh NAME
> @@ -320,11 +320,6 @@ end up sleeping while holding a mutex, w
>  .Xr rwlock 9 ,
>  .Xr sema 9
>  .Sh BUGS
> -Currently there is no way to assert that a lock is not held.
> -This is not possible in the
> -.No non- Ns Dv WITNESS
> -case for asserting that this thread
> -does not hold a shared lock.
>  In the
>  .No non- Ns Dv WITNESS
>  case, the
The removed text was not quite correct, but its removal is not quite correct
either.  sx (and rw) locks do not track shared owners, so in non-witness
case only exclusive ownership by curthread triggers panic for SA_UNLOCKED
case.  Shared ownership is silently ignored by the assert.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r296975 - in head/sys/dev/cxgbe: . common

2016-03-19 Thread Navdeep Parhar
Author: np
Date: Thu Mar 17 01:15:16 2016
New Revision: 296975
URL: https://svnweb.freebsd.org/changeset/base/296975

Log:
  cxgbe(4): Tidy up PAUSE frame accounting.
  
  Figure out if the chip is counting PAUSE frames in the "normal" stats
  and take them out if it is.  This fixes a bug in the tx stats because
  the default hardware behavior is different for Tx and Rx but the driver
  was treating both the same way.  The result was that OPACKETS, OBYTES,
  and OMCASTS were under-reported (if tx_pause > 0) before this change.
  
  Note that the mac_stats sysctl still gives you the raw value of these
  statistics straight from the device registers.

Modified:
  head/sys/dev/cxgbe/common/t4_hw.c
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/common/t4_hw.c
==
--- head/sys/dev/cxgbe/common/t4_hw.c   Thu Mar 17 01:09:21 2016
(r296974)
+++ head/sys/dev/cxgbe/common/t4_hw.c   Thu Mar 17 01:15:16 2016
(r296975)
@@ -5615,6 +5615,7 @@ void t4_get_port_stats_offset(struct ada
 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
 {
u32 bgmap = t4_get_mps_bg_map(adap, idx);
+   u32 stat_ctl;
 
 #define GET_STAT(name) \
t4_read_reg64(adap, \
@@ -5622,6 +5623,8 @@ void t4_get_port_stats(struct adapter *a
T5_PORT_REG(idx, A_MPS_PORT_STAT_##name##_L)))
 #define GET_STAT_COM(name) t4_read_reg64(adap, A_MPS_STAT_##name##_L)
 
+   stat_ctl = t4_read_reg(adap, A_MPS_STAT_CTL);
+
p->tx_pause = GET_STAT(TX_PORT_PAUSE);
p->tx_octets= GET_STAT(TX_PORT_BYTES);
p->tx_frames= GET_STAT(TX_PORT_FRAMES);
@@ -5646,6 +5649,12 @@ void t4_get_port_stats(struct adapter *a
p->tx_ppp6  = GET_STAT(TX_PORT_PPP6);
p->tx_ppp7  = GET_STAT(TX_PORT_PPP7);
 
+   if (stat_ctl & F_COUNTPAUSESTATTX) {
+   p->tx_frames -= p->tx_pause;
+   p->tx_octets -= p->tx_pause * 64;
+   p->tx_mcast_frames -= p->tx_pause;
+   }
+
p->rx_pause = GET_STAT(RX_PORT_PAUSE);
p->rx_octets= GET_STAT(RX_PORT_BYTES);
p->rx_frames= GET_STAT(RX_PORT_FRAMES);
@@ -5674,6 +5683,12 @@ void t4_get_port_stats(struct adapter *a
p->rx_ppp6  = GET_STAT(RX_PORT_PPP6);
p->rx_ppp7  = GET_STAT(RX_PORT_PPP7);
 
+   if (stat_ctl & F_COUNTPAUSESTATRX) {
+   p->rx_frames -= p->rx_pause;
+   p->rx_octets -= p->rx_pause * 64;
+   p->rx_mcast_frames -= p->rx_pause;
+   }
+
p->rx_ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_MAC_DROP_FRAME) : 0;
p->rx_ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_MAC_DROP_FRAME) : 0;
p->rx_ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_MAC_DROP_FRAME) : 0;

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cThu Mar 17 01:09:21 2016
(r296974)
+++ head/sys/dev/cxgbe/t4_main.cThu Mar 17 01:15:16 2016
(r296975)
@@ -1732,29 +1732,29 @@ cxgbe_get_counter(struct ifnet *ifp, ift
 
switch (c) {
case IFCOUNTER_IPACKETS:
-   return (s->rx_frames - s->rx_pause);
+   return (s->rx_frames);
 
case IFCOUNTER_IERRORS:
return (s->rx_jabber + s->rx_runt + s->rx_too_long +
s->rx_fcs_err + s->rx_len_err);
 
case IFCOUNTER_OPACKETS:
-   return (s->tx_frames - s->tx_pause);
+   return (s->tx_frames);
 
case IFCOUNTER_OERRORS:
return (s->tx_error_frames);
 
case IFCOUNTER_IBYTES:
-   return (s->rx_octets - s->rx_pause * 64);
+   return (s->rx_octets);
 
case IFCOUNTER_OBYTES:
-   return (s->tx_octets - s->tx_pause * 64);
+   return (s->tx_octets);
 
case IFCOUNTER_IMCASTS:
-   return (s->rx_mcast_frames - s->rx_pause);
+   return (s->rx_mcast_frames);
 
case IFCOUNTER_OMCASTS:
-   return (s->tx_mcast_frames - s->tx_pause);
+   return (s->tx_mcast_frames);
 
case IFCOUNTER_IQDROPS:
return (s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 +
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297038 - head/sys/dev/pci

2016-03-19 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Mar 18 19:36:43 2016
New Revision: 297038
URL: https://svnweb.freebsd.org/changeset/base/297038

Log:
  Convert the printfs here from %lx to %jx as well after r297000 in order
  to be able to compile this into arm kernels.
  
  Sponsored by: DARPA/AFRL

Modified:
  head/sys/dev/pci/pci_host_generic.c

Modified: head/sys/dev/pci/pci_host_generic.c
==
--- head/sys/dev/pci/pci_host_generic.c Fri Mar 18 19:04:01 2016
(r297037)
+++ head/sys/dev/pci/pci_host_generic.c Fri Mar 18 19:36:43 2016
(r297038)
@@ -540,7 +540,7 @@ generic_pcie_alloc_resource_pcie(device_
 
if (bootverbose) {
device_printf(dev,
-   "rman_reserve_resource: start=%#lx, end=%#lx, count=%#lx\n",
+   "rman_reserve_resource: start=%#jx, end=%#jx, count=%#jx\n",
start, end, count);
}
 
@@ -560,7 +560,7 @@ generic_pcie_alloc_resource_pcie(device_
 
 fail:
device_printf(dev, "%s FAIL: type=%d, rid=%d, "
-   "start=%016lx, end=%016lx, count=%016lx, flags=%x\n",
+   "start=%016jx, end=%016jx, count=%016jx, flags=%x\n",
__func__, type, *rid, start, end, count, flags);
 
return (NULL);
@@ -744,7 +744,7 @@ generic_pcie_alloc_resource_ofw(device_t
 
if (i == MAX_RANGES_TUPLES) {
device_printf(bus, "Could not map resource "
-   "%#lx-%#lx\n", start, end);
+   "%#jx-%#jx\n", start, end);
return (NULL);
}
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297009 - head/sbin/ifconfig

2016-03-19 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 18 04:09:27 2016
New Revision: 297009
URL: https://svnweb.freebsd.org/changeset/base/297009

Log:
  Remove duplicate LE_READ_4() definition.
  
  Tested:
  
  * typed 'make', seemed to work.

Modified:
  head/sbin/ifconfig/ifieee80211.c

Modified: head/sbin/ifconfig/ifieee80211.c
==
--- head/sbin/ifconfig/ifieee80211.cFri Mar 18 04:00:57 2016
(r297008)
+++ head/sbin/ifconfig/ifieee80211.cFri Mar 18 04:09:27 2016
(r297009)
@@ -3071,14 +3071,6 @@ printcountry(const char *tag, const u_in
printf(">");
 }
 
-/* unaligned little endian access */ 
-#define LE_READ_4(p)   \
-   ((u_int32_t)\
-const u_int8_t *)(p))[0]  ) |  \
- (((const u_int8_t *)(p))[1] <<  8) |  \
- (((const u_int8_t *)(p))[2] << 16) |  \
- (((const u_int8_t *)(p))[3] << 24)))
-
 static __inline int
 iswpaoui(const u_int8_t *frm)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r287445 - in head: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools

2016-03-19 Thread Alan Somers
On Thu, Sep 3, 2015 at 6:14 PM, Xin LI  wrote:

> Author: delphij
> Date: Fri Sep  4 00:14:20 2015
> New Revision: 287445
> URL: https://svnweb.freebsd.org/changeset/base/287445
>
> Log:
>   Expose an interface to determine if an ACE is inherited.
>
>   Submitted by: sef
>   Reviewed by:  trasz
>   MFC after:2 weeks
>   Differential Revision:https://reviews.freebsd.org/D3540
>
> Modified:
>   head/bin/setfacl/setfacl.1
>   head/lib/libc/posix1e/acl_add_flag_np.3
>   head/lib/libc/posix1e/acl_support_nfs4.c
>   head/share/man/man9/acl.9
>   head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c
>   head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
>   head/sys/kern/subr_acl_nfs4.c
>   head/sys/sys/acl.h
>   head/tools/regression/acltools/tools-crossfs.test
>   head/tools/regression/acltools/tools-nfs4-psarc.test
>   head/tools/regression/acltools/tools-nfs4-trivial.test
>   head/tools/regression/acltools/tools-nfs4.test
>

...


> Modified: head/sys/sys/acl.h
>
> ==
> --- head/sys/sys/acl.h  Thu Sep  3 22:15:56 2015(r287444)
> +++ head/sys/sys/acl.h  Fri Sep  4 00:14:20 2015(r287445)
> @@ -249,11 +249,12 @@ typedef void *acl_t;
>  #defineACL_ENTRY_INHERIT_ONLY  0x0008
>  #defineACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
>  #defineACL_ENTRY_FAILED_ACCESS 0x0020
> +#defineACL_ENTRY_INHERITED 0x0080
>
>  #defineACL_FLAGS_BITS  (ACL_ENTRY_FILE_INHERIT | \
>  ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
>  ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
> -ACL_ENTRY_FAILED_ACCESS)
> +ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
>
>  /*
>   * Undefined value in ae_id field.  ae_id should be set to this value
>

Out of curiosity, why did you choose 0x0080 for ACL_ENTRY_INHERITED instead
of 0x0040 ?
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r297028 - in head/sys/arm64: arm64 include

2016-03-19 Thread Andrew Turner
Author: andrew
Date: Fri Mar 18 16:18:29 2016
New Revision: 297028
URL: https://svnweb.freebsd.org/changeset/base/297028

Log:
  Reduce the diff with intrng by renaming similar functions. This is a noop,
  but will help move to use the common interrupt handling code later.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/exception.S
  head/sys/arm64/arm64/intr_machdep.c
  head/sys/arm64/arm64/nexus.c
  head/sys/arm64/include/intr.h

Modified: head/sys/arm64/arm64/exception.S
==
--- head/sys/arm64/arm64/exception.SFri Mar 18 15:44:21 2016
(r297027)
+++ head/sys/arm64/arm64/exception.SFri Mar 18 16:18:29 2016
(r297028)
@@ -150,7 +150,7 @@ END(handle_el1h_sync)
 ENTRY(handle_el1h_irq)
save_registers 1
mov x0, sp
-   bl  arm_cpu_intr
+   bl  intr_irq_handler
restore_registers 1
eret
 END(handle_el1h_irq)
@@ -171,7 +171,7 @@ END(handle_el0_sync)
 ENTRY(handle_el0_irq)
save_registers 0
mov x0, sp
-   bl  arm_cpu_intr
+   bl  intr_irq_handler
do_ast
restore_registers 0
eret

Modified: head/sys/arm64/arm64/intr_machdep.c
==
--- head/sys/arm64/arm64/intr_machdep.c Fri Mar 18 15:44:21 2016
(r297027)
+++ head/sys/arm64/arm64/intr_machdep.c Fri Mar 18 16:18:29 2016
(r297028)
@@ -408,7 +408,7 @@ arm_setup_intr(const char *name, driver_
 }
 
 int
-arm_teardown_intr(void *cookie)
+intr_irq_remove_handler(device_t dev, u_int irq, void *cookie)
 {
struct arm64_intr_entry *intr;
int error;
@@ -426,7 +426,7 @@ arm_teardown_intr(void *cookie)
 }
 
 int
-arm_config_intr(u_int hw_irq, enum intr_trigger trig, enum intr_polarity pol)
+intr_irq_config(u_int hw_irq, enum intr_trigger trig, enum intr_polarity pol)
 {
struct arm64_intr_entry *intr;
 
@@ -476,7 +476,7 @@ stray:
 }
 
 void
-arm_cpu_intr(struct trapframe *tf)
+intr_irq_handler(struct trapframe *tf)
 {
 
critical_enter();
@@ -512,7 +512,7 @@ SYSINIT(arm_intr_smp_init, SI_SUB_SMP, S
 
 /* Attempt to bind the specified IRQ to the specified CPU. */
 int
-arm_intr_bind(u_int hw_irq, int cpu)
+intr_irq_bind(u_int hw_irq, int cpu)
 {
struct arm64_intr_entry *intr;
 

Modified: head/sys/arm64/arm64/nexus.c
==
--- head/sys/arm64/arm64/nexus.cFri Mar 18 15:44:21 2016
(r297027)
+++ head/sys/arm64/arm64/nexus.cFri Mar 18 16:18:29 2016
(r297028)
@@ -271,7 +271,7 @@ nexus_config_intr(device_t dev, int irq,
 enum intr_polarity pol)
 {
 
-   return (arm_config_intr(irq, trig, pol));
+   return (intr_irq_config(irq, trig, pol));
 }
 
 static int
@@ -298,7 +298,7 @@ static int
 nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
 {
 
-   return (arm_teardown_intr(ih));
+   return (intr_irq_remove_handler(child, rman_get_start(r), ih));
 }
 
 #ifdef SMP
@@ -306,7 +306,7 @@ static int
 nexus_bind_intr(device_t dev, device_t child, struct resource *irq, int cpu)
 {
 
-   return (arm_intr_bind(rman_get_start(irq), cpu));
+   return (intr_irq_bind(rman_get_start(irq), cpu));
 }
 #endif
 

Modified: head/sys/arm64/include/intr.h
==
--- head/sys/arm64/include/intr.h   Fri Mar 18 15:44:21 2016
(r297027)
+++ head/sys/arm64/include/intr.h   Fri Mar 18 16:18:29 2016
(r297028)
@@ -29,8 +29,10 @@
 #ifndef _MACHINE_INTR_H_
 #define_MACHINE_INTR_H_
 
-intarm_config_intr(u_int, enum intr_trigger, enum intr_polarity);
-void   arm_cpu_intr(struct trapframe *);
+intintr_irq_config(u_int, enum intr_trigger, enum intr_polarity);
+void   intr_irq_handler(struct trapframe *);
+intintr_irq_remove_handler(device_t, u_int, void *);
+
 void   arm_dispatch_intr(u_int, struct trapframe *);
 intarm_enable_intr(void);
 void   arm_mask_irq(u_int);
@@ -44,12 +46,12 @@ int arm_map_msi(device_t, device_t, int,
 intarm_map_msix(device_t, device_t, int, uint64_t *, uint32_t *);
 intarm_setup_intr(const char *, driver_filter_t *, driver_intr_t,
void *, u_int, enum intr_type, void **);
-intarm_teardown_intr(void *);
 void   arm_unmask_irq(u_int);
 
 #ifdef SMP
+intintr_irq_bind(u_int, int);
+
 void   arm_init_secondary(void);
-intarm_intr_bind(u_int, int);
 void   arm_setup_ipihandler(driver_filter_t *, u_int);
 void   arm_unmask_ipi(u_int);
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r287445 - in head: bin/setfacl lib/libc/posix1e share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/contrib/opensolaris/uts/common/sys sys/kern sys/sys tools/regression/acltools

2016-03-19 Thread Sean Fagan
It’s written to disk.  Although that actually depends on the filesystem.

Sean.
> On Mar 16, 2016, at 9:55 PM, Alan Somers  wrote:
> 
> Do you happen to know if ACL_ENTRY_INHERITED is written to disk, or does it 
> only exist in-core?
> 
> On Wed, Mar 16, 2016 at 10:37 PM, Sean Fagan  wrote:
> As I recall, from ZFS, but I’m not positive.  Either that, or something else 
> was using 0x40.
> 
> Sean.
> > On Mar 16, 2016, at 9:29 PM, Xin LI  wrote:
> >
> > +sef who created the patch...
> >
> > On Wed, Mar 16, 2016 at 3:40 PM, Alan Somers  wrote:
> >>
> >>
> >> On Thu, Sep 3, 2015 at 6:14 PM, Xin LI  wrote:
> >>>
> >>> Author: delphij
> >>> Date: Fri Sep  4 00:14:20 2015
> >>> New Revision: 287445
> >>> URL: https://svnweb.freebsd.org/changeset/base/287445
> >>>
> >>> Log:
> >>>  Expose an interface to determine if an ACE is inherited.
> >>>
> >>>  Submitted by: sef
> >>>  Reviewed by:  trasz
> >>>  MFC after:2 weeks
> >>>  Differential Revision:https://reviews.freebsd.org/D3540
> >>>
> >>> Modified:
> >>>  head/bin/setfacl/setfacl.1
> >>>  head/lib/libc/posix1e/acl_add_flag_np.3
> >>>  head/lib/libc/posix1e/acl_support_nfs4.c
> >>>  head/share/man/man9/acl.9
> >>>  head/sys/cddl/compat/opensolaris/kern/opensolaris_acl.c
> >>>  head/sys/cddl/contrib/opensolaris/uts/common/sys/acl.h
> >>>  head/sys/kern/subr_acl_nfs4.c
> >>>  head/sys/sys/acl.h
> >>>  head/tools/regression/acltools/tools-crossfs.test
> >>>  head/tools/regression/acltools/tools-nfs4-psarc.test
> >>>  head/tools/regression/acltools/tools-nfs4-trivial.test
> >>>  head/tools/regression/acltools/tools-nfs4.test
> >>
> >>
> >> ...
> >>
> >>>
> >>> Modified: head/sys/sys/acl.h
> >>>
> >>> ==
> >>> --- head/sys/sys/acl.h  Thu Sep  3 22:15:56 2015(r287444)
> >>> +++ head/sys/sys/acl.h  Fri Sep  4 00:14:20 2015(r287445)
> >>> @@ -249,11 +249,12 @@ typedef void *acl_t;
> >>> #defineACL_ENTRY_INHERIT_ONLY  0x0008
> >>> #defineACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
> >>> #defineACL_ENTRY_FAILED_ACCESS 0x0020
> >>> +#defineACL_ENTRY_INHERITED 0x0080
> >>>
> >>> #defineACL_FLAGS_BITS  (ACL_ENTRY_FILE_INHERIT |
> >>> \
> >>> ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
> >>> ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
> >>> -ACL_ENTRY_FAILED_ACCESS)
> >>> +ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
> >>>
> >>> /*
> >>>  * Undefined value in ae_id field.  ae_id should be set to this value
> >>
> >>
> >> Out of curiosity, why did you choose 0x0080 for ACL_ENTRY_INHERITED instead
> >> of 0x0040 ?
> >>
> >
> >
> >
> > --
> > Xin LI  https://www.delphij.net/
> > FreeBSD - The Power to Serve! Live free or die
> 
> 

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

svn commit: r296944 - head/sys/dev/ppbus

2016-03-19 Thread Warner Losh
Author: imp
Date: Wed Mar 16 16:56:28 2016
New Revision: 296944
URL: https://svnweb.freebsd.org/changeset/base/296944

Log:
  Fix debug printf

Modified:
  head/sys/dev/ppbus/vpo.c

Modified: head/sys/dev/ppbus/vpo.c
==
--- head/sys/dev/ppbus/vpo.cWed Mar 16 16:52:31 2016(r296943)
+++ head/sys/dev/ppbus/vpo.cWed Mar 16 16:56:28 2016(r296944)
@@ -316,7 +316,7 @@ vpo_action(struct cam_sim *sim, union cc
}
 #ifdef VP0_DEBUG
device_printf(vpo->vpo_dev, "XPT_SCSI_IO (0x%x) request\n",
-   scsiio_cdb_ptr(csio));
+   *scsiio_cdb_ptr(csio));
 #endif
vpo_intr(vpo, csio);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"