svn commit: r368786 - stable/12/sys/dev/superio

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:28:25 2020
New Revision: 368786
URL: https://svnweb.freebsd.org/changeset/base/368786

Log:
  MFC r349848 (by lwhsu):
  
  - Fix gcc build for superio(4)
  - Change string mapping of SUPERIO_DEV_NONE to distinguish from 
SUPERIO_DEV_MAX
  
  Reviewed by:  imp
  Discussed with:   avg, imp, jhb
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D20880

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

Modified: stable/12/sys/dev/superio/superio.c
==
--- stable/12/sys/dev/superio/superio.c Sat Dec 19 04:24:05 2020
(r368785)
+++ stable/12/sys/dev/superio/superio.c Sat Dec 19 04:28:25 2020
(r368786)
@@ -419,7 +419,7 @@ devtype_to_str(superio_dev_type_t type)
 {
switch (type) {
case SUPERIO_DEV_NONE:
-   return ("invalid");
+   return ("none");
case SUPERIO_DEV_HWM:
return ("HWM");
case SUPERIO_DEV_WDT:
@@ -429,6 +429,7 @@ devtype_to_str(superio_dev_type_t type)
case SUPERIO_DEV_MAX:
return ("invalid");
}
+   return ("invalid");
 }
 
 static int
___
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: r368785 - stable/12/sys/dev/ice

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:24:05 2020
New Revision: 368785
URL: https://svnweb.freebsd.org/changeset/base/368785

Log:
  MFC r368745:
  
  ice: quiet -Wredundant-decls
  
  Reapply r364240 after driver update in r365617.
  
  Reviewed by:  lwhsu
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27561

Modified:
  stable/12/sys/dev/ice/ice_common.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ice/ice_common.h
==
--- stable/12/sys/dev/ice/ice_common.h  Sat Dec 19 04:22:26 2020
(r368784)
+++ stable/12/sys/dev/ice/ice_common.h  Sat Dec 19 04:24:05 2020
(r368785)
@@ -46,15 +46,6 @@ enum ice_fw_modes {
ICE_FW_MODE_ROLLBACK
 };
 
-/* prototype for functions used for SW locks */
-void ice_free_list(struct LIST_HEAD_TYPE *list);
-void ice_init_lock(struct ice_lock *lock);
-void ice_acquire_lock(struct ice_lock *lock);
-void ice_release_lock(struct ice_lock *lock);
-void ice_destroy_lock(struct ice_lock *lock);
-void *ice_alloc_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m, u64 size);
-void ice_free_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m);
-
 void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 
___
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: r368784 - stable/12/sys/dev/qat

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:22:26 2020
New Revision: 368784
URL: https://svnweb.freebsd.org/changeset/base/368784

Log:
  MFC r368564:
  
  qat: quiet -Wredundant-decls
  
  Reviewed by:  markj
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27554

Modified:
  stable/12/sys/dev/qat/qat_ae.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/qat/qat_ae.c
==
--- stable/12/sys/dev/qat/qat_ae.c  Sat Dec 19 04:21:15 2020
(r368783)
+++ stable/12/sys/dev/qat/qat_ae.c  Sat Dec 19 04:22:26 2020
(r368784)
@@ -82,8 +82,6 @@ static intqat_ae_write_4(struct qat_softc *, u_char, 
uint32_t);
 static int qat_ae_read_4(struct qat_softc *, u_char, bus_size_t,
uint32_t *);
-static int qat_ae_write_4(struct qat_softc *, u_char, bus_size_t,
-   uint32_t);
 static voidqat_ae_ctx_indr_write(struct qat_softc *, u_char, uint32_t,
bus_size_t, uint32_t);
 static int qat_ae_ctx_indr_read(struct qat_softc *, u_char, uint32_t,
___
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: r368783 - stable/12/sys/dev/ntb/ntb_hw

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:21:15 2020
New Revision: 368783
URL: https://svnweb.freebsd.org/changeset/base/368783

Log:
  MFC r368563:
  
  ntb: quiet gcc -Wreturn-type
  
  Reviewed by:  cem, markj
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D27553

Modified:
  stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
==
--- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Dec 19 04:18:49 2020
(r368782)
+++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_intel.c Sat Dec 19 04:21:15 2020
(r368783)
@@ -1305,6 +1305,7 @@ db_ioread(struct ntb_softc *ntb, uint64_t regoff)
case NTB_XEON_GEN1:
return (intel_ntb_reg_read(2, regoff));
}
+   __assert_unreachable();
 }
 
 static inline void
___
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: r368782 - in stable/12/sys: amd64/amd64 i386/i386

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:18:49 2020
New Revision: 368782
URL: https://svnweb.freebsd.org/changeset/base/368782

Log:
  MFC r347628:
  
  x86: spell vpxor %zmm0 as vpxord
  
  Fix gcc/gas amd64 & i386 build after r347566.
  
  Reviewed by:  kib
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D20264

Modified:
  stable/12/sys/amd64/amd64/support.S
  stable/12/sys/i386/i386/support.s
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/support.S
==
--- stable/12/sys/amd64/amd64/support.S Sat Dec 19 04:09:21 2020
(r368781)
+++ stable/12/sys/amd64/amd64/support.S Sat Dec 19 04:18:49 2020
(r368782)
@@ -1905,7 +1905,7 @@ ENTRY(mds_handler_skl_avx512)
 1: movqPCPU(MDS_BUF), %rdi
movqPCPU(MDS_BUF64), %rdx
vmovdqa64   %zmm0, PCPU(MDS_TMP)
-   vpxor   %zmm0, %zmm0, %zmm0
+   vpxord  %zmm0, %zmm0, %zmm0
 
lfence
vorpd   (%rdx), %zmm0, %zmm0

Modified: stable/12/sys/i386/i386/support.s
==
--- stable/12/sys/i386/i386/support.s   Sat Dec 19 04:09:21 2020
(r368781)
+++ stable/12/sys/i386/i386/support.s   Sat Dec 19 04:18:49 2020
(r368782)
@@ -632,7 +632,7 @@ ENTRY(mds_handler_skl_avx512)
 1: movlPCPU(MDS_BUF), %edi
movlPCPU(MDS_BUF64), %edx
vmovdqa64   %zmm0, PCPU(MDS_TMP)
-   vpxor   %zmm0, %zmm0, %zmm0
+   vpxord  %zmm0, %zmm0, %zmm0
 
lfence
vorpd   (%edx), %zmm0, %zmm0
___
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: r368781 - stable/12/libexec/rtld-elf/i386

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:09:21 2020
New Revision: 368781
URL: https://svnweb.freebsd.org/changeset/base/368781

Log:
  MFC r343672 (by vangyzen):
  
  rtld: pacify -Wmaybe-uninitialized from gcc6
  
  Sponsored by: Dell EMC Isilon

Modified:
  stable/12/libexec/rtld-elf/i386/reloc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rtld-elf/i386/reloc.c
==
--- stable/12/libexec/rtld-elf/i386/reloc.c Sat Dec 19 04:05:08 2020
(r368780)
+++ stable/12/libexec/rtld-elf/i386/reloc.c Sat Dec 19 04:09:21 2020
(r368781)
@@ -146,6 +146,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int
} else
cache = NULL;
 
+   /* Appease some compilers. */
+   symval = 0;
+   def = NULL;
+
rellim = (const Elf_Rel *)((const char *)obj->rel + obj->relsize);
for (rel = obj->rel;  rel < rellim;  rel++) {
switch (ELF_R_TYPE(rel->r_info)) {
___
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: r368780 - stable/12/lib/msun

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Sat Dec 19 04:05:08 2020
New Revision: 368780
URL: https://svnweb.freebsd.org/changeset/base/368780

Log:
  MFC r343671 (by vangyzen):
  
  libm: squelch -Woverflow from gcc6
  
  Sponsored by: Dell EMC Isilon

Modified:
  stable/12/lib/msun/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/msun/Makefile
==
--- stable/12/lib/msun/Makefile Sat Dec 19 03:30:06 2020(r368779)
+++ stable/12/lib/msun/Makefile Sat Dec 19 04:05:08 2020(r368780)
@@ -108,6 +108,15 @@ COMMON_SRCS+=  catrigl.c \
s_nextafterl.c s_nexttoward.c s_remquol.c s_rintl.c s_roundl.c \
s_scalbnl.c s_sinl.c s_sincosl.c \
s_tanhl.c s_tanl.c s_truncl.c w_cabsl.c
+# Work around this warning from gcc 6:
+# lib/msun/ld80/e_powl.c:275:1: error: floating constant exceeds range of
+# 'long double' [-Werror=overflow]
+# if( y >= LDBL_MAX )
+# See also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=130067
+.include 
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 6
+CFLAGS.e_powl.c+= -Wno-error=overflow
+.endif
 .endif
 
 # C99 complex functions
___
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: r368779 - head/sys/kern

2020-12-18 Thread Kyle Evans
Author: kevans
Date: Sat Dec 19 03:30:06 2020
New Revision: 368779
URL: https://svnweb.freebsd.org/changeset/base/368779

Log:
  kern: cpuset: allow jails to modify child jails' roots
  
  This partially lifts a restriction imposed by r191639 ("Prevent a superuser
  inside a jail from modifying the dedicated root cpuset of that jail") that's
  perhaps beneficial after r192895 ("Add hierarchical jails."). Jails still
  cannot modify their own cpuset, but they can modify child jails' roots to
  further restrict them or widen them back to the modifying jails' own mask.
  
  As a side effect of this, the system root may once again widen the mask of
  jails as long as they're still using a subset of the parent jails' mask.
  This was previously prevented by the fact that cpuset_getroot of a root set
  will return that root, rather than the root's parent -- cpuset_modify uses
  cpuset_getroot since it was introduced in r327895, previously it was just
  validating against set->cs_parent which allowed the system root to widen
  jail masks.
  
  Reviewed by:  jamie
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D27352

Modified:
  head/sys/kern/kern_cpuset.c

Modified: head/sys/kern/kern_cpuset.c
==
--- head/sys/kern/kern_cpuset.c Sat Dec 19 03:07:38 2020(r368778)
+++ head/sys/kern/kern_cpuset.c Sat Dec 19 03:30:06 2020(r368779)
@@ -688,19 +688,34 @@ cpuset_modify(struct cpuset *set, cpuset_t *mask)
if (error)
return (error);
/*
-* In case we are called from within the jail
+* In case we are called from within the jail,
 * we do not allow modifying the dedicated root
 * cpuset of the jail but may still allow to
-* change child sets.
+* change child sets, including subordinate jails'
+* roots.
 */
-   if (jailed(curthread->td_ucred) &&
-   set->cs_flags & CPU_SET_ROOT)
+   if ((set->cs_flags & CPU_SET_ROOT) != 0 &&
+   jailed(curthread->td_ucred) &&
+   set == curthread->td_ucred->cr_prison->pr_cpuset)
return (EPERM);
/*
 * Verify that we have access to this set of
 * cpus.
 */
-   root = cpuset_getroot(set);
+   if ((set->cs_flags & (CPU_SET_ROOT | CPU_SET_RDONLY)) == CPU_SET_ROOT) {
+   KASSERT(set->cs_parent != NULL,
+   ("jail.cpuset=%d is not a proper child of parent jail's 
root.",
+   set->cs_id));
+
+   /*
+* cpuset_getroot() cannot work here due to how top-level jail
+* roots are constructed.  Top-level jails are parented to
+* thread0's cpuset (i.e. cpuset 1) rather than the system root.
+*/
+   root = set->cs_parent;
+   } else {
+   root = cpuset_getroot(set);
+   }
mtx_lock_spin(_lock);
if (root && !CPU_SUBSET(>cs_mask, mask)) {
error = EINVAL;
___
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: r368778 - head/usr.bin/login

2020-12-18 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Dec 19 03:07:38 2020
New Revision: 368778
URL: https://svnweb.freebsd.org/changeset/base/368778

Log:
  login(1): when exporting variables check the result of setenv(3)
  
  When exporting a variable we correctly check all the preconditions that
  could make setenv(3) fail. Checking the setenv(3) return value seems
  redundant, but given that login(1) is critical, it doesn't hurt to have
  a post-check.
  
  This change is based on the "Principles of Secure Coding" course by
  Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.
  
  (This change redoes r368776 due to a silly mistake)

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

Modified: head/usr.bin/login/login.c
==
--- head/usr.bin/login/login.c  Sat Dec 19 02:42:14 2020(r368777)
+++ head/usr.bin/login/login.c  Sat Dec 19 03:07:38 2020(r368778)
@@ -793,6 +793,7 @@ export(const char *s)
char *p;
const char **pp;
size_t n;
+   int rv;
 
if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL)
return (0);
@@ -804,8 +805,10 @@ export(const char *s)
return (0);
}
*p = '\0';
-   (void)setenv(s, p + 1, 1);
+   rv = setenv(s, p + 1, 1);
*p = '=';
+   if (rv == -1)
+   return (0);
return (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: r368777 - head/usr.bin/login

2020-12-18 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Dec 19 02:42:14 2020
New Revision: 368777
URL: https://svnweb.freebsd.org/changeset/base/368777

Log:
  Revert r368776:
  login(1): when exporting variables check the result of setenv(3)
  
  mismatch: the return value upon error is -1, so the code was not
  doing nothing.

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

Modified: head/usr.bin/login/login.c
==
--- head/usr.bin/login/login.c  Sat Dec 19 02:23:53 2020(r368776)
+++ head/usr.bin/login/login.c  Sat Dec 19 02:42:14 2020(r368777)
@@ -793,7 +793,6 @@ export(const char *s)
char *p;
const char **pp;
size_t n;
-   int rv;
 
if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL)
return (0);
@@ -805,10 +804,8 @@ export(const char *s)
return (0);
}
*p = '\0';
-   rv = setenv(s, p + 1, 1);
+   (void)setenv(s, p + 1, 1);
*p = '=';
-   if (rv == 1)
-   return (0);
return (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"


Re: svn commit: r368776 - head/usr.bin/login

2020-12-18 Thread Pedro Giffuni

On 12/18/20 9:23 PM, Pedro F. Giffuni wrote:

Author: pfg
Date: Sat Dec 19 02:23:53 2020
New Revision: 368776
URL: https://svnweb.freebsd.org/changeset/base/368776

Log:
   login(1): when exporting variables check the result of setenv(3)
   
   When exporting a variable we correctly check all the preconditions that

   could make setenv(3) fail. Checking the setenv(3) return value seems
   redundant, but given that login(1) is critical, it doesn't hurt to have
   a post-check.
   
   This change is based on the "Principles of Secure Coding" course by

   Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.
   
   Differential Revision:	https://reviews.freebsd.org/D26966


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

Modified: head/usr.bin/login/login.c
==
--- head/usr.bin/login/login.c  Sat Dec 19 01:46:47 2020(r368775)
+++ head/usr.bin/login/login.c  Sat Dec 19 02:23:53 2020(r368776)
@@ -793,6 +793,7 @@ export(const char *s)
char *p;
const char **pp;
size_t n;
+   int rv;
  
  	if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL)

return (0);
@@ -804,8 +805,10 @@ export(const char *s)
return (0);
}
*p = '\0';
-   (void)setenv(s, p + 1, 1);
+   rv = setenv(s, p + 1, 1);
*p = '=';
+   if (rv == 1)
+   return (0);
return (1);
  }
  


This is wrong .. it should have been -1.

I'll revert to make the change clean.

___
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: r368776 - head/usr.bin/login

2020-12-18 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Dec 19 02:23:53 2020
New Revision: 368776
URL: https://svnweb.freebsd.org/changeset/base/368776

Log:
  login(1): when exporting variables check the result of setenv(3)
  
  When exporting a variable we correctly check all the preconditions that
  could make setenv(3) fail. Checking the setenv(3) return value seems
  redundant, but given that login(1) is critical, it doesn't hurt to have
  a post-check.
  
  This change is based on the "Principles of Secure Coding" course by
  Matthew Bishop, PhD., which specifically discusses this code in FreeBSD.
  
  Differential Revision:https://reviews.freebsd.org/D26966

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

Modified: head/usr.bin/login/login.c
==
--- head/usr.bin/login/login.c  Sat Dec 19 01:46:47 2020(r368775)
+++ head/usr.bin/login/login.c  Sat Dec 19 02:23:53 2020(r368776)
@@ -793,6 +793,7 @@ export(const char *s)
char *p;
const char **pp;
size_t n;
+   int rv;
 
if (strlen(s) > 1024 || (p = strchr(s, '=')) == NULL)
return (0);
@@ -804,8 +805,10 @@ export(const char *s)
return (0);
}
*p = '\0';
-   (void)setenv(s, p + 1, 1);
+   rv = setenv(s, p + 1, 1);
*p = '=';
+   if (rv == 1)
+   return (0);
return (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: r368775 - head/usr.sbin/pmc

2020-12-18 Thread Konstantin Belousov
Author: kib
Date: Sat Dec 19 01:46:47 2020
New Revision: 368775
URL: https://svnweb.freebsd.org/changeset/base/368775

Log:
  Remove redundand redefinion, fixing build.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/usr.sbin/pmc/cmd_pmc_summary.cc

Modified: head/usr.sbin/pmc/cmd_pmc_summary.cc
==
--- head/usr.sbin/pmc/cmd_pmc_summary.ccFri Dec 18 23:31:36 2020
(r368774)
+++ head/usr.sbin/pmc/cmd_pmc_summary.ccSat Dec 19 01:46:47 2020
(r368775)
@@ -81,8 +81,6 @@ typedef std::pair sampleid;
 typedef std::pair samplename;
 typedef unordered_map > eventcountmap;
 
-#defineP_KPROC 0x4 /* Kernel process. */
-
 static void __dead2
 usage(void)
 {
___
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: r368774 - in head/sys/dev/usb: . quirk

2020-12-18 Thread Jessica Clarke
Author: jrtc27
Date: Fri Dec 18 23:31:36 2020
New Revision: 368774
URL: https://svnweb.freebsd.org/changeset/base/368774

Log:
  usb: Replace ITUNERNET vendor with MICROCHIP and improve product names
  
  These Mini-Box LCDs are using Microchip components and sub-licensed product
  IDs. Whilst here, update the constant names and descriptions for the products
  to use the names listed on the manufacturer's website rather than vague ones.
  The picoLCD 4x20 is named that on the manufacturer's website so prefer that
  name, even though linux-usb.org lists it with the numbers reversed as one 
might
  expect.
  
  Reviewed by:  hselasky
  Differential Revision:https://reviews.freebsd.org/D27670

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 18 23:28:27 2020
(r368773)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 18 23:31:36 2020
(r368774)
@@ -128,8 +128,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK
USB_QUIRK(CYPRESS, SILVERSHIELD, 0x, 0x, UQ_HID_IGNORE),
USB_QUIRK(DELORME, EARTHMATE, 0x, 0x, UQ_HID_IGNORE),
USB_QUIRK(DREAMLINK, DL100B, 0x, 0x, UQ_HID_IGNORE),
-   USB_QUIRK(ITUNERNET, USBLCD2X20, 0x, 0x, UQ_HID_IGNORE),
-   USB_QUIRK(ITUNERNET, USBLCD4X20, 0x, 0x, UQ_HID_IGNORE),
+   USB_QUIRK(MICROCHIP, PICOLCD20X2, 0x, 0x, UQ_HID_IGNORE),
+   USB_QUIRK(MICROCHIP, PICOLCD4X20, 0x, 0x, UQ_HID_IGNORE),
USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x, 0x, UQ_HID_IGNORE),
USB_QUIRK(LIEBERT2, PSI1000, 0x, 0x, UQ_HID_IGNORE),
USB_QUIRK(LIEBERT2, POWERSURE_PSA, 0x, 0x, UQ_HID_IGNORE),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsFri Dec 18 23:28:27 2020(r368773)
+++ head/sys/dev/usb/usbdevsFri Dec 18 23:31:36 2020(r368774)
@@ -184,7 +184,7 @@ vendor ITTCANON 0x04d1  ITT Canon
 vendor ALTEC   0x04d2  Altec Lansing
 vendor LSI 0x04d4  LSI
 vendor MENTORGRAPHICS  0x04d6  Mentor Graphics
-vendor ITUNERNET   0x04d8  I-Tuner Networks
+vendor MICROCHIP   0x04d8  Microchip Technology, Inc.
 vendor HOLTEK  0x04d9  Holtek Semiconductor, Inc.
 vendor PANASONIC   0x04da  Panasonic (Matsushita)
 vendor HUANHSIN0x04dc  Huan Hsin
@@ -2647,9 +2647,9 @@ product ISSC ISSCBTA  0x1001  Bluetooth USB 
Adapter
 product ITEGNO WM1080A 0x1080  WM1080A GSM/GPRS modem
 product ITEGNO WM2080A 0x2080  WM2080A CDMA modem
 
-/* Ituner networks products */
-product ITUNERNET USBLCD2X20   0x0002  USB-LCD 2x20
-product ITUNERNET USBLCD4X20   0xc001  USB-LCD 4x20
+/* Microchip Technology, Inc. products */
+product MICROCHIP PICOLCD20X2  0x0002  Mini-Box picoLCD 20x2
+product MICROCHIP PICOLCD4X20  0xc001  Mini-Box picoLCD 4x20
 
 /* Jablotron products */
 product JABLOTRON PC60B0x0001  PC-60B
___
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: r368773 - head/sbin/fsck_ffs

2020-12-18 Thread Kirk McKusick
Author: mckusick
Date: Fri Dec 18 23:28:27 2020
New Revision: 368773
URL: https://svnweb.freebsd.org/changeset/base/368773

Log:
  Rename pass4check() to freeblock() and move from pass4.c to inode.c.
  The new name more accurately describes what it does and the file move
  puts it with other similar functions. Done in preparation for future
  cleanups. No functional differences intended.
  
  Sponsored by: Netflix
  Historic Footnote: my last FreeBSD svn commit

Modified:
  head/sbin/fsck_ffs/dir.c
  head/sbin/fsck_ffs/fsck.h
  head/sbin/fsck_ffs/fsutil.c
  head/sbin/fsck_ffs/inode.c
  head/sbin/fsck_ffs/pass4.c

Modified: head/sbin/fsck_ffs/dir.c
==
--- head/sbin/fsck_ffs/dir.cFri Dec 18 23:14:39 2020(r368772)
+++ head/sbin/fsck_ffs/dir.cFri Dec 18 23:28:27 2020(r368773)
@@ -532,7 +532,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
}
inodirty(dp);
idesc.id_type = ADDR;
-   idesc.id_func = pass4check;
+   idesc.id_func = freeblock;
idesc.id_number = oldlfdir;
adjust(, inoinfo(oldlfdir)->ino_linkcnt + 1);
inoinfo(oldlfdir)->ino_linkcnt = 0;
@@ -635,6 +635,7 @@ expanddir(union dinode *dp, char *name)
 {
ufs2_daddr_t lastbn, newblk;
struct bufarea *bp;
+   struct inodesc idesc;
char *cp, firstblk[DIRBLKSIZ];
 
lastbn = lblkno(, DIP(dp, di_size));
@@ -679,7 +680,10 @@ bad:
DIP_SET(dp, di_db[lastbn + 1], 0);
DIP_SET(dp, di_size, DIP(dp, di_size) - sblock.fs_bsize);
DIP_SET(dp, di_blocks, DIP(dp, di_blocks) - btodb(sblock.fs_bsize));
-   freeblk(newblk, sblock.fs_frag);
+   /* Free the block we allocated above */
+   idesc.id_blkno = newblk;
+   idesc.id_numfrags = sblock.fs_frag;
+   (void)freeblock();
return (0);
 }
 

Modified: head/sbin/fsck_ffs/fsck.h
==
--- head/sbin/fsck_ffs/fsck.h   Fri Dec 18 23:14:39 2020(r368772)
+++ head/sbin/fsck_ffs/fsck.h   Fri Dec 18 23:28:27 2020(r368773)
@@ -438,7 +438,7 @@ voidfinalIOstats(void);
 intfindino(struct inodesc *);
 intfindname(struct inodesc *);
 void   flush(int fd, struct bufarea *bp);
-void   freeblk(ufs2_daddr_t blkno, long frags);
+intfreeblock(struct inodesc *);
 void   freeino(ino_t ino);
 void   freeinodebuf(void);
 void   fsutilinit(void);
@@ -465,7 +465,6 @@ int pass1check(struct inodesc *);
 void   pass2(void);
 void   pass3(void);
 void   pass4(void);
-intpass4check(struct inodesc *);
 void   pass5(void);
 void   pfatal(const char *fmt, ...) __printflike(1, 2);
 void   propagate(void);

Modified: head/sbin/fsck_ffs/fsutil.c
==
--- head/sbin/fsck_ffs/fsutil.c Fri Dec 18 23:14:39 2020(r368772)
+++ head/sbin/fsck_ffs/fsutil.c Fri Dec 18 23:28:27 2020(r368773)
@@ -800,19 +800,8 @@ allocblk(long frags)
 }
 
 /*
- * Free a previously allocated block
+ * Slow down IO so as to leave some disk bandwidth for other processes
  */
-void
-freeblk(ufs2_daddr_t blkno, long frags)
-{
-   struct inodesc idesc;
-
-   idesc.id_blkno = blkno;
-   idesc.id_numfrags = frags;
-   (void)pass4check();
-}
-
-/* Slow down IO so as to leave some disk bandwidth for other processes */
 void
 slowio_start()
 {

Modified: head/sbin/fsck_ffs/inode.c
==
--- head/sbin/fsck_ffs/inode.c  Fri Dec 18 23:14:39 2020(r368772)
+++ head/sbin/fsck_ffs/inode.c  Fri Dec 18 23:28:27 2020(r368773)
@@ -641,6 +641,37 @@ clearentry(struct inodesc *idesc)
return (STOP|FOUND|ALTERED);
 }
 
+int
+freeblock(struct inodesc *idesc)
+{
+   struct dups *dlp;
+   ufs2_daddr_t blkno;
+   long nfrags, res;
+
+   res = KEEPON;
+   blkno = idesc->id_blkno;
+   for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
+   if (chkrange(blkno, 1)) {
+   res = SKIP;
+   } else if (testbmap(blkno)) {
+   for (dlp = duplist; dlp; dlp = dlp->next) {
+   if (dlp->dup != blkno)
+   continue;
+   dlp->dup = duplist->dup;
+   dlp = duplist;
+   duplist = duplist->next;
+   free((char *)dlp);
+   break;
+   }
+   if (dlp == NULL) {
+   clrbmap(blkno);
+   n_blks--;
+   

svn commit: r368772 - in head: sys/compat/freebsd32 sys/kern sys/sys usr.bin/elfctl

2020-12-18 Thread Konstantin Belousov
Author: kib
Date: Fri Dec 18 23:14:39 2020
New Revision: 368772
URL: https://svnweb.freebsd.org/changeset/base/368772

Log:
  Add ELF flag to disable ASLR stack gap.
  
  Also centralize and unify checks to enable ASLR stack gap in a new
  helper exec_stackgap().
  
  PR:   239873
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/kern/imgact_elf.c
  head/sys/kern/kern_exec.c
  head/sys/sys/elf_common.h
  head/sys/sys/imgact.h
  head/usr.bin/elfctl/elfctl.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Fri Dec 18 23:11:27 2020
(r368771)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Fri Dec 18 23:14:39 2020
(r368772)
@@ -3424,8 +3424,7 @@ freebsd32_copyout_strings(struct image_params *imgp, u
destp = rounddown2(destp, sizeof(uint32_t));
ustringp = destp;
 
-   if (imgp->sysent->sv_stackgap != NULL)
-   imgp->sysent->sv_stackgap(imgp, );
+   exec_stackgap(imgp, );
 
if (imgp->auxargs) {
/*

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Fri Dec 18 23:11:27 2020(r368771)
+++ head/sys/kern/imgact_elf.c  Fri Dec 18 23:14:39 2020(r368772)
@@ -2818,8 +2818,6 @@ __elfN(stackgap)(struct image_params *imgp, uintptr_t 
uintptr_t range, rbase, gap;
int pct;
 
-   if ((imgp->map_flags & MAP_ASLR) == 0)
-   return;
pct = __elfN(aslr_stack_gap);
if (pct == 0)
return;

Modified: head/sys/kern/kern_exec.c
==
--- head/sys/kern/kern_exec.c   Fri Dec 18 23:11:27 2020(r368771)
+++ head/sys/kern/kern_exec.c   Fri Dec 18 23:14:39 2020(r368772)
@@ -1534,6 +1534,17 @@ exec_args_get_begin_envv(struct image_args *args)
return (args->endp);
 }
 
+void
+exec_stackgap(struct image_params *imgp, uintptr_t *dp)
+{
+   if (imgp->sysent->sv_stackgap == NULL ||
+   (imgp->proc->p_fctl0 & (NT_FREEBSD_FCTL_ASLR_DISABLE |
+   NT_FREEBSD_FCTL_ASG_DISABLE)) != 0 ||
+   (imgp->map_flags & MAP_ASLR) == 0)
+   return;
+   imgp->sysent->sv_stackgap(imgp, dp);
+}
+
 /*
  * Copy strings out to the new process address space, constructing new arg
  * and env vector tables. Return a pointer to the base so that it can be used
@@ -1624,8 +1635,7 @@ exec_copyout_strings(struct image_params *imgp, uintpt
destp = rounddown2(destp, sizeof(void *));
ustringp = destp;
 
-   if (imgp->sysent->sv_stackgap != NULL)
-   imgp->sysent->sv_stackgap(imgp, );
+   exec_stackgap(imgp, );
 
if (imgp->auxargs) {
/*

Modified: head/sys/sys/elf_common.h
==
--- head/sys/sys/elf_common.h   Fri Dec 18 23:11:27 2020(r368771)
+++ head/sys/sys/elf_common.h   Fri Dec 18 23:14:39 2020(r368772)
@@ -797,6 +797,7 @@ typedef struct {
 #defineNT_FREEBSD_FCTL_STKGAP_DISABLE  0x0004
 #defineNT_FREEBSD_FCTL_WXNEEDED0x0008
 #defineNT_FREEBSD_FCTL_LA480x0010
+#defineNT_FREEBSD_FCTL_ASG_DISABLE 0x0020 /* ASLR STACK GAP 
Disable */
 
 /* Values for n_type.  Used in core files. */
 #defineNT_PRSTATUS 1   /* Process status. */

Modified: head/sys/sys/imgact.h
==
--- head/sys/sys/imgact.h   Fri Dec 18 23:11:27 2020(r368771)
+++ head/sys/sys/imgact.h   Fri Dec 18 23:14:39 2020(r368772)
@@ -122,6 +122,7 @@ int exec_copyin_args(struct image_args *, const char *
char **, char **);
 intexec_copyin_data_fds(struct thread *, struct image_args *, const void *,
size_t, const int *, size_t);
+void   exec_stackgap(struct image_params *imgp, uintptr_t *dp);
 intpre_execve(struct thread *td, struct vmspace **oldvmspace);
 void   post_execve(struct thread *td, int error, struct vmspace *oldvmspace);
 #endif

Modified: head/usr.bin/elfctl/elfctl.c
==
--- head/usr.bin/elfctl/elfctl.cFri Dec 18 23:11:27 2020
(r368771)
+++ head/usr.bin/elfctl/elfctl.cFri Dec 18 23:14:39 2020
(r368772)
@@ -68,6 +68,7 @@ static struct ControlFeatures featurelist[] = {
{ "stackgap",   NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" },
{ "wxneeded",   NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" },
{ "la48",   NT_FREEBSD_FCTL_LA48, "amd64: Limit user VA to 48bit" },
+   { "aslrstkgap", NT_FREEBSD_FCTL_ASG_DISABLE, "Disable ASLR 

svn commit: r368771 - head/sys/sys

2020-12-18 Thread Konstantin Belousov
Author: kib
Date: Fri Dec 18 23:11:27 2020
New Revision: 368771
URL: https://svnweb.freebsd.org/changeset/base/368771

Log:
  proc.h: Reformat P_ and P2_ definitions.
  
  Use traditional explicit leading zero format for hex numbers.
  Align P2_ hex values.
  Wrap long lines by splitting comments.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/sys/proc.h

Modified: head/sys/sys/proc.h
==
--- head/sys/sys/proc.h Fri Dec 18 22:10:17 2020(r368770)
+++ head/sys/sys/proc.h Fri Dec 18 23:11:27 2020(r368771)
@@ -739,57 +739,78 @@ struct proc {
 #definePROC_PROFLOCK_ASSERT(p, type)   mtx_assert(&(p)->p_profmtx, 
(type))
 
 /* These flags are kept in p_flag. */
-#defineP_ADVLOCK   0x1 /* Process may hold a POSIX advisory 
lock. */
-#defineP_CONTROLT  0x2 /* Has a controlling terminal. */
-#defineP_KPROC 0x4 /* Kernel process. */
-#defineP_UNUSED3   0x8 /* --available-- */
-#defineP_PPWAIT0x00010 /* Parent is waiting for child to 
exec/exit. */
-#defineP_PROFIL0x00020 /* Has started profiling. */
-#defineP_STOPPROF  0x00040 /* Has thread requesting to stop 
profiling. */
-#defineP_HADTHREADS0x00080 /* Has had threads (no cleanup 
shortcuts) */
-#defineP_SUGID 0x00100 /* Had set id privileges since last 
exec. */
-#defineP_SYSTEM0x00200 /* System proc: no sigs, stats or 
swapping. */
-#defineP_SINGLE_EXIT   0x00400 /* Threads suspending should exit, not 
wait. */
-#defineP_TRACED0x00800 /* Debugged process being traced. */
-#defineP_WAITED0x01000 /* Someone is waiting for us. */
-#defineP_WEXIT 0x02000 /* Working on exiting. */
-#defineP_EXEC  0x04000 /* Process called exec. */
-#defineP_WKILLED   0x08000 /* Killed, go to kernel/user boundary 
ASAP. */
-#defineP_CONTINUED 0x1 /* Proc has continued from a stopped 
state. */
-#defineP_STOPPED_SIG   0x2 /* Stopped due to SIGSTOP/SIGTSTP. */
-#defineP_STOPPED_TRACE 0x4 /* Stopped because of tracing. */
-#defineP_STOPPED_SINGLE 0x8 /* Only 1 thread can continue (not to 
user). */
-#defineP_PROTECTED 0x10 /* Do not kill on memory overcommit. */
-#defineP_SIGEVENT  0x20 /* Process pending signals changed. */
-#defineP_SINGLE_BOUNDARY 0x40 /* Threads should suspend at user 
boundary. */
-#defineP_HWPMC 0x80 /* Process is using HWPMCs */
-#defineP_JAILED0x100 /* Process is in jail. */
-#defineP_TOTAL_STOP0x200 /* Stopped in stop_all_proc. */
-#defineP_INEXEC0x400 /* Process is in execve(). */
-#defineP_STATCHILD 0x800 /* Child process stopped or exited. */
-#defineP_INMEM 0x1000 /* Loaded into memory. */
-#defineP_SWAPPINGOUT   0x2000 /* Process is being swapped out. */
-#defineP_SWAPPINGIN0x4000 /* Process is being swapped in. */
-#defineP_PPTRACE   0x8000 /* PT_TRACEME by vforked child. */
+#defineP_ADVLOCK   0x0001  /* Process may hold a POSIX 
advisory
+  lock. */
+#defineP_CONTROLT  0x0002  /* Has a controlling terminal. 
*/
+#defineP_KPROC 0x0004  /* Kernel process. */
+#defineP_UNUSED3   0x0008  /* --available-- */
+#defineP_PPWAIT0x0010  /* Parent is waiting for child 
to
+  exec/exit. */
+#defineP_PROFIL0x0020  /* Has started profiling. */
+#defineP_STOPPROF  0x0040  /* Has thread requesting to stop
+  profiling. */
+#defineP_HADTHREADS0x0080  /* Has had threads (no cleanup
+  shortcuts) */
+#defineP_SUGID 0x0100  /* Had set id privileges since 
last
+  exec. */
+#defineP_SYSTEM0x0200  /* System proc: no sigs, stats 
or
+  swapping. */
+#defineP_SINGLE_EXIT   0x0400  /* Threads suspending should 
exit,
+  not wait. */
+#defineP_TRACED0x0800  /* Debugged process being 
traced. */
+#defineP_WAITED0x1000  /* Someone is waiting for us. */
+#defineP_WEXIT 0x2000  /* Working on exiting. */
+#defineP_EXEC  0x4000  /* Process called exec. */
+#defineP_WKILLED   0x8000  /* Killed, go to kernel/user 
boundary
+   

svn commit: r368770 - head/lib/libc/string

2020-12-18 Thread Jessica Clarke
Author: jrtc27
Date: Fri Dec 18 22:10:17 2020
New Revision: 368770
URL: https://svnweb.freebsd.org/changeset/base/368770

Log:
  strerror.3: Fix whitespace issue introduced in r368714
  
  MFC with: 368714

Modified:
  head/lib/libc/string/strerror.3

Modified: head/lib/libc/string/strerror.3
==
--- head/lib/libc/string/strerror.3 Fri Dec 18 22:00:57 2020
(r368769)
+++ head/lib/libc/string/strerror.3 Fri Dec 18 22:10:17 2020
(r368770)
@@ -188,7 +188,7 @@ main(void)
perror("open()");
exit(1);
}
-printf("File descriptor: %d\en", fd);
+   printf("File descriptor: %d\en", fd);
return (0);
 }
 .Ed
___
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: r368769 - head/sys/net

2020-12-18 Thread Alexander V. Chernikov
Author: melifaro
Date: Fri Dec 18 22:00:57 2020
New Revision: 368769
URL: https://svnweb.freebsd.org/changeset/base/368769

Log:
  Switch direct rt fields access in rtsock.c to newly-create field acessors.
  
  rtsock code was build around the assumption that each rtentry record
   in the system radix tree is a ready-to-use sockaddr. This assumptions
   turned out to be not quite true:
  * masks have their length tweaked, so we have rtsock_fix_netmask() hack
  * IPv6 addresses have their scope embedded, so we have another explicit
   deembedding hack.
  
  Change the code to decouple rtentry internals from rtsock code using
   newly-created rtentry accessors. This will allow to eventually eliminate
   both of the hacks and change rtentry dst/mask format.
  
  Differential Revision:https://reviews.freebsd.org/D27451

Modified:
  head/sys/net/rtsock.c

Modified: head/sys/net/rtsock.c
==
--- head/sys/net/rtsock.c   Fri Dec 18 20:41:23 2020(r368768)
+++ head/sys/net/rtsock.c   Fri Dec 18 22:00:57 2020(r368769)
@@ -158,10 +158,13 @@ MTX_SYSINIT(rtsock, _mtx, "rtsock route_cb lock
 SYSCTL_NODE(_net, OID_AUTO, route, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "");
 
 struct walkarg {
+   int family;
int w_tmemsize;
int w_op, w_arg;
caddr_t w_tmem;
struct sysctl_req *w_req;
+   struct sockaddr *dst;
+   struct sockaddr *mask;
 };
 
 static voidrts_input(struct mbuf *m);
@@ -170,7 +173,7 @@ static int  rtsock_msg_buffer(int type, struct rt_addri
struct walkarg *w, int *plen);
 static int rt_xaddrs(caddr_t cp, caddr_t cplim,
struct rt_addrinfo *rtinfo);
-static int sysctl_dumpentry(struct radix_node *rn, void *vw);
+static int sysctl_dumpentry(struct rtentry *rt, void *vw);
 static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh,
uint32_t weight, struct walkarg *w);
 static int sysctl_iflist(int af, struct walkarg *w);
@@ -187,7 +190,8 @@ static int  update_rtm_from_rc(struct rt_addrinfo *info
 static voidsend_rtm_reply(struct socket *so, struct rt_msghdr *rtm,
struct mbuf *m, sa_family_t saf, u_int fibnum,
int rtm_errno);
-static int can_export_rte(struct ucred *td_ucred, const struct rtentry 
*rt);
+static boolcan_export_rte(struct ucred *td_ucred, bool rt_is_host,
+   const struct sockaddr *rt_dst);
 
 static struct netisr_handler rtsock_nh = {
.nh_name = "rtsock",
@@ -707,7 +711,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum,
return (ESRCH);
}
 
-   nh = select_nhop(rc->rc_rt->rt_nhop, info->rti_info[RTAX_GATEWAY]);
+   nh = select_nhop(rt_get_raw_nhop(rc->rc_rt), 
info->rti_info[RTAX_GATEWAY]);
if (nh == NULL) {
RIB_RUNLOCK(rnh);
return (ESRCH);
@@ -721,9 +725,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum,
 */
if (rtm->rtm_flags & RTF_ANNOUNCE) {
struct sockaddr laddr;
-   struct nhop_object *nh;
 
-   nh = rc->rc_rt->rt_nhop;
if (nh->nh_ifp != NULL &&
nh->nh_ifp->if_type == IFT_PROPVIRTUAL) {
struct ifaddr *ifa;
@@ -747,7 +749,7 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum,
RIB_RUNLOCK(rnh);
return (ESRCH);
}
-   nh = select_nhop(rc->rc_rt->rt_nhop, 
info->rti_info[RTAX_GATEWAY]);
+   nh = select_nhop(rt_get_raw_nhop(rc->rc_rt), 
info->rti_info[RTAX_GATEWAY]);
if (nh == NULL) {
RIB_RUNLOCK(rnh);
return (ESRCH);
@@ -760,6 +762,66 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum,
return (0);
 }
 
+static void
+init_sockaddrs_family(int family, struct sockaddr *dst, struct sockaddr *mask)
+{
+#ifdef INET
+   if (family == AF_INET) {
+   struct sockaddr_in *dst4 = (struct sockaddr_in *)dst;
+   struct sockaddr_in *mask4 = (struct sockaddr_in *)mask;
+
+   bzero(dst4, sizeof(struct sockaddr_in));
+   bzero(mask4, sizeof(struct sockaddr_in));
+
+   dst4->sin_family = AF_INET;
+   dst4->sin_len = sizeof(struct sockaddr_in);
+   mask4->sin_family = AF_INET;
+   mask4->sin_len = sizeof(struct sockaddr_in);
+   }
+#endif
+#ifdef INET6
+   if (family == AF_INET6) {
+   struct sockaddr_in6 *dst6 = (struct sockaddr_in6 *)dst;
+   struct sockaddr_in6 *mask6 = (struct sockaddr_in6 *)mask;
+
+   bzero(dst6, sizeof(struct sockaddr_in6));
+   bzero(mask6, sizeof(struct sockaddr_in6));
+
+   dst6->sin6_family = AF_INET6;
+   

svn commit: r368768 - in head/sys: amd64/amd64 arm64/arm64 i386/i386 riscv/riscv

2020-12-18 Thread John Baldwin
Author: jhb
Date: Fri Dec 18 20:41:23 2020
New Revision: 368768
URL: https://svnweb.freebsd.org/changeset/base/368768

Log:
  Skip the vm.pmap.kernel_maps sysctl by default.
  
  This sysctl node can generate very verbose output, so don't trigger it
  for sysctl -a or sysctl vm.pmap.
  
  Reviewed by:  markj, kib
  Differential Revision:https://reviews.freebsd.org/D27504

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/arm64/arm64/pmap.c
  head/sys/i386/i386/pmap_base.c
  head/sys/riscv/riscv/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Fri Dec 18 20:10:30 2020(r368767)
+++ head/sys/amd64/amd64/pmap.c Fri Dec 18 20:41:23 2020(r368768)
@@ -11271,7 +11271,7 @@ restart:
return (error);
 }
 SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps,
-CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP,
 NULL, 0, sysctl_kmaps, "A",
 "Dump kernel address layout");
 

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Fri Dec 18 20:10:30 2020(r368767)
+++ head/sys/arm64/arm64/pmap.c Fri Dec 18 20:41:23 2020(r368768)
@@ -7168,6 +7168,6 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS)
return (error);
 }
 SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps,
-CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP,
 NULL, 0, sysctl_kmaps, "A",
 "Dump kernel address layout");

Modified: head/sys/i386/i386/pmap_base.c
==
--- head/sys/i386/i386/pmap_base.c  Fri Dec 18 20:10:30 2020
(r368767)
+++ head/sys/i386/i386/pmap_base.c  Fri Dec 18 20:41:23 2020
(r368768)
@@ -265,7 +265,7 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS)
return (pmap_methods_ptr->pm_sysctl_kmaps(oidp, arg1, arg2, req));
 }
 SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps,
-CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP,
 NULL, 0, sysctl_kmaps, "A",
 "Dump kernel address layout");
 

Modified: head/sys/riscv/riscv/pmap.c
==
--- head/sys/riscv/riscv/pmap.c Fri Dec 18 20:10:30 2020(r368767)
+++ head/sys/riscv/riscv/pmap.c Fri Dec 18 20:41:23 2020(r368768)
@@ -4638,6 +4638,6 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS)
return (error);
 }
 SYSCTL_OID(_vm_pmap, OID_AUTO, kernel_maps,
-CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
+CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP,
 NULL, 0, sysctl_kmaps, "A",
 "Dump kernel address layout");
___
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: r368767 - in head/sys/riscv: include riscv

2020-12-18 Thread Mitchell Horne
Author: mhorne
Date: Fri Dec 18 20:10:30 2020
New Revision: 368767
URL: https://svnweb.freebsd.org/changeset/base/368767

Log:
  riscv: report additional known SBI implementations
  
  These implementation IDs are defined in the SBI spec, so we should print
  their name if detected.
  
  Submitted by: Danjel Qyteza 
  Reviewed by:  jhb, kp
  Differential Revision:https://reviews.freebsd.org/D27660

Modified:
  head/sys/riscv/include/sbi.h
  head/sys/riscv/riscv/sbi.c

Modified: head/sys/riscv/include/sbi.h
==
--- head/sys/riscv/include/sbi.hFri Dec 18 16:55:54 2020
(r368766)
+++ head/sys/riscv/include/sbi.hFri Dec 18 20:10:30 2020
(r368767)
@@ -47,6 +47,10 @@
 /* SBI Implementation IDs */
 #defineSBI_IMPL_ID_BBL 0
 #defineSBI_IMPL_ID_OPENSBI 1
+#defineSBI_IMPL_ID_XVISOR  2
+#defineSBI_IMPL_ID_KVM 3
+#defineSBI_IMPL_ID_RUSTSBI 4
+#defineSBI_IMPL_ID_DIOSIX  5
 
 /* SBI Error Codes */
 #defineSBI_SUCCESS 0

Modified: head/sys/riscv/riscv/sbi.c
==
--- head/sys/riscv/riscv/sbi.c  Fri Dec 18 16:55:54 2020(r368766)
+++ head/sys/riscv/riscv/sbi.c  Fri Dec 18 20:10:30 2020(r368767)
@@ -110,6 +110,18 @@ sbi_print_version(void)
case (SBI_IMPL_ID_BBL):
printf("SBI: Berkely Boot Loader %lu\n", sbi_impl_version);
break;
+   case (SBI_IMPL_ID_XVISOR):
+   printf("SBI: eXtensible Versatile hypervISOR %lu\n", 
sbi_impl_version);
+   break;
+   case (SBI_IMPL_ID_KVM):
+   printf("SBI: Kernel-based Virtual Machine %lu\n", 
sbi_impl_version);
+   break;
+   case (SBI_IMPL_ID_RUSTSBI):
+   printf("SBI: RustSBI %lu\n", sbi_impl_version);
+   break;
+   case (SBI_IMPL_ID_DIOSIX):
+   printf("SBI: Diosix %lu\n", sbi_impl_version);
+   break;
case (SBI_IMPL_ID_OPENSBI):
major = sbi_impl_version >> OPENSBI_VERSION_MAJOR_OFFSET;
minor = sbi_impl_version & OPENSBI_VERSION_MINOR_MASK;
___
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"


12/17/2020 Inquiry

2020-12-18 Thread Petrus Vermeulen via svn-src-all


___
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: r368766 - head/sys/arm64/rockchip/clk

2020-12-18 Thread Emmanuel Vadot
Author: manu
Date: Fri Dec 18 16:55:54 2020
New Revision: 368766
URL: https://svnweb.freebsd.org/changeset/base/368766

Log:
  arm64: rk3399: Export the watchdog clock
  
  This clock is used by the watchdog IP and can be controlled only
  in the secure world.

Modified:
  head/sys/arm64/rockchip/clk/rk3399_cru.c

Modified: head/sys/arm64/rockchip/clk/rk3399_cru.c
==
--- head/sys/arm64/rockchip/clk/rk3399_cru.cFri Dec 18 16:16:03 2020
(r368765)
+++ head/sys/arm64/rockchip/clk/rk3399_cru.cFri Dec 18 16:55:54 2020
(r368766)
@@ -1212,6 +1212,11 @@ static struct rk_clk rk3399_clks[] = {
FRACT(DCLK_VOP1_FRAC, "dclk_vop1_frac", "dclk_vop1_div", 0,
107),
 
+   /* 
+* This clock is controlled in the secure world
+*/
+   FFACT(PCLK_WDT, "pclk_wdt", "pclk_alive", 1, 1),
+
 /* Not yet implemented yet
  * MMC(SCLK_SDMMC_DRV, "sdmmc_drv","clk_sdmmc", RK3399_SDMMC_CON0, 
1),
  * MMC(SCLK_SDMMC_SAMPLE,  "sdmmc_sample", "clk_sdmmc", RK3399_SDMMC_CON1, 
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: r368765 - in head/sys/amd64: amd64 include

2020-12-18 Thread Mitchell Horne
Author: mhorne
Date: Fri Dec 18 16:16:03 2020
New Revision: 368765
URL: https://svnweb.freebsd.org/changeset/base/368765

Log:
  amd64: use register macros for gdb_cpu_getreg()
  
  Prefer these newly-added definitions to bare values.
  
  MFC after:2 weeks
  Sponsored by: NetApp, Inc.
  Sponsored by: Klara, Inc.

Modified:
  head/sys/amd64/amd64/gdb_machdep.c
  head/sys/amd64/include/gdb_machdep.h

Modified: head/sys/amd64/amd64/gdb_machdep.c
==
--- head/sys/amd64/amd64/gdb_machdep.c  Fri Dec 18 16:09:24 2020
(r368764)
+++ head/sys/amd64/amd64/gdb_machdep.c  Fri Dec 18 16:16:03 2020
(r368765)
@@ -60,31 +60,31 @@ gdb_cpu_getreg(int regnum, size_t *regsz)
 
if (kdb_thread  == curthread) {
switch (regnum) {
-   case 0: return (_frame->tf_rax);
-   case 2: return (_frame->tf_rcx);
-   case 3: return (_frame->tf_rdx);
-   case 4: return (_frame->tf_rsi);
-   case 5: return (_frame->tf_rdi);
-   case 8: return (_frame->tf_r8);
-   case 9: return (_frame->tf_r9);
-   case 10: return (_frame->tf_r10);
-   case 11: return (_frame->tf_r11);
-   case 17: return (_frame->tf_rflags);
-   case 18: return (_frame->tf_cs);
-   case 19: return (_frame->tf_ss);
+   case GDB_REG_RAX: return (_frame->tf_rax);
+   case GDB_REG_RCX: return (_frame->tf_rcx);
+   case GDB_REG_RDX: return (_frame->tf_rdx);
+   case GDB_REG_RSI: return (_frame->tf_rsi);
+   case GDB_REG_RDI: return (_frame->tf_rdi);
+   case GDB_REG_R8:  return (_frame->tf_r8);
+   case GDB_REG_R9:  return (_frame->tf_r9);
+   case GDB_REG_R10: return (_frame->tf_r10);
+   case GDB_REG_R11: return (_frame->tf_r11);
+   case GDB_REG_RFLAGS: return (_frame->tf_rflags);
+   case GDB_REG_CS:  return (_frame->tf_cs);
+   case GDB_REG_SS:  return (_frame->tf_ss);
}
}
switch (regnum) {
-   case 1:  return (_thrctx->pcb_rbx);
-   case 6:  return (_thrctx->pcb_rbp);
-   case 7:  return (_thrctx->pcb_rsp);
-   case 12: return (_thrctx->pcb_r12);
-   case 13: return (_thrctx->pcb_r13);
-   case 14: return (_thrctx->pcb_r14);
-   case 15: return (_thrctx->pcb_r15);
-   case 16: return (_thrctx->pcb_rip);
-   case 18: return (&_kcodesel);
-   case 19: return (&_kdatasel);
+   case GDB_REG_RBX: return (_thrctx->pcb_rbx);
+   case GDB_REG_RBP: return (_thrctx->pcb_rbp);
+   case GDB_REG_RSP: return (_thrctx->pcb_rsp);
+   case GDB_REG_R12: return (_thrctx->pcb_r12);
+   case GDB_REG_R13: return (_thrctx->pcb_r13);
+   case GDB_REG_R14: return (_thrctx->pcb_r14);
+   case GDB_REG_R15: return (_thrctx->pcb_r15);
+   case GDB_REG_PC:  return (_thrctx->pcb_rip);
+   case GDB_REG_CS:  return (&_kcodesel);
+   case GDB_REG_SS:  return (&_kdatasel);
}
return (NULL);
 }

Modified: head/sys/amd64/include/gdb_machdep.h
==
--- head/sys/amd64/include/gdb_machdep.hFri Dec 18 16:09:24 2020
(r368764)
+++ head/sys/amd64/include/gdb_machdep.hFri Dec 18 16:16:03 2020
(r368765)
@@ -50,6 +50,9 @@
 #defineGDB_REG_R14 14
 #defineGDB_REG_R15 15
 #defineGDB_REG_PC  16
+#defineGDB_REG_RFLAGS  17
+#defineGDB_REG_CS  18
+#defineGDB_REG_SS  19
 _Static_assert(GDB_BUFSZ >= (GDB_NREGS * 16), "buffer fits 'g' regs");
 
 static __inline size_t
___
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: r368764 - in head/sys/amd64: amd64 include

2020-12-18 Thread Mitchell Horne
Author: mhorne
Date: Fri Dec 18 16:09:24 2020
New Revision: 368764
URL: https://svnweb.freebsd.org/changeset/base/368764

Log:
  amd64: allow gdb(4) to write to most registers
  
  Similar to the recent patch to arm's gdb stub in r368414, allow GDB to
  update the contents of most general purpose registers.
  
  Reviewed by:  cem, jhb, markj
  MFC after:2 weeks
  Sponsored by: NetApp, Inc.
  Sponsored by: Klara, Inc.
  NetApp PR:44
  Differential Revision:https://reviews.freebsd.org/D27642

Modified:
  head/sys/amd64/amd64/gdb_machdep.c
  head/sys/amd64/include/gdb_machdep.h

Modified: head/sys/amd64/amd64/gdb_machdep.c
==
--- head/sys/amd64/amd64/gdb_machdep.c  Fri Dec 18 16:04:48 2020
(r368763)
+++ head/sys/amd64/amd64/gdb_machdep.c  Fri Dec 18 16:09:24 2020
(r368764)
@@ -92,12 +92,42 @@ gdb_cpu_getreg(int regnum, size_t *regsz)
 void
 gdb_cpu_setreg(int regnum, void *val)
 {
+   register_t regval = *(register_t *)val;
 
+   /*
+* Write registers to the trapframe and pcb, if applicable.
+* Some scratch registers are not tracked by the pcb.
+*/
+   if (kdb_thread == curthread) {
+   switch (regnum) {
+   case GDB_REG_RAX: kdb_frame->tf_rax = regval; break;
+   case GDB_REG_RBX: kdb_frame->tf_rbx = regval; break;
+   case GDB_REG_RCX: kdb_frame->tf_rcx = regval; break;
+   case GDB_REG_RDX: kdb_frame->tf_rdx = regval; break;
+   case GDB_REG_RSI: kdb_frame->tf_rsi = regval; break;
+   case GDB_REG_RDI: kdb_frame->tf_rdi = regval; break;
+   case GDB_REG_RBP: kdb_frame->tf_rbp = regval; break;
+   case GDB_REG_RSP: kdb_frame->tf_rsp = regval; break;
+   case GDB_REG_R8:  kdb_frame->tf_r8  = regval; break;
+   case GDB_REG_R9:  kdb_frame->tf_r9  = regval; break;
+   case GDB_REG_R10: kdb_frame->tf_r10 = regval; break;
+   case GDB_REG_R11: kdb_frame->tf_r11 = regval; break;
+   case GDB_REG_R12: kdb_frame->tf_r12 = regval; break;
+   case GDB_REG_R13: kdb_frame->tf_r13 = regval; break;
+   case GDB_REG_R14: kdb_frame->tf_r14 = regval; break;
+   case GDB_REG_R15: kdb_frame->tf_r15 = regval; break;
+   case GDB_REG_PC:  kdb_frame->tf_rip = regval; break;
+   }
+   }
switch (regnum) {
-   case GDB_REG_PC:
-   kdb_thrctx->pcb_rip = *(register_t *)val;
-   if (kdb_thread  == curthread)
-   kdb_frame->tf_rip = *(register_t *)val;
+   case GDB_REG_RBX: kdb_thrctx->pcb_rbx = regval; break;
+   case GDB_REG_RBP: kdb_thrctx->pcb_rbp = regval; break;
+   case GDB_REG_RSP: kdb_thrctx->pcb_rsp = regval; break;
+   case GDB_REG_R12: kdb_thrctx->pcb_r12 = regval; break;
+   case GDB_REG_R13: kdb_thrctx->pcb_r13 = regval; break;
+   case GDB_REG_R14: kdb_thrctx->pcb_r14 = regval; break;
+   case GDB_REG_R15: kdb_thrctx->pcb_r15 = regval; break;
+   case GDB_REG_PC:  kdb_thrctx->pcb_rip = regval; break;
}
 }
 

Modified: head/sys/amd64/include/gdb_machdep.h
==
--- head/sys/amd64/include/gdb_machdep.hFri Dec 18 16:04:48 2020
(r368763)
+++ head/sys/amd64/include/gdb_machdep.hFri Dec 18 16:09:24 2020
(r368764)
@@ -33,6 +33,22 @@
 
 #defineGDB_BUFSZ   4096
 #defineGDB_NREGS   56
+#defineGDB_REG_RAX 0
+#defineGDB_REG_RBX 1
+#defineGDB_REG_RCX 2
+#defineGDB_REG_RDX 3
+#defineGDB_REG_RSI 4
+#defineGDB_REG_RDI 5
+#defineGDB_REG_RBP 6
+#defineGDB_REG_RSP 7
+#defineGDB_REG_R8  8
+#defineGDB_REG_R9  9
+#defineGDB_REG_R10 10
+#defineGDB_REG_R11 11
+#defineGDB_REG_R12 12
+#defineGDB_REG_R13 13
+#defineGDB_REG_R14 14
+#defineGDB_REG_R15 15
 #defineGDB_REG_PC  16
 _Static_assert(GDB_BUFSZ >= (GDB_NREGS * 16), "buffer fits 'g' regs");
 
___
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: r368763 - head/sys/dev/acpica

2020-12-18 Thread Mark Johnston
Author: markj
Date: Fri Dec 18 16:04:48 2020
New Revision: 368763
URL: https://svnweb.freebsd.org/changeset/base/368763

Log:
  acpi: Ensure that adjacent memory affinity table entries are coalesced
  
  The SRAT may contain multiple distinct entries that together describe a
  contiguous region of physical memory.  In this case we were not
  coalescing the corresponding entries in the memory affinity table, which
  led to fragmented phys_avail[] entries.  Since r338431 the vm_phys_segs[]
  entries derived from phys_avail[] will be coalesced, resulting in a
  situation where vm_phys_segs[] entries do not have a covering
  phys_avail[] entry.  vm_page_startup() will not add such segments to the
  physical memory allocator, leaving them unused.
  
  Reported by:  Don Morris 
  Reviewed by:  kib, vangyzen
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D27620

Modified:
  head/sys/dev/acpica/acpi_pxm.c

Modified: head/sys/dev/acpica/acpi_pxm.c
==
--- head/sys/dev/acpica/acpi_pxm.c  Fri Dec 18 16:02:28 2020
(r368762)
+++ head/sys/dev/acpica/acpi_pxm.c  Fri Dec 18 16:04:48 2020
(r368763)
@@ -265,6 +265,7 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar
ACPI_SRAT_MEM_AFFINITY *mem;
ACPI_SRAT_GICC_AFFINITY *gicc;
static struct cpu_info *cpup;
+   uint64_t base, length;
int domain, i, slot;
 
switch (entry->Type) {
@@ -327,20 +328,22 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar
break;
case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
mem = (ACPI_SRAT_MEM_AFFINITY *)entry;
+   base = mem->BaseAddress;
+   length = mem->Length;
+   domain = mem->ProximityDomain;
+
if (bootverbose)
printf(
"SRAT: Found memory domain %d addr 0x%jx len 0x%jx: %s\n",
-   mem->ProximityDomain, (uintmax_t)mem->BaseAddress,
-   (uintmax_t)mem->Length,
+   domain, (uintmax_t)base, (uintmax_t)length,
(mem->Flags & ACPI_SRAT_MEM_ENABLED) ?
"enabled" : "disabled");
if (!(mem->Flags & ACPI_SRAT_MEM_ENABLED))
break;
-   if (mem->BaseAddress >= maxphyaddr ||
-   !overlaps_phys_avail(mem->BaseAddress,
-   mem->BaseAddress + mem->Length)) {
+   if (base >= maxphyaddr ||
+   !overlaps_phys_avail(base, base + length)) {
printf("SRAT: Ignoring memory at addr 0x%jx\n",
-   (uintmax_t)mem->BaseAddress);
+   (uintmax_t)base);
break;
}
if (num_mem == VM_PHYSSEG_MAX) {
@@ -350,10 +353,20 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar
}
slot = num_mem;
for (i = 0; i < num_mem; i++) {
-   if (mem_info[i].end <= mem->BaseAddress)
+   if (mem_info[i].domain == domain) {
+   /* Try to extend an existing segment. */
+   if (base == mem_info[i].end) {
+   mem_info[i].end += length;
+   return;
+   }
+   if (base + length == mem_info[i].start) {
+   mem_info[i].start -= length;
+   return;
+   }
+   }
+   if (mem_info[i].end <= base)
continue;
-   if (mem_info[i].start <
-   (mem->BaseAddress + mem->Length)) {
+   if (mem_info[i].start < base + length) {
printf("SRAT: Overlapping memory entries\n");
*(int *)arg = ENXIO;
return;
@@ -362,9 +375,9 @@ srat_parse_entry(ACPI_SUBTABLE_HEADER *entry, void *ar
}
for (i = num_mem; i > slot; i--)
mem_info[i] = mem_info[i - 1];
-   mem_info[slot].start = mem->BaseAddress;
-   mem_info[slot].end = mem->BaseAddress + mem->Length;
-   mem_info[slot].domain = mem->ProximityDomain;
+   mem_info[slot].start = base;
+   mem_info[slot].end = base + length;
+   mem_info[slot].domain = domain;
num_mem++;
break;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all

svn commit: r368762 - head/libexec/rc/rc.d

2020-12-18 Thread Mark Johnston
Author: markj
Date: Fri Dec 18 16:02:28 2020
New Revision: 368762
URL: https://svnweb.freebsd.org/changeset/base/368762

Log:
  Fix the ipfw service status output when ipfw.ko isn't loaded
  
  Reported by:  lme
  Reviewed by:  lme
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D27657

Modified:
  head/libexec/rc/rc.d/ipfw

Modified: head/libexec/rc/rc.d/ipfw
==
--- head/libexec/rc/rc.d/ipfw   Fri Dec 18 15:07:14 2020(r368761)
+++ head/libexec/rc/rc.d/ipfw   Fri Dec 18 16:02:28 2020(r368762)
@@ -129,7 +129,9 @@ ipfw_status()
status=$(sysctl -i -n net.inet.ip.fw.enable)
: ${status:=0}
if afexists inet6; then
-   status=$((${status} + $(sysctl -i -n net.inet6.ip6.fw.enable)))
+   status6=$(sysctl -i -n net.inet6.ip6.fw.enable)
+   : ${status6:=0}
+   status=$((${status} + ${status6}))
fi
if [ ${status} -eq 0 ]; then
echo "ipfw is not enabled"
___
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: r368761 - head/sys/dev/virtio/mmio

2020-12-18 Thread Jessica Clarke
Author: jrtc27
Date: Fri Dec 18 15:07:14 2020
New Revision: 368761
URL: https://svnweb.freebsd.org/changeset/base/368761

Log:
  virtio_mmio: Fix feature negotiation copy-paste issue in r361943
  
  This caused us to write to the low half of the feature word twice, once with
  the high bits and once with the low bits. Common legacy device implementations
  seem to be fairly lenient about being able to write to the feature bits
  multiple times, but Arm's models use a stricter implementation that will 
ignore
  the second write. This fixes using vtnet(4) on those models.
  
  Reported by:  Jean-Philippe Brucker 
  Pointy hat:   jrtc27

Modified:
  head/sys/dev/virtio/mmio/virtio_mmio.c

Modified: head/sys/dev/virtio/mmio/virtio_mmio.c
==
--- head/sys/dev/virtio/mmio/virtio_mmio.c  Fri Dec 18 12:40:19 2020
(r368760)
+++ head/sys/dev/virtio/mmio/virtio_mmio.c  Fri Dec 18 15:07:14 2020
(r368761)
@@ -409,10 +409,10 @@ vtmmio_negotiate_features(device_t dev, uint64_t child
 
vtmmio_describe_features(sc, "negotiated", features);
 
-   vtmmio_write_config_4(sc, VIRTIO_MMIO_HOST_FEATURES_SEL, 1);
+   vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES_SEL, 1);
vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES, features >> 32);
 
-   vtmmio_write_config_4(sc, VIRTIO_MMIO_HOST_FEATURES_SEL, 0);
+   vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES_SEL, 0);
vtmmio_write_config_4(sc, VIRTIO_MMIO_GUEST_FEATURES, features);
 
return (features);
___
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: r368760 - stable/12/sys/modules/em

2020-12-18 Thread Eugene Grosbein
Author: eugen
Date: Fri Dec 18 12:40:19 2020
New Revision: 368760
URL: https://svnweb.freebsd.org/changeset/base/368760

Log:
  MFC r368391: if_em.ko: fix module build outside of kernel build environment

Modified:
  stable/12/sys/modules/em/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/modules/em/Makefile
==
--- stable/12/sys/modules/em/Makefile   Fri Dec 18 12:24:33 2020
(r368759)
+++ stable/12/sys/modules/em/Makefile   Fri Dec 18 12:40:19 2020
(r368760)
@@ -4,7 +4,7 @@
 .PATH:  ${SRCTOP}/sys/dev/e1000
 KMOD= if_em
 SRCS= device_if.h bus_if.h pci_if.h opt_ddb.h opt_inet.h \
- opt_inet6.h ifdi_if.h
+ opt_inet6.h opt_rss.h ifdi_if.h
 SRCS+= $(CORE_SRC) $(LEGACY_SRC)
 SRCS   += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED)
 CORE_SRC = if_em.c em_txrx.c e1000_osdep.c
___
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: r368759 - stable/11/sbin/hastd

2020-12-18 Thread Eugene Grosbein
Author: eugen
Date: Fri Dec 18 12:24:33 2020
New Revision: 368759
URL: https://svnweb.freebsd.org/changeset/base/368759

Log:
  MFC r368148: fix hastd(8)
  
  hastd(8) assumes it has no extra file descriptors opened
  and aborts otherwise, so call closefrom() early.
  
  PR:   227461

Modified:
  stable/11/sbin/hastd/hastd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/hastd/hastd.c
==
--- stable/11/sbin/hastd/hastd.cFri Dec 18 12:20:29 2020
(r368758)
+++ stable/11/sbin/hastd/hastd.cFri Dec 18 12:24:33 2020
(r368759)
@@ -1222,6 +1222,7 @@ main(int argc, char *argv[])
pjdlog_init(PJDLOG_MODE_STD);
pjdlog_debug_set(debuglevel);
 
+   closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1);
g_gate_load();
 
/*
___
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: r368758 - stable/12/sbin/hastd

2020-12-18 Thread Eugene Grosbein
Author: eugen
Date: Fri Dec 18 12:20:29 2020
New Revision: 368758
URL: https://svnweb.freebsd.org/changeset/base/368758

Log:
  MFC r368148: fix hastd(8)
  
  hastd(8) assumes it has no extra file descriptors opened
  and aborts otherwise, so call closefrom() early.
  
  PR:   227461

Modified:
  stable/12/sbin/hastd/hastd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/hastd/hastd.c
==
--- stable/12/sbin/hastd/hastd.cFri Dec 18 10:13:28 2020
(r368757)
+++ stable/12/sbin/hastd/hastd.cFri Dec 18 12:20:29 2020
(r368758)
@@ -1222,6 +1222,7 @@ main(int argc, char *argv[])
pjdlog_init(PJDLOG_MODE_STD);
pjdlog_debug_set(debuglevel);
 
+   closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1);
g_gate_load();
 
/*
___
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: r368757 - stable/12/sys/netinet

2020-12-18 Thread Michael Tuexen
Author: tuexen
Date: Fri Dec 18 10:13:28 2020
New Revision: 368757
URL: https://svnweb.freebsd.org/changeset/base/368757

Log:
  MFC r368593:
  Clean up more resouces of an existing SCTP association in case of
  a restart.
  This fixes a use-after-free scenario, which was reported by Felix
  Wilhelm from Google in case a peer is able to modify the cookie.
  However, this can also be triggered by an assciation restart under
  some specific conditions.
  
  MFC r368622:
  Harden the handling of outgoing streams in case of an restart or INIT
  collision. This avouds an out-of-bounce access in case the peer can
  break the cookie signature. Thanks to Felix Wilhelm from Google for
  reporting the issue.

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

Modified: stable/12/sys/netinet/sctp_input.c
==
--- stable/12/sys/netinet/sctp_input.c  Fri Dec 18 10:09:21 2020
(r368756)
+++ stable/12/sys/netinet/sctp_input.c  Fri Dec 18 10:13:28 2020
(r368757)
@@ -1433,6 +1433,11 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
struct sctp_association *asoc;
struct sctp_init_chunk *init_cp, init_buf;
struct sctp_init_ack_chunk *initack_cp, initack_buf;
+   struct sctp_asconf_addr *aparam, *naparam;
+   struct sctp_asconf_ack *aack, *naack;
+   struct sctp_tmit_chunk *chk, *nchk;
+   struct sctp_stream_reset_list *strrst, *nstrrst;
+   struct sctp_queued_to_read *sq, *nsq;
struct sctp_nets *net;
struct mbuf *op_err;
struct timeval old;
@@ -1700,7 +1705,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
NULL);
}
asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd);
-   asoc->pre_open_streams = 
ntohs(initack_cp->init.num_outbound_streams);
+   if (asoc->pre_open_streams < asoc->streamoutcnt) {
+   asoc->pre_open_streams = asoc->streamoutcnt;
+   }
 
if (ntohl(init_cp->init.initiate_tag) != asoc->peer_vtag) {
/*
@@ -1711,7 +1718,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
 * still take a timeout to move these.. but it can't
 * hurt to mark them.
 */
-   struct sctp_tmit_chunk *chk;
 
TAILQ_FOREACH(chk, >asoc.sent_queue, sctp_next) {
if (chk->sent < SCTP_DATAGRAM_RESEND) {
@@ -1834,7 +1840,9 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
/* move to OPEN state, if not in SHUTDOWN_SENT */
SCTP_SET_STATE(stcb, SCTP_STATE_OPEN);
}
-   asoc->pre_open_streams = 
ntohs(initack_cp->init.num_outbound_streams);
+   if (asoc->pre_open_streams < asoc->streamoutcnt) {
+   asoc->pre_open_streams = asoc->streamoutcnt;
+   }
asoc->init_seq_number = ntohl(initack_cp->init.initial_tsn);
asoc->sending_seq = asoc->asconf_seq_out = 
asoc->str_reset_seq_out = asoc->init_seq_number;
asoc->asconf_seq_out_acked = asoc->asconf_seq_out - 1;
@@ -1875,6 +1883,57 @@ sctp_process_cookie_existing(struct mbuf *m, int iphle
stcb->asoc.strmout[i].next_mid_unordered = 0;
stcb->asoc.strmout[i].last_msg_incomplete = 0;
}
+   TAILQ_FOREACH_SAFE(strrst, >resetHead, next_resp, 
nstrrst) {
+   TAILQ_REMOVE(>resetHead, strrst, next_resp);
+   SCTP_FREE(strrst, SCTP_M_STRESET);
+   }
+   TAILQ_FOREACH_SAFE(sq, >pending_reply_queue, next, nsq) {
+   TAILQ_REMOVE(>pending_reply_queue, sq, next);
+   if (sq->data) {
+   sctp_m_freem(sq->data);
+   sq->data = NULL;
+   }
+   sctp_free_remote_addr(sq->whoFrom);
+   sq->whoFrom = NULL;
+   sq->stcb = NULL;
+   sctp_free_a_readq(stcb, sq);
+   }
+   TAILQ_FOREACH_SAFE(chk, >control_send_queue, sctp_next, 
nchk) {
+   TAILQ_REMOVE(>control_send_queue, chk, sctp_next);
+   if (chk->data) {
+   sctp_m_freem(chk->data);
+   chk->data = NULL;
+   }
+   if (chk->holds_key_ref)
+   sctp_auth_key_release(stcb, chk->auth_keyid, 
SCTP_SO_LOCKED);
+   sctp_free_remote_addr(chk->whoTo);
+   SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
+   

svn commit: r368756 - head/contrib/jemalloc/src

2020-12-18 Thread Marcin Wojtas
Author: mw
Date: Fri Dec 18 10:09:21 2020
New Revision: 368756
URL: https://svnweb.freebsd.org/changeset/base/368756

Log:
  Fix abort in jemalloc extent coalescing.
  
  Fix error in extent_try_coalesce_impl(), which could cause abort
  to happen when trying to coalesce extents backwards. The error could
  happen because of how extent_before_get() function works. This function
  gets address of previous extent, by subtracting page size from current
  extent address. If current extent is located at PAGE_SIZE offset, this
  address resolved to 0x. An assertion in rtree_leaf_elm_lookup
  then caused the running program to abort.
  
  This problem was discovered when trying to build world on 32-bit
  machines with ASLR and PIE enabled. The problem was encountered
  on armv7 and i386 machines, but most likely other 32-bit
  architectures are affected as well.
  
  While this patch fixes one problem with buildworld on 32-bit platforms
  with ASLR, the build still fails, however it happens much later
  and due to lack of memory.
  
  The change is aligned with accepted fix in the upstream Jemalloc
  repository (https://github.com/jemalloc/jemalloc/pull/1973).
  As it doesn't apply on top of Jemalloc tree, its updated version
  was eventually merged: https://github.com/jemalloc/jemalloc/pull/2003
  
  PR: 249937
  Submitted by: Dawid Gorecki 
  Obtained from: Semihalf
  Sponsored by: Stormshield
  Differential Revision: https://reviews.freebsd.org/D27025

Modified:
  head/contrib/jemalloc/src/extent.c

Modified: head/contrib/jemalloc/src/extent.c
==
--- head/contrib/jemalloc/src/extent.c  Fri Dec 18 10:08:11 2020
(r368755)
+++ head/contrib/jemalloc/src/extent.c  Fri Dec 18 10:09:21 2020
(r368756)
@@ -1641,8 +1641,11 @@ extent_try_coalesce_impl(tsdn_t *tsdn, arena_t *arena,
}
 
/* Try to coalesce backward. */
-   extent_t *prev = extent_lock_from_addr(tsdn, rtree_ctx,
-   extent_before_get(extent), inactive_only);
+   extent_t *prev = NULL;
+   if (extent_before_get(extent) != NULL) {
+   prev = extent_lock_from_addr(tsdn, rtree_ctx,
+   extent_before_get(extent), inactive_only);
+   }
if (prev != NULL) {
bool can_coalesce = extent_can_coalesce(arena, extents,
extent, prev);
___
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: r368755 - stable/12/libexec/tftpd

2020-12-18 Thread Michael Tuexen
Author: tuexen
Date: Fri Dec 18 10:08:11 2020
New Revision: 368755
URL: https://svnweb.freebsd.org/changeset/base/368755

Log:
  MFC r368394:
  When dropping packets (RRQ or WRQ) for debugging, report the send
  operation as successful. Reporting a failure stops the transfer
  instead of using timeouts.
  
  MFC r368521:
  Fix the TFTP client when performing a RRQ for files smaller than 512 bytes
  and the server not sending an OACK:
  * Close the file.
  * Report the correct the number of received blocks.
  
  MFC r368647:
  Improve the counting of blocks used to transfer a file from the
  server to the client in case of not using an OACK: Don't miss
  the first block in case of it is not also the last one.
  
  MFC r368657:
  When receiving a file having a length, which is a mulitple of the blocksize,
  close the file once it is received.

Modified:
  stable/12/libexec/tftpd/tftp-io.c
  stable/12/libexec/tftpd/tftp-transfer.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/tftpd/tftp-io.c
==
--- stable/12/libexec/tftpd/tftp-io.c   Fri Dec 18 08:43:06 2020
(r368754)
+++ stable/12/libexec/tftpd/tftp-io.c   Fri Dec 18 10:08:11 2020
(r368755)
@@ -190,7 +190,7 @@ send_wrq(int peer, char *filename, char *mode)
filename, mode
);
 
-   DROPPACKETn("send_wrq", 1);
+   DROPPACKETn("send_wrq", 0);
 
tp = (struct tftphdr *)buf;
tp->th_opcode = htons((u_short)WRQ);
@@ -238,7 +238,7 @@ send_rrq(int peer, char *filename, char *mode)
filename, mode
);
 
-   DROPPACKETn("send_rrq", 1);
+   DROPPACKETn("send_rrq", 0);
 
tp = (struct tftphdr *)buf;
tp->th_opcode = htons((u_short)RRQ);

Modified: stable/12/libexec/tftpd/tftp-transfer.c
==
--- stable/12/libexec/tftpd/tftp-transfer.c Fri Dec 18 08:43:06 2020
(r368754)
+++ stable/12/libexec/tftpd/tftp-transfer.c Fri Dec 18 10:08:11 2020
(r368755)
@@ -258,6 +258,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st
if (firstblock != NULL) {
writesize = write_file(firstblock->th_data, fb_size);
ts->amount += writesize;
+   ts->blocks++;
windowblock++;
if (windowsize == 1 || fb_size != segsize) {
for (i = 0; ; i++) {
@@ -280,6 +281,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st
}
 
if (fb_size != segsize) {
+   write_close();
gettimeofday(&(ts->tstop), NULL);
return;
}
@@ -395,9 +397,9 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st
send_error(peer, ENOSPACE);
goto abort;
}
-   if (n_data != segsize)
-   write_close();
}
+   if (n_data != segsize)
+   write_close();
windowblock++;
 
/* Only send ACKs for the last block in the window. */
___
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: r368754 - head/tools/tools/locale

2020-12-18 Thread Yuri Pankov
Author: yuripv
Date: Fri Dec 18 08:43:06 2020
New Revision: 368754
URL: https://svnweb.freebsd.org/changeset/base/368754

Log:
  tools/tools/locale: fix static-colldef

Modified:
  head/tools/tools/locale/Makefile

Modified: head/tools/tools/locale/Makefile
==
--- head/tools/tools/locale/MakefileFri Dec 18 08:40:33 2020
(r368753)
+++ head/tools/tools/locale/MakefileFri Dec 18 08:43:06 2020
(r368754)
@@ -126,9 +126,8 @@ build-colldef:  static-colldef
 
 static-colldef:
 .for area enc in ${COLLATION_SPECIAL}
-colldef.draft/${area}.${enc}.src: posix/${area}.${enc}.src
awk -f ${TOOLSDIR}/extract-colldef.awk \
-   ${.ALLSRC} > ${.TARGET} || (rm -f ${.TARGET} && false)
+   posix/${area}.${enc}.src > colldef.draft/${area}.${enc}.src
 .endfor
 
 BASE_LOCALES_OF_INTEREST?= \
___
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: r368753 - in stable/12: share/mk sys/conf

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Fri Dec 18 08:40:33 2020
New Revision: 368753
URL: https://svnweb.freebsd.org/changeset/base/368753

Log:
  MFC r350739-r350740 (by cem)
  
  r350739:
  Disable useless -Wformat-zero-length
  
  It is part of -Wformat, which is enabled by -Wall.  Empty format strings are
  well defined and it is perfectly reasonable to expect them in a formatting
  interface.
  
  r350740:
  r350739 try #2
  
  For some inexplicable reason, C++ compilers reject the -Wno- flag, and also
  (ab)use CWARNFLAGS.
  
  Reported by:  imp

Modified:
  stable/12/share/mk/bsd.sys.mk
  stable/12/sys/conf/kern.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/mk/bsd.sys.mk
==
--- stable/12/share/mk/bsd.sys.mk   Fri Dec 18 08:29:38 2020
(r368752)
+++ stable/12/share/mk/bsd.sys.mk   Fri Dec 18 08:40:33 2020
(r368753)
@@ -201,6 +201,9 @@ FORMAT_EXTENSIONS=  -fformat-extensions
 CWARNFLAGS+=   -Wno-unknown-pragmas
 .endif # IGNORE_PRAGMA
 
+# This warning is utter nonsense
+CFLAGS+=   -Wno-format-zero-length
+
 # We need this conditional because many places that use it
 # only enable it for some files with CLFAGS.$FILE+=${CLANG_NO_IAS}.
 # unconditionally, and can't easily use the CFLAGS.clang=

Modified: stable/12/sys/conf/kern.mk
==
--- stable/12/sys/conf/kern.mk  Fri Dec 18 08:29:38 2020(r368752)
+++ stable/12/sys/conf/kern.mk  Fri Dec 18 08:40:33 2020(r368753)
@@ -86,6 +86,9 @@ NO_WCAST_QUAL= -Wno-cast-qual
 .endif
 .endif
 
+# This warning is utter nonsense
+CWARNFLAGS+=   -Wno-format-zero-length
+
 # External compilers may not support our format extensions.  Allow them
 # to be disabled.  WARNING: format checking is disabled in this case.
 .if ${MK_FORMAT_EXTENSIONS} == "no"
___
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: r368752 - stable/12/sys/vm

2020-12-18 Thread Ryan Libby
Author: rlibby
Date: Fri Dec 18 08:29:38 2020
New Revision: 368752
URL: https://svnweb.freebsd.org/changeset/base/368752

Log:
  MFC r357019:
  
  uma: fix zone domain overlaying pcpu cache with disabled cpus
  
  UMA zone structures have two arrays at the end which are sized according
  to the machine: an array of CPU count length, and an array of NUMA
  domain count length.  The CPU counting was wrong in the case where some
  CPUs are disabled (when mp_ncpus != mp_maxid + 1), and this caused the
  second array to be overlaid with the first.
  
  Reported by:  olivier
  Reviewed by:  jeff, markj
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D23318

Modified:
  stable/12/sys/vm/uma_core.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/vm/uma_core.c
==
--- stable/12/sys/vm/uma_core.c Fri Dec 18 04:23:20 2020(r368751)
+++ stable/12/sys/vm/uma_core.c Fri Dec 18 08:29:38 2020(r368752)
@@ -1782,7 +1782,8 @@ zone_ctor(void *mem, int size, void *udata, int flags)
zone->uz_flags = 0;
zone->uz_warning = NULL;
/* The domain structures follow the cpu structures. */
-   zone->uz_domain = (struct uma_zone_domain *)>uz_cpu[mp_ncpus];
+   zone->uz_domain =
+   (struct uma_zone_domain *)>uz_cpu[mp_maxid + 1];
timevalclear(>uz_ratecheck);
keg = arg->keg;
 
___
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"