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

2019-02-04 Thread Jayachandran C.
Author: jchandra
Date: Tue Feb  5 06:25:35 2019
New Revision: 343764
URL: https://svnweb.freebsd.org/changeset/base/343764

Log:
  arm, acpi: increase size of memory region arrays
  
  Bump up MAX_HWCNT and MAX_EXCNT to 32 when ACPI is enabled. These are
  the sizes of the hwregions and exregions arrays respectively. ACPI
  firmware typically has more memory regions and the current value of
  16 is not sufficient for some platforms.
  
  This commit fixes a failure seen with AMI firmware on Cavium's Sabre
  ThunderX2 reference platform. This platform needs 21 physical memory
  regions and 18 excluded regions to boot correctly with the current
  firmware release.
  
  Reviewed by:  andrew
  Differential Revision:https://reviews.freebsd.org/D19073

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

Modified: head/sys/arm/arm/physmem.c
==
--- head/sys/arm/arm/physmem.c  Tue Feb  5 04:47:41 2019(r343763)
+++ head/sys/arm/arm/physmem.c  Tue Feb  5 06:25:35 2019(r343764)
@@ -29,6 +29,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_acpi.h"
 #include "opt_ddb.h"
 
 /*
@@ -48,8 +49,13 @@ __FBSDID("$FreeBSD$");
  * that can be allocated, or both, depending on the exclusion flags associated
  * with the region.
  */
+#ifdef DEV_ACPI
+#defineMAX_HWCNT   32  /* ACPI needs more regions */
+#defineMAX_EXCNT   32
+#else
 #defineMAX_HWCNT   16
 #defineMAX_EXCNT   16
+#endif
 
 #if defined(__arm__)
 #defineMAX_PHYS_ADDR   0xull
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343763 - head/sys/powerpc/powerpc

2019-02-04 Thread Justin Hibbits
Author: jhibbits
Date: Tue Feb  5 04:47:41 2019
New Revision: 343763
URL: https://svnweb.freebsd.org/changeset/base/343763

Log:
  powerpc: Don't idle with the wait instruction on booke
  
  It appears idling via 'wait' on e5500 causes strange behaviors, such as
  top(1) simply hanging sporadically, until input.  Until this can possibly be
  sorted out (interrupt issue?), just don't idle on this hardware.  The SoCs
  are low power already, and the wait state doesn't save much anyway.

Modified:
  head/sys/powerpc/powerpc/cpu.c

Modified: head/sys/powerpc/powerpc/cpu.c
==
--- head/sys/powerpc/powerpc/cpu.c  Tue Feb  5 04:47:21 2019
(r343762)
+++ head/sys/powerpc/powerpc/cpu.c  Tue Feb  5 04:47:41 2019
(r343763)
@@ -767,11 +767,6 @@ cpu_idle_booke(sbintime_t sbt)
case FSL_E500mc:
case FSL_E5500:
case FSL_E6500:
-   /*
-* Base binutils doesn't know what the 'wait' instruction is, so
-* use the opcode encoding here.
-*/
-   __asm __volatile(".long 0x7c7c");
break;
default:
powerpc_sync();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343762 - head/sys/kern

2019-02-04 Thread Conrad Meyer
Author: cem
Date: Tue Feb  5 04:47:21 2019
New Revision: 343762
URL: https://svnweb.freebsd.org/changeset/base/343762

Log:
  extattr_list_vp: Narrow locked section somewhat
  
  Suggested by: mjg
  Reviewed by:  kib, mjg
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D19083

Modified:
  head/sys/kern/vfs_extattr.c

Modified: head/sys/kern/vfs_extattr.c
==
--- head/sys/kern/vfs_extattr.c Tue Feb  5 03:32:58 2019(r343761)
+++ head/sys/kern/vfs_extattr.c Tue Feb  5 04:47:21 2019(r343762)
@@ -633,8 +633,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v
if (nbytes > IOSIZE_MAX)
return (EINVAL);
 
-   vn_lock(vp, LK_SHARED | LK_RETRY);
-
auiop = NULL;
sizep = NULL;
cnt = 0;
@@ -653,24 +651,25 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v
} else
sizep = 
 
+   vn_lock(vp, LK_SHARED | LK_RETRY);
+
 #ifdef MAC
error = mac_vnode_check_listextattr(td->td_ucred, vp, attrnamespace);
-   if (error)
-   goto done;
+   if (error) {
+   VOP_UNLOCK(vp, 0);
+   return (error);
+   }
 #endif
 
error = VOP_LISTEXTATTR(vp, attrnamespace, auiop, sizep,
td->td_ucred, td);
+   VOP_UNLOCK(vp, 0);
 
if (auiop != NULL) {
cnt -= auio.uio_resid;
td->td_retval[0] = cnt;
} else
td->td_retval[0] = size;
-#ifdef MAC
-done:
-#endif
-   VOP_UNLOCK(vp, 0);
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343761 - head/sys/kern

2019-02-04 Thread Conrad Meyer
Author: cem
Date: Tue Feb  5 03:32:58 2019
New Revision: 343761
URL: https://svnweb.freebsd.org/changeset/base/343761

Log:
  extattr_list_vp: Only take shared vnode lock
  
  List is a 'read'-type operation that does not modify shared state; it's safe
  for multiple thread to proceed concurrently.  This is reflected in the vnode
  operation LISTEXTATTR locking protocol specification, which only requires a
  shared lock.
  
  (Similar to previous r248933.)
  
  Reported by:  Case van Rij 
  Reviewed by:  kib, mjg
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D19082

Modified:
  head/sys/kern/vfs_extattr.c

Modified: head/sys/kern/vfs_extattr.c
==
--- head/sys/kern/vfs_extattr.c Tue Feb  5 03:01:10 2019(r343760)
+++ head/sys/kern/vfs_extattr.c Tue Feb  5 03:32:58 2019(r343761)
@@ -633,7 +633,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, v
if (nbytes > IOSIZE_MAX)
return (EINVAL);
 
-   vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+   vn_lock(vp, LK_SHARED | LK_RETRY);
 
auiop = NULL;
sizep = NULL;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-04 Thread Andriy Voskoboinyk
Author: avos
Date: Tue Feb  5 03:01:10 2019
New Revision: 343760
URL: https://svnweb.freebsd.org/changeset/base/343760

Log:
  MFC r343541:
  Drop some unneeded includes from wireless USB drivers.

Modified:
  stable/10/sys/dev/usb/wlan/if_rsu.c
  stable/10/sys/dev/usb/wlan/if_rum.c
  stable/10/sys/dev/usb/wlan/if_run.c
  stable/10/sys/dev/usb/wlan/if_uath.c
  stable/10/sys/dev/usb/wlan/if_upgt.c
  stable/10/sys/dev/usb/wlan/if_ural.c
  stable/10/sys/dev/usb/wlan/if_urtw.c
  stable/10/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/dev/usb/wlan/if_rsu.c
  stable/11/sys/dev/usb/wlan/if_rum.c
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_uath.c
  stable/11/sys/dev/usb/wlan/if_upgt.c
  stable/11/sys/dev/usb/wlan/if_ural.c
  stable/11/sys/dev/usb/wlan/if_urtw.c
  stable/11/sys/dev/usb/wlan/if_zyd.c
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rum.c
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_uath.c
  stable/12/sys/dev/usb/wlan/if_upgt.c
  stable/12/sys/dev/usb/wlan/if_ural.c
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/dev/usb/wlan/if_rsu.c
==
--- stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -35,12 +35,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-
-#include 
-#include 
 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_rum.c
==
--- stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_rum.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_run.c
==
--- stable/10/sys/dev/usb/wlan/if_run.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_run.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_uath.c
==
--- stable/10/sys/dev/usb/wlan/if_uath.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_uath.cTue Feb  5 03:01:10 2019
(r343760)
@@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_upgt.c
==
--- stable/10/sys/dev/usb/wlan/if_upgt.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_upgt.cTue Feb  5 03:01:10 2019
(r343760)
@@ -38,7 +38,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_ural.c
==
--- stable/10/sys/dev/usb/wlan/if_ural.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_ural.cTue Feb  5 03:01:10 2019
(r343760)
@@ -43,10 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_urtw.c
==
--- stable/10/sys/dev/usb/wlan/if_urtw.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_urtw.cTue Feb  5 03:01:10 2019
(r343760)
@@ -31,10 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/10/sys/dev/usb/wlan/if_zyd.c
==
--- stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/10/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-04 Thread Andriy Voskoboinyk
Author: avos
Date: Tue Feb  5 03:01:10 2019
New Revision: 343760
URL: https://svnweb.freebsd.org/changeset/base/343760

Log:
  MFC r343541:
  Drop some unneeded includes from wireless USB drivers.

Modified:
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rum.c
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_uath.c
  stable/12/sys/dev/usb/wlan/if_upgt.c
  stable/12/sys/dev/usb/wlan/if_ural.c
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_rsu.c
  stable/10/sys/dev/usb/wlan/if_rum.c
  stable/10/sys/dev/usb/wlan/if_run.c
  stable/10/sys/dev/usb/wlan/if_uath.c
  stable/10/sys/dev/usb/wlan/if_upgt.c
  stable/10/sys/dev/usb/wlan/if_ural.c
  stable/10/sys/dev/usb/wlan/if_urtw.c
  stable/10/sys/dev/usb/wlan/if_zyd.c
  stable/11/sys/dev/usb/wlan/if_rsu.c
  stable/11/sys/dev/usb/wlan/if_rum.c
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_uath.c
  stable/11/sys/dev/usb/wlan/if_upgt.c
  stable/11/sys/dev/usb/wlan/if_ural.c
  stable/11/sys/dev/usb/wlan/if_urtw.c
  stable/11/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/dev/usb/wlan/if_rsu.c
==
--- stable/12/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -39,12 +39,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-
-#include 
-#include 
 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_rum.c
==
--- stable/12/sys/dev/usb/wlan/if_rum.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_rum.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_run.c
==
--- stable/12/sys/dev/usb/wlan/if_run.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_run.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_uath.c
==
--- stable/12/sys/dev/usb/wlan/if_uath.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_uath.cTue Feb  5 03:01:10 2019
(r343760)
@@ -85,10 +85,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_upgt.c
==
--- stable/12/sys/dev/usb/wlan/if_upgt.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_upgt.cTue Feb  5 03:01:10 2019
(r343760)
@@ -41,7 +41,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_ural.c
==
--- stable/12/sys/dev/usb/wlan/if_ural.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_ural.cTue Feb  5 03:01:10 2019
(r343760)
@@ -45,10 +45,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_urtw.c
==
--- stable/12/sys/dev/usb/wlan/if_urtw.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_urtw.cTue Feb  5 03:01:10 2019
(r343760)
@@ -34,10 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/12/sys/dev/usb/wlan/if_zyd.c
==
--- stable/12/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/12/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -44,10 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343760 - in stable: 10/sys/dev/usb/wlan 11/sys/dev/usb/wlan 12/sys/dev/usb/wlan

2019-02-04 Thread Andriy Voskoboinyk
Author: avos
Date: Tue Feb  5 03:01:10 2019
New Revision: 343760
URL: https://svnweb.freebsd.org/changeset/base/343760

Log:
  MFC r343541:
  Drop some unneeded includes from wireless USB drivers.

Modified:
  stable/11/sys/dev/usb/wlan/if_rsu.c
  stable/11/sys/dev/usb/wlan/if_rum.c
  stable/11/sys/dev/usb/wlan/if_run.c
  stable/11/sys/dev/usb/wlan/if_uath.c
  stable/11/sys/dev/usb/wlan/if_upgt.c
  stable/11/sys/dev/usb/wlan/if_ural.c
  stable/11/sys/dev/usb/wlan/if_urtw.c
  stable/11/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/usb/wlan/if_rsu.c
  stable/10/sys/dev/usb/wlan/if_rum.c
  stable/10/sys/dev/usb/wlan/if_run.c
  stable/10/sys/dev/usb/wlan/if_uath.c
  stable/10/sys/dev/usb/wlan/if_upgt.c
  stable/10/sys/dev/usb/wlan/if_ural.c
  stable/10/sys/dev/usb/wlan/if_urtw.c
  stable/10/sys/dev/usb/wlan/if_zyd.c
  stable/12/sys/dev/usb/wlan/if_rsu.c
  stable/12/sys/dev/usb/wlan/if_rum.c
  stable/12/sys/dev/usb/wlan/if_run.c
  stable/12/sys/dev/usb/wlan/if_uath.c
  stable/12/sys/dev/usb/wlan/if_upgt.c
  stable/12/sys/dev/usb/wlan/if_ural.c
  stable/12/sys/dev/usb/wlan/if_urtw.c
  stable/12/sys/dev/usb/wlan/if_zyd.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/dev/usb/wlan/if_rsu.c
==
--- stable/11/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_rsu.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -40,12 +40,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-
-#include 
-#include 
 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_rum.c
==
--- stable/11/sys/dev/usb/wlan/if_rum.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_rum.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_run.c
==
--- stable/11/sys/dev/usb/wlan/if_run.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_run.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_uath.c
==
--- stable/11/sys/dev/usb/wlan/if_uath.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_uath.cTue Feb  5 03:01:10 2019
(r343760)
@@ -80,10 +80,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_upgt.c
==
--- stable/11/sys/dev/usb/wlan/if_upgt.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_upgt.cTue Feb  5 03:01:10 2019
(r343760)
@@ -39,7 +39,6 @@
 #include 
 
 #include 
-#include 
 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_ural.c
==
--- stable/11/sys/dev/usb/wlan/if_ural.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_ural.cTue Feb  5 03:01:10 2019
(r343760)
@@ -43,10 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_urtw.c
==
--- stable/11/sys/dev/usb/wlan/if_urtw.cTue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_urtw.cTue Feb  5 03:01:10 2019
(r343760)
@@ -31,10 +31,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 

Modified: stable/11/sys/dev/usb/wlan/if_zyd.c
==
--- stable/11/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 02:33:57 2019
(r343759)
+++ stable/11/sys/dev/usb/wlan/if_zyd.c Tue Feb  5 03:01:10 2019
(r343760)
@@ -42,10 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
-#include 
-#include 
-
 #include 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343759 - in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler

2019-02-04 Thread Cy Schubert
Author: cy
Date: Tue Feb  5 02:33:57 2019
New Revision: 343759
URL: https://svnweb.freebsd.org/changeset/base/343759

Log:
  MFC r342815:
  
  Remove ipsd (IP Scan Detetor). It is unused and to my knowledge has
  never been used on any platform that ipfilter has been on. However
  it looks like it could be a useful utility, therefore there are plans
  to make it a port one day. It lacks a man page as well.

Deleted:
  stable/12/contrib/ipfilter/ipsd/Celler/ip_compat.h
  stable/12/contrib/ipfilter/ipsd/Makefile
  stable/12/contrib/ipfilter/ipsd/README
  stable/12/contrib/ipfilter/ipsd/ipsd.c
  stable/12/contrib/ipfilter/ipsd/ipsd.h
  stable/12/contrib/ipfilter/ipsd/ipsdr.c
  stable/12/contrib/ipfilter/ipsd/linux.h
  stable/12/contrib/ipfilter/ipsd/sbpf.c
  stable/12/contrib/ipfilter/ipsd/sdlpi.c
  stable/12/contrib/ipfilter/ipsd/slinux.c
  stable/12/contrib/ipfilter/ipsd/snit.c
Modified:
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Deleted:
  stable/11/contrib/ipfilter/ipsd/Celler/ip_compat.h
  stable/11/contrib/ipfilter/ipsd/Makefile
  stable/11/contrib/ipfilter/ipsd/README
  stable/11/contrib/ipfilter/ipsd/ipsd.c
  stable/11/contrib/ipfilter/ipsd/ipsd.h
  stable/11/contrib/ipfilter/ipsd/ipsdr.c
  stable/11/contrib/ipfilter/ipsd/linux.h
  stable/11/contrib/ipfilter/ipsd/sbpf.c
  stable/11/contrib/ipfilter/ipsd/sdlpi.c
  stable/11/contrib/ipfilter/ipsd/slinux.c
  stable/11/contrib/ipfilter/ipsd/snit.c
Modified:
Directory Properties:
  stable/11/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343759 - in stable: 11/contrib/ipfilter/ipsd 11/contrib/ipfilter/ipsd/Celler 12/contrib/ipfilter/ipsd 12/contrib/ipfilter/ipsd/Celler

2019-02-04 Thread Cy Schubert
Author: cy
Date: Tue Feb  5 02:33:57 2019
New Revision: 343759
URL: https://svnweb.freebsd.org/changeset/base/343759

Log:
  MFC r342815:
  
  Remove ipsd (IP Scan Detetor). It is unused and to my knowledge has
  never been used on any platform that ipfilter has been on. However
  it looks like it could be a useful utility, therefore there are plans
  to make it a port one day. It lacks a man page as well.

Deleted:
  stable/11/contrib/ipfilter/ipsd/Celler/ip_compat.h
  stable/11/contrib/ipfilter/ipsd/Makefile
  stable/11/contrib/ipfilter/ipsd/README
  stable/11/contrib/ipfilter/ipsd/ipsd.c
  stable/11/contrib/ipfilter/ipsd/ipsd.h
  stable/11/contrib/ipfilter/ipsd/ipsdr.c
  stable/11/contrib/ipfilter/ipsd/linux.h
  stable/11/contrib/ipfilter/ipsd/sbpf.c
  stable/11/contrib/ipfilter/ipsd/sdlpi.c
  stable/11/contrib/ipfilter/ipsd/slinux.c
  stable/11/contrib/ipfilter/ipsd/snit.c
Modified:
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Deleted:
  stable/12/contrib/ipfilter/ipsd/Celler/ip_compat.h
  stable/12/contrib/ipfilter/ipsd/Makefile
  stable/12/contrib/ipfilter/ipsd/README
  stable/12/contrib/ipfilter/ipsd/ipsd.c
  stable/12/contrib/ipfilter/ipsd/ipsd.h
  stable/12/contrib/ipfilter/ipsd/ipsdr.c
  stable/12/contrib/ipfilter/ipsd/linux.h
  stable/12/contrib/ipfilter/ipsd/sbpf.c
  stable/12/contrib/ipfilter/ipsd/sdlpi.c
  stable/12/contrib/ipfilter/ipsd/slinux.c
  stable/12/contrib/ipfilter/ipsd/snit.c
Modified:
Directory Properties:
  stable/12/   (props changed)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343758 - head/lib/libpmc/pmu-events

2019-02-04 Thread Matt Macy
Author: mmacy
Date: Tue Feb  5 00:31:25 2019
New Revision: 343758
URL: https://svnweb.freebsd.org/changeset/base/343758

Log:
  Fix deterministic builds by sorting input to fts in jevents
  
  Reported by: emaste@

Modified:
  head/lib/libpmc/pmu-events/jevents.c

Modified: head/lib/libpmc/pmu-events/jevents.c
==
--- head/lib/libpmc/pmu-events/jevents.cMon Feb  4 23:57:59 2019
(r343757)
+++ head/lib/libpmc/pmu-events/jevents.cTue Feb  5 00:31:25 2019
(r343758)
@@ -54,6 +54,10 @@
 #include "json.h"
 #include "jevents.h"
 
+static int
+nftw_ordered(const char *path, int (*fn)(const char *, const struct stat *, 
int,
+   struct FTW *), int nfds, int ftwflags);
+
 _Noreturn void  _Exit(int);
 
 int verbose;
@@ -1122,7 +1126,7 @@ int main(int argc, char *argv[])
 
maxfds = get_maxfds();
mapfile = NULL;
-   rc = nftw(ldirname, preprocess_arch_std_files, maxfds, 0);
+   rc = nftw_ordered(ldirname, preprocess_arch_std_files, maxfds, 0);
if (rc && verbose) {
pr_info("%s: Error preprocessing arch standard files %s: %s\n",
prog, ldirname, strerror(errno));
@@ -1135,7 +1139,7 @@ int main(int argc, char *argv[])
goto empty_map;
}
 
-   rc = nftw(ldirname, process_one_file, maxfds, 0);
+   rc = nftw_ordered(ldirname, process_one_file, maxfds, 0);
if (rc && verbose) {
pr_info("%s: Error walking file tree %s\n", prog, ldirname);
goto empty_map;
@@ -1168,4 +1172,91 @@ empty_map:
create_empty_mapping(output_file);
free_arch_std_events();
return 0;
+}
+
+#include 
+
+static int
+fts_compare(const FTSENT * const *a, const FTSENT * const *b)
+{
+   return (strcmp((*a)->fts_name, (*b)->fts_name));
+}
+
+static int
+nftw_ordered(const char *path, int (*fn)(const char *, const struct stat *, 
int,
+ struct FTW *), int nfds, int ftwflags)
+{
+   char * const paths[2] = { (char *)path, NULL };
+   struct FTW ftw;
+   FTSENT *cur;
+   FTS *ftsp;
+   int error = 0, ftsflags, fnflag, postorder, sverrno;
+
+   /* XXX - nfds is currently unused */
+   if (nfds < 1) {
+   errno = EINVAL;
+   return (-1);
+   }
+
+   ftsflags = FTS_COMFOLLOW;
+   if (!(ftwflags & FTW_CHDIR))
+   ftsflags |= FTS_NOCHDIR;
+   if (ftwflags & FTW_MOUNT)
+   ftsflags |= FTS_XDEV;
+   if (ftwflags & FTW_PHYS)
+   ftsflags |= FTS_PHYSICAL;
+   else
+   ftsflags |= FTS_LOGICAL;
+   postorder = (ftwflags & FTW_DEPTH) != 0;
+   ftsp = fts_open(paths, ftsflags, fts_compare);
+   if (ftsp == NULL)
+   return (-1);
+   while ((cur = fts_read(ftsp)) != NULL) {
+   switch (cur->fts_info) {
+   case FTS_D:
+   if (postorder)
+   continue;
+   fnflag = FTW_D;
+   break;
+   case FTS_DC:
+   continue;
+   case FTS_DNR:
+   fnflag = FTW_DNR;
+   break;
+   case FTS_DP:
+   if (!postorder)
+   continue;
+   fnflag = FTW_DP;
+   break;
+   case FTS_F:
+   case FTS_DEFAULT:
+   fnflag = FTW_F;
+   break;
+   case FTS_NS:
+   case FTS_NSOK:
+   fnflag = FTW_NS;
+   break;
+   case FTS_SL:
+   fnflag = FTW_SL;
+   break;
+   case FTS_SLNONE:
+   fnflag = FTW_SLN;
+   break;
+   default:
+   error = -1;
+   goto done;
+   }
+   ftw.base = cur->fts_pathlen - cur->fts_namelen;
+   ftw.level = cur->fts_level;
+   error = fn(cur->fts_path, cur->fts_statp, fnflag, );
+   if (error != 0)
+   break;
+   }
+done:
+   sverrno = errno;
+   if (fts_close(ftsp) != 0 && error == 0)
+   error = -1;
+   else
+   errno = sverrno;
+   return (error);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2019-02-04 Thread Konstantin Belousov
Author: kib
Date: Mon Feb  4 23:57:59 2019
New Revision: 343757
URL: https://svnweb.freebsd.org/changeset/base/343757

Log:
  Update CPUID bits definitions and CPU identification based on changes
  in SDM rev. 069.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

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

Modified: head/sys/x86/include/specialreg.h
==
--- head/sys/x86/include/specialreg.h   Mon Feb  4 22:38:34 2019
(r343756)
+++ head/sys/x86/include/specialreg.h   Mon Feb  4 23:57:59 2019
(r343757)
@@ -436,7 +436,12 @@
 #defineCPUID_STDEXT2_UMIP  0x0004
 #defineCPUID_STDEXT2_PKU   0x0008
 #defineCPUID_STDEXT2_OSPKE 0x0010
+#defineCPUID_STDEXT2_WAITPKG   0x0020
+#defineCPUID_STDEXT2_GFNI  0x0100
 #defineCPUID_STDEXT2_RDPID 0x0040
+#defineCPUID_STDEXT2_CLDEMOTE  0x0200
+#defineCPUID_STDEXT2_MOVDIRI   0x0800
+#defineCPUID_STDEXT2_MOVDIRI64B0x1000
 #defineCPUID_STDEXT2_SGXLC 0x4000
 
 /*
@@ -446,6 +451,7 @@
 #defineCPUID_STDEXT3_STIBP 0x0800
 #defineCPUID_STDEXT3_L1D_FLUSH 0x1000
 #defineCPUID_STDEXT3_ARCH_CAP  0x2000
+#defineCPUID_STDEXT3_CORE_CAP  0x4000
 #defineCPUID_STDEXT3_SSBD  0x8000
 
 /* MSR IA32_ARCH_CAP(ABILITIES) bits */

Modified: head/sys/x86/x86/identcpu.c
==
--- head/sys/x86/x86/identcpu.c Mon Feb  4 22:38:34 2019(r343756)
+++ head/sys/x86/x86/identcpu.c Mon Feb  4 23:57:59 2019(r343757)
@@ -981,7 +981,12 @@ printcpuinfo(void)
   "\003UMIP"
   "\004PKU"
   "\005OSPKE"
+  "\006WAITPKG"
+  "\011GFNI"
   "\027RDPID"
+  "\032CLDEMOTE"
+  "\034MOVDIRI"
+  "\035MOVDIRI64B"
   "\037SGXLC"
   );
}
@@ -994,6 +999,7 @@ printcpuinfo(void)
   "\034STIBP"
   "\035L1DFL"
   "\036ARCH_CAP"
+  "\037CORE_CAP"
   "\040SSBD"
   );
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343756 - stable/12/sys/netinet

2019-02-04 Thread Brooks Davis
Author: brooks
Date: Mon Feb  4 22:38:34 2019
New Revision: 343756
URL: https://svnweb.freebsd.org/changeset/base/343756

Log:
  MFC r343587:
  
  Add a simple port filter to SIFTR.
  
  SIFTR does not allow any kind of filtering, but captures every packet
  processed by the TCP stack.
  Often, only a specific session or service is of interest, and doing the
  filtering in post-processing of the log adds to the overhead of SIFTR.
  
  This adds a new sysctl net.inet.siftr.port_filter. When set to zero, all
  packets get captured as previously. If set to any other value, only
  packets where either the source or the destination ports match, are
  captured in the log file.
  
  Submitted by: Richard Scheffenegger
  Reviewed by:  Cheng Cui
  Differential Revision:https://reviews.freebsd.org/D18897

Modified:
  stable/12/sys/netinet/siftr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/siftr.c
==
--- stable/12/sys/netinet/siftr.c   Mon Feb  4 21:28:25 2019
(r343755)
+++ stable/12/sys/netinet/siftr.c   Mon Feb  4 22:38:34 2019
(r343756)
@@ -272,6 +272,7 @@ static volatile unsigned int siftr_exit_pkt_manager_th
 static unsigned int siftr_enabled = 0;
 static unsigned int siftr_pkts_per_log = 1;
 static unsigned int siftr_generate_hashes = 0;
+static uint16_t siftr_port_filter = 0;
 /* static unsigned int siftr_binary_log = 0; */
 static char siftr_logfile[PATH_MAX] = "/var/log/siftr.log";
 static char siftr_logfile_shadow[PATH_MAX] = "/var/log/siftr.log";
@@ -317,6 +318,10 @@ SYSCTL_UINT(_net_inet_siftr, OID_AUTO, genhashes, CTLF
 _generate_hashes, 0,
 "enable packet hash generation");
 
+SYSCTL_U16(_net_inet_siftr, OID_AUTO, port_filter, CTLFLAG_RW,
+_port_filter, 0,
+"enable packet filter on a TCP port");
+
 /* XXX: TODO
 SYSCTL_UINT(_net_inet_siftr, OID_AUTO, binary, CTLFLAG_RW,
 _binary_log, 0,
@@ -907,6 +912,16 @@ siftr_chkpkt(void *arg, struct mbuf **m, struct ifnet 
goto inp_unlock;
}
 
+   /*
+* Only pkts selected by the tcp port filter
+* can be inserted into the pkt_queue
+*/
+   if ((siftr_port_filter != 0) && 
+   (siftr_port_filter != ntohs(inp->inp_lport)) &&
+   (siftr_port_filter != ntohs(inp->inp_fport))) {
+   goto inp_unlock;
+   }
+
pn = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, M_NOWAIT|M_ZERO);
 
if (pn == NULL) {
@@ -1080,6 +1095,16 @@ siftr_chkpkt6(void *arg, struct mbuf **m, struct ifnet
else
ss->nskip_out_tcpcb++;
 
+   goto inp_unlock6;
+   }
+
+   /*
+* Only pkts selected by the tcp port filter
+* can be inserted into the pkt_queue
+*/
+   if ((siftr_port_filter != 0) && 
+   (siftr_port_filter != ntohs(inp->inp_lport)) &&
+   (siftr_port_filter != ntohs(inp->inp_fport))) {
goto inp_unlock6;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r343755 - in head: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/libi

2019-02-04 Thread Rodney W. Grimes
> Author: imp
> Date: Mon Feb  4 21:28:25 2019
> New Revision: 343755
> URL: https://svnweb.freebsd.org/changeset/base/343755
> 
> Log:
>   Regularize the Netflix copyright
>   
>   Use recent best practices for Copyright form at the top of
>   the license:
>   1. Remove all the All Rights Reserved clauses on our stuff. Where we
>  piggybacked others, use a separate line to make things clear.
Thank you, I think you missed at least one though.
And a few other comments inline, I defanitly think we need to pull
what was done here into an update of style(9), including the proper
way to attribute "work done for hire".

>   2. Use "Netflix, Inc." everywhere.
>   3. Use a single line for the copyright for grep friendliness.
>   4. Use date ranges in all places for our stuff.
>   
>   Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)
> 
> Modified:
>   head/lib/libefivar/efi-osdep.h
>   head/lib/libefivar/efivar-dp-format.c
>   head/lib/libefivar/efivar-dp-parse.c
>   head/lib/libefivar/efivar-dp-xlate.c
>   head/lib/libefivar/efivar-dp.h
>   head/lib/libefivar/efivar.3
>   head/lib/libefivar/efivar.c
>   head/lib/libefivar/efivar.h
>   head/lib/libefivar/uefi-dplib.h
>   head/lib/libefivar/uefi-dputil.c
>   head/sbin/devmatch/devmatch.8
>   head/sbin/devmatch/devmatch.c
>   head/sbin/nvmecontrol/modules/wdc/wdc.c
>   head/sbin/nvmecontrol/nc_util.c
>   head/sbin/nvmecontrol/ns.c
>   head/sbin/nvmecontrol/nvmecontrol_ext.h
>   head/sbin/nvmecontrol/power.c
>   head/share/man/man4/nda.4
>   head/share/man/man9/kern_testfrwk.9
>   head/stand/efi/libefi/efienv.c
>   head/stand/efi/libefi/env.c
>   head/stand/efi/libefi/wchar.c
>   head/stand/efi/loader/main.c
>   head/stand/forth/efi.4th
>   head/stand/i386/libi386/biospci.c
>   head/stand/libsa/abort.c
>   head/stand/libsa/xlocale_private.h
>   head/sys/cam/nvme/nvme_all.c
>   head/sys/cam/nvme/nvme_all.h
>   head/sys/cam/nvme/nvme_da.c
>   head/sys/crypto/aesni/aesencdec.h
>   head/sys/dev/efidev/efidev.c
>   head/sys/dev/nvme/nvme_sim.c
>   head/sys/dev/tcp_log/tcp_log_dev.c
>   head/sys/dev/tcp_log/tcp_log_dev.h
>   head/sys/kern/subr_boot.c
>   head/sys/netinet/tcp_hpts.c
>   head/sys/netinet/tcp_hpts.h
>   head/sys/netinet/tcp_log_buf.c
>   head/sys/netinet/tcp_log_buf.h
>   head/sys/netinet/tcp_stacks/rack.c
>   head/sys/netinet/tcp_stacks/rack_bbr_common.h
>   head/sys/netinet/tcp_stacks/sack_filter.c
>   head/sys/netinet/tcp_stacks/sack_filter.h
>   head/sys/netinet/tcp_stacks/tcp_rack.h
>   head/sys/sys/boot.h
>   head/sys/sys/efiio.h
>   head/sys/sys/kern_prefetch.h
>   head/sys/tests/callout_test.h
>   head/sys/tests/callout_test/callout_test.c
>   head/sys/tests/framework/kern_testfrwk.c
>   head/sys/tests/kern_testfrwk.h
>   head/usr.sbin/efibootmgr/efibootmgr.8
>   head/usr.sbin/efibootmgr/efibootmgr.c
>   head/usr.sbin/efidp/efidp.8
>   head/usr.sbin/efidp/efidp.c
>   head/usr.sbin/efivar/efiutil.c
>   head/usr.sbin/efivar/efiutil.h
>   head/usr.sbin/efivar/efivar.8
>   head/usr.sbin/efivar/efivar.c
>   head/usr.sbin/mpsutil/mps_cmd.c
>   head/usr.sbin/mpsutil/mps_debug.c
>   head/usr.sbin/mpsutil/mps_show.c
>   head/usr.sbin/mpsutil/mpsutil.c
>   head/usr.sbin/pmcstat/pmcpl_annotate_cg.c
>   head/usr.sbin/pmcstat/pmcpl_annotate_cg.h
>   head/usr.sbin/pmcstudy/eval_expr.c
>   head/usr.sbin/pmcstudy/eval_expr.h
>   head/usr.sbin/pmcstudy/pmcstudy.8
>   head/usr.sbin/pmcstudy/pmcstudy.c
> 
> Modified: head/lib/libefivar/efi-osdep.h
> ==
> --- head/lib/libefivar/efi-osdep.hMon Feb  4 21:16:15 2019
> (r343754)
> +++ head/lib/libefivar/efi-osdep.hMon Feb  4 21:28:25 2019
> (r343755)
> @@ -1,6 +1,5 @@
>  /*-
>   * Copyright (c) 2017 Netflix, Inc.
> - * All rights reserved.
>   *
>   * Redistribution and use in source and binary forms, with or without
>   * modification, are permitted provided that the following conditions
> 
> Modified: head/lib/libefivar/efivar-dp-format.c
> ==
> --- head/lib/libefivar/efivar-dp-format.c Mon Feb  4 21:16:15 2019
> (r343754)
> +++ head/lib/libefivar/efivar-dp-format.c Mon Feb  4 21:28:25 2019
> (r343755)
> @@ -1,6 +1,5 @@
>  /*-
>   * Copyright (c) 2017 Netflix, Inc.
> - * All rights reserved.
>   *
>   * Redistribution and use in source and binary forms, with or without
>   * modification, are permitted provided that the following conditions
> 
> Modified: head/lib/libefivar/efivar-dp-parse.c
> ==
> --- head/lib/libefivar/efivar-dp-parse.c  Mon Feb  4 21:16:15 2019
> (r343754)
> +++ head/lib/libefivar/efivar-dp-parse.c  Mon Feb  4 21:28:25 2019
> (r343755)
> @@ -1,6 +1,5 @@
>  /*-
>   * Copyright (c) 2017 Netflix, Inc.
> - * All rights reserved.
>   *
>   * Redistribution and use in source and binary 

svn commit: r343755 - in head: lib/libefivar sbin/devmatch sbin/nvmecontrol sbin/nvmecontrol/modules/wdc share/man/man4 share/man/man9 stand/efi/libefi stand/efi/loader stand/forth stand/i386/libi3...

2019-02-04 Thread Warner Losh
Author: imp
Date: Mon Feb  4 21:28:25 2019
New Revision: 343755
URL: https://svnweb.freebsd.org/changeset/base/343755

Log:
  Regularize the Netflix copyright
  
  Use recent best practices for Copyright form at the top of
  the license:
  1. Remove all the All Rights Reserved clauses on our stuff. Where we
 piggybacked others, use a separate line to make things clear.
  2. Use "Netflix, Inc." everywhere.
  3. Use a single line for the copyright for grep friendliness.
  4. Use date ranges in all places for our stuff.
  
  Approved by: Netflix Legal (who gave me the form), adrian@ (pmc files)

Modified:
  head/lib/libefivar/efi-osdep.h
  head/lib/libefivar/efivar-dp-format.c
  head/lib/libefivar/efivar-dp-parse.c
  head/lib/libefivar/efivar-dp-xlate.c
  head/lib/libefivar/efivar-dp.h
  head/lib/libefivar/efivar.3
  head/lib/libefivar/efivar.c
  head/lib/libefivar/efivar.h
  head/lib/libefivar/uefi-dplib.h
  head/lib/libefivar/uefi-dputil.c
  head/sbin/devmatch/devmatch.8
  head/sbin/devmatch/devmatch.c
  head/sbin/nvmecontrol/modules/wdc/wdc.c
  head/sbin/nvmecontrol/nc_util.c
  head/sbin/nvmecontrol/ns.c
  head/sbin/nvmecontrol/nvmecontrol_ext.h
  head/sbin/nvmecontrol/power.c
  head/share/man/man4/nda.4
  head/share/man/man9/kern_testfrwk.9
  head/stand/efi/libefi/efienv.c
  head/stand/efi/libefi/env.c
  head/stand/efi/libefi/wchar.c
  head/stand/efi/loader/main.c
  head/stand/forth/efi.4th
  head/stand/i386/libi386/biospci.c
  head/stand/libsa/abort.c
  head/stand/libsa/xlocale_private.h
  head/sys/cam/nvme/nvme_all.c
  head/sys/cam/nvme/nvme_all.h
  head/sys/cam/nvme/nvme_da.c
  head/sys/crypto/aesni/aesencdec.h
  head/sys/dev/efidev/efidev.c
  head/sys/dev/nvme/nvme_sim.c
  head/sys/dev/tcp_log/tcp_log_dev.c
  head/sys/dev/tcp_log/tcp_log_dev.h
  head/sys/kern/subr_boot.c
  head/sys/netinet/tcp_hpts.c
  head/sys/netinet/tcp_hpts.h
  head/sys/netinet/tcp_log_buf.c
  head/sys/netinet/tcp_log_buf.h
  head/sys/netinet/tcp_stacks/rack.c
  head/sys/netinet/tcp_stacks/rack_bbr_common.h
  head/sys/netinet/tcp_stacks/sack_filter.c
  head/sys/netinet/tcp_stacks/sack_filter.h
  head/sys/netinet/tcp_stacks/tcp_rack.h
  head/sys/sys/boot.h
  head/sys/sys/efiio.h
  head/sys/sys/kern_prefetch.h
  head/sys/tests/callout_test.h
  head/sys/tests/callout_test/callout_test.c
  head/sys/tests/framework/kern_testfrwk.c
  head/sys/tests/kern_testfrwk.h
  head/usr.sbin/efibootmgr/efibootmgr.8
  head/usr.sbin/efibootmgr/efibootmgr.c
  head/usr.sbin/efidp/efidp.8
  head/usr.sbin/efidp/efidp.c
  head/usr.sbin/efivar/efiutil.c
  head/usr.sbin/efivar/efiutil.h
  head/usr.sbin/efivar/efivar.8
  head/usr.sbin/efivar/efivar.c
  head/usr.sbin/mpsutil/mps_cmd.c
  head/usr.sbin/mpsutil/mps_debug.c
  head/usr.sbin/mpsutil/mps_show.c
  head/usr.sbin/mpsutil/mpsutil.c
  head/usr.sbin/pmcstat/pmcpl_annotate_cg.c
  head/usr.sbin/pmcstat/pmcpl_annotate_cg.h
  head/usr.sbin/pmcstudy/eval_expr.c
  head/usr.sbin/pmcstudy/eval_expr.h
  head/usr.sbin/pmcstudy/pmcstudy.8
  head/usr.sbin/pmcstudy/pmcstudy.c

Modified: head/lib/libefivar/efi-osdep.h
==
--- head/lib/libefivar/efi-osdep.h  Mon Feb  4 21:16:15 2019
(r343754)
+++ head/lib/libefivar/efi-osdep.h  Mon Feb  4 21:28:25 2019
(r343755)
@@ -1,6 +1,5 @@
 /*-
  * Copyright (c) 2017 Netflix, Inc.
- * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/lib/libefivar/efivar-dp-format.c
==
--- head/lib/libefivar/efivar-dp-format.c   Mon Feb  4 21:16:15 2019
(r343754)
+++ head/lib/libefivar/efivar-dp-format.c   Mon Feb  4 21:28:25 2019
(r343755)
@@ -1,6 +1,5 @@
 /*-
  * Copyright (c) 2017 Netflix, Inc.
- * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/lib/libefivar/efivar-dp-parse.c
==
--- head/lib/libefivar/efivar-dp-parse.cMon Feb  4 21:16:15 2019
(r343754)
+++ head/lib/libefivar/efivar-dp-parse.cMon Feb  4 21:28:25 2019
(r343755)
@@ -1,6 +1,5 @@
 /*-
  * Copyright (c) 2017 Netflix, Inc.
- * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Modified: head/lib/libefivar/efivar-dp-xlate.c
==
--- head/lib/libefivar/efivar-dp-xlate.cMon Feb  4 21:16:15 2019
(r343754)
+++ head/lib/libefivar/efivar-dp-xlate.cMon Feb  4 21:28:25 2019
(r343755)
@@ -1,6 +1,5 @@
 /*-
  * Copyright (c) 2017 Netflix, Inc.
- * All rights 

svn commit: r343754 - head/lib/libthr/thread

2019-02-04 Thread Konstantin Belousov
Author: kib
Date: Mon Feb  4 21:16:15 2019
New Revision: 343754
URL: https://svnweb.freebsd.org/changeset/base/343754

Log:
  Fixes for very early use of the pthread_mutex_* and libthr malloc.
  
  When libthr is statically linked into the binary, order of the
  constructors execution is not deterministic.  It is possible for the
  application constructor to use pthread_mutex_* functions before the
  libthr initialization was done.
  
  Handle it by:
  - making thr_malloc.c locking functions operational when curthread is not
yet set;
  - making __thr_malloc_init() idempotent, allowing more than one call to it;
  - unconditionally calling __thr_malloc_init() before initializing
a process-private mutex.
  
  Reported and tested by:   mmel
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/lib/libthr/thread/thr_malloc.c
  head/lib/libthr/thread/thr_mutex.c

Modified: head/lib/libthr/thread/thr_malloc.c
==
--- head/lib/libthr/thread/thr_malloc.c Mon Feb  4 20:46:57 2019
(r343753)
+++ head/lib/libthr/thread/thr_malloc.c Mon Feb  4 21:16:15 2019
(r343754)
@@ -46,6 +46,8 @@ void
 __thr_malloc_init(void)
 {
 
+   if (npagesizes != 0)
+   return;
npagesizes = getpagesizes(pagesizes_d, nitems(pagesizes_d));
if (npagesizes == -1) {
npagesizes = 1;
@@ -59,6 +61,8 @@ static void
 thr_malloc_lock(struct pthread *curthread)
 {
 
+   if (curthread == NULL)
+   return;
curthread->locklevel++;
_thr_umutex_lock(_malloc_umtx, TID(curthread));
 }
@@ -67,6 +71,8 @@ static void
 thr_malloc_unlock(struct pthread *curthread)
 {
 
+   if (curthread == NULL)
+   return;
_thr_umutex_unlock(_malloc_umtx, TID(curthread));
curthread->locklevel--;
_thr_ast(curthread);

Modified: head/lib/libthr/thread/thr_mutex.c
==
--- head/lib/libthr/thread/thr_mutex.c  Mon Feb  4 20:46:57 2019
(r343753)
+++ head/lib/libthr/thread/thr_mutex.c  Mon Feb  4 21:16:15 2019
(r343754)
@@ -390,6 +390,7 @@ __pthread_mutex_init(pthread_mutex_t * __restrict mute
}
if (mutex_attr == NULL ||
(*mutex_attr)->m_pshared == PTHREAD_PROCESS_PRIVATE) {
+   __thr_malloc_init();
return (mutex_init(mutex, mutex_attr ? *mutex_attr : NULL,
__thr_calloc));
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r325728 - head/lib/libkvm

2019-02-04 Thread Ed Maste
On Sat, 11 Nov 2017 at 18:31, Will Andrews  wrote:
>
> Author: will
> Date: Sat Nov 11 23:30:58 2017
> New Revision: 325728
> URL: https://svnweb.freebsd.org/changeset/base/325728
>
> Log:
>   libkvm: add kvm_walk_pages API.
>
> Modified: head/lib/libkvm/kvm.h
> ==
> --- head/lib/libkvm/kvm.h   Sat Nov 11 22:50:14 2017(r325727)
> +++ head/lib/libkvm/kvm.h   Sat Nov 11 23:30:58 2017(r325728)
> @@ -36,6 +36,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Default version symbol. */
>  #defineVRS_SYM "_version"
> @@ -73,7 +74,19 @@ struct kvm_swap {
> u_int   ksw_reserved2;
>  };
>
> +struct kvm_page {
> +   unsigned int version;
> +   u_long paddr;

This should probably be uin64_t to support cross-debugging cores from
64-bit machines on 32-bit hosts; also for i386 PAE. Or, on IRC jhb
suggested we introduce a kpaddr_t typedef akin to kvaddr_t.

> +   u_long kmap_vaddr;
> +   u_long dmap_vaddr;

These two should be kvaddr_t.

> +   vm_prot_t prot;
> +   u_long offset;

off_t?

> +   size_t len;
> +   /* end of version 1 */
> +};
> +
>  #define SWIF_DEV_PREFIX0x0002
> +#defineLIBKVM_WALK_PAGES_VERSION   1
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343753 - head/sys/net

2019-02-04 Thread Marius Strobl
Author: marius
Date: Mon Feb  4 20:46:57 2019
New Revision: 343753
URL: https://svnweb.freebsd.org/changeset/base/343753

Log:
  o As illustrated by e. g. figure 7-14 of the Intel 82599 10 GbE
controller datasheet revision 3.3, in the context of Ethernet
MACs the control data describing the packet buffers typically
are named "descriptors". Each of these descriptors references
one buffer, multiple of which a packet can be composed of.
By contrast, in comments, messages and the names of structure
members, iflib(4) refers to DMA resources employed for RX and
TX buffers (rather than control data) as "desc(riptors)".
This odd naming convention of iflib(4) made reviewing r343085
and identifying wrong and missing bus_dmamap_sync(9) calls in
particular way harder than it already is. This convention may
also explain why the netmap(4) part of iflib(4) pairs the DMA
tags for control data with DMA maps of buffers and vice versa
in calls to bus_dma(9) functions.
Therefore, change iflib(4) to refer to buf(fers) when buffers
and not the usual understanding of descriptors is meant. This
change does not include corrections to the DMA resources used
in the netmap(4) parts. However, it revises error messages to
state which kind of allocation/creation failed. Specifically,
the "Unable to allocate tx_buffer (map) memory" copy & pasted
inappropriately on several occasions was replaced with proper
messages.
  o Enhance some other error messages to indicate which half - RX
or TX - they apply to instead of using identical text in both
cases and generally canonicalize them.
  o Correct the descriptions of iflib_{r,t}xsd_alloc() to reflect
reality; current code doesn't use {r,t}x_buffer structures.
  o In iflib_queues_alloc():
- Remove redundant BUS_DMA_NOWAIT of iflib_dma_alloc() calls,
- change the M_WAITOK from malloc(9) calls into M_NOWAIT. The
  return values are already checked, deferred DMA allocations
  not being an option at this point, BUS_DMA_NOWAIT has to be
  used anyway and prior malloc(9) calls in this function also
  specify M_NOWAIT.
  
  Reviewed by:  shurd
  Differential Revision:https://reviews.freebsd.org/D19067

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cMon Feb  4 20:09:22 2019(r343752)
+++ head/sys/net/iflib.cMon Feb  4 20:46:57 2019(r343753)
@@ -353,8 +353,8 @@ struct iflib_txq {
uint8_t ift_closed;
uint8_t ift_update_freq;
struct iflib_filter_info ift_filter_info;
-   bus_dma_tag_t   ift_desc_tag;
-   bus_dma_tag_t   ift_tso_desc_tag;
+   bus_dma_tag_t   ift_buf_tag;
+   bus_dma_tag_t   ift_tso_buf_tag;
iflib_dma_info_tift_ifdi;
 #define MTX_NAME_LEN 16
charift_mtx_name[MTX_NAME_LEN];
@@ -389,7 +389,7 @@ struct iflib_fl {
iflib_rxsd_array_t  ifl_sds;
iflib_rxq_t ifl_rxq;
uint8_t ifl_id;
-   bus_dma_tag_t   ifl_desc_tag;
+   bus_dma_tag_t   ifl_buf_tag;
iflib_dma_info_tifl_ifdi;
uint64_tifl_bus_addrs[IFLIB_MAX_RX_REFRESH] 
__aligned(CACHE_LINE_SIZE);
caddr_t ifl_vm_addrs[IFLIB_MAX_RX_REFRESH];
@@ -922,10 +922,9 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl
if_ctx_t ctx = ifp->if_softc;
iflib_txq_t txq = >ifc_txqs[kring->ring_id];
 
-   bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map,
+   bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map,
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 
-
/*
 * First part: process new packets to send.
 * nm_i is the current index in the netmap kring,
@@ -992,7 +991,8 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl
 
if (slot->flags & NS_BUF_CHANGED) {
/* buffer has changed, reload map */
-   netmap_reload_map(na, 
txq->ift_desc_tag, txq->ift_sds.ifsd_map[nic_i], addr);
+   netmap_reload_map(na, txq->ift_buf_tag,
+   txq->ift_sds.ifsd_map[nic_i], addr);
}
/* make sure changes to the buffer are synced */
bus_dmamap_sync(txq->ift_ifdi->idi_tag, 
txq->ift_sds.ifsd_map[nic_i],
@@ -1005,7 +1005,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl
kring->nr_hwcur = nm_i;
 
/* synchronize the NIC ring */
-   bus_dmamap_sync(txq->ift_desc_tag, txq->ift_ifdi->idi_map,
+   bus_dmamap_sync(txq->ift_buf_tag, txq->ift_ifdi->idi_map,

Re: svn commit: r343751 - head/lib/libc/tests/sys

2019-02-04 Thread Enji Cooper


> On Feb 4, 2019, at 12:09 PM, Rodney W. Grimes 
>  wrote:
> 
>> Author: ngie
>> Date: Mon Feb  4 19:12:45 2019
>> New Revision: 343751
>> URL: https://svnweb.freebsd.org/changeset/base/343751
>> 
>> Log:
>>  Avoid the DNS lookup for "localhost"
>> 
>>  ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my 
>> test
>>  VM), so in order for the test to pass on the host, it needs to avoid the DNS
>>  lookup by using the numeric host address representation.
> 
> If it can not get to a resolver, it should be falling back to
> /etc/hosts whch does have the correct entries for localhost.

Please continue this thread of discussion on Phabricator.

This was already discussed sort of there. As I said before (when it was 
commented on by @emaste):

>> In D19026#407184, @emaste wrote:
>> I don't object to this patch but shouldn't we be able to prevent any DNS use 
>> via nsswitch.conf?
>> That would require everyone make a corresponding change to prevent any DNS 
>> use when running this test.

> It's better to focus on what needs to be tested, instead of what's nice to 
> test by side-effect. There are other tests that exercise DNS lookups (which 
> currently fail after a long timeout due to a lacking external connection).

> This is a quick hack to set this test on a working path. The right path is 
> the suggestion @asomers provided in the previous review, to use if_tap.

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


Re: svn commit: r343751 - head/lib/libc/tests/sys

2019-02-04 Thread Rodney W. Grimes
> Author: ngie
> Date: Mon Feb  4 19:12:45 2019
> New Revision: 343751
> URL: https://svnweb.freebsd.org/changeset/base/343751
> 
> Log:
>   Avoid the DNS lookup for "localhost"
>   
>   ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my 
> test
>   VM), so in order for the test to pass on the host, it needs to avoid the DNS
>   lookup by using the numeric host address representation.

If it can not get to a resolver, it should be falling back to
/etc/hosts whch does have the correct entries for localhost.


>   
>   PR: 235200
>   Reviewed by:asomers, lwhsu
>   Approved by:emaste (mentor)
>   MFC after:  2 weeks
>   MFC with:   r343362, r343365, r343367-r343368, r343461
>   Differential Revision: https://reviews.freebsd.org/D19026
> 
> Modified:
>   head/lib/libc/tests/sys/sendfile_test.c
> 
> Modified: head/lib/libc/tests/sys/sendfile_test.c
> ==
> --- head/lib/libc/tests/sys/sendfile_test.c   Mon Feb  4 18:30:47 2019
> (r343750)
> +++ head/lib/libc/tests/sys/sendfile_test.c   Mon Feb  4 19:12:45 2019
> (r343751)
> @@ -97,22 +97,31 @@ generate_random_port(int seed)
>  static void
>  resolve_localhost(struct addrinfo **res, int domain, int type, int port)
>  {
> + const char *host;
>   char *serv;
>   struct addrinfo hints;
>   int error;
>  
> - ATF_REQUIRE_MSG(domain == AF_INET || domain == AF_INET6,
> - "unhandled domain: %d", domain);
> + switch (domain) {
> + case AF_INET:
> + host = "127.0.0.1";
> + break;
> + case AF_INET6:
> + host = "::1";
> + break;
> + default:
> + atf_tc_fail("unhandled domain: %d", domain);
> + }
>  
>   ATF_REQUIRE_MSG(asprintf(, "%d", port) >= 0,
>   "asprintf failed: %s", strerror(errno));
>  
>   memset(, 0, sizeof(hints));
>   hints.ai_family = domain;
> - hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV;
> + hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV|AI_NUMERICHOST;
>   hints.ai_socktype = type;
>  
> - error = getaddrinfo("localhost", serv, , res);
> + error = getaddrinfo(host, serv, , res);
>   ATF_REQUIRE_EQ_MSG(error, 0,
>   "getaddrinfo failed: %s", gai_strerror(error));
>   free(serv);

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


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

2019-02-04 Thread Alexander Motin
Author: mav
Date: Mon Feb  4 20:09:22 2019
New Revision: 343752
URL: https://svnweb.freebsd.org/changeset/base/343752

Log:
  s/Maximal/Maximum/ in sysctl description.
  
  Submitted by: smh
  MFC after:1 week

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
19:12:45 2019(r343751)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
20:09:22 2019(r343752)
@@ -191,7 +191,7 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, 
 int vdev_max_ms_shift = 38;
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN,
 _max_ms_shift, 0,
-"Maximal shift between vdev size and number of metaslabs");
+"Maximum shift between vdev size and number of metaslabs");
 
 boolean_t vdev_validate_skip = B_FALSE;
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343751 - head/lib/libc/tests/sys

2019-02-04 Thread Enji Cooper
Author: ngie
Date: Mon Feb  4 19:12:45 2019
New Revision: 343751
URL: https://svnweb.freebsd.org/changeset/base/343751

Log:
  Avoid the DNS lookup for "localhost"
  
  ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my test
  VM), so in order for the test to pass on the host, it needs to avoid the DNS
  lookup by using the numeric host address representation.
  
  PR:   235200
  Reviewed by:  asomers, lwhsu
  Approved by:  emaste (mentor)
  MFC after:2 weeks
  MFC with: r343362, r343365, r343367-r343368, r343461
  Differential Revision: https://reviews.freebsd.org/D19026

Modified:
  head/lib/libc/tests/sys/sendfile_test.c

Modified: head/lib/libc/tests/sys/sendfile_test.c
==
--- head/lib/libc/tests/sys/sendfile_test.c Mon Feb  4 18:30:47 2019
(r343750)
+++ head/lib/libc/tests/sys/sendfile_test.c Mon Feb  4 19:12:45 2019
(r343751)
@@ -97,22 +97,31 @@ generate_random_port(int seed)
 static void
 resolve_localhost(struct addrinfo **res, int domain, int type, int port)
 {
+   const char *host;
char *serv;
struct addrinfo hints;
int error;
 
-   ATF_REQUIRE_MSG(domain == AF_INET || domain == AF_INET6,
-   "unhandled domain: %d", domain);
+   switch (domain) {
+   case AF_INET:
+   host = "127.0.0.1";
+   break;
+   case AF_INET6:
+   host = "::1";
+   break;
+   default:
+   atf_tc_fail("unhandled domain: %d", domain);
+   }
 
ATF_REQUIRE_MSG(asprintf(, "%d", port) >= 0,
"asprintf failed: %s", strerror(errno));
 
memset(, 0, sizeof(hints));
hints.ai_family = domain;
-   hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV;
+   hints.ai_flags = AI_ADDRCONFIG|AI_NUMERICSERV|AI_NUMERICHOST;
hints.ai_socktype = type;
 
-   error = getaddrinfo("localhost", serv, , res);
+   error = getaddrinfo(host, serv, , res);
ATF_REQUIRE_EQ_MSG(error, 0,
"getaddrinfo failed: %s", gai_strerror(error));
free(serv);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343750 - head/release/arm64

2019-02-04 Thread Emmanuel Vadot
Author: manu
Date: Mon Feb  4 18:30:47 2019
New Revision: 343750
URL: https://svnweb.freebsd.org/changeset/base/343750

Log:
  release: arm64: pine64-lts: Use the newly created u-boot-pine64-lts port
  
  In U-Boot 2019.01 there is now a config for this board, use it for the
  release image.
  
  MFC after:1 week

Modified:
  head/release/arm64/PINE64-LTS.conf

Modified: head/release/arm64/PINE64-LTS.conf
==
--- head/release/arm64/PINE64-LTS.conf  Mon Feb  4 18:29:23 2019
(r343749)
+++ head/release/arm64/PINE64-LTS.conf  Mon Feb  4 18:30:47 2019
(r343750)
@@ -6,7 +6,7 @@
 EMBEDDED_TARGET_ARCH="aarch64"
 EMBEDDED_TARGET="arm64"
 EMBEDDEDBUILD=1
-EMBEDDEDPORTS="sysutils/u-boot-sopine"
+EMBEDDEDPORTS="sysutils/u-boot-pine64-lts"
 FAT_SIZE="54m -b 1m"
 FAT_TYPE="16"
 IMAGE_SIZE="2560M"
@@ -18,7 +18,7 @@ FDT_OVERLAYS="sun50i-a64-sid,sun50i-a64-ths,sun50i-a64
 export BOARDNAME="PINE64-LTS"
 
 arm_install_uboot() {
-   UBOOT_DIR="/usr/local/share/u-boot/u-boot-sopine"
+   UBOOT_DIR="/usr/local/share/u-boot/u-boot-pine64-lts"
UBOOT_FILES="u-boot-sunxi-with-spl.bin"
chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \
of=/dev/${mddev} bs=1k seek=8 conv=sync
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343749 - head/release/arm64

2019-02-04 Thread Emmanuel Vadot
Author: manu
Date: Mon Feb  4 18:29:23 2019
New Revision: 343749
URL: https://svnweb.freebsd.org/changeset/base/343749

Log:
  release: arm64: rpi3: Install the RPI3B+ DTB file
  
  We should use the correct DTB file otherwise the firmware uses
  the RPI3B one.
  
  MFC after:1 week

Modified:
  head/release/arm64/RPI3.conf

Modified: head/release/arm64/RPI3.conf
==
--- head/release/arm64/RPI3.confMon Feb  4 18:07:03 2019
(r343748)
+++ head/release/arm64/RPI3.confMon Feb  4 18:29:23 2019
(r343749)
@@ -4,7 +4,7 @@
 #
 
 DTB_DIR="/usr/local/share/rpi-firmware"
-DTB="bcm2710-rpi-3-b.dtb"
+DTB="bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb"
 EMBEDDED_TARGET_ARCH="aarch64"
 EMBEDDED_TARGET="arm64"
 EMBEDDEDBUILD=1
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2019-02-04 Thread Dimitry Andric
Author: dim
Date: Mon Feb  4 18:07:03 2019
New Revision: 343748
URL: https://svnweb.freebsd.org/changeset/base/343748

Log:
  Use NLDT to get number of LDTs on i386
  
  Compiling a GENERIC kernel for i386 with clang 8.0 results in the
  following warning:
  
  /usr/src/sys/i386/i386/sys_machdep.c:542:40: error: 'sizeof ((ldt))' will 
return the size of the pointer, not the array itself 
[-Werror,-Wsizeof-pointer-div]
  nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt);
^~~
  /usr/src/sys/sys/param.h:299:32: note: expanded from macro 'nitems'
  #define nitems(x)   (sizeof((x)) / sizeof((x)[0]))
   ~~~ ^
  
  Indeed, 'ldt' is declared as 'union descriptor *', so nitems() is not
  the right way to determine the number of LDTs.  Instead, the NLDT define
  from sys/x86/include/segments.h should be used.
  
  Reviewed by:  kib
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D19074

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

Modified: head/sys/i386/i386/sys_machdep.c
==
--- head/sys/i386/i386/sys_machdep.cMon Feb  4 17:53:29 2019
(r343747)
+++ head/sys/i386/i386/sys_machdep.cMon Feb  4 18:07:03 2019
(r343748)
@@ -539,7 +539,7 @@ i386_get_ldt(struct thread *td, struct i386_ldt_args *
data = malloc(num * sizeof(union descriptor), M_TEMP, M_WAITOK);
mtx_lock_spin(_lock);
pldt = td->td_proc->p_md.md_ldt;
-   nldt = pldt != NULL ? pldt->ldt_len : nitems(ldt);
+   nldt = pldt != NULL ? pldt->ldt_len : NLDT;
if (uap->start >= nldt) {
num = 0;
} else {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r343713 - in head/sys: amd64/conf arm64/conf

2019-02-04 Thread Andrew Turner
This should be fixed in r343746.

Andrew

> On 4 Feb 2019, at 05:28, Li-Wen Hsu  wrote:
> 
> On Sun, Feb 3, 2019 at 8:46 PM Andrew Turner  wrote:
>> 
>> Author: andrew
>> Date: Sun Feb  3 12:46:27 2019
>> New Revision: 343713
>> URL: https://svnweb.freebsd.org/changeset/base/343713
>> 
>> Log:
>>  Enable COVERAGE and KCOV by default on arm64 and amd64.
>> 
>>  This allows userspace to trace the kernel using the coverage sanitizer
>>  found in clang. It will also allow other coverage tools to be built as
>>  modules and attach into the same framework.
>> 
>>  Sponsored by: DARPA, AFRL
>> 
>> Modified:
>>  head/sys/amd64/conf/GENERIC
>>  head/sys/arm64/conf/GENERIC
>> 
>> Modified: head/sys/amd64/conf/GENERIC
>> ==
>> --- head/sys/amd64/conf/GENERIC Sun Feb  3 11:41:43 2019(r343712)
>> +++ head/sys/amd64/conf/GENERIC Sun Feb  3 12:46:27 2019(r343713)
>> @@ -102,8 +102,8 @@ options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9)
>> optionsVERBOSE_SYSINIT=0   # Support debug.verbose_sysinit, off 
>> by default
>> 
>> # Kernel Sanitizers
>> -#options   COVERAGE# Generic kernel coverage. Used by 
>> KCOV
>> -#options   KCOV# Kernel Coverage Sanitizer
>> +optionsCOVERAGE# Generic kernel coverage. Used by 
>> KCOV
>> +optionsKCOV# Kernel Coverage Sanitizer
>> # Warning: KUBSAN can result in a kernel too large for loader to load
>> #options   KUBSAN  # Kernel Undefined Behavior Sanitizer
>> 
>> 
>> Modified: head/sys/arm64/conf/GENERIC
>> ==
>> --- head/sys/arm64/conf/GENERIC Sun Feb  3 11:41:43 2019(r343712)
>> +++ head/sys/arm64/conf/GENERIC Sun Feb  3 12:46:27 2019(r343713)
>> @@ -94,8 +94,8 @@ options   USB_DEBUG   # enable debug msgs
>> optionsVERBOSE_SYSINIT=0   # Support debug.verbose_sysinit, off 
>> by default
>> 
>> # Kernel Sanitizers
>> -#options   COVERAGE# Generic kernel coverage. Used by 
>> KCOV
>> -#options   KCOV# Kernel Coverage Sanitizer
>> +optionsCOVERAGE# Generic kernel coverage. Used by 
>> KCOV
>> +optionsKCOV# Kernel Coverage Sanitizer
>> # Warning: KUBSAN can result in a kernel too large for loader to load
>> #options   KUBSAN  # Kernel Undefined Behavior Sanitizer
> 
> This breaks gcc build:
> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/8781/console :
> 
> x86_64-unknown-freebsd12.0-gcc: error: unrecognized command line
> option '-fsanitize-coverage=trace-pc,trace-cmp'; did you mean
> '-fsanitize-coverage=trace-pc'?
> 
> We probably need to adjust arguments passed to gcc.
> 
> Li-Wen
> 

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


svn commit: r343746 - head/sys/conf

2019-02-04 Thread Andrew Turner
Author: andrew
Date: Mon Feb  4 16:55:24 2019
New Revision: 343746
URL: https://svnweb.freebsd.org/changeset/base/343746

Log:
  Only enable trace-cmp on Clang and modern GCC.
  
  It's was only added to GCC 8.1 so don't try to enable it for earlier
  releases.
  
  Reported by:  lwhsu
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/conf/files
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/files
==
--- head/sys/conf/files Mon Feb  4 16:13:41 2019(r343745)
+++ head/sys/conf/files Mon Feb  4 16:55:24 2019(r343746)
@@ -3808,7 +3808,7 @@ kern/kern_idle.c  standard
 kern/kern_intr.c   standard
 kern/kern_jail.c   standard
 kern/kern_kcov.c   optional kcov   \
-   compile-with"${NORMAL_C} 
-fno-sanitize-coverage=trace-pc,trace-cmp"
+   compile-with"${NORMAL_C} -fno-sanitize=all"
 kern/kern_khelp.c  standard
 kern/kern_kthread.cstandard
 kern/kern_ktr.coptional ktr

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Mon Feb  4 16:13:41 2019(r343745)
+++ head/sys/conf/kern.pre.mk   Mon Feb  4 16:55:24 2019(r343746)
@@ -120,7 +120,12 @@ SAN_CFLAGS+=   -fsanitize=undefined
 
 COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo
 .if !empty(COVERAGE_ENABLED)
+.if ${COMPILER_TYPE} == "clang" || \
+(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100)
 SAN_CFLAGS+=   -fsanitize-coverage=trace-pc,trace-cmp
+.else
+SAN_CFLAGS+=   -fsanitize-coverage=trace-pc
+.endif
 .endif
 
 CFLAGS+=   ${SAN_CFLAGS}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2019-02-04 Thread Steven Hartland




On 04/02/2019 16:13, Alexander Motin wrote:

Author: mav
Date: Mon Feb  4 16:13:41 2019
New Revision: 343745
URL: https://svnweb.freebsd.org/changeset/base/343745

Log:
   Add missed tunables/sysctls for some new vdev variables.
   
   While there, make few existing sysctls writeable, since there is no reason

   not to.
   
   MFC after:	1 week


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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
16:02:03 2019(r343744)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
16:13:41 2019(r343745)
@@ -165,29 +165,38 @@ static vdev_ops_t *vdev_ops_table[] = {
  
  /* target number of metaslabs per top-level vdev */

  int vdev_max_ms_count = 200;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RWTUN,
  _max_ms_count, 0,
-"Maximum number of metaslabs per top-level vdev");
+"Target number of metaslabs per top-level vdev");
  
  /* minimum number of metaslabs per top-level vdev */

  int vdev_min_ms_count = 16;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RWTUN,
  _min_ms_count, 0,
  "Minimum number of metaslabs per top-level vdev");
  
  /* practical upper limit of total metaslabs per top-level vdev */

  int vdev_ms_count_limit = 1ULL << 17;
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count_limit, CTLFLAG_RWTUN,
+_ms_count_limit, 0,
+"Maximum number of metaslabs per top-level vdev");
  
  /* lower limit for metaslab size (512M) */

  int vdev_default_ms_shift = 29;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RWTUN,
  _default_ms_shift, 0,
-"Shift between vdev size and number of metaslabs");
+"Default shift between vdev size and number of metaslabs");
  
  /* upper limit for metaslab size (256G) */

  int vdev_max_ms_shift = 38;
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN,
+_max_ms_shift, 0,
+"Maximal shift between vdev size and number of metaslabs");
It's a just a nit but I believe this should Maximum, like the others, 
instead of Maximal.
  
  boolean_t vdev_validate_skip = B_FALSE;

+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN,
+_validate_skip, 0,
+"Bypass vdev validation");
  
  /*

   * Since the DTL space map of a vdev is not expected to have a lot of



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


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

2019-02-04 Thread Alexander Motin
Author: mav
Date: Mon Feb  4 16:13:41 2019
New Revision: 343745
URL: https://svnweb.freebsd.org/changeset/base/343745

Log:
  Add missed tunables/sysctls for some new vdev variables.
  
  While there, make few existing sysctls writeable, since there is no reason
  not to.
  
  MFC after:1 week

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
16:02:03 2019(r343744)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Mon Feb  4 
16:13:41 2019(r343745)
@@ -165,29 +165,38 @@ static vdev_ops_t *vdev_ops_table[] = {
 
 /* target number of metaslabs per top-level vdev */
 int vdev_max_ms_count = 200;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count, CTLFLAG_RWTUN,
 _max_ms_count, 0,
-"Maximum number of metaslabs per top-level vdev");
+"Target number of metaslabs per top-level vdev");
 
 /* minimum number of metaslabs per top-level vdev */
 int vdev_min_ms_count = 16;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, min_ms_count, CTLFLAG_RWTUN,
 _min_ms_count, 0,
 "Minimum number of metaslabs per top-level vdev");
 
 /* practical upper limit of total metaslabs per top-level vdev */
 int vdev_ms_count_limit = 1ULL << 17;
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_count_limit, CTLFLAG_RWTUN,
+_ms_count_limit, 0,
+"Maximum number of metaslabs per top-level vdev");
 
 /* lower limit for metaslab size (512M) */
 int vdev_default_ms_shift = 29;
-SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RDTUN,
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, default_ms_shift, CTLFLAG_RWTUN,
 _default_ms_shift, 0,
-"Shift between vdev size and number of metaslabs");
+"Default shift between vdev size and number of metaslabs");
 
 /* upper limit for metaslab size (256G) */
 int vdev_max_ms_shift = 38;
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, max_ms_shift, CTLFLAG_RWTUN,
+_max_ms_shift, 0,
+"Maximal shift between vdev size and number of metaslabs");
 
 boolean_t vdev_validate_skip = B_FALSE;
+SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, validate_skip, CTLFLAG_RWTUN,
+_validate_skip, 0,
+"Bypass vdev validation");
 
 /*
  * Since the DTL space map of a vdev is not expected to have a lot of
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343744 - head/sys/powerpc/aim

2019-02-04 Thread Leandro Lupori
Author: luporl
Date: Mon Feb  4 16:02:03 2019
New Revision: 343744
URL: https://svnweb.freebsd.org/changeset/base/343744

Log:
  powerpc64: Add a trap stack area
  
  Currently, the trap code switches to the the temporary stack in the dbtrap
  section. It works in most cases, but in the beginning of the execution, the
  temp stack is being used, as starting in the powerpc_init() code.
  
  In this current scenario, the stack is being overwritten, which causes the
  return of breakpoint() to take abnormal execution.
  
  This current patchset create a small stack to use by the dbtrap: codepath
  avoiding the corruption of the temporary stack.
  
  PR:   224872
  Submitted by: breno.leitao_gmail.com
  Reviewed by:  jhibbits
  Differential Revision:https://reviews.freebsd.org/D14484

Modified:
  head/sys/powerpc/aim/locore32.S
  head/sys/powerpc/aim/locore64.S
  head/sys/powerpc/aim/trap_subr32.S
  head/sys/powerpc/aim/trap_subr64.S

Modified: head/sys/powerpc/aim/locore32.S
==
--- head/sys/powerpc/aim/locore32.S Mon Feb  4 14:10:31 2019
(r343743)
+++ head/sys/powerpc/aim/locore32.S Mon Feb  4 16:02:03 2019
(r343744)
@@ -60,6 +60,12 @@ GLOBAL(__endkernel)
 GLOBAL(tmpstk)
.space  TMPSTKSZ
 
+#ifdef KDB
+#define TRAPSTKSZ   4096/* 4k trap stack */
+GLOBAL(trapstk)
+.spaceTRAPSTKSZ
+#endif
+
.text
.globl  btext
 btext:

Modified: head/sys/powerpc/aim/locore64.S
==
--- head/sys/powerpc/aim/locore64.S Mon Feb  4 14:10:31 2019
(r343743)
+++ head/sys/powerpc/aim/locore64.S Mon Feb  4 16:02:03 2019
(r343744)
@@ -65,6 +65,14 @@ GLOBAL(tmpstk)
 TOC_ENTRY(tmpstk)
 TOC_ENTRY(can_wakeup)
 
+#ifdef KDB
+#define TRAPSTKSZ   4096/* 4k trap stack */
+GLOBAL(trapstk)
+.spaceTRAPSTKSZ
+TOC_ENTRY(trapstk)
+#endif
+
+
 /*
  * Entry point for bootloaders that do not fully implement ELF and start
  * at the beginning of the image (kexec, notably). In its own section so

Modified: head/sys/powerpc/aim/trap_subr32.S
==
--- head/sys/powerpc/aim/trap_subr32.S  Mon Feb  4 14:10:31 2019
(r343743)
+++ head/sys/powerpc/aim/trap_subr32.S  Mon Feb  4 16:02:03 2019
(r343744)
@@ -864,8 +864,8 @@ dbtrap:
mtsprg3 %r1
 
lwz %r1,TRAP_TOCBASE(0) /* get new SP */
-   lwz %r1,tmpstk@got(%r1)
-   addi%r1,%r1,TMPSTKSZ-16
+   lwz %r1,trapstk@got(%r1)
+   addi%r1,%r1,TRAPSTKSZ-16
 
FRAME_SETUP(PC_DBSAVE)
 /* Call C trap code: */

Modified: head/sys/powerpc/aim/trap_subr64.S
==
--- head/sys/powerpc/aim/trap_subr64.S  Mon Feb  4 14:10:31 2019
(r343743)
+++ head/sys/powerpc/aim/trap_subr64.S  Mon Feb  4 16:02:03 2019
(r343744)
@@ -897,8 +897,8 @@ dbtrap:
mtsprg3 %r1
 
GET_TOCBASE(%r1)/* get new SP */
-   ld  %r1,TOC_REF(tmpstk)(%r1)
-   addi%r1,%r1,(TMPSTKSZ-48)
+   ld  %r1,TOC_REF(trapstk)(%r1)
+   addi%r1,%r1,(TRAPSTKSZ-48)
 
FRAME_SETUP(PC_DBSAVE)
 /* Call C trap code: */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343742 - head/lib/libsysdecode

2019-02-04 Thread Michael Tuexen
Author: tuexen
Date: Mon Feb  4 13:30:47 2019
New Revision: 343742
URL: https://svnweb.freebsd.org/changeset/base/343742

Log:
  Add missing SCTP_EOR entry.
  
  MFC after:3 days

Modified:
  head/lib/libsysdecode/flags.c

Modified: head/lib/libsysdecode/flags.c
==
--- head/lib/libsysdecode/flags.c   Mon Feb  4 10:25:29 2019
(r343741)
+++ head/lib/libsysdecode/flags.c   Mon Feb  4 13:30:47 2019
(r343742)
@@ -1208,7 +1208,7 @@ sysdecode_sctp_pr_policy(int policy)
 
 static struct name_table sctpsndflags[] = {
X(SCTP_EOF) X(SCTP_ABORT) X(SCTP_UNORDERED) X(SCTP_ADDR_OVER)
-   X(SCTP_SENDALL) X(SCTP_SACK_IMMEDIATELY) XEND
+   X(SCTP_SENDALL) X(SCTP_EOR) X(SCTP_SACK_IMMEDIATELY) XEND
 };
 
 bool
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343741 - stable/12/usr.bin/find

2019-02-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb  4 10:25:29 2019
New Revision: 343741
URL: https://svnweb.freebsd.org/changeset/base/343741

Log:
  MFC r343516:
  
  Fix whiteout support in find(1)
  
  find(1) ignores -type w passed to it. With this patch find(1) properly
  identifies and prints whiteouts.
  
  PR:   126384, 156703
  Submitted by: o...@mamontov.net

Modified:
  stable/12/usr.bin/find/find.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/find/find.c
==
--- stable/12/usr.bin/find/find.c   Mon Feb  4 10:24:57 2019
(r343740)
+++ stable/12/usr.bin/find/find.c   Mon Feb  4 10:25:29 2019
(r343741)
@@ -208,8 +208,10 @@ find_execute(PLAN *plan, char *paths[])
entry->fts_path, strerror(entry->fts_errno));
exitstatus = 1;
continue;
-#ifdef FTS_W
+#if defined(FTS_W) && defined(FTS_WHITEOUT)
case FTS_W:
+   if (ftsoptions & FTS_WHITEOUT)
+   break;
continue;
 #endif /* FTS_W */
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343740 - stable/12/sys/dev/bhnd/cores/pmu

2019-02-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb  4 10:24:57 2019
New Revision: 343740
URL: https://svnweb.freebsd.org/changeset/base/343740

Log:
  MFC r343458:
  
  Fix format/arg mismatch
  
  USe correct format for int arguments
  
  PR:   229549
  Submitted by: David Binderman 

Modified:
  stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c
==
--- stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.cMon Feb  4 10:24:16 
2019(r343739)
+++ stable/12/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.cMon Feb  4 10:24:57 
2019(r343740)
@@ -1036,7 +1036,7 @@ bhnd_pmu_res_init(struct bhnd_pmu_softc *sc)
return (error);
}
 
-   PMU_DEBUG(sc, "Applying %s=%s to rsrc %d res_updn_timer\n",
+   PMU_DEBUG(sc, "Applying %s=%d to rsrc %d res_updn_timer\n",
name, val, i);
 
BHND_PMU_WRITE_4(sc, BHND_PMU_RES_TABLE_SEL, i);
@@ -,7 +,7 @@ bhnd_pmu_res_init(struct bhnd_pmu_softc *sc)
return (error);
}
 
-   PMU_DEBUG(sc, "Applying %s=%s to rsrc %d res_dep_mask\n", name,
+   PMU_DEBUG(sc, "Applying %s=%d to rsrc %d res_dep_mask\n", name,
val, i);
 
BHND_PMU_WRITE_4(sc, BHND_PMU_RES_TABLE_SEL, i);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343739 - stable/12/tools/tools/tinybsd

2019-02-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb  4 10:24:16 2019
New Revision: 343739
URL: https://svnweb.freebsd.org/changeset/base/343739

Log:
  MFC r343391:
  
  Fix prompt for MFSROOT in tinybsd
  
  tinybsd offers two choices when prompting user for MFSROOT: 'YES'
  and 'NO'. Script logic only handles 'yes'. Change offered values
  to lower case.
  
  PR:   131059
  Submitted by: Brock Williams 

Modified:
  stable/12/tools/tools/tinybsd/tinybsd
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tools/tools/tinybsd/tinybsd
==
--- stable/12/tools/tools/tinybsd/tinybsd   Mon Feb  4 10:20:48 2019
(r343738)
+++ stable/12/tools/tools/tinybsd/tinybsd   Mon Feb  4 10:24:16 2019
(r343739)
@@ -206,7 +206,7 @@ loadconfig () {
   break
 fi
   done
-  MFSROOT=`confirm_action "$MFSROOT" "Use an MFSROOT? (YES/NO)"`
+  MFSROOT=`confirm_action "$MFSROOT" "Use an MFSROOT? (yes/no)"`
   IMG=`confirm_action "$IMG" "Image file to generate?"`
 
 # example of formatted value (NNN in this case)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343738 - stable/12/sys/dev/aic7xxx

2019-02-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb  4 10:20:48 2019
New Revision: 343738
URL: https://svnweb.freebsd.org/changeset/base/343738

Log:
  MFC r343170:
  
  [aic7xxx] Use correct product name 29320LPE instead of non-existent 39320LPE
  
  The PCI id belongs to Adaptec 29320LPE controller. The same fix also was
  merged[1] to OpenBSD driver ~6 years ago.
  
  [1] https://github.com/openbsd/src/commit/f997b5
  
  PR:   172133
  Submitted by: henning.peter...@t-online.de

Modified:
  stable/12/sys/dev/aic7xxx/aic79xx_pci.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/aic7xxx/aic79xx_pci.c
==
--- stable/12/sys/dev/aic7xxx/aic79xx_pci.c Mon Feb  4 10:19:27 2019
(r343737)
+++ stable/12/sys/dev/aic7xxx/aic79xx_pci.c Mon Feb  4 10:20:48 2019
(r343738)
@@ -75,6 +75,7 @@ ahd_compose_id(u_int device, u_int vendor, u_int subde
 #define ID_AIC7901 0x800F90059005ull
 #define ID_AHA_29320A  0x8000900500609005ull
 #define ID_AHA_29320ALP0x8017900500449005ull
+#define ID_AHA_29320LPE0x8017900500459005ull
 
 #define ID_AIC7901A0x801E90059005ull
 #define ID_AHA_29320LP 0x8014900500449005ull
@@ -91,7 +92,6 @@ ahd_compose_id(u_int device, u_int vendor, u_int subde
 #define ID_AHA_39320D_B0x801C900500419005ull
 #define ID_AHA_39320D_HP   0x8011900500AC0E11ull
 #define ID_AHA_39320D_B_HP 0x801C900500AC0E11ull
-#define ID_AHA_39320LPE0x8017900500459005ull
 #define ID_AIC7902_PCI_REV_A4  0x3
 #define ID_AIC7902_PCI_REV_B0  0x10
 #define SUBID_HP   0x0E11
@@ -144,6 +144,12 @@ struct ahd_pci_identity ahd_pci_ident_table [] =
"Adaptec 29320ALP Ultra320 SCSI adapter",
ahd_aic7901_setup
},
+   {
+   ID_AHA_29320LPE,
+   ID_ALL_MASK,
+   "Adaptec 29320LPE Ultra320 SCSI adapter",
+   ahd_aic7901_setup
+   },
/* aic7901A based controllers */
{
ID_AHA_29320LP,
@@ -210,12 +216,6 @@ struct ahd_pci_identity ahd_pci_ident_table [] =
ID_AHA_39320D_B_HP,
ID_ALL_MASK,
"Adaptec (HP OEM) 39320D Ultra320 SCSI adapter",
-   ahd_aic7902_setup
-   },
-   {
-   ID_AHA_39320LPE,
-   ID_ALL_MASK,
-   "Adaptec 39320LPE Ultra320 SCSI adapter",
ahd_aic7902_setup
},
/* Generic chip probes for devices we don't know 'exactly' */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343737 - in stable/12/sys/dev/usb: . quirk

2019-02-04 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Mon Feb  4 10:19:27 2019
New Revision: 343737
URL: https://svnweb.freebsd.org/changeset/base/343737

Log:
  MFC r343224, r343533
  
  r343224:
  Add KBD_BOOTPROTO quirk for Logitech G510s USB keyboard
  
  PR:   232136
  Submitted by: dgilb...@eicat.ca
  
  r343533:
  [usb] Add UQ_KBD_BOOTPROTO quirk for Corsair K68 keyboard
  
  PR:   222114
  Submitted by: Zane C. Bowers-Hadley 

Modified:
  stable/12/sys/dev/usb/quirk/usb_quirk.c
  stable/12/sys/dev/usb/usbdevs
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/usb/quirk/usb_quirk.c
==
--- stable/12/sys/dev/usb/quirk/usb_quirk.c Mon Feb  4 09:08:36 2019
(r343736)
+++ stable/12/sys/dev/usb/quirk/usb_quirk.c Mon Feb  4 10:19:27 2019
(r343737)
@@ -96,6 +96,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK
USB_QUIRK(TELEX, MIC1, 0x009, 0x009, UQ_AU_NO_FRAC),
USB_QUIRK(SILICONPORTALS, YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC),
USB_QUIRK(LOGITECH, UN53B, 0x, 0x, UQ_NO_STRINGS),
+   USB_QUIRK(LOGITECH, G510S, 0x, 0x, UQ_KBD_BOOTPROTO),
USB_QUIRK(REALTEK, RTL8196EU, 0x, 0x, UQ_CFG_INDEX_1),
USB_QUIRK(ELSA, MODEM1, 0x, 0x, UQ_CFG_INDEX_1),
USB_QUIRK(PLANEX2, MZKUE150N, 0x, 0x, UQ_CFG_INDEX_1),
@@ -164,6 +165,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK
USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x, 0x, 
UQ_MS_LEADING_BYTE),
/* Quirk for Corsair Vengeance K60 keyboard */
USB_QUIRK(CORSAIR, K60, 0x, 0x, UQ_KBD_BOOTPROTO),
+   /* Quirk for Corsair Gaming K68 keyboard */
+   USB_QUIRK(CORSAIR, K68, 0x, 0x, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair Vengeance K70 keyboard */
USB_QUIRK(CORSAIR, K70, 0x, 0x, UQ_KBD_BOOTPROTO),
/* Quirk for Corsair K70 RGB keyboard */

Modified: stable/12/sys/dev/usb/usbdevs
==
--- stable/12/sys/dev/usb/usbdevs   Mon Feb  4 09:08:36 2019
(r343736)
+++ stable/12/sys/dev/usb/usbdevs   Mon Feb  4 10:19:27 2019
(r343737)
@@ -1581,6 +1581,7 @@ product COREGA FETHER_USB_TXC 0x9601  FEther USB-TXC
 
 /* Corsair products */
 product CORSAIR K600x0a60  Corsair Vengeance K60 keyboard
+product CORSAIR K680x1b3f  Corsair Gaming K68 keyboard
 product CORSAIR K700x1b09  Corsair Vengeance K70 keyboard
 product CORSAIR K70_RGB0x1b13  Corsair K70 RGB Keyboard
 product CORSAIR STRAFE 0x1b15  Corsair STRAFE Gaming keyboard
@@ -2841,6 +2842,7 @@ product LOGITECH UN58A0xc030  iFeel Mouse
 product LOGITECH UN53B 0xc032  iFeel MouseMan
 product LOGITECH WMPAD 0xc208  WingMan GamePad Extreme
 product LOGITECH WMRPAD0xc20a  WingMan RumblePad
+product LOGITECH G510S 0xc22d  G510s Keyboard
 product LOGITECH WMJOY 0xc281  WingMan Force joystick
 product LOGITECH BB13  0xc401  USB-PS/2 Trackball
 product LOGITECH RK53  0xc501  Cordless mouse
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r343735 - stable/12/share/misc

2019-02-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon Feb  4 08:38:02 2019
New Revision: 343735
URL: https://svnweb.freebsd.org/changeset/base/343735

Log:
  MFC: 343546
  
  Update pci_vendors to 2019.01.29

Modified:
  stable/12/share/misc/pci_vendors
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/misc/pci_vendors
==
--- stable/12/share/misc/pci_vendorsMon Feb  4 08:37:16 2019
(r343734)
+++ stable/12/share/misc/pci_vendorsMon Feb  4 08:38:02 2019
(r343735)
@@ -2,11 +2,11 @@
 
 #  List of PCI ID's
 #
-#  Version: 2018.08.12
-#  Date:2018-08-12 03:15:01
+#  Version: 2019.01.29
+#  Date:2019-01-29 03:15:01
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
-#  the PCI ID Project at http://pci-ids.ucw.cz/.
+#  the PCI ID Project at https://pci-ids.ucw.cz/.
 #
 #  New data are always welcome, especially if they are accurate. If you 
have
 #  anything to contribute, please follow the instructions at the web site.
@@ -58,8 +58,7 @@
0680  Ultra ATA/133 IDE RAID CONTROLLER CARD
 # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter
 00a7  Teles AG (Wrong ID)
-# nee nCipher
-0100  Thales e-Security
+0100  nCipher Security
 0123  General Dynamics
 0128  Dell (wrong ID)
 # 018a is not LevelOne but there is a board misprogrammed
@@ -275,6 +274,7 @@
8086 9460  RAID Controller RSP3TD160F
8086 9480  RAID Controller RSP3MD088F
0015  MegaRAID Tri-Mode SAS3416
+   1d49 0503  ThinkSystem RAID 530-16i PCIe 12Gb Adapter
0016  MegaRAID Tri-Mode SAS3508
1028 1fc9  PERC H840 Adapter
1028 1fcb  PERC H740P Adapter
@@ -282,7 +282,6 @@
1028 1fcf  PERC H740P Mini
1d49 0601  ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter
1d49 0603  ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter
-   1d49 0604  ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter
8086 352e  Integrated RAID Module RMSP3CD080F
8086 352f  Integrated RAID Module RMSP3HD080E
8086 9461  RAID Controller RSP3DD080F
@@ -413,6 +412,7 @@
005c  SAS1064A PCI-X Fusion-MPT SAS
005d  MegaRAID SAS-3 3108 [Invader]
1000 9361  MegaRAID SAS 9361-8i
+   1000 9363  MegaRAID SAS 9361-4i
1000 9364  MegaRAID SAS 9364-8i
1000 936a  MegaRAID SAS 9364-8i
1028 1f41  PERC H830 Adapter
@@ -445,6 +445,7 @@
1028 1f4d  PERC H330 Embedded (for monolithic)
1054 306a  SAS 3004 iMR ROMB
1d49 04db  ServeRAID M1210 SAS/SATA Controller
+   1d49 0504  ThinkSystem RAID 520-8i PCIe 12Gb Adapter
0060  MegaRAID SAS 1078
1000 1006  MegaRAID SAS ELP
1000 100a  MegaRAID SAS 8708ELP
@@ -483,15 +484,17 @@
0065  SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor]
006e  SAS2308 PCI-Express Fusion-MPT SAS-2
0070  SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire]
+   1000 3010  SAS9211-4i
0071  MR SAS HBA 2004
0072  SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]
+   1000 3040  9210-8i
1000 30b0  9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA]
1028 1f1c  6Gbps SAS HBA Adapter
1028 1f1d  PERC H200 Adapter
1028 1f1e  PERC H200 Integrated
1028 1f1f  PERC H200 Modular
1028 1f20  PERC H200 Embedded
-   1028 1f22  Internal Tape Adapter
+   1028 1f22  PERC H200 Internal Tape Adapter
8086 350f  RMS2LL040 RAID Controller
8086 3700  SSD 910 Series
0073  MegaRAID SAS 2008 [Falcon]
@@ -506,6 +509,7 @@
1028 1f52  PERC H310 Embedded1
1028 1f53  PERC H310 Embedded2
1028 1f54  PERC H310 Reserved
+   1028 1f78  PERC H310
1054 3035  LSI MegaRAID SAS 9240-8i
1137 0072  2004 iMR ROMB
1137 0073  2008 ROMB
@@ -586,10 +590,13 @@
0084  SAS2208 PCI-Express Fusion-MPT SAS-2
0085  SAS2208 PCI-Express Fusion-MPT SAS-2
0086  SAS2308 PCI-Express Fusion-MPT SAS-2
+   15d9 0690  Onboard MegaRAID SAS2208 [Thunderbolt]
+   15d9 0691  Onboard SAS2308 PCI-Express Fusion-MPT SAS-2
0087  SAS2308 PCI-Express Fusion-MPT SAS-2
1000 3020  9207-8i SAS2.1 HBA
1000 3040  9207-8e SAS2.1 HBA
1000 3050  SAS9217-8i
+   1014 0472  N2125 External Host Bus Adapter
1590 0044  H220i
8086 3000  RS25GB008 RAID Controller
8086 3060  RS25FB044 RAID Controller
@@ -627,6 +634,7 @@
8086 3020  

svn commit: r343734 - stable/11/share/misc

2019-02-04 Thread Baptiste Daroussin
Author: bapt
Date: Mon Feb  4 08:37:16 2019
New Revision: 343734
URL: https://svnweb.freebsd.org/changeset/base/343734

Log:
  MFC: 332990,337892,343546
  
  Update pci_vendors to 2019.01.29

Modified:
  stable/11/share/misc/pci_vendors
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/misc/pci_vendors
==
--- stable/11/share/misc/pci_vendorsMon Feb  4 08:30:29 2019
(r343733)
+++ stable/11/share/misc/pci_vendorsMon Feb  4 08:37:16 2019
(r343734)
@@ -2,11 +2,11 @@
 
 #  List of PCI ID's
 #
-#  Version: 2018.03.21
-#  Date:2018-03-21 03:15:01
+#  Version: 2019.01.29
+#  Date:2019-01-29 03:15:01
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
-#  the PCI ID Project at http://pci-ids.ucw.cz/.
+#  the PCI ID Project at https://pci-ids.ucw.cz/.
 #
 #  New data are always welcome, especially if they are accurate. If you 
have
 #  anything to contribute, please follow the instructions at the web site.
@@ -27,6 +27,7 @@
 # This is a relabelled RTL-8139
8139  AT-2500TX V3 Ethernet
 0014  Loongson Technology LLC
+   7a00  Hyper Transport Bridge Controller
7a02  APB (Advanced Peripheral Bus) Controller
7a03  Gigabit Ethernet Controller
7a04  OTG USB Controller
@@ -34,9 +35,15 @@
7a06  DC (Display Controller)
7a07  HDA (High Definition Audio) Controller
7a08  SATA AHCI Controller
+   7a09  PCI-to-PCI Bridge
+   7a0b  SPI Controller
+   7a0c  LPC Controller
7a0f  DMA (Direct Memory Access) Controller
7a14  EHCI USB Controller
+   7a15  Vivante GPU (Graphics Processing Unit)
+   7a19  PCI-to-PCI Bridge
7a24  OHCI USB Controller
+   7a29  PCI-to-PCI Bridge
 001c  PEAK-System Technik GmbH
0001  PCAN-PCI CAN-Bus controller
001c 0004  2 Channel CAN Bus SJC1000
@@ -51,8 +58,7 @@
0680  Ultra ATA/133 IDE RAID CONTROLLER CARD
 # Wrong ID used in subsystem ID of the TELES.S0/PCI 2.x ISDN adapter
 00a7  Teles AG (Wrong ID)
-# nee nCipher
-0100  Thales e-Security
+0100  nCipher Security
 0123  General Dynamics
 0128  Dell (wrong ID)
 # 018a is not LevelOne but there is a board misprogrammed
@@ -74,6 +80,7 @@
000a  TTP-Monitoring Card V2.0
 0432  SCM Microsystems, Inc.
0001  Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet]
+0497  Dell Inc. (wrong ID)
 0675  Dynalink
1700  IS64PH ISDN Adapter
1702  IS64PH ISDN Adapter
@@ -267,6 +274,7 @@
8086 9460  RAID Controller RSP3TD160F
8086 9480  RAID Controller RSP3MD088F
0015  MegaRAID Tri-Mode SAS3416
+   1d49 0503  ThinkSystem RAID 530-16i PCIe 12Gb Adapter
0016  MegaRAID Tri-Mode SAS3508
1028 1fc9  PERC H840 Adapter
1028 1fcb  PERC H740P Adapter
@@ -274,7 +282,6 @@
1028 1fcf  PERC H740P Mini
1d49 0601  ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter
1d49 0603  ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter
-   1d49 0604  ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter
8086 352e  Integrated RAID Module RMSP3CD080F
8086 352f  Integrated RAID Module RMSP3HD080E
8086 9461  RAID Controller RSP3DD080F
@@ -405,6 +412,7 @@
005c  SAS1064A PCI-X Fusion-MPT SAS
005d  MegaRAID SAS-3 3108 [Invader]
1000 9361  MegaRAID SAS 9361-8i
+   1000 9363  MegaRAID SAS 9361-4i
1000 9364  MegaRAID SAS 9364-8i
1000 936a  MegaRAID SAS 9364-8i
1028 1f41  PERC H830 Adapter
@@ -421,6 +429,8 @@
17aa 1052  ThinkServer RAID 720i
17aa 1053  ThinkServer RAID 720ix
1d49 0600  ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter
+   1d49 0608  ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter
+   1d49 0609  ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter
8086 351e  RMS3CC080 RAID Controller
8086 351f  RMS3CC040 RAID Controller
8086 9360  RS3DC080 RAID Controller
@@ -435,6 +445,7 @@
1028 1f4d  PERC H330 Embedded (for monolithic)
1054 306a  SAS 3004 iMR ROMB
1d49 04db  ServeRAID M1210 SAS/SATA Controller
+   1d49 0504  ThinkSystem RAID 520-8i PCIe 12Gb Adapter
0060  MegaRAID SAS 1078
1000 1006  MegaRAID SAS ELP
1000 100a  MegaRAID SAS 8708ELP
@@ -473,14 +484,17 @@
0065  SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor]
006e  SAS2308 PCI-Express Fusion-MPT SAS-2
0070  SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire]
+   1000 3010  SAS9211-4i
0071  MR SAS HBA 2004
0072  SAS2008 

Re: svn commit: r343566 - in head/lib/libthr: . thread

2019-02-04 Thread Michal Meloun


On 04.02.2019 8:00, Konstantin Belousov wrote:
> On Mon, Feb 04, 2019 at 07:31:19AM +0100, Michal Meloun wrote:
>> On 29.01.2019 23:46, Konstantin Belousov wrote:
>>> Author: kib
>>> Date: Tue Jan 29 22:46:44 2019
>>> New Revision: 343566
>>> URL: https://svnweb.freebsd.org/changeset/base/343566
>>>
>>> Log:
>>>   Untangle jemalloc and mutexes initialization.
>>>   
>>>   The need to use libc malloc(3) from some places in libthr always
>>>   caused issues.  For instance, per-thread key allocation was switched to
>>>   use plain mmap(2) to get storage, because some third party mallocs
>>>   used keys for implementation of calloc(3).
>>>   
>>>   Even more important, libthr calls calloc(3) during initialization of
>>>   pthread mutexes, and jemalloc uses pthread mutexes.  Jemalloc provides
>>>   some way to both postpone the initialization, and to make
>>>   initialization to use specialized allocator, but this is very fragile
>>>   and often breaks.  See the referenced PR for another example.
>>>   
>>>   Add the small malloc implementation used by rtld, to libthr. Use it in
>>>   thr_spec.c and for mutexes initialization. This avoids the issues with
>>>   mutual dependencies between malloc and libthr in principle.  The
>>>   drawback is that some more allocations are not interceptable for
>>>   alternate malloc implementations.  There should be not too much memory
>>>   use from this allocator, and the alternative, direct use of mmap(2) is
>>>   obviously worse.
>>>   
>>>   PR:   235211
>>>   MFC after:2 weeks
>>>   Sponsored by: The FreeBSD Foundation
>>>   Differential revision:https://reviews.freebsd.org/D18988
>>>
>> This broke ARM  static binaries (at least rescue/rescue). From first
>> look it seems that __pthread_mutex_init() invoked by atomic_init() is
>> called before curthread is set (before _thread_init_hack()).
>>
>>
>> root@tegra124:/usr/src # gdb --args
>> /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh
>> ...
>> Reading symbols from /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue...done.
>> (gdb) b _thread_init_hack
>> Breakpoint 1 at 0x67cad0: file /usr/src/lib/libthr/thread/thr_init.c,
>> line 296.
>> (gdb) r
>> Starting program: /usr/obj/usr/src/arm.armv7/rescue/rescue/rescue sh
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> __thr_calloc (num=1, size=) at
>> /usr/src/lib/libthr/thread/thr_malloc.c:82
>> 82  thr_malloc_lock(curthread);
>> (gdb) bt
>> #0  __thr_calloc (num=1, size=) at
>> /usr/src/lib/libthr/thread/thr_malloc.c:82
>> #1  0x00676e1c in mutex_init (mutex=,
>> mutex_attr=, calloc_cb=)
>> at /usr/src/lib/libthr/thread/thr_mutex.c:294
>> #2  __pthread_mutex_init (mutex=0xc6e948 ,
>> mutex_attr=) at /usr/src/lib/libthr/thread/thr_mutex.c:393
>> #3  0x001d41f0 in handle_static_init (argc=2, argv=,
>> env=) at /usr/src/lib/csu/common/ignore_init.c:124
>> #4  0x001d40e8 in __start (argc=2, argv=, env=> out>, ps_strings=, obj=0x0, cleanup=0x0)
>> at /usr/src/lib/csu/arm/crt1.c:112
>> #5  0x001d4000 in ?? ()
>> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
>> (gdb) f 3
>> #3  0x001d41f0 in handle_static_init (argc=2, argv=,
>> env=) at /usr/src/lib/csu/common/ignore_init.c:124
>> 124 fn(argc, argv, env);
>> (gdb) list
>> 119 _init();
>> 120 array_size = __init_array_end - __init_array_start;
>> 121 for (n = 0; n < array_size; n++) {
>> 122 fn = __init_array_start[n];
>> 123 if ((uintptr_t)fn != 0 && (uintptr_t)fn != 1)
>> 124 fn(argc, argv, env);
>> 125 }
>> 126 }
>> (gdb) p n
>> $1 = 20
>> (gdb) p fn
>> $6 = (void (*)(int, char **, char **)) 0x63f21c 
>> (gdb) p (void *)&__init_array_start
>> $19 = (void *) 0xa7ab60
>> (gdb) p (void *)&__init_array_end
>> $20 = (void *) 0xa7abc0
>> (gdb) x/24a &__init_array_start
>> 0xa7ab60:   0x1d4270 
>> 0x2d926c <_$$hide$$ ifconfig.lo ifconfig_ctor>
>> 0x2d98e0 <_$$hide$$ ifconfig.lo link_ctor>
>> 0x2d9cb4 <_$$hide$$ ifconfig.lo inet_ctor>
>> 0xa7ab70:   0x2da2e0 <_$$hide$$ ifconfig.lo inet6_ctor>
>> 0x2db790 <_$$hide$$ ifconfig.lo clone_ctor>
>> 0x2dbb8c <_$$hide$$ ifconfig.lo mac_ctor>
>> 0x2dbe70 <_$$hide$$ ifconfig.lo ifmedia_ctor>
>> 0xa7ab80:   0x2dced0 <_$$hide$$ ifconfig.lo fib_ctor>
>> 0x2dd118 <_$$hide$$ ifconfig.lo vlan_ctor>
>> 0x2dd668 <_$$hide$$ ifconfig.lo vxlan_ctor>
>> 0x2df45c <_$$hide$$ ifconfig.lo gre_ctor>
>> 0xa7ab90:   0x2df6d8 <_$$hide$$ ifconfig.lo gif_ctor>
>> 0x2df874 <_$$hide$$ ifconfig.lo ipsec_ctor>
>> 0x2e2144 <_$$hide$$ ifconfig.lo ieee80211_ctor>
>> 0x2f0a10 <_$$hide$$ ifconfig.lo carp_ctor>
>> 0xa7aba0:   0x2f0e6c <_$$hide$$ ifconfig.lo group_ctor>
>>