svn commit: r365603 - head/tests/sys/kern

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 17:58:24 2020
New Revision: 365603
URL: https://svnweb.freebsd.org/changeset/base/365603

Log:
  Fix the build after r365592
  
  r365592 accidentally mixed atf-c and atf-sh; convert atf_skip -> atf_tc_skip

Modified:
  head/tests/sys/kern/memfd_test.c

Modified: head/tests/sys/kern/memfd_test.c
==
--- head/tests/sys/kern/memfd_test.cThu Sep 10 17:53:00 2020
(r365602)
+++ head/tests/sys/kern/memfd_test.cThu Sep 10 17:58:24 2020
(r365603)
@@ -44,7 +44,7 @@ ATF_TC_BODY(basic, tc)
char buf[8];
 
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_skip "https://bugs.freebsd.org/249236;
+   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE((fd = memfd_create("...", 0)) != -1);
 
@@ -103,7 +103,7 @@ ATF_TC_BODY(write_seal, tc)
char *addr, buf[BUF_SIZE];
 
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_skip "https://bugs.freebsd.org/249236;
+   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
@@ -135,7 +135,7 @@ ATF_TC_BODY(mmap_write_seal, tc)
char *addr, *paddr, *raddr;
 
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_skip "https://bugs.freebsd.org/249236;
+   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
@@ -203,7 +203,7 @@ ATF_TC_BODY(truncate_seals, tc)
 {
 
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_skip "https://bugs.freebsd.org/249236;
+   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM);
ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM);
@@ -242,7 +242,7 @@ ATF_TC_BODY(dup_seals, tc)
int seals;
 
if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_skip "https://bugs.freebsd.org/249236;
+   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE((fdx = dup(fd)) != -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: r365582 - head/usr.bin/sort

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 15:37:19 2020
New Revision: 365582
URL: https://svnweb.freebsd.org/changeset/base/365582

Log:
  Fix -Wpointer-sign warnings in bwstring.c

Modified:
  head/usr.bin/sort/bwstring.c

Modified: head/usr.bin/sort/bwstring.c
==
--- head/usr.bin/sort/bwstring.cThu Sep 10 15:37:15 2020
(r365581)
+++ head/usr.bin/sort/bwstring.cThu Sep 10 15:37:19 2020
(r365582)
@@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$");
 bool byte_sort;
 
 static wchar_t **wmonths;
-static unsigned char **cmonths;
+static char **cmonths;
 
 /* initialise months */
 
@@ -56,17 +56,17 @@ initialise_months(void)
const nl_item item[12] = { ABMON_1, ABMON_2, ABMON_3, ABMON_4,
ABMON_5, ABMON_6, ABMON_7, ABMON_8, ABMON_9, ABMON_10,
ABMON_11, ABMON_12 };
-   unsigned char *tmp;
+   char *tmp;
size_t len;
 
if (MB_CUR_MAX == 1) {
if (cmonths == NULL) {
-   unsigned char *m;
+   char *m;
 
-   cmonths = sort_malloc(sizeof(unsigned char*) * 12);
+   cmonths = sort_malloc(sizeof(char*) * 12);
for (int i = 0; i < 12; i++) {
cmonths[i] = NULL;
-   tmp = (unsigned char *) nl_langinfo(item[i]);
+   tmp = nl_langinfo(item[i]);
if (debug_sort)
printf("month[%d]=%s\n", i, tmp);
if (*tmp == '\0')
@@ -86,14 +86,14 @@ initialise_months(void)
wmonths = sort_malloc(sizeof(wchar_t *) * 12);
for (int i = 0; i < 12; i++) {
wmonths[i] = NULL;
-   tmp = (unsigned char *) nl_langinfo(item[i]);
+   tmp = nl_langinfo(item[i]);
if (debug_sort)
printf("month[%d]=%s\n", i, tmp);
if (*tmp == '\0')
continue;
len = strlen(tmp);
m = sort_malloc(SIZEOF_WCHAR_STRING(len + 1));
-   if (mbstowcs(m, (char*)tmp, len) ==
+   if (mbstowcs(m, tmp, len) ==
((size_t) - 1)) {
sort_free(m);
continue;
___
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: r365584 - in head: . usr.bin/mandoc

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 15:37:29 2020
New Revision: 365584
URL: https://svnweb.freebsd.org/changeset/base/365584

Log:
  Ensure that the makewhatis symlink is added in the bootstrap-tools stage
  
  We currently set MK_MAN=no in $BSARGS so MK_MAN_UTILS will also be false
  which means that the makewhatis symlink will not be created.
  This change fixes the build when using both -DBUILD_WITH_STRICT_TMPPATH and
  -DBOOTSTRAP_ALL_TOOLS.
  
  Tested by:andrew
  Differential Revision: https://reviews.freebsd.org/D16761

Modified:
  head/Makefile.inc1
  head/usr.bin/mandoc/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Sep 10 15:37:24 2020(r365583)
+++ head/Makefile.inc1  Thu Sep 10 15:37:29 2020(r365584)
@@ -723,7 +723,7 @@ BSARGS= DESTDIR= \
BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \
BWPHASE=${.TARGET:C,^_,,} \
SSP_CFLAGS= \
-   MK_HTML=no NO_LINT=yes MK_MAN=no \
+   MK_HTML=no NO_LINT=yes MK_MAN=no MK_MAN_UTILS=yes \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
MK_CLANG_EXTRAS=no MK_CLANG_FORMAT=no MK_CLANG_FULL=no \

Modified: head/usr.bin/mandoc/Makefile
==
--- head/usr.bin/mandoc/MakefileThu Sep 10 15:37:24 2020
(r365583)
+++ head/usr.bin/mandoc/MakefileThu Sep 10 15:37:29 2020
(r365584)
@@ -14,6 +14,8 @@ MLINKS+=  apropos.1 whatis.1
 LINKS= ${BINDIR}/mandoc ${BINDIR}/whatis \
${BINDIR}/mandoc ${BINDIR}/makewhatis \
${BINDIR}/mandoc ${BINDIR}/apropos
+.elif defined(BOOTSTRAPPING)
+.error "MK_MAN_UTILS should be set to yes when bootstrapping"
 .endif
 
 LIBMAN_SRCS=   man.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: r365580 - in head: cddl/lib/drti cddl/lib/libctf cddl/lib/libdtrace cddl/usr.bin/ctfconvert cddl/usr.bin/ctfdump cddl/usr.bin/ctfmerge cddl/usr.sbin/dtrace cddl/usr.sbin/lockstat cddl/u...

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 15:37:07 2020
New Revision: 365580
URL: https://svnweb.freebsd.org/changeset/base/365580

Log:
  Remove -I flag for include path that doesn't exist
  
  Found this while trying to get macOS bootstrap to work again after OpenZFS 
merge.
  
  Reviewed By:  #zfs, freqlabs
  Differential Revision: https://reviews.freebsd.org/D26192

Modified:
  head/cddl/lib/drti/Makefile
  head/cddl/lib/libctf/Makefile
  head/cddl/lib/libdtrace/Makefile
  head/cddl/usr.bin/ctfconvert/Makefile
  head/cddl/usr.bin/ctfdump/Makefile
  head/cddl/usr.bin/ctfmerge/Makefile
  head/cddl/usr.sbin/dtrace/Makefile
  head/cddl/usr.sbin/lockstat/Makefile
  head/cddl/usr.sbin/plockstat/Makefile
  head/cddl/usr.sbin/zfsd/Makefile.common
  head/lib/libproc/Makefile

Modified: head/cddl/lib/drti/Makefile
==
--- head/cddl/lib/drti/Makefile Thu Sep 10 14:58:46 2020(r365579)
+++ head/cddl/lib/drti/Makefile Thu Sep 10 15:37:07 2020(r365580)
@@ -12,7 +12,6 @@ CLEANFILES=   ${FILES}
 # These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
 .undef LIBRARIES_ONLY
 CFLAGS+= -DIN_BASE
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd

Modified: head/cddl/lib/libctf/Makefile
==
--- head/cddl/lib/libctf/Makefile   Thu Sep 10 14:58:46 2020
(r365579)
+++ head/cddl/lib/libctf/Makefile   Thu Sep 10 15:37:07 2020
(r365580)
@@ -22,7 +22,6 @@ WARNS?=   2
 CFLAGS+=   -DCTF_OLD_VERSIONS
 
 CFLAGS+= -DIN_BASE
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd

Modified: head/cddl/lib/libdtrace/Makefile
==
--- head/cddl/lib/libdtrace/MakefileThu Sep 10 14:58:46 2020
(r365579)
+++ head/cddl/lib/libdtrace/MakefileThu Sep 10 15:37:07 2020
(r365580)
@@ -67,7 +67,6 @@ FILESMODE=${NOBINMODE}
 WARNS?=1
 
 CFLAGS+= -DIN_BASE
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd

Modified: head/cddl/usr.bin/ctfconvert/Makefile
==
--- head/cddl/usr.bin/ctfconvert/Makefile   Thu Sep 10 14:58:46 2020
(r365579)
+++ head/cddl/usr.bin/ctfconvert/Makefile   Thu Sep 10 15:37:07 2020
(r365580)
@@ -31,7 +31,6 @@ CFLAGS+= -DIN_BASE
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
 CFLAGS+=   -I${SRCTOP}/sys/cddl/compat/opensolaris \
-I${SRCTOP}/cddl/compat/opensolaris/include \

Modified: head/cddl/usr.bin/ctfdump/Makefile
==
--- head/cddl/usr.bin/ctfdump/Makefile  Thu Sep 10 14:58:46 2020
(r365579)
+++ head/cddl/usr.bin/ctfdump/Makefile  Thu Sep 10 15:37:07 2020
(r365580)
@@ -12,7 +12,6 @@ CFLAGS+= -DIN_BASE
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/sys
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
 CFLAGS+=   -I${OPENSOLARIS_USR_DISTDIR} \

Modified: head/cddl/usr.bin/ctfmerge/Makefile
==
--- head/cddl/usr.bin/ctfmerge/Makefile Thu Sep 10 14:58:46 2020
(r365579)
+++ head/cddl/usr.bin/ctfmerge/Makefile Thu Sep 10 15:37:07 2020
(r365580)
@@ -29,7 +29,6 @@ CFLAGS+= -DIN_BASE
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd/spl
 CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include
 CFLAGS+=   -I${SRCTOP}/sys/cddl/compat/opensolaris \

svn commit: r365581 - head/kerberos5/include

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 15:37:15 2020
New Revision: 365581
URL: https://svnweb.freebsd.org/changeset/base/365581

Log:
  Fix a noisy -Wundef warning when bootstrapping tools

Modified:
  head/kerberos5/include/config.h

Modified: head/kerberos5/include/config.h
==
--- head/kerberos5/include/config.h Thu Sep 10 15:37:07 2020
(r365580)
+++ head/kerberos5/include/config.h Thu Sep 10 15:37:15 2020
(r365581)
@@ -1579,7 +1579,7 @@ static /**/const char *const rcsid[] = { (const char *
 /* Define to `int' if  doesn't define. */
 /* #undef uid_t */
 
-#if _AIX
+#ifdef _AIX
 /* XXX this is gross, but kills about a gazillion warnings */
 struct ether_addr;
 struct sockaddr;
___
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: r365589 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 16:59:54 2020
New Revision: 365589
URL: https://svnweb.freebsd.org/changeset/base/365589

Log:
  MFC r357100:
  
  The server side of TCP fast open relies on the delayed ACK timer to allow
  including user data in the SYN-ACK. When DSACK support was added in
  r347382, an immediate ACK was sent even for the received SYN with
  user data. This patch fixes that and allows again to send user data with
  the SYN-ACK.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 16:47:12 2020
(r365588)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 16:59:54 2020
(r365589)
@@ -2299,7 +2299,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
/*
 * DSACK - add SACK block for dropped range
 */
-   if (tp->t_flags & TF_SACK_PERMIT) {
+   if ((todrop > 0) && (tp->t_flags & TF_SACK_PERMIT)) {
tcp_update_sack_list(tp, th->th_seq,
th->th_seq + todrop);
/*

Modified: stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c
==
--- stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 16:47:12 
2020(r365588)
+++ stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 16:59:54 
2020(r365589)
@@ -495,7 +495,7 @@ ctf_drop_checks(struct tcpopt *to, struct mbuf *m, str
/*
 * DSACK - add SACK block for dropped range
 */
-   if (tp->t_flags & TF_SACK_PERMIT) {
+   if ((todrop > 0) && (tp->t_flags & TF_SACK_PERMIT)) {
tcp_update_sack_list(tp, th->th_seq, th->th_seq + tlen);
/*
 * ACK now, as the next in-sequence segment
___
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: r365592 - head/tests/sys/kern

2020-09-10 Thread Li-Wen Hsu
On Fri, Sep 11, 2020 at 1:18 AM Kyle Evans  wrote:
>
> On Thu, Sep 10, 2020 at 12:16 PM Li-Wen Hsu  wrote:
> >
> > Author: lwhsu
> > Date: Thu Sep 10 17:15:44 2020
> > New Revision: 365592
> > URL: https://svnweb.freebsd.org/changeset/base/365592
> >
> > Log:
> >   Temporarily skip failing sys.kern.memfd_test.* tests in CI
> >
> >   PR:   249236
> >   Sponsored by: The FreeBSD Foundation
> >
>
> Oy, I was literally just about to hit commit on the fix for these.

Oops, Although I should have marked them earlier, just don't get
another report of the same issues.
___
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: r365602 - head/contrib/netbsd-tests/lib/librt

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 17:53:00 2020
New Revision: 365602
URL: https://svnweb.freebsd.org/changeset/base/365602

Log:
  librt: tests: fix minor issues with higher WARNS
  
  got_sigalrm is a global with external linkage and must therefore have a
  previous extern declaration. There's no reason to maintain the status quo
  there, so just make it static.
  
  The result var is unused.
  
  This part of the test has not been upstreamed, presumably because it exists
  solely for sem_clockwait_np. We should perhaps consider moving it into its
  own test file outside of ^/contrib/netbsd-tests, but this can happen later.
  
  MFC after:1 week

Modified:
  head/contrib/netbsd-tests/lib/librt/t_sem.c

Modified: head/contrib/netbsd-tests/lib/librt/t_sem.c
==
--- head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:49:21 2020
(r365601)
+++ head/contrib/netbsd-tests/lib/librt/t_sem.c Thu Sep 10 17:53:00 2020
(r365602)
@@ -190,7 +190,7 @@ timespec_add_ms(struct timespec *ts, int ms)
}
 }
 
-volatile sig_atomic_t got_sigalrm = 0;
+static volatile sig_atomic_t got_sigalrm = 0;
 
 static void
 sigalrm_handler(int sig __unused)
@@ -212,7 +212,6 @@ ATF_TC_BODY(timedwait, tc)
 {
struct timespec ts;
sem_t sem;
-   int result;
 
SEM_REQUIRE(sem_init(, 0, 0));
SEM_REQUIRE(sem_post());
___
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: r365583 - head/tools/build/mk

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 15:37:24 2020
New Revision: 365583
URL: https://svnweb.freebsd.org/changeset/base/365583

Log:
  Silence GCC's -Wno-unused-result during bootstrap
  
  Unlike clang, GCC still warns even with (void) casts 
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425)

Modified:
  head/tools/build/mk/Makefile.boot

Modified: head/tools/build/mk/Makefile.boot
==
--- head/tools/build/mk/Makefile.boot   Thu Sep 10 15:37:19 2020
(r365582)
+++ head/tools/build/mk/Makefile.boot   Thu Sep 10 15:37:24 2020
(r365583)
@@ -96,3 +96,6 @@ UPDATE_DEPENDFILE= no
 Error was caused by Makefile in ${.CURDIR}
 .endif
 .endif
+
+# GCC doesn't allow silencing warn_unused_result calls with (void) casts.
+CFLAGS.gcc+=-Wno-unused-result
___
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: r365596 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:31:34 2020
New Revision: 365596
URL: https://svnweb.freebsd.org/changeset/base/365596

Log:
  MFC r351782:
  Fix two TCP RACK issues:
  * Convert the TCP delayed ACK timer from ms to ticks as required.
This fixes the timer on platforms with hz != 1000.
  * Don't delay acknowledgements which report duplicate data using
DSACKs.

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

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:29:20 2020
(r365595)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:31:34 2020
(r365596)
@@ -1802,6 +1802,11 @@ rack_drop_checks(struct tcpopt *to, struct mbuf *m, st
 * will clear the DSACK block again
 */
tp->t_flags |= TF_ACKNOW;
+   /*
+* ACK now, as the next in-sequence segment
+* will clear the DSACK block again
+*/
+   tp->t_flags |= TF_ACKNOW;
}
*drop_hdrlen += todrop; /* drop from the top afterwards */
th->th_seq += todrop;
@@ -2350,7 +2355,7 @@ rack_start_hpts_timer(struct tcp_rack *rack, struct tc
}
hpts_timeout = rack_timer_start(tp, rack, cts);
if (tp->t_flags & TF_DELACK) {
-   delayed_ack = tcp_delacktime;
+   delayed_ack = TICKS_2_MSEC(tcp_delacktime);
rack->r_ctl.rc_hpts_flags |= PACE_TMR_DELACK;
}
if (delayed_ack && ((hpts_timeout == 0) ||
___
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: r365598 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:44:27 2020
New Revision: 365598
URL: https://svnweb.freebsd.org/changeset/base/365598

Log:
  MFC r353490 (from rrs):
  if_hw_tsomaxsegsize needs to be initialized to zero, just
  like in bbr.c and tcp_output.c

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

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:41:23 2020
(r365597)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:44:27 2020
(r365598)
@@ -6996,7 +6996,7 @@ rack_output(struct tcpcb *tp)
struct mbuf *m;
struct mbuf *mb;
uint32_t if_hw_tsomaxsegcount = 0;
-   uint32_t if_hw_tsomaxsegsize;
+   uint32_t if_hw_tsomaxsegsize = 0;
long tot_len_this_send = 0;
struct ip *ip = NULL;
 #ifdef TCPDEBUG
___
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: r365592 - head/tests/sys/kern

2020-09-10 Thread Li-Wen Hsu
Author: lwhsu
Date: Thu Sep 10 17:15:44 2020
New Revision: 365592
URL: https://svnweb.freebsd.org/changeset/base/365592

Log:
  Temporarily skip failing sys.kern.memfd_test.* tests in CI
  
  PR:   249236
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/kern/memfd_test.c

Modified: head/tests/sys/kern/memfd_test.c
==
--- head/tests/sys/kern/memfd_test.cThu Sep 10 17:12:42 2020
(r365591)
+++ head/tests/sys/kern/memfd_test.cThu Sep 10 17:15:44 2020
(r365592)
@@ -43,6 +43,9 @@ ATF_TC_BODY(basic, tc)
int fd;
char buf[8];
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_skip "https://bugs.freebsd.org/249236;
+
ATF_REQUIRE((fd = memfd_create("...", 0)) != -1);
 
/* write(2) should grow us out automatically. */
@@ -99,6 +102,9 @@ ATF_TC_BODY(write_seal, tc)
int fd;
char *addr, buf[BUF_SIZE];
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_skip "https://bugs.freebsd.org/249236;
+
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
 
@@ -128,6 +134,9 @@ ATF_TC_BODY(mmap_write_seal, tc)
int fd;
char *addr, *paddr, *raddr;
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_skip "https://bugs.freebsd.org/249236;
+
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
 
@@ -193,6 +202,9 @@ ATF_TC_WITHOUT_HEAD(truncate_seals);
 ATF_TC_BODY(truncate_seals, tc)
 {
 
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_skip "https://bugs.freebsd.org/249236;
+
ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM);
ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM);
ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW) == 0);
@@ -228,6 +240,9 @@ ATF_TC_BODY(dup_seals, tc)
char buf[8];
int fd, fdx;
int seals;
+
+   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
+   atf_skip "https://bugs.freebsd.org/249236;
 
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE((fdx = dup(fd)) != -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: r365595 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:29:20 2020
New Revision: 365595
URL: https://svnweb.freebsd.org/changeset/base/365595

Log:
  MFC r351328 (by rrs):
  Fix an issue when TSO and Rack play together. Basically
  an retransmission of the initial SYN (with data) would
  cause us to strip the SYN and decrement/increase offset/len
  which then caused us a -1 offset and a panic.

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

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:26:16 2020
(r365594)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:29:20 2020
(r365595)
@@ -7467,9 +7467,6 @@ again:
(tp->t_state == TCPS_SYN_RECEIVED))
flags &= ~TH_SYN;
 #endif
-   sb_offset--, len++;
-   if (sbavail(sb) == 0)
-   len = 0;
}
/*
 * Be careful not to send data and/or FIN on SYN segments. This
___
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: r365597 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:41:23 2020
New Revision: 365597
URL: https://svnweb.freebsd.org/changeset/base/365597

Log:
  MFC r352661 (from rrs):
  lets put (void) in a couple of functions to keep older platforms that
  are stuck with gcc happy (ppc). The changes are needed in both bbr and
  rack.

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

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:31:34 2020
(r365596)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:41:23 2020
(r365597)
@@ -479,7 +479,7 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS)
 
 
 static void
-rack_init_sysctls()
+rack_init_sysctls(void)
 {
SYSCTL_ADD_S32(_sysctl_ctx,
SYSCTL_CHILDREN(rack_sysctl_root),
@@ -1130,7 +1130,7 @@ rack_log_to_processing(struct tcp_rack *rack, uint32_t
 }
 
 static void
-rack_counter_destroy()
+rack_counter_destroy(void)
 {
counter_u64_free(rack_badfr);
counter_u64_free(rack_badfr_bytes);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365604 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 18:04:34 2020
New Revision: 365604
URL: https://svnweb.freebsd.org/changeset/base/365604

Log:
  MFC r350061:
  Fix compilation on platforms using gcc.
  When compiling RACK on platforms using gcc, a warning that tcp_outflags
  is defined but not used is issued and terminates compilation on PPC64,
  for example. So don't indicate that tcp_outflags is used.

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

Modified: stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c
==
--- stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 17:58:24 
2020(r365603)
+++ stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 18:04:34 
2020(r365604)
@@ -85,7 +85,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#defineTCPOUTFLAGS
 #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"


Re: uninitialized variables [Was: svn commit: r365445 - head/sys/cam/mmc]

2020-09-10 Thread Andriy Gapon
On 09/09/2020 16:44, Mark Johnston wrote:
> On Wed, Sep 09, 2020 at 08:49:01AM +0300, Andriy Gapon wrote:
>> On 08/09/2020 15:48, Mark Johnston wrote:
>>> I observed the same thing recently as well: the compiler catches
>>> uninitialized variables only in simple cases.  In my case, any uses of
>>> goto within the function seemed to silence the warning, even if they
>>> appeared after the uninitialized reference.
>>
>> I am running a kernel build now with this addition (for clang):
>> CWARNEXTRA+=   -Wconditional-uninitialized 
>> -Wno-error-conditional-uninitialized
>>
>> It produces a ton of warnings.
>> Some of them are probably false positives, but some look quite reasonable.
> 
> It has a lot of trouble with code patterns of the form:
> 
>   for (i = 0; i < 100; i++) {
>   val = foo();
>   }
>   if (val != 0) /* may be uninitialized!!1 */
>   bar();
> 
> or
> 
>   if (foo == bar)
>   val = baz();
>   
>   if (foo == bar && val == 3)
>   
> 
> The second example makes some sense to me since it's hard to prove that
> foo == bar will not change between the first and second evaluations.

I also noted the first pattern as the most common source of false positives.
So, it seems that we cannot have what we want.
Without -Wconditional-uninitialized clang is too conservative, with the option
it's too "loose".

I seem to recall that compilers used to be better than that.
But maybe it's just false memories ("there used to be more snow in the winter",
etc).

>> E.g.:
>> sys/cam/cam_periph.c:314:19: warning: variable 'p_drv' may be uninitialized 
>> when
>> used here [-Wconditional-uninitialized]
>> TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links);
>>
>> Indeed, there is a conditional 'goto failure' before a first assignment to 
>> p_drv
>> and the line is after the label.  So, maybe the situation is impossible, but 
>> it
>> is reasonable to warn about it.
>>
>> But the number of false positives (and "possible but impossible" situations) 
>> is
>> too overwhelming.
> 
> Yeah.  I looked at maybe 30 warnings (out of hundreds) this morning
> and they were all false positives.  KMSAN will provide a new tool for
> finding such bugs, but they will only be detected at runtime.
> 


-- 
Andriy Gapon
___
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: r365588 - head/lib/libcompiler_rt

2020-09-10 Thread Dimitry Andric
Author: dim
Date: Thu Sep 10 16:47:12 2020
New Revision: 365588
URL: https://svnweb.freebsd.org/changeset/base/365588

Log:
  Follow-up r364753 by only using arm's stdatomic.c implementation, as it
  already covers the functions in compiler-rt's atomic.c, leading to
  conflicts when linking.
  
  PR:   230888
  MFC after:3 days
  X-MFC-With:   r364753

Modified:
  head/lib/libcompiler_rt/Makefile.inc

Modified: head/lib/libcompiler_rt/Makefile.inc
==
--- head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:08 2020
(r365587)
+++ head/lib/libcompiler_rt/Makefile.incThu Sep 10 16:47:12 2020
(r365588)
@@ -124,7 +124,8 @@ SRCF+=  umodti3
 
 # Enable compiler-rt's atomic implementation only for clang, as it uses clang
 # specific builtins, and gcc packages usually come with their own libatomic.
-.if "${COMPILER_TYPE}" == "clang"
+# Exclude arm which has its own implementations of atomic functions, below.
+.if "${COMPILER_TYPE}" == "clang" && ${MACHINE_CPUARCH} != "arm"
 SRCF+= atomic
 .endif
 
___
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: r365587 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 16:47:08 2020
New Revision: 365587
URL: https://svnweb.freebsd.org/changeset/base/365587

Log:
  MFC r358023:
  
  Don't use uninitialised stack memory if the sysctl variable
  net.inet.tcp.hostcache.enable is set to 0.
  The bug resulted in using possibly a too small MSS value or wrong
  initial retransmission timer settings. Possibly the value used
  for ssthresh was also wrong.

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

Modified: stable/12/sys/netinet/tcp_hostcache.c
==
--- stable/12/sys/netinet/tcp_hostcache.c   Thu Sep 10 16:44:28 2020
(r365586)
+++ stable/12/sys/netinet/tcp_hostcache.c   Thu Sep 10 16:47:08 2020
(r365587)
@@ -437,8 +437,10 @@ tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_
 {
struct hc_metrics *hc_entry;
 
-   if (!V_tcp_use_hostcache)
+   if (!V_tcp_use_hostcache) {
+   bzero(hc_metrics_lite, sizeof(*hc_metrics_lite));
return;
+   }
 
/*
 * Find the right bucket.
___
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: r365600 - head/contrib/netbsd-tests/lib/libexecinfo

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 17:48:27 2020
New Revision: 365600
URL: https://svnweb.freebsd.org/changeset/base/365600

Log:
  MFV r365599: import fix for a libexecinfo warning at higher WARNS
  
  v1.17 of this file included a fix that I just submitted upstream to fix a
  warning about prevent_inline with external linkage not having been
  previously declared.
  
  MFC after:1 week

Modified:
  head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c
Directory Properties:
  head/contrib/netbsd-tests/   (props changed)

Modified: head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c
==
--- head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c Thu Sep 10 
17:46:40 2020(r365599)
+++ head/contrib/netbsd-tests/lib/libexecinfo/t_backtrace.c Thu Sep 10 
17:48:27 2020(r365600)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $  */
+/* $NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $
*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $");
 
 #include 
 #include 
@@ -47,7 +47,7 @@ void myfunc2(size_t ncalls);
 void myfunc1(size_t origcalls, volatile size_t ncalls);
 void myfunc(size_t ncalls);
 
-volatile int prevent_inline;
+static volatile int prevent_inline;
 
 void
 myfunc3(size_t ncalls)
___
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: r365606 - head/sys/dev/usb/net

2020-09-10 Thread Li-Wen Hsu
Author: lwhsu
Date: Thu Sep 10 18:27:52 2020
New Revision: 365606
URL: https://svnweb.freebsd.org/changeset/base/365606

Log:
  urndis(4): Add support of Inseego/Novatel Wireless MiFi 8800/8000
  
  PR:   245152
  Submitted by: rootl...@gmail.com
  Reviewed by:  hselasky
  MFC after:3 days

Modified:
  head/sys/dev/usb/net/if_urndis.c

Modified: head/sys/dev/usb/net/if_urndis.c
==
--- head/sys/dev/usb/net/if_urndis.cThu Sep 10 18:19:45 2020
(r365605)
+++ head/sys/dev/usb/net/if_urndis.cThu Sep 10 18:27:52 2020
(r365606)
@@ -179,6 +179,9 @@ static const STRUCT_USB_HOST_ID urndis_host_devs[] = {
/* Nokia 7 plus */
{USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(0x4),
USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)},
+   /* Novatel Wireless 8800/8000/etc */
+   {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(0xef),
+   USB_IFACE_PROTOCOL(UIPROTO_RNDIS)},
 };
 
 DRIVER_MODULE(urndis, uhub, urndis_driver, urndis_devclass, NULL, 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: r365608 - in stable/12: lib/lib80211 sbin/ifconfig share/man/man4 sys/contrib/dev/ath/ath_hal/ar9300 sys/dev/an sys/dev/ath sys/dev/ath/ath_dfs/null sys/dev/ath/ath_hal sys/dev/ath/ath_...

2020-09-10 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Sep 10 19:00:17 2020
New Revision: 365608
URL: https://svnweb.freebsd.org/changeset/base/365608

Log:
  MFC r344749-344750,344841-344843,345284,346405,346470,347140-347141,348331,
  349593,351868,353506-353507,353809,353853,353858,353860,356852,359063,
  359158,360819,360888,360950-360951,360953-360954,360998,361009,361025,
  361085,361087,361098,361106-361107,361115,361118,361319-361321,361486,
  361560,361566,361626,361636-361637,361687,361726,361737-361738,361768,
  361778,361811-361813,361819-361822,361825-361826,361834,361863-361864,
  361878,361885-361886,362016,362084-362085,362156-362157,362161-362162,
  362210-362213,362216,362256-362257,362671,362815-362816,363325,
  363327-363328,364011-364012,364299,364301,364303,364312,364315,
  364326-364327,364551,364553,364673,365097,365116,365125-365126,
  365130-365131,365198,365419
by adrian(78), bcran(1), bz(13), cem(1), gavin(1), glebius(6),
   landonf(1), mjg(7)
  
  Merge WiFi net80211, drivers, and management in order to support better 11n
  and upcoming 11ac.
  
  This includes an ath(4) update, some run(4) 11n support, 11n for otus(4),
  A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options, scanning fixes,
  enahnced PRIV checks for jails, restored parent device name printing,
  improvements for upcoming VHT support, lots of under-the-hood infrastructure
  improvements, new device ID, debug tools updates, some whistespace changes
  (to make future MFCs easier).
  
  This does not include (nost) epoch(9) related changes as too much other
  infrastructure was not merged for that.
  
  Bump __FreeBSD_veresion as this changes the priv(9) names (not know to be
  used externally), and net80211 structures.
  
  Tested on:some ath(4) AP, run(4) STA, and rtwn(4) STA
  Discussed with:   adrian (extremly briefly)
  Sponsored by: Rubicon Communications, LLC (d/b/a "Netgate") [partially]
  Relnotes: yes

Added:
  stable/12/tools/tools/ath/athani/
 - copied from r344842, head/tools/tools/ath/athani/
Modified:
  stable/12/lib/lib80211/lib80211_regdomain.c
  stable/12/lib/lib80211/lib80211_regdomain.h
  stable/12/lib/lib80211/regdomain.xml
  stable/12/sbin/ifconfig/ifieee80211.c
  stable/12/share/man/man4/ath.4
  stable/12/share/man/man4/net80211.4
  stable/12/share/man/man4/run.4
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_phy.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300eep.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_ap121.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_aphrodite.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_cus157.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_generic.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_hb112.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_hb116.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_osprey_k31.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_wasp_2.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_xb112.h
  stable/12/sys/contrib/dev/ath/ath_hal/ar9300/ar9300template_xb113.h
  stable/12/sys/dev/an/if_an.c
  stable/12/sys/dev/ath/ah_osdep.c
  stable/12/sys/dev/ath/ah_osdep_ar5210.c
  stable/12/sys/dev/ath/ah_osdep_ar5211.c
  stable/12/sys/dev/ath/ah_osdep_ar5212.c
  stable/12/sys/dev/ath/ah_osdep_ar5416.c
  stable/12/sys/dev/ath/ah_osdep_ar9300.c
  stable/12/sys/dev/ath/ath_dfs/null/dfs_null.c
  stable/12/sys/dev/ath/ath_hal/ah.c
  stable/12/sys/dev/ath/ath_hal/ah.h
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_9287.c
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_9287.h
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_v14.c
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_v3.c
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_v3.h
  stable/12/sys/dev/ath/ath_hal/ah_eeprom_v4k.c
  stable/12/sys/dev/ath/ath_hal/ah_internal.h
  stable/12/sys/dev/ath/ath_hal/ah_regdomain.c
  stable/12/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h
  stable/12/sys/dev/ath/ath_hal/ah_regdomain/ah_rd_freqbands.h
  stable/12/sys/dev/ath/ath_hal/ah_soc.h
  stable/12/sys/dev/ath/ath_hal/ar5210/ar5210.h
  stable/12/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c
  stable/12/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c
  stable/12/sys/dev/ath/ath_hal/ar5211/ar5211.h
  stable/12/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c
  stable/12/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c
  stable/12/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c
  

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

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:03:36 2020
New Revision: 365590
URL: https://svnweb.freebsd.org/changeset/base/365590

Log:
  MFC r357816 (from rrs)
  
  This small fix makes it so we properly follow
  the RFC and only enable ECN when both the
  CWR and ECT bits our set within the SYN packet.

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

Modified: stable/12/sys/netinet/tcp_syncache.c
==
--- stable/12/sys/netinet/tcp_syncache.cThu Sep 10 16:59:54 2020
(r365589)
+++ stable/12/sys/netinet/tcp_syncache.cThu Sep 10 17:03:36 2020
(r365590)
@@ -1607,7 +1607,8 @@ skip_alloc:
sc->sc_peer_mss = to->to_mss;   /* peer mss may be zero */
if (ltflags & TF_NOOPT)
sc->sc_flags |= SCF_NOOPT;
-   if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn)
+   if (((th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) &&
+   V_tcp_do_ecn)
sc->sc_flags |= SCF_ECN;
 
if (V_tcp_syncookies)
___
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: r365593 - head/lib/libc/sys

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 17:23:30 2020
New Revision: 365593
URL: https://svnweb.freebsd.org/changeset/base/365593

Log:
  Fix memfd_create tests after r365524
  
  r365524 did accidentally invert this check that sets SHM_LARGEPAGE, leading
  non-hugetlb memfd as unconfigured largepage shm and thus test failures when
  we try to ftruncate or write to them.
  
  PR:   249236
  Discussed with:   kib

Modified:
  head/lib/libc/sys/shm_open.c

Modified: head/lib/libc/sys/shm_open.c
==
--- head/lib/libc/sys/shm_open.cThu Sep 10 17:15:44 2020
(r365592)
+++ head/lib/libc/sys/shm_open.cThu Sep 10 17:23:30 2020
(r365593)
@@ -136,7 +136,7 @@ memfd_create(const char *name, unsigned int flags)
oflags |= O_CLOEXEC;
if ((flags & MFD_ALLOW_SEALING) != 0)
shmflags |= SHM_ALLOW_SEALING;
-   if ((flags & MFD_HUGETLB) == 0)
+   if ((flags & MFD_HUGETLB) != 0)
shmflags |= SHM_LARGEPAGE;
fd = __sys_shm_open2(SHM_ANON, oflags, 0, shmflags, memfd_name);
if (fd == -1 || (flags & MFD_HUGETLB) == 0)
___
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: r365601 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:49:21 2020
New Revision: 365601
URL: https://svnweb.freebsd.org/changeset/base/365601

Log:
  MFC r356417 (from rrs):
  This catches rack up in the recent changes to ECN and
  also commonizes the functions that both the freebsd and
  rack stack uses.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
  stable/12/sys/netinet/tcp_var.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 17:48:27 2020
(r365600)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 17:49:21 2020
(r365601)
@@ -493,7 +493,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
(tlen <= tp->t_maxseg) &&   \
(V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN)))
 
-static void inline
+void inline
 cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos)
 {
INP_WLOCK_ASSERT(tp->t_inpcb);

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:48:27 2020
(r365600)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:49:21 2020
(r365601)
@@ -6752,6 +6752,10 @@ rack_hpts_do_segment(struct mbuf *m, struct tcphdr *th
TCPSTAT_INC(tcps_ecn_ect1);
break;
}
+
+   /* Process a packet differently from RFC3168. */
+   cc_ecnpkt_handler(tp, th, iptos);
+
/* Congestion experienced. */
if (thflags & TH_ECE) {
rack_cong_signal(tp, th, CC_ECN);

Modified: stable/12/sys/netinet/tcp_var.h
==
--- stable/12/sys/netinet/tcp_var.h Thu Sep 10 17:48:27 2020
(r365600)
+++ stable/12/sys/netinet/tcp_var.h Thu Sep 10 17:49:21 2020
(r365601)
@@ -868,6 +868,7 @@ voidcc_ack_received(struct tcpcb *tp, struct tcphdr 
*
uint16_t nsegs, uint16_t type);
 void   cc_conn_init(struct tcpcb *tp);
 void   cc_post_recovery(struct tcpcb *tp, struct tcphdr *th);
+voidcc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos);
 void   cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type);
 #ifdef TCP_HHOOK
 void   hhook_run_tcp_est_in(struct tcpcb *tp,
___
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: r365607 - head/sys/powerpc/include

2020-09-10 Thread Brandon Bergren
Author: bdragon
Date: Thu Sep 10 18:41:15 2020
New Revision: 365607
URL: https://svnweb.freebsd.org/changeset/base/365607

Log:
  [PowerPC64LE] Add LOAD_LR_NIA and RETURN_TO_NATIVE_ENDIAN defines.
  
  * Add LOAD_LR_NIA define. This is preferred to "bl 1f; 1:" because it
  doesn't pollute the branch predictor.
  
  * Add magic sequence to return the CPU to the correct endianness after
  jumping to cross-endian code, similar to the sequence from Linux.
  
  Sponsored by: Tag1 Consulting, Inc.

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

Modified: head/sys/powerpc/include/asm.h
==
--- head/sys/powerpc/include/asm.h  Thu Sep 10 18:27:52 2020
(r365606)
+++ head/sys/powerpc/include/asm.h  Thu Sep 10 18:41:15 2020
(r365607)
@@ -194,6 +194,43 @@ name: \
 #defineASENTRY_NOPROF(y)   _ENTRY(ASMNAME(y))
 #defineENTRY_NOPROF(y) _ENTRY(CNAME(y))
 
+/* Load NIA without affecting branch prediction */
+#defineLOAD_LR_NIA bcl 20, 31, .+4
+
+/*
+ * Magic sequence to return to native endian.
+ * Overwrites r0 and r11.
+ *
+ * The encoding of the instruction "tdi 0, %r0, 0x48" in opposite endian
+ * happens to be "b . + 8". This is useful because we can write a sequence
+ * of instructions that can execute in either endian.
+ *
+ * Use a sequence of handcoded instructions that switches contexts to the
+ * instruction following the sequence, but with the correct PSL_LE bit.
+ *
+ * The same sequence works for both BE and LE because the xori will flip
+ * the bit to the other state, and the code only runs when running in the
+ * wrong endian.
+ *
+ * This sequence is NMI-reentrant.
+ */
+#defineRETURN_TO_NATIVE_ENDIAN 
  \
+   tdi 0, %r0, 0x48;   /* Endian swapped: b . + 8  */\
+   b   1f; /* Will fall through to here if correct */\
+   .long   0xa600607d; /* mfmsr %r11   */\
+   .long   0x0038; /* li %r0, 0*/\
+   .long   0x6401617d; /* mtmsrd %r0, 1 (L=1 EE,RI bits only)  */\
+   .long   0x01006b69; /* xori %r11, %r11, 0x1 (PSL_LE)*/\
+   .long   0xa602087c; /* mflr %r0 */\
+   .long   0x05009f42; /* LOAD_LR_NIA  */\
+   .long   0xa6037b7d; /* 0: mtsrr1 %r11   */\
+   .long   0xa602687d; /* mflr %r11*/\
+   .long   0x18006b39; /* addi %r11, %r11, (1f - 0b)   */\
+   .long   0xa6037a7d; /* mtsrr0 %r11  */\
+   .long   0xa603087c; /* mtlr %r0 */\
+   .long   0x244c; /* rfid */\
+1: /* RETURN_TO_NATIVE_ENDIAN */
+
 #defineASMSTR  .asciz
 
 #defineRCSID(x).text; .asciz x
___
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: r365585 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 15:58:37 2020
New Revision: 365585
URL: https://svnweb.freebsd.org/changeset/base/365585

Log:
  MFC r357115:
  
  Don't set the ECT codepoint on retransmitted packets during SACK loss
  recovery. This is required by RFC 3168.

Modified:
  stable/12/sys/netinet/tcp_output.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_output.c
==
--- stable/12/sys/netinet/tcp_output.c  Thu Sep 10 15:37:29 2020
(r365584)
+++ stable/12/sys/netinet/tcp_output.c  Thu Sep 10 15:58:37 2020
(r365585)
@@ -1133,6 +1133,7 @@ send:
 * Ignore pure ack packets, retransmissions and window probes.
 */
if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) &&
+   (sack_rxmit == 0) &&
!((tp->t_flags & TF_FORCEDATA) && len == 1 &&
SEQ_LT(tp->snd_una, tp->snd_max))) {
 #ifdef INET6

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 15:37:29 2020
(r365584)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 15:58:37 2020
(r365585)
@@ -8272,6 +8272,7 @@ send:
 * retransmissions and window probes.
 */
if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) &&
+   (sack_rxmit == 0) &&
!((tp->t_flags & TF_FORCEDATA) && len == 1)) {
 #ifdef INET6
if (isipv6)
___
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: r365586 - in stable/12/sys/netinet: . cc tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 16:44:28 2020
New Revision: 365586
URL: https://svnweb.freebsd.org/changeset/base/365586

Log:
  MFC r357116:
  
  Sending CWR after an RTO is according to RFC 3168 generally required
  and not only for the DCTCP congestion control.

Modified:
  stable/12/sys/netinet/cc/cc_dctcp.c
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/cc/cc_dctcp.c
==
--- stable/12/sys/netinet/cc/cc_dctcp.c Thu Sep 10 15:58:37 2020
(r365585)
+++ stable/12/sys/netinet/cc/cc_dctcp.c Thu Sep 10 16:44:28 2020
(r365586)
@@ -282,7 +282,6 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
dctcp_data->ece_curr = 1;
break;
case CC_RTO:
-   CCV(ccv, t_flags) |= TF_ECN_SND_CWR;
dctcp_update_alpha(ccv);
dctcp_data->save_sndnxt += CCV(ccv, t_maxseg);
dctcp_data->num_cong_events++;

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 15:58:37 2020
(r365585)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 16:44:28 2020
(r365586)
@@ -438,6 +438,8 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, ui
tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 /
maxseg) * maxseg;
tp->snd_cwnd = maxseg;
+   if (tp->t_flags & TF_ECN_PERMIT)
+   tp->t_flags |= TF_ECN_SND_CWR;
break;
case CC_RTO_ERR:
TCPSTAT_INC(tcps_sndrexmitbad);

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 15:58:37 2020
(r365585)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 16:44:28 2020
(r365586)
@@ -1444,6 +1444,8 @@ rack_cong_signal(struct tcpcb *tp, struct tcphdr *th, 
tp->snd_ssthresh = max(2, min(tp->snd_wnd, tp->snd_cwnd) / 2 /
tp->t_maxseg) * tp->t_maxseg;
tp->snd_cwnd = tp->t_maxseg;
+   if (tp->t_flags & TF_ECN_PERMIT)
+   tp->t_flags |= TF_ECN_SND_CWR;
break;
case CC_RTO_ERR:
TCPSTAT_INC(tcps_sndrexmitbad);
___
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: r365591 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:12:42 2020
New Revision: 365591
URL: https://svnweb.freebsd.org/changeset/base/365591

Log:
  MFC r364754:
  
  RFC 3465 defines a limit L used in TCP slow start for limiting the number
  of acked bytes as described in Section 2.2 of that document.
  This patch ensures that this limit is not also applied in congestion
  avoidance. Applying this limit also in congestion avoidance can result in
  using less bandwidth than allowed.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 17:03:36 2020
(r365590)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 17:12:42 2020
(r365591)
@@ -309,8 +309,7 @@ cc_ack_received(struct tcpcb *tp, struct tcphdr *th, u
 
if (type == CC_ACK) {
if (tp->snd_cwnd > tp->snd_ssthresh) {
-   tp->t_bytes_acked += min(tp->ccv->bytes_this_ack,
-nsegs * V_tcp_abc_l_var * tcp_maxseg(tp));
+   tp->t_bytes_acked += tp->ccv->bytes_this_ack;
if (tp->t_bytes_acked >= tp->snd_cwnd) {
tp->t_bytes_acked -= tp->snd_cwnd;
tp->ccv->flags |= CCF_ABC_SENTAWND;

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:03:36 2020
(r365590)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:12:42 2020
(r365591)
@@ -1322,8 +1322,7 @@ rack_ack_received(struct tcpcb *tp, struct tcp_rack *r
}
 #endif
if (tp->snd_cwnd > tp->snd_ssthresh) {
-   tp->t_bytes_acked += min(tp->ccv->bytes_this_ack,
-   nsegs * V_tcp_abc_l_var * tp->t_maxseg);
+   tp->t_bytes_acked += tp->ccv->bytes_this_ack;
if (tp->t_bytes_acked >= tp->snd_cwnd) {
tp->t_bytes_acked -= tp->snd_cwnd;
tp->ccv->flags |= CCF_ABC_SENTAWND;
___
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: r365594 - stable/12/sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 17:26:16 2020
New Revision: 365594
URL: https://svnweb.freebsd.org/changeset/base/365594

Log:
  MFC r350973 (from rrs):
  Place back in the dependency on HPTS via module depends versus
  a fatal error in compiling. This was taken out by mistake
  when I mis-merged from the 18q22p2 sources of rack in NF. Opps.

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

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:23:30 2020
(r365593)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 17:26:16 2020
(r365594)
@@ -127,10 +127,6 @@ uma_zone_t rack_pcb_zone;
 struct sysctl_ctx_list rack_sysctl_ctx;
 struct sysctl_oid *rack_sysctl_root;
 
-#ifndef TCPHPTS
-#error Kernel option TCPHPTS is required
-#endif
-
 #define CUM_ACKED 1
 #define SACKED 2
 
@@ -9296,3 +9292,4 @@ static moduledata_t tcp_rack = {
 
 MODULE_VERSION(MODNAME, 1);
 DECLARE_MODULE(MODNAME, tcp_rack, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY);
+MODULE_DEPEND(MODNAME, tcphpts, 1, 1, 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: r365605 - head/usr.sbin/crunch/crunchgen

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 18:19:45 2020
New Revision: 365605
URL: https://svnweb.freebsd.org/changeset/base/365605

Log:
  crunchgen(8): fix crunched application build with WARNS=6
  
  This was revealed by the rescue build with a patch I'm working on to default
  WARNS=6 everywhere. The issues resolved were:
  
  - Missing prototype for _crunched_${ident}_stub in the *_stub.c generated
bits
  - Missing prototype for crunched_main
  - Incomplete prototype for _crunched_${ident}_stub in the generated parts of
crunched_main
  - Literal strings in the stub table must drop const qualifier, unless we
const'ify name
  - f field in struct stub didn't have a proper prototype
  
  Most of these issues are minor formalities and easily addressed.
  
  I note that if my patch to eventually raise WARNS for the rescue build
  lands, we'll need to bump the __FreeBSD_version requirement for
  bootstrapping crunchgen and wipe out the rescue .OBJDIR if it's stale, which
  we should be able to detect pretty easily from a couple of the issues that
  have been fixed here.
  
  Reviewed by:  arichardson
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D26363

Modified:
  head/usr.sbin/crunch/crunchgen/crunched_main.c
  head/usr.sbin/crunch/crunchgen/crunchgen.c

Modified: head/usr.sbin/crunch/crunchgen/crunched_main.c
==
--- head/usr.sbin/crunch/crunchgen/crunched_main.c  Thu Sep 10 18:04:34 
2020(r365604)
+++ head/usr.sbin/crunch/crunchgen/crunched_main.c  Thu Sep 10 18:19:45 
2020(r365605)
@@ -76,15 +76,19 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+typedef int crunched_stub_t(int, char **, char **);
+
 struct stub {
-   char *name;
-   int (*f)();
+   const char *name;
+   crunched_stub_t *f;
 };
 
 extern const char *__progname;
 extern struct stub entry_points[];
 
 static void crunched_usage(void);
+
+crunched_stub_t crunched_main;
 
 static struct stub *
 find_entry_point(const char *basename)

Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
==
--- head/usr.sbin/crunch/crunchgen/crunchgen.c  Thu Sep 10 18:04:34 2020
(r365604)
+++ head/usr.sbin/crunch/crunchgen/crunchgen.c  Thu Sep 10 18:19:45 2020
(r365605)
@@ -934,7 +934,9 @@ gen_output_cfile(void)
fprintf(outcf, "%s\n", *cp);
 
for (p = progs; p != NULL; p = p->next)
-   fprintf(outcf, "extern int _crunched_%s_stub();\n", p->ident);
+   fprintf(outcf,
+   "extern crunched_stub_t _crunched_%s_stub;\n",
+   p->ident);
 
fprintf(outcf, "\nstruct stub entry_points[] = {\n");
for (p = progs; p != NULL; p = p->next) {
@@ -1122,9 +1124,10 @@ prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "%s_stub.c:\n", p->name);
fprintf(outmk, "\techo \""
"extern int main(int argc, char **argv, char **envp); "
+   "int _crunched_%s_stub(int argc, char **argv, char **envp);"
"int _crunched_%s_stub(int argc, char **argv, char **envp)"
"{return main(argc,argv,envp);}\" >%s_stub.c\n",
-   p->ident, p->name);
+   p->ident, p->ident, p->name);
fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)",
p->name, p->name, p->ident);
if (p->libs)
___
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: r365592 - head/tests/sys/kern

2020-09-10 Thread Kyle Evans
On Thu, Sep 10, 2020 at 12:16 PM Li-Wen Hsu  wrote:
>
> Author: lwhsu
> Date: Thu Sep 10 17:15:44 2020
> New Revision: 365592
> URL: https://svnweb.freebsd.org/changeset/base/365592
>
> Log:
>   Temporarily skip failing sys.kern.memfd_test.* tests in CI
>
>   PR:   249236
>   Sponsored by: The FreeBSD Foundation
>

Oy, I was literally just about to hit commit on the fix for these.
___
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: r365599 - vendor/NetBSD/tests/dist/lib/libexecinfo

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 17:46:40 2020
New Revision: 365599
URL: https://svnweb.freebsd.org/changeset/base/365599

Log:
  netbsd-tests: import fix for a libexecinfo warning at higher WARNS
  
  v1.17 of this file included a fix that I just submitted upstream to fix a
  warning about prevent_inline with external linkage not having been
  previously declared.

Modified:
  vendor/NetBSD/tests/dist/lib/libexecinfo/t_backtrace.c

Modified: vendor/NetBSD/tests/dist/lib/libexecinfo/t_backtrace.c
==
--- vendor/NetBSD/tests/dist/lib/libexecinfo/t_backtrace.c  Thu Sep 10 
17:44:27 2020(r365598)
+++ vendor/NetBSD/tests/dist/lib/libexecinfo/t_backtrace.c  Thu Sep 10 
17:46:40 2020(r365599)
@@ -1,4 +1,4 @@
-/* $NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $  */
+/* $NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $
*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__RCSID("$NetBSD: t_backtrace.c,v 1.16 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_backtrace.c,v 1.17 2020/09/09 20:04:10 christos Exp $");
 
 #include 
 #include 
@@ -47,7 +47,7 @@ void myfunc2(size_t ncalls);
 void myfunc1(size_t origcalls, volatile size_t ncalls);
 void myfunc(size_t ncalls);
 
-volatile int prevent_inline;
+static volatile int prevent_inline;
 
 void
 myfunc3(size_t ncalls)
___
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: r365609 - in head/tests/sys: netinet netinet6

2020-09-10 Thread Alexander V. Chernikov
Author: melifaro
Date: Thu Sep 10 19:25:51 2020
New Revision: 365609
URL: https://svnweb.freebsd.org/changeset/base/365609

Log:
  Add basic test for net.fibs dynamic growth.
  
  Reviewed by:  kp
  Differential Revision:https://reviews.freebsd.org/D26382

Added:
  head/tests/sys/netinet/fibs.sh   (contents, props changed)
  head/tests/sys/netinet6/fibs6.sh   (contents, props changed)
Modified:
  head/tests/sys/netinet/Makefile
  head/tests/sys/netinet6/Makefile

Modified: head/tests/sys/netinet/Makefile
==
--- head/tests/sys/netinet/Makefile Thu Sep 10 19:00:17 2020
(r365608)
+++ head/tests/sys/netinet/Makefile Thu Sep 10 19:25:51 2020
(r365609)
@@ -9,7 +9,7 @@ ATF_TESTS_C=ip_reass_test \
so_reuseport_lb_test \
socket_afinet
 
-ATF_TESTS_SH=  carp fibs_test redirect divert forward output lpm
+ATF_TESTS_SH=  carp fibs fibs_test redirect divert forward output lpm
 TEST_METADATA.output+= required_programs="python"
 
 PROGS= udp_dontroute tcp_user_cookie

Added: head/tests/sys/netinet/fibs.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/netinet/fibs.sh  Thu Sep 10 19:25:51 2020
(r365609)
@@ -0,0 +1,73 @@
+#!/usr/bin/env atf-sh
+#-
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2020 Alexander V. Chernikov
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+. $(atf_get_srcdir)/../common/vnet.subr
+
+atf_test_case "fibs_ifroutes1_success" "cleanup"
+fibs_ifroutes1_success_head()
+{
+
+   atf_set descr 'Test IPv4 routes gets populated in the correct fib'
+   atf_set require.user root
+}
+
+fibs_ifroutes1_success_body()
+{
+
+   vnet_init
+
+   net_dst="192.168.0."
+   jname="v6t-fibs_ifroutes1_success"
+
+   epair=$(vnet_mkepair)
+   vnet_mkjail ${jname}a ${epair}a
+
+   jexec ${jname}a sysctl net.fibs=2
+   
+   jexec ${jname}a ifconfig ${epair}a fib 1
+   jexec ${jname}a ifconfig ${epair}a inet ${net_dst}1/24
+   jexec ${jname}a ifconfig ${epair}a up
+
+   atf_check -s exit:0 -o ignore jexec ${jname}a setfib 1 route -4n get 
${net_dst}0/24
+   atf_check -o match:"interface: lo0" jexec ${jname}a setfib 1 route -4n 
get ${net_dst}1
+   atf_check -o match:"destination: ${net_dst}1" jexec ${jname}a setfib 1 
route -4n get ${net_dst}1
+}
+
+fibs_ifroutes1_success_cleanup()
+{
+   vnet_cleanup
+}
+
+atf_init_test_cases()
+{
+   atf_add_test_case "fibs_ifroutes1_success"
+}
+
+

Modified: head/tests/sys/netinet6/Makefile
==
--- head/tests/sys/netinet6/MakefileThu Sep 10 19:00:17 2020
(r365608)
+++ head/tests/sys/netinet6/MakefileThu Sep 10 19:25:51 2020
(r365609)
@@ -13,7 +13,8 @@ ATF_TESTS_SH= \
divert \
forward6 \
output6 \
-   lpm6
+   lpm6 \
+   fibs6
 TEST_METADATA.output6+=required_programs="python"
 
 ${PACKAGE}FILES+=  exthdr.py

Added: head/tests/sys/netinet6/fibs6.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/netinet6/fibs6.shThu Sep 10 19:25:51 2020
(r365609)
@@ -0,0 +1,92 @@
+#!/usr/bin/env atf-sh
+#-
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Copyright (c) 2020 Alexander 

svn commit: r365612 - in stable/12: . sys/amd64/conf sys/conf sys/contrib/dev/ice sys/dev/ice sys/modules sys/modules/ice sys/modules/ice_ddp tools/kerneldoc/subsys

2020-09-10 Thread Eric Joyner
Author: erj
Date: Thu Sep 10 20:46:16 2020
New Revision: 365612
URL: https://svnweb.freebsd.org/changeset/base/365612

Log:
  MFC r361541, r362038, r364240
  
  These MFCs add the ice(4) driver to the kernel for Intel 800 Series
  Ethernet adapters, a couple fixes for the ice_ddp module makefile, and
  remove some redeclarations, respectively.
  
  Relnotes: yes
  Sponsored by: Intel Corporation

Added:
  stable/12/sys/contrib/dev/ice/
 - copied from r361541, head/sys/contrib/dev/ice/
  stable/12/sys/dev/ice/
 - copied from r361541, head/sys/dev/ice/
  stable/12/sys/modules/ice/
 - copied from r361541, head/sys/modules/ice/
  stable/12/sys/modules/ice_ddp/
 - copied from r361541, head/sys/modules/ice_ddp/
  stable/12/tools/kerneldoc/subsys/Doxyfile-dev_ice
 - copied unchanged from r361541, 
head/tools/kerneldoc/subsys/Doxyfile-dev_ice
Modified:
  stable/12/MAINTAINERS
  stable/12/sys/amd64/conf/GENERIC
  stable/12/sys/amd64/conf/NOTES
  stable/12/sys/conf/files.amd64
  stable/12/sys/conf/files.arm64
  stable/12/sys/dev/ice/ice_common.h
  stable/12/sys/modules/Makefile
  stable/12/sys/modules/ice_ddp/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/MAINTAINERS
==
--- stable/12/MAINTAINERS   Thu Sep 10 20:34:44 2020(r365611)
+++ stable/12/MAINTAINERS   Thu Sep 10 20:46:16 2020(r365612)
@@ -89,9 +89,11 @@ share/mk/*.test.mk   freebsd-testing,ngie (same list as 
 stand/forthdteske  Pre-commit review requested.
 stand/lua  kevans  Pre-commit review requested
 sys/compat/linuxkpihselaskyIf in doubt, ask.
+sys/contrib/dev/iceerj Pre-commit phabricator review requested.
 sys/dev/e1000  erj Pre-commit phabricator review requested.
 sys/dev/ixgbe  erj Pre-commit phabricator review requested.
 sys/dev/ixlerj Pre-commit phabricator review requested.
+sys/dev/iceerj Pre-commit phabricator review requested.
 sys/dev/sound/usb  hselaskyIf in doubt, ask.
 sys/dev/usbhselaskyIf in doubt, ask.
 sys/dev/xenroyger  Pre-commit review recommended.

Modified: stable/12/sys/amd64/conf/GENERIC
==
--- stable/12/sys/amd64/conf/GENERICThu Sep 10 20:34:44 2020
(r365611)
+++ stable/12/sys/amd64/conf/GENERICThu Sep 10 20:46:16 2020
(r365612)
@@ -225,6 +225,7 @@ device  ix  # Intel 
PRO/10GbE PCIE PF Ethernet
 device ixv # Intel PRO/10GbE PCIE VF Ethernet
 device ixl # Intel 700 Series Physical Function
 device iavf# Intel Adaptive Virtual Function
+device ice # Intel 800 Series Physical Function
 device vmx # VMware VMXNET3 Ethernet
 
 # PCI Ethernet NICs.

Modified: stable/12/sys/amd64/conf/NOTES
==
--- stable/12/sys/amd64/conf/NOTES  Thu Sep 10 20:34:44 2020
(r365611)
+++ stable/12/sys/amd64/conf/NOTES  Thu Sep 10 20:46:16 2020
(r365612)
@@ -306,6 +306,8 @@ options DRM_DEBUG   # Include debug printfs (slow)
 # ed:   Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503
 #   HP PC Lan+, various PC Card devices
 #   (requires miibus)
+# ice: Intel 800 Series Physical Function
+#  Requires the ice_ddp module for full functionality
 # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter
 #  Requires the ipw firmware module
 # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters
@@ -332,6 +334,8 @@ device  iwi # Intel 
2200BG/2225BG/2915ABG wireless NI
 device iwn # Intel 4965/1000/5000/6000 wireless NICs.
 device ixl # Intel 700 Series Physical Function
 device iavf# Intel Adaptive Virtual Function
+device ice # Intel 800 Series Physical Function
+device ice_ddp # Intel 800 Series DDP Package
 device mthca   # Mellanox HCA InfiniBand
 device mlx4# Shared code module between IB and Ethernet
 device mlx4ib  # Mellanox ConnectX HCA InfiniBand

Modified: stable/12/sys/conf/files.amd64
==
--- stable/12/sys/conf/files.amd64  Thu Sep 10 20:34:44 2020
(r365611)
+++ stable/12/sys/conf/files.amd64  Thu Sep 10 20:46:16 2020
(r365612)
@@ -255,6 +255,52 @@ dev/imcsmb/imcsmb.coptionalimcsmb
 dev/imcsmb/imcsmb_pci.coptionalimcsmb pci
 dev/intel/spi.coptionalintelspi
 dev/io/iodev.c optionalio
+dev/ice/if_ice_iflib.c 

svn commit: r365622 - vendor/lib9p/9d5aee77bcc1bf0e79b0a3bfefff5fdf2146283c

2020-09-10 Thread Jakub Wojciech Klama
Author: jceel
Date: Fri Sep 11 00:12:05 2020
New Revision: 365622
URL: https://svnweb.freebsd.org/changeset/base/365622

Log:
  Tag import of lib9p 9d5aee77bcc1bf0e79b0a3bfefff5fdf2146283c.
  
  Approved by:  trasz (mentor)
  MFC after:1 month
  Sponsored by: Conclusive Engineering

Added:
  vendor/lib9p/9d5aee77bcc1bf0e79b0a3bfefff5fdf2146283c/
 - copied from r365621, vendor/lib9p/dist/
___
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: r365614 - in stable/12: sys/dev/virtio/block usr.sbin/bhyve

2020-09-10 Thread Allan Jude
Author: allanjude
Date: Thu Sep 10 21:01:22 2020
New Revision: 365614
URL: https://svnweb.freebsd.org/changeset/base/365614

Log:
  MFC r360229, r363255
  
  r360229:
  Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend
  
  This will advertise support for TRIM to the guest virtio-blk driver and
  perform the DIOCGDELETE ioctl on the backing storage if it supports it.
  
  Thanks to Jason King and others at Joyent and illumos for expanding on
  my original patch, adding improvements including better error handling
  and making sure to following the virtio spec.
  
  r363255:
  Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver
  
  If the hypervisor advertises support for the DISCARD command then the
  guest can perform TRIM commands, freeing space on the backing store.
  
  If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE
  
  Tested with FreeBSD guests on bhyve and KVM
  
  Relnotes: yes
  Sponsored by: Klara Inc.

Modified:
  stable/12/sys/dev/virtio/block/virtio_blk.c
  stable/12/sys/dev/virtio/block/virtio_blk.h
  stable/12/usr.sbin/bhyve/block_if.c
  stable/12/usr.sbin/bhyve/pci_virtio_block.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/virtio/block/virtio_blk.c
==
--- stable/12/sys/dev/virtio/block/virtio_blk.c Thu Sep 10 20:54:44 2020
(r365613)
+++ stable/12/sys/dev/virtio/block/virtio_blk.c Thu Sep 10 21:01:22 2020
(r365614)
@@ -81,6 +81,7 @@ struct vtblk_softc {
 #define VTBLK_FLAG_SUSPEND 0x0008
 #define VTBLK_FLAG_BARRIER 0x0010
 #define VTBLK_FLAG_WC_CONFIG   0x0020
+#define VTBLK_FLAG_DISCARD 0x0040
 
struct virtqueue*vtblk_vq;
struct sglist   *vtblk_sglist;
@@ -112,6 +113,7 @@ static struct virtio_feature_desc vtblk_feature_desc[]
{ VIRTIO_BLK_F_WCE, "WriteCache"},
{ VIRTIO_BLK_F_TOPOLOGY,"Topology"  },
{ VIRTIO_BLK_F_CONFIG_WCE,  "ConfigWCE" },
+   { VIRTIO_BLK_F_DISCARD, "Discard"   },
 
{ 0, NULL }
 };
@@ -210,6 +212,7 @@ TUNABLE_INT("hw.vtblk.writecache_mode", _writeca
  VIRTIO_BLK_F_WCE  | \
  VIRTIO_BLK_F_TOPOLOGY | \
  VIRTIO_BLK_F_CONFIG_WCE   | \
+ VIRTIO_BLK_F_DISCARD  | \
  VIRTIO_RING_F_INDIRECT_DESC)
 
 #define VTBLK_MTX(_sc) &(_sc)->vtblk_mtx
@@ -461,7 +464,7 @@ vtblk_config_change(device_t dev)
vtblk_read_config(sc, );
 
/* Capacity is always in 512-byte units. */
-   capacity = blkcfg.capacity * 512;
+   capacity = blkcfg.capacity * VTBLK_BSIZE;
 
if (sc->vtblk_disk->d_mediasize != capacity)
vtblk_resize_disk(sc, capacity);
@@ -546,11 +549,18 @@ vtblk_strategy(struct bio *bp)
 * be a better way to report our readonly'ness to GEOM above.
 */
if (sc->vtblk_flags & VTBLK_FLAG_READONLY &&
-   (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) {
+   (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH ||
+   bp->bio_cmd == BIO_DELETE)) {
vtblk_bio_done(sc, bp, EROFS);
return;
}
 
+   if ((bp->bio_cmd != BIO_READ) && (bp->bio_cmd != BIO_WRITE) &&
+   (bp->bio_cmd != BIO_FLUSH) && (bp->bio_cmd != BIO_DELETE)) {
+   vtblk_bio_done(sc, bp, EOPNOTSUPP);
+   return;
+   }
+
VTBLK_LOCK(sc);
 
if (sc->vtblk_flags & VTBLK_FLAG_DETACH) {
@@ -559,6 +569,13 @@ vtblk_strategy(struct bio *bp)
return;
}
 
+   if ((bp->bio_cmd == BIO_DELETE) &&
+   !(sc->vtblk_flags & VTBLK_FLAG_DISCARD)) {
+   VTBLK_UNLOCK(sc);
+   vtblk_bio_done(sc, bp, EOPNOTSUPP);
+   return;
+   }
+
bioq_insert_tail(>vtblk_bioq, bp);
vtblk_startio(sc);
 
@@ -594,6 +611,8 @@ vtblk_setup_features(struct vtblk_softc *sc)
sc->vtblk_flags |= VTBLK_FLAG_BARRIER;
if (virtio_with_feature(dev, VIRTIO_BLK_F_CONFIG_WCE))
sc->vtblk_flags |= VTBLK_FLAG_WC_CONFIG;
+   if (virtio_with_feature(dev, VIRTIO_BLK_F_DISCARD))
+   sc->vtblk_flags |= VTBLK_FLAG_DISCARD;
 }
 
 static int
@@ -683,12 +702,12 @@ vtblk_alloc_disk(struct vtblk_softc *sc, struct virtio
dp->d_dump = vtblk_dump;
 
/* Capacity is always in 512-byte units. */
-   dp->d_mediasize = blkcfg->capacity * 512;
+   dp->d_mediasize = blkcfg->capacity * VTBLK_BSIZE;
 
if (virtio_with_feature(dev, VIRTIO_BLK_F_BLK_SIZE))
dp->d_sectorsize = blkcfg->blk_size;
else
-   dp->d_sectorsize = 512;
+   dp->d_sectorsize = VTBLK_BSIZE;
 
/*
 * The VirtIO maximum I/O size is given in terms of segments.
@@ -722,6 +741,11 @@ vtblk_alloc_disk(struct vtblk_softc *sc, struct virtio
   

svn commit: r365619 - in stable/12/sys: conf sys

2020-09-10 Thread Glen Barber
Author: gjb
Date: Fri Sep 11 00:04:23 2020
New Revision: 365619
URL: https://svnweb.freebsd.org/changeset/base/365619

Log:
  Rename stable/12 to -STABLE, and bump __FreeBSD_version after
  releng/12.2 had been created.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Modified:
  stable/12/sys/conf/newvers.sh
  stable/12/sys/sys/param.h

Modified: stable/12/sys/conf/newvers.sh
==
--- stable/12/sys/conf/newvers.sh   Thu Sep 10 23:56:59 2020
(r365618)
+++ stable/12/sys/conf/newvers.sh   Fri Sep 11 00:04:23 2020
(r365619)
@@ -49,7 +49,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.2"
-BRANCH=${BRANCH_OVERRIDE:-PRERELEASE}
+BRANCH=${BRANCH_OVERRIDE:-STABLE}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 

Modified: stable/12/sys/sys/param.h
==
--- stable/12/sys/sys/param.h   Thu Sep 10 23:56:59 2020(r365618)
+++ stable/12/sys/sys/param.h   Fri Sep 11 00:04:23 2020(r365619)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1201526  /* Master, propagated to newvers */
+#define __FreeBSD_version 1202500  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
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: r365611 - stable/12/sys/riscv/riscv

2020-09-10 Thread John Baldwin
Author: jhb
Date: Thu Sep 10 20:34:44 2020
New Revision: 365611
URL: https://svnweb.freebsd.org/changeset/base/365611

Log:
  MFC 363459:
  Pass the right size to memcpy() when copying the array of FP registers.
  
  The size of the containing structure was passed instead of the size of
  the array.  This happened to be harmless as the extra word copied is
  one we copy in the next line anyway.

Modified:
  stable/12/sys/riscv/riscv/machdep.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/riscv/riscv/machdep.c
==
--- stable/12/sys/riscv/riscv/machdep.c Thu Sep 10 20:28:43 2020
(r365610)
+++ stable/12/sys/riscv/riscv/machdep.c Thu Sep 10 20:34:44 2020
(r365611)
@@ -414,7 +414,7 @@ get_fpcontext(struct thread *td, mcontext_t *mcp)
KASSERT((curpcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0,
("Non-userspace FPE flags set in get_fpcontext"));
memcpy(mcp->mc_fpregs.fp_x, curpcb->pcb_x,
-   sizeof(mcp->mc_fpregs));
+   sizeof(mcp->mc_fpregs.fp_x));
mcp->mc_fpregs.fp_fcsr = curpcb->pcb_fcsr;
mcp->mc_fpregs.fp_flags = curpcb->pcb_fpflags;
mcp->mc_flags |= _MC_FP_VALID;
@@ -441,7 +441,7 @@ set_fpcontext(struct thread *td, mcontext_t *mcp)
curpcb = curthread->td_pcb;
/* FPE usage is enabled, override registers. */
memcpy(curpcb->pcb_x, mcp->mc_fpregs.fp_x,
-   sizeof(mcp->mc_fpregs));
+   sizeof(mcp->mc_fpregs.fp_x));
curpcb->pcb_fcsr = mcp->mc_fpregs.fp_fcsr;
curpcb->pcb_fpflags = mcp->mc_fpregs.fp_flags & PCB_FP_USERMASK;
td->td_frame->tf_sstatus |= SSTATUS_FS_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: r365617 - head/sys/dev/ice

2020-09-10 Thread Eric Joyner
Author: erj
Date: Thu Sep 10 23:46:13 2020
New Revision: 365617
URL: https://svnweb.freebsd.org/changeset/base/365617

Log:
  ice(4): Update to 0.26.16
  
  Summary of changes:
  
  - Assorted bug fixes
  - Support for newer versions of the device firmware
  - Suspend/resume support
  - Support for Lenient Link Mode for E82X devices (e.g. can try to link with
SFP/QSFP modules with bad EEPROMs)
  - Adds port-level rx_discards sysctl, similar to ixl(4)'s
  
  This version of the driver is intended to be used with DDP package 1.3.16.0,
  which has already been updated in a previous commit.
  
  Tested by:Jeffrey Pieper 
  MFC after:3 days
  MFC with: r365332, r365550
  Sponsored by: Intel Corporation
  Differential Revision:https://reviews.freebsd.org/D26322

Modified:
  head/sys/dev/ice/ice_adminq_cmd.h
  head/sys/dev/ice/ice_bitops.h
  head/sys/dev/ice/ice_common.c
  head/sys/dev/ice/ice_common.h
  head/sys/dev/ice/ice_controlq.c
  head/sys/dev/ice/ice_controlq.h
  head/sys/dev/ice/ice_dcb.c
  head/sys/dev/ice/ice_dcb.h
  head/sys/dev/ice/ice_drv_info.h
  head/sys/dev/ice/ice_flex_pipe.c
  head/sys/dev/ice/ice_flex_pipe.h
  head/sys/dev/ice/ice_flex_type.h
  head/sys/dev/ice/ice_flow.c
  head/sys/dev/ice/ice_flow.h
  head/sys/dev/ice/ice_hw_autogen.h
  head/sys/dev/ice/ice_lan_tx_rx.h
  head/sys/dev/ice/ice_lib.c
  head/sys/dev/ice/ice_lib.h
  head/sys/dev/ice/ice_nvm.c
  head/sys/dev/ice/ice_nvm.h
  head/sys/dev/ice/ice_protocol_type.h
  head/sys/dev/ice/ice_sched.c
  head/sys/dev/ice/ice_sched.h
  head/sys/dev/ice/ice_status.h
  head/sys/dev/ice/ice_strings.c
  head/sys/dev/ice/ice_switch.c
  head/sys/dev/ice/ice_switch.h
  head/sys/dev/ice/ice_type.h
  head/sys/dev/ice/if_ice_iflib.c
  head/sys/dev/ice/virtchnl.h
  head/sys/dev/ice/virtchnl_inline_ipsec.h

Modified: head/sys/dev/ice/ice_adminq_cmd.h
==
--- head/sys/dev/ice/ice_adminq_cmd.h   Thu Sep 10 22:22:23 2020
(r365616)
+++ head/sys/dev/ice/ice_adminq_cmd.h   Thu Sep 10 23:46:13 2020
(r365617)
@@ -156,12 +156,13 @@ struct ice_aqc_list_caps_elem {
 #define ICE_AQC_CAPS_MSIX  0x0043
 #define ICE_AQC_CAPS_MAX_MTU   0x0047
 #define ICE_AQC_CAPS_NVM_VER   0x0048
+#define ICE_AQC_CAPS_OROM_VER  0x004A
+#define ICE_AQC_CAPS_NET_VER   0x004C
 #define ICE_AQC_CAPS_CEM   0x00F2
 #define ICE_AQC_CAPS_IWARP 0x0051
 #define ICE_AQC_CAPS_LED   0x0061
 #define ICE_AQC_CAPS_SDP   0x0062
 #define ICE_AQC_CAPS_WR_CSR_PROT   0x0064
-#define ICE_AQC_CAPS_NO_DROP_POLICY0x0065
 #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP0x0073
 #define ICE_AQC_CAPS_SKU   0x0074
 #define ICE_AQC_CAPS_PORT_MAP  0x0075
@@ -281,13 +282,6 @@ struct ice_aqc_get_sw_cfg_resp_elem {
 #define ICE_AQC_GET_SW_CONF_RESP_IS_VF BIT(15)
 };
 
-/* The response buffer is as follows. Note that the length of the
- * elements array varies with the length of the command response.
- */
-struct ice_aqc_get_sw_cfg_resp {
-   struct ice_aqc_get_sw_cfg_resp_elem elements[1];
-};
-
 /* Set Port parameters, (direct, 0x0203) */
 struct ice_aqc_set_port_params {
__le16 cmd_flags;
@@ -338,8 +332,6 @@ struct ice_aqc_set_port_params {
 #define ICE_AQC_RES_TYPE_SWITCH_PROF_BLDR_TCAM 0x49
 #define ICE_AQC_RES_TYPE_ACL_PROF_BLDR_PROFID  0x50
 #define ICE_AQC_RES_TYPE_ACL_PROF_BLDR_TCAM0x51
-#define ICE_AQC_RES_TYPE_FD_PROF_BLDR_PROFID   0x58
-#define ICE_AQC_RES_TYPE_FD_PROF_BLDR_TCAM 0x59
 #define ICE_AQC_RES_TYPE_HASH_PROF_BLDR_PROFID 0x60
 #define ICE_AQC_RES_TYPE_HASH_PROF_BLDR_TCAM   0x61
 /* Resource types 0x62-67 are reserved for Hash profile builder */
@@ -372,15 +364,6 @@ struct ice_aqc_get_res_resp_elem {
__le16 total_free; /* Resources un-allocated/not reserved by any PF */
 };
 
-/* Buffer for Get Resource command */
-struct ice_aqc_get_res_resp {
-   /* Number of resource entries to be calculated using
-* datalen/sizeof(struct ice_aqc_cmd_resp)).
-* Value of 'datalen' gets updated as part of response.
-*/
-   struct ice_aqc_get_res_resp_elem elem[1];
-};
-
 /* Allocate Resources command (indirect 0x0208)
  * Free Resources command (indirect 0x0209)
  */
@@ -406,7 +389,7 @@ struct ice_aqc_alloc_free_res_elem {
 #define ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_M  \
(0xF << ICE_AQC_RES_TYPE_VSI_PRUNE_LIST_S)
__le16 num_elems;
-   struct ice_aqc_res_elem elem[1];
+   struct ice_aqc_res_elem elem[STRUCT_HACK_VAR_LEN];
 };
 
 /* Get Allocated Resource Descriptors Command (indirect 0x020A) */
@@ -428,10 

svn commit: r365610 - svnadmin/conf

2020-09-10 Thread Glen Barber
Author: gjb
Date: Thu Sep 10 20:28:43 2020
New Revision: 365610
URL: https://svnweb.freebsd.org/changeset/base/365610

Log:
  Require explicit re@ approval for the releng/12.2 branch.
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Modified:
  svnadmin/conf/approvers

Modified: svnadmin/conf/approvers
==
--- svnadmin/conf/approvers Thu Sep 10 19:25:51 2020(r365609)
+++ svnadmin/conf/approvers Thu Sep 10 20:28:43 2020(r365610)
@@ -20,6 +20,7 @@
 #^stable/12/   re
 #^stable/11/   re
 ^release/  re
+^releng/12.2/  re
 ^releng/12.[0-1]/  (security-officer|so)
 ^releng/11.[0-4]/  (security-officer|so)
 ^releng/10.[0-4]/  (security-officer|so)
___
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: r365613 - head/sys/kern

2020-09-10 Thread Konstantin Belousov
Author: kib
Date: Thu Sep 10 20:54:44 2020
New Revision: 365613
URL: https://svnweb.freebsd.org/changeset/base/365613

Log:
  Fix interaction between largepages and seals/writes.
  
  On write with SHM_GROW_ON_WRITE, use proper truncate.
  Do not allow to grow largepage shm if F_SEAL_GROW is set. Note that
  shrinks are not supported at all due to unmanaged mappings.
  Call to vm_pager_update_writecount() is only valid for swap objects,
  skip it for unmanaged largepages.
  Largepages cannot support write sealing.
  Do not writecnt largepage mappings.
  
  Reported by:  kevans
  Reviewed by:  kevans, markj
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D26394

Modified:
  head/sys/kern/uipc_shm.c

Modified: head/sys/kern/uipc_shm.c
==
--- head/sys/kern/uipc_shm.cThu Sep 10 20:46:16 2020(r365612)
+++ head/sys/kern/uipc_shm.cThu Sep 10 20:54:44 2020(r365613)
@@ -450,9 +450,7 @@ shm_write(struct file *fp, struct uio *uio, struct ucr
error = 0;
if ((shmfd->shm_flags & SHM_GROW_ON_WRITE) != 0 &&
size > shmfd->shm_size) {
-   VM_OBJECT_WLOCK(shmfd->shm_object);
-   error = shm_dotruncate_locked(shmfd, size, rl_cookie);
-   VM_OBJECT_WUNLOCK(shmfd->shm_object);
+   error = shm_dotruncate_cookie(shmfd, size, rl_cookie);
}
if (error == 0)
error = uiomove_object(shmfd->shm_object,
@@ -767,6 +765,9 @@ shm_dotruncate_largepage(struct shmfd *shmfd, off_t le
 #endif
}
 
+   if ((shmfd->shm_seals & F_SEAL_GROW) != 0)
+   return (EPERM);
+
aflags = VM_ALLOC_NORMAL | VM_ALLOC_ZERO;
if (shmfd->shm_lp_alloc_policy == SHM_LARGEPAGE_ALLOC_NOWAIT)
aflags |= VM_ALLOC_WAITFAIL;
@@ -1416,7 +1417,7 @@ out:
 static int
 shm_mmap_large(struct shmfd *shmfd, vm_map_t map, vm_offset_t *addr,
 vm_size_t size, vm_prot_t prot, vm_prot_t max_prot, int flags,
-vm_ooffset_t foff, bool writecounted, struct thread *td)
+vm_ooffset_t foff, struct thread *td)
 {
struct vmspace *vms;
vm_map_entry_t next_entry, prev_entry;
@@ -1448,8 +1449,6 @@ shm_mmap_large(struct shmfd *shmfd, vm_map_t map, vm_o
docow |= MAP_INHERIT_SHARE;
if ((flags & MAP_NOCORE) != 0)
docow |= MAP_DISABLE_COREDUMP;
-   if (writecounted)
-   docow |= MAP_WRITECOUNT;
 
mask = pagesizes[shmfd->shm_lp_psind] - 1;
if ((foff & mask) != 0)
@@ -1594,12 +1593,15 @@ shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *a
mtx_unlock(_timestamp_lock);
vm_object_reference(shmfd->shm_object);
 
-   if (writecnt)
-   vm_pager_update_writecount(shmfd->shm_object, 0, objsize);
if (shm_largepage(shmfd)) {
+   writecnt = false;
error = shm_mmap_large(shmfd, map, addr, objsize, prot,
-   maxprot, flags, foff, writecnt, td);
+   maxprot, flags, foff, td);
} else {
+   if (writecnt) {
+   vm_pager_update_writecount(shmfd->shm_object, 0,
+   objsize);
+   }
error = vm_mmap_object(map, addr, objsize, prot, maxprot, flags,
shmfd->shm_object, foff, writecnt, td);
}
@@ -1838,6 +1840,11 @@ shm_add_seals(struct file *fp, int seals)
}
nseals = seals & ~shmfd->shm_seals;
if ((nseals & F_SEAL_WRITE) != 0) {
+   if (shm_largepage(shmfd)) {
+   error = ENOTSUP;
+   goto out;
+   }
+
/*
 * The rangelock above prevents writable mappings from being
 * added after we've started applying seals.  The RLOCK here
___
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: r365616 - head/sys/amd64/vmm/amd

2020-09-10 Thread John Baldwin
Author: jhb
Date: Thu Sep 10 22:22:23 2020
New Revision: 365616
URL: https://svnweb.freebsd.org/changeset/base/365616

Log:
  Use vmcb_read/write for the vmcb snapshot functions.
  
  This avoids some unnecessary layers of indirection.

Modified:
  head/sys/amd64/vmm/amd/vmcb.c

Modified: head/sys/amd64/vmm/amd/vmcb.c
==
--- head/sys/amd64/vmm/amd/vmcb.c   Thu Sep 10 21:25:16 2020
(r365615)
+++ head/sys/amd64/vmm/amd/vmcb.c   Thu Sep 10 22:22:23 2020
(r365616)
@@ -472,7 +472,7 @@ vmcb_getany(struct svm_softc *sc, int vcpu, int ident,
goto err;
}
 
-   error = vm_get_register(sc->vm, vcpu, ident, val);
+   error = vmcb_read(sc, vcpu, ident, val);
 
 err:
return (error);
@@ -493,7 +493,7 @@ vmcb_setany(struct svm_softc *sc, int vcpu, int ident,
goto err;
}
 
-   error = vm_set_register(sc->vm, vcpu, ident, val);
+   error = vmcb_write(sc, vcpu, ident, val);
 
 err:
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: r365623 - head/sys/dev/usb/net

2020-09-10 Thread John-Mark Gurney
Author: jmg
Date: Fri Sep 11 02:02:13 2020
New Revision: 365623
URL: https://svnweb.freebsd.org/changeset/base/365623

Log:
  Don't clear reserved bits per RealTek
  
  MFC after:3 days

Modified:
  head/sys/dev/usb/net/if_ure.c

Modified: head/sys/dev/usb/net/if_ure.c
==
--- head/sys/dev/usb/net/if_ure.c   Fri Sep 11 00:12:05 2020
(r365622)
+++ head/sys/dev/usb/net/if_ure.c   Fri Sep 11 02:02:13 2020
(r365623)
@@ -816,9 +816,10 @@ ure_rxfilter(struct usb_ether *ue)
 
URE_LOCK_ASSERT(sc, MA_OWNED);
 
-   rxmode = URE_RCR_APM;
-   if (ifp->if_flags & IFF_BROADCAST)
-rxmode |= URE_RCR_AB;
+   rxmode = ure_read_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA);
+   rxmode &= ~(URE_RCR_AAP | URE_RCR_AM);
+   rxmode |= URE_RCR_APM;  /* accept physical match packets */
+   rxmode |= URE_RCR_AB;   /* always accept broadcasts */
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
if (ifp->if_flags & IFF_PROMISC)
rxmode |= URE_RCR_AAP;
___
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: r365624 - head/lib/libc/sys

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Fri Sep 11 02:02:15 2020
New Revision: 365624
URL: https://svnweb.freebsd.org/changeset/base/365624

Log:
  memfd_create: simplify HUGETLB support a little bit
  
  This also fixes a minor issue that was missed in the initial review; the
  layout of the MFD_HUGE_* flags is actually not 1:1 bit:flag -- it instead
  borrowed the Linux convention of how this is laid out since it was
  originally implemented on Linux, the top 6 bits represent the shift required
  for the requested page size.
  
  This allows us to remove the flag <-> pgsize mapping table and simplify the
  logic just prior to validation of the requested page size.
  
  While we're here, fix two small nits:
  
  - HUGETLB memfd shouldn't exhibit the SHM_GROW_ON_WRITE behavior. We can
only grow largepage shm by appropriately aligned (i.e. requested pagesize)
sizes, so it can't work in the typical/sane fashion. Furthermore, Linux
does the same, so let's be compatible.
  
  - We don't allow MFD_HUGETLB without specifying a pagesize, so no need to
check for that later.
  
  Reviewed by:  kib (slightly earlier version)

Modified:
  head/lib/libc/sys/shm_open.c

Modified: head/lib/libc/sys/shm_open.c
==
--- head/lib/libc/sys/shm_open.cFri Sep 11 02:02:13 2020
(r365623)
+++ head/lib/libc/sys/shm_open.cFri Sep 11 02:02:15 2020
(r365624)
@@ -81,27 +81,6 @@ shm_create_largepage(const char *path, int flags, int 
return (fd);
 }
 
-#defineK(x)((size_t)(x) * 1024)
-#defineM(x)(K(x) * 1024)
-#defineG(x)(M(x) * 1024)
-static const struct {
-   int mask;
-   size_t pgsize;
-} mfd_huge_sizes[] = {
-   { .mask = MFD_HUGE_64KB,.pgsize = K(64) },
-   { .mask = MFD_HUGE_512KB,   .pgsize = K(512) },
-   { .mask = MFD_HUGE_1MB, .pgsize = M(1) },
-   { .mask = MFD_HUGE_2MB, .pgsize = M(2) },
-   { .mask = MFD_HUGE_8MB, .pgsize = M(8) },
-   { .mask = MFD_HUGE_16MB,.pgsize = M(16) },
-   { .mask = MFD_HUGE_32MB,.pgsize = M(32) },
-   { .mask = MFD_HUGE_256MB,   .pgsize = M(256) },
-   { .mask = MFD_HUGE_512MB,   .pgsize = M(512) },
-   { .mask = MFD_HUGE_1GB, .pgsize = G(1) },
-   { .mask = MFD_HUGE_2GB, .pgsize = G(2) },
-   { .mask = MFD_HUGE_16GB,.pgsize = G(16) },
-};
-
 /*
  * The path argument is passed to the kernel, but the kernel doesn't currently
  * do anything with it.  Linux exposes it in linprocfs for debugging purposes
@@ -111,9 +90,9 @@ int
 memfd_create(const char *name, unsigned int flags)
 {
char memfd_name[NAME_MAX + 1];
-   size_t namelen, *pgs;
+   size_t namelen, *pgs, pgsize;
struct shm_largepage_conf slc;
-   int error, fd, i, npgs, oflags, pgidx, saved_errno, shmflags;
+   int error, fd, npgs, oflags, pgidx, saved_errno, shmflags;
 
if (name == NULL) {
errno = EBADF;
@@ -130,8 +109,7 @@ memfd_create(const char *name, unsigned int flags)
return (-1);
}
/* Size specified but no HUGETLB. */
-   if (((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) ||
-   __bitcount(flags & MFD_HUGE_MASK) > 1) {
+   if ((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) {
errno = EINVAL;
return (-1);
}
@@ -139,13 +117,15 @@ memfd_create(const char *name, unsigned int flags)
/* We've already validated that we're sufficiently sized. */
snprintf(memfd_name, NAME_MAX + 1, "%s%s", MEMFD_NAME_PREFIX, name);
oflags = O_RDWR;
-   shmflags = SHM_GROW_ON_WRITE;
+   shmflags = 0;
if ((flags & MFD_CLOEXEC) != 0)
oflags |= O_CLOEXEC;
if ((flags & MFD_ALLOW_SEALING) != 0)
shmflags |= SHM_ALLOW_SEALING;
if ((flags & MFD_HUGETLB) != 0)
shmflags |= SHM_LARGEPAGE;
+   else
+   shmflags |= SHM_GROW_ON_WRITE;
fd = __sys_shm_open2(SHM_ANON, oflags, 0, shmflags, memfd_name);
if (fd == -1 || (flags & MFD_HUGETLB) == 0)
return (fd);
@@ -160,25 +140,14 @@ memfd_create(const char *name, unsigned int flags)
error = getpagesizes(pgs, npgs);
if (error == -1)
goto clean;
-   if ((flags & MFD_HUGE_MASK) == 0) {
-   if (npgs == 1) {
-   errno = EOPNOTSUPP;
-   goto clean;
-   }
-   pgidx = 1;
-   } else {
-   for (i = 0; i < nitems(mfd_huge_sizes); i++) {
-   if (mfd_huge_sizes[i].mask == (flags & MFD_HUGE_MASK))
-   break;
-   }
-   for (pgidx = 0; pgidx < npgs; pgidx++) {
-   if (mfd_huge_sizes[i].pgsize == pgs[pgidx])
- 

Re: svn commit: r365615 - head/lib/libc/sys

2020-09-10 Thread Kyle Evans
On Thu, Sep 10, 2020 at 4:25 PM Kyle Evans  wrote:
>
> Author: kevans
> Date: Thu Sep 10 21:25:16 2020
> New Revision: 365615
> URL: https://svnweb.freebsd.org/changeset/base/365615
>
> Log:
>   memfd_create: fix return values
>
>   Literally returning EINVAL from a function designed to return an fd makes
>   for interesting scenarios.
>
>   I cannot assign enough pointy hats to cover this one.
>

The word omitted is "myself" -- I cannot assign myself enough pointy
hats to cover this one.

Thanks,

Kyle Evans
___
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: r365614 - in stable/12: sys/dev/virtio/block usr.sbin/bhyve

2020-09-10 Thread Alan Somers
On Thu, Sep 10, 2020 at 3:01 PM Allan Jude  wrote:

> Author: allanjude
> Date: Thu Sep 10 21:01:22 2020
> New Revision: 365614
> URL: https://svnweb.freebsd.org/changeset/base/365614
>
> Log:
>   MFC r360229, r363255
>
>   r360229:
>   Add VIRTIO_BLK_T_DISCARD (TRIM) support to the bhyve virtio-blk backend
>
>   This will advertise support for TRIM to the guest virtio-blk driver and
>   perform the DIOCGDELETE ioctl on the backing storage if it supports it.
>
>   Thanks to Jason King and others at Joyent and illumos for expanding on
>   my original patch, adding improvements including better error handling
>   and making sure to following the virtio spec.
>
>   r363255:
>   Add VIRTIO_BLK_T_DISCARD support to the virtio-blk driver
>
>   If the hypervisor advertises support for the DISCARD command then the
>   guest can perform TRIM commands, freeing space on the backing store.
>
>   If VIRTIO_BLK_F_DISCARD is enabled, advertise DISKFLAG_CANDELETE
>
>   Tested with FreeBSD guests on bhyve and KVM
>
>   Relnotes: yes
>   Sponsored by: Klara Inc.
>
> Modified:
>   stable/12/sys/dev/virtio/block/virtio_blk.c
>   stable/12/sys/dev/virtio/block/virtio_blk.h
>   stable/12/usr.sbin/bhyve/block_if.c
>   stable/12/usr.sbin/bhyve/pci_virtio_block.c
> Directory Properties:
>   stable/12/   (props changed)
>

Yay!
___
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: r365618 - in releng/12.2: release/pkg_repos sys/conf sys/sys

2020-09-10 Thread Glen Barber
Author: gjb
Date: Thu Sep 10 23:56:59 2020
New Revision: 365618
URL: https://svnweb.freebsd.org/changeset/base/365618

Log:
  - Copy stable/12@r365545 to releng/12.2 as part of the 12.2-RELEASE
cycle.
  - Update from PRERELEASE to BETA1.
  - Set the default pkg(7) repository to 'quarterly'.
  - Bump __FreeBSD_version.
  - Prune svn:mergeinfo from the new branch.
  
  Approved by:  re (implicit)
  
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Added:
 - copied from r365545, stable/12/
Directory Properties:
  releng/12.2/   (props changed)
Modified:
  releng/12.2/release/pkg_repos/release-dvd.conf
  releng/12.2/sys/conf/newvers.sh
  releng/12.2/sys/sys/param.h

Modified: releng/12.2/release/pkg_repos/release-dvd.conf
==
--- stable/12/release/pkg_repos/release-dvd.confWed Sep  9 23:11:55 
2020(r365545)
+++ releng/12.2/release/pkg_repos/release-dvd.conf  Thu Sep 10 23:56:59 
2020(r365618)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 release: {
-  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest;,
+  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly;,
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",

Modified: releng/12.2/sys/conf/newvers.sh
==
--- stable/12/sys/conf/newvers.sh   Wed Sep  9 23:11:55 2020
(r365545)
+++ releng/12.2/sys/conf/newvers.sh Thu Sep 10 23:56:59 2020
(r365618)
@@ -49,7 +49,7 @@
 
 TYPE="FreeBSD"
 REVISION="12.2"
-BRANCH=${BRANCH_OVERRIDE:-PRERELEASE}
+BRANCH=${BRANCH_OVERRIDE:-BETA1}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 

Modified: releng/12.2/sys/sys/param.h
==
--- stable/12/sys/sys/param.h   Wed Sep  9 23:11:55 2020(r365545)
+++ releng/12.2/sys/sys/param.h Thu Sep 10 23:56:59 2020(r365618)
@@ -60,7 +60,7 @@
  * in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1201525  /* Master, propagated to newvers */
+#define __FreeBSD_version 1202000  /* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
___
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: r365621 - vendor/lib9p/dist/transport

2020-09-10 Thread Jakub Wojciech Klama
Author: jceel
Date: Fri Sep 11 00:10:24 2020
New Revision: 365621
URL: https://svnweb.freebsd.org/changeset/base/365621

Log:
  Import lib9p 9d5aee77bcc1bf0e79b0a3bfefff5fdf2146283c.
  
  Approved by:  trasz (mentor)
  MFC after:1 month
  Sponsored by: Conclusive Engineering

Modified:
  vendor/lib9p/dist/transport/socket.c

Modified: vendor/lib9p/dist/transport/socket.c
==
--- vendor/lib9p/dist/transport/socket.cFri Sep 11 00:06:16 2020
(r365620)
+++ vendor/lib9p/dist/transport/socket.cFri Sep 11 00:10:24 2020
(r365621)
@@ -307,7 +307,7 @@ l9p_socket_send_response(struct l9p_request *req __unu
 
 static void
 l9p_socket_drop_response(struct l9p_request *req __unused,
-const struct iovec *iov, size_t niov __unused, void *arg)
+const struct iovec *iov, size_t niov __unused, void *arg __unused)
 {
 
L9P_LOG(L9P_DEBUG, "%p: drop buf=%p", arg, iov[0].iov_base);
___
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: r365615 - head/lib/libc/sys

2020-09-10 Thread Kyle Evans
Author: kevans
Date: Thu Sep 10 21:25:16 2020
New Revision: 365615
URL: https://svnweb.freebsd.org/changeset/base/365615

Log:
  memfd_create: fix return values
  
  Literally returning EINVAL from a function designed to return an fd makes
  for interesting scenarios.
  
  I cannot assign enough pointy hats to cover this one.

Modified:
  head/lib/libc/sys/shm_open.c

Modified: head/lib/libc/sys/shm_open.c
==
--- head/lib/libc/sys/shm_open.cThu Sep 10 21:01:22 2020
(r365614)
+++ head/lib/libc/sys/shm_open.cThu Sep 10 21:25:16 2020
(r365615)
@@ -115,18 +115,26 @@ memfd_create(const char *name, unsigned int flags)
struct shm_largepage_conf slc;
int error, fd, i, npgs, oflags, pgidx, saved_errno, shmflags;
 
-   if (name == NULL)
-   return (EBADF);
+   if (name == NULL) {
+   errno = EBADF;
+   return (-1);
+   }
namelen = strlen(name);
-   if (namelen + sizeof(MEMFD_NAME_PREFIX) - 1 > NAME_MAX)
-   return (EINVAL);
+   if (namelen + sizeof(MEMFD_NAME_PREFIX) - 1 > NAME_MAX) {
+   errno = EINVAL;
+   return (-1);
+   }
if ((flags & ~(MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB |
-   MFD_HUGE_MASK)) != 0)
-   return (EINVAL);
+   MFD_HUGE_MASK)) != 0) {
+   errno = EINVAL;
+   return (-1);
+   }
/* Size specified but no HUGETLB. */
if (((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) ||
-   __bitcount(flags & MFD_HUGE_MASK) > 1)
-   return (EINVAL);
+   __bitcount(flags & MFD_HUGE_MASK) > 1) {
+   errno = EINVAL;
+   return (-1);
+   }
 
/* We've already validated that we're sufficiently sized. */
snprintf(memfd_name, NAME_MAX + 1, "%s%s", MEMFD_NAME_PREFIX, name);
___
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: r365620 - head/sys/riscv/conf

2020-09-10 Thread John Baldwin
Author: jhb
Date: Fri Sep 11 00:06:16 2020
New Revision: 365620
URL: https://svnweb.freebsd.org/changeset/base/365620

Log:
  Disable WITNESS for spin locks by default.
  
  This matches all other architectures and removes substantial overhead.
  
  Reported by:  arichardson (indirectly)
  Reviewed by:  imp, arichardson
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D26403

Modified:
  head/sys/riscv/conf/GENERIC

Modified: head/sys/riscv/conf/GENERIC
==
--- head/sys/riscv/conf/GENERIC Fri Sep 11 00:04:23 2020(r365619)
+++ head/sys/riscv/conf/GENERIC Fri Sep 11 00:06:16 2020(r365620)
@@ -140,7 +140,7 @@ options DEADLKRES   # Enable the deadlock 
resolver
 optionsINVARIANTS  # Enable calls of extra sanity checking
 optionsINVARIANT_SUPPORT   # Extra sanity checks of internal 
structures, required by INVARIANTS
 optionsWITNESS # Enable checks to detect deadlocks and 
cycles
-# options  WITNESS_SKIPSPIN# Don't run witness on spinlocks for 
speed
+optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for 
speed
 optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
 # options  EARLY_PRINTF
 optionsVERBOSE_SYSINIT=0   # Support debug.verbose_sysinit, off by 
default
___
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: r365625 - head/tests/sys/kern

2020-09-10 Thread Li-Wen Hsu
Author: lwhsu
Date: Fri Sep 11 05:45:27 2020
New Revision: 365625
URL: https://svnweb.freebsd.org/changeset/base/365625

Log:
  Revert r365592 and r365603 as the tests are fixed by r365593
  
  PR:   249236
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tests/sys/kern/memfd_test.c

Modified: head/tests/sys/kern/memfd_test.c
==
--- head/tests/sys/kern/memfd_test.cFri Sep 11 02:02:15 2020
(r365624)
+++ head/tests/sys/kern/memfd_test.cFri Sep 11 05:45:27 2020
(r365625)
@@ -43,9 +43,6 @@ ATF_TC_BODY(basic, tc)
int fd;
char buf[8];
 
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/249236;);
-
ATF_REQUIRE((fd = memfd_create("...", 0)) != -1);
 
/* write(2) should grow us out automatically. */
@@ -102,9 +99,6 @@ ATF_TC_BODY(write_seal, tc)
int fd;
char *addr, buf[BUF_SIZE];
 
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/249236;);
-
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
 
@@ -134,9 +128,6 @@ ATF_TC_BODY(mmap_write_seal, tc)
int fd;
char *addr, *paddr, *raddr;
 
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/249236;);
-
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0);
 
@@ -202,9 +193,6 @@ ATF_TC_WITHOUT_HEAD(truncate_seals);
 ATF_TC_BODY(truncate_seals, tc)
 {
 
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/249236;);
-
ATF_REQUIRE(memfd_truncate_test(4, 8, F_SEAL_GROW) == EPERM);
ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_SHRINK) == EPERM);
ATF_REQUIRE(memfd_truncate_test(8, 4, F_SEAL_GROW) == 0);
@@ -240,9 +228,6 @@ ATF_TC_BODY(dup_seals, tc)
char buf[8];
int fd, fdx;
int seals;
-
-   if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false))
-   atf_tc_skip("https://bugs.freebsd.org/249236;);
 
ATF_REQUIRE((fd = memfd_create("...", MFD_ALLOW_SEALING)) != -1);
ATF_REQUIRE((fdx = dup(fd)) != -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: r365562 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 11:45:03 2020
New Revision: 365562
URL: https://svnweb.freebsd.org/changeset/base/365562

Log:
  MFC r364054:
  
  Improve the ECN negotiation when the TCP SYN-cache is used by making
  sure that
  * ECN is disabled if the client sends an non-ECN-setup SYN segment.
  * ECN is disabled is the ECN-setup SYN-ACK segment is retransmitted more
than net.inet.tcp.ecn.maxretries times.

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

Modified: stable/12/sys/netinet/tcp_syncache.c
==
--- stable/12/sys/netinet/tcp_syncache.cThu Sep 10 11:43:23 2020
(r365561)
+++ stable/12/sys/netinet/tcp_syncache.cThu Sep 10 11:45:03 2020
(r365562)
@@ -477,6 +477,9 @@ syncache_timer(void *xsch)
sch->sch_nextc = sc->sc_rxttime;
continue;
}
+   if (sc->sc_rxmits > V_tcp_ecn_maxretries) {
+   sc->sc_flags &= ~SCF_ECN;
+   }
if (sc->sc_rxmits > V_tcp_syncache.rexmt_limit) {
if ((s = tcp_log_addrs(>sc_inc, NULL, NULL, NULL))) 
{
log(LOG_DEBUG, "%s; %s: Retransmits exhausted, "
@@ -1430,6 +1433,13 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *t
sc->sc_tsreflect = to->to_tsval;
else
sc->sc_flags &= ~SCF_TIMESTAMP;
+   /*
+* Disable ECN if needed.
+*/
+   if ((sc->sc_flags & SCF_ECN) &&
+   ((th->th_flags & (TH_ECE|TH_CWR)) != (TH_ECE|TH_CWR))) {
+   sc->sc_flags &= ~SCF_ECN;
+   }
 #ifdef MAC
/*
 * Since we have already unconditionally allocated label
___
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: r365564 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 11:55:45 2020
New Revision: 365564
URL: https://svnweb.freebsd.org/changeset/base/365564

Log:
  MFC r361752:
  
  We should never allow either the broadcast or IN_ADDR_ANY to be
  connected to or sent to. This was fond when working with Michael
  Tuexen and Skyzaller. Skyzaller seems to want to use either of
  these two addresses to connect to at times. And it really is
  an error to do so, so lets not allow that behavior.
  
  MFC r363256:
  (Re)-allow 0.0.0.0 to be used as an address in connect() for TCP
  In r361752 an error handling was introduced for using 0.0.0.0 or
  255.255.255.255 as the address in connect() for TCP, since both
  addresses can't be used. However, the stack maps 0.0.0.0 implicitly
  to a local address and at least two regressions were reported.
  Therefore, re-allow the usage of 0.0.0.0.
  While there, change the error indicated when using 255.255.255.255
  from EAFNOSUPPORT to EACCES as mentioned in the man-page of connect().

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

Modified: stable/12/sys/netinet/tcp_usrreq.c
==
--- stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 11:46:36 2020
(r365563)
+++ stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 11:55:45 2020
(r365564)
@@ -543,6 +543,9 @@ tcp_usr_connect(struct socket *so, struct sockaddr *na
if (sinp->sin_family == AF_INET
&& IN_MULTICAST(ntohl(sinp->sin_addr.s_addr)))
return (EAFNOSUPPORT);
+   if ((sinp->sin_family == AF_INET) &&
+   (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST))
+   return (EACCES);
if ((error = prison_remote_ip4(td->td_ucred, >sin_addr)) != 0)
return (error);
 
@@ -639,6 +642,10 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n
error = EAFNOSUPPORT;
goto out;
}
+   if (ntohl(sin.sin_addr.s_addr) == INADDR_BROADCAST) {
+   error = EACCES;
+   goto out;
+   }
if ((error = prison_remote_ip4(td->td_ucred,
_addr)) != 0)
goto out;
@@ -994,6 +1001,12 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf
if (m)
m_freem(m);
error = EAFNOSUPPORT;
+   goto out;
+   }
+   if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) {
+   if (m)
+   m_freem(m);
+   error = EACCES;
goto out;
}
if ((error = prison_remote_ip4(td->td_ucred,
___
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: r365558 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew
Date: Thu Sep 10 09:42:37 2020
New Revision: 365558
URL: https://svnweb.freebsd.org/changeset/base/365558

Log:
  Only manage ofw gpio providers on ofw systems
  
  On arm64 we may boot via ACPI. In this case we will still try to manage the
  gpio providers as if we are using FDT. Fix this by checking if the FDT node
  is valid before registering a cross reference.
  
  Sponsored by: Innovate UK

Modified:
  head/sys/dev/gpio/ofw_gpiobus.c

Modified: head/sys/dev/gpio/ofw_gpiobus.c
==
--- head/sys/dev/gpio/ofw_gpiobus.c Thu Sep 10 09:37:30 2020
(r365557)
+++ head/sys/dev/gpio/ofw_gpiobus.c Thu Sep 10 09:42:37 2020
(r365558)
@@ -197,7 +197,8 @@ ofw_gpiobus_register_provider(device_t provider)
phandle_t node;
 
node = ofw_bus_get_node(provider);
-   OF_device_register_xref(OF_xref_from_node(node), provider);
+   if (node != -1)
+   OF_device_register_xref(OF_xref_from_node(node), provider);
 }
 
 void
@@ -206,7 +207,8 @@ ofw_gpiobus_unregister_provider(device_t provider)
phandle_t node;
 
node = ofw_bus_get_node(provider);
-   OF_device_register_xref(OF_xref_from_node(node), NULL);
+   if (node != -1)
+   OF_device_register_xref(OF_xref_from_node(node), NULL);
 }
 
 static struct ofw_gpiobus_devinfo *
___
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: r365559 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew
Date: Thu Sep 10 09:50:43 2020
New Revision: 365559
URL: https://svnweb.freebsd.org/changeset/base/365559

Log:
  Switch the name of the pl061 driver to gpio
  
  We need it to be named gpio for gpiobus to work.
  
  Sponsored by: Innovate UK

Modified:
  head/sys/dev/gpio/pl061.c
  head/sys/dev/gpio/pl061_acpi.c

Modified: head/sys/dev/gpio/pl061.c
==
--- head/sys/dev/gpio/pl061.c   Thu Sep 10 09:42:37 2020(r365558)
+++ head/sys/dev/gpio/pl061.c   Thu Sep 10 09:50:43 2020(r365559)
@@ -577,4 +577,4 @@ static device_method_t pl061_methods[] = {
DEVMETHOD_END
 };
 
-DEFINE_CLASS_0(pl061, pl061_driver, pl061_methods, sizeof(struct pl061_softc));
+DEFINE_CLASS_0(gpio, pl061_driver, pl061_methods, sizeof(struct pl061_softc));

Modified: head/sys/dev/gpio/pl061_acpi.c
==
--- head/sys/dev/gpio/pl061_acpi.c  Thu Sep 10 09:42:37 2020
(r365558)
+++ head/sys/dev/gpio/pl061_acpi.c  Thu Sep 10 09:50:43 2020
(r365559)
@@ -93,7 +93,7 @@ static device_method_t pl061_acpi_methods[] = {
DEVMETHOD_END
 };
 
-DEFINE_CLASS_1(pl061, pl061_acpi_driver, pl061_acpi_methods,
+DEFINE_CLASS_1(gpio, pl061_acpi_driver, pl061_acpi_methods,
 sizeof(struct pl061_softc), pl061_driver);
 
 static devclass_t pl061_devclass;
___
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: r365565 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 12:01:35 2020
New Revision: 365565
URL: https://svnweb.freebsd.org/changeset/base/365565

Log:
  MFC r361081:
  
  Allow only IPv4 addresses in sendto() for TCP on AF_INET sockets.
  
  This problem was found by looking at syzkaller reproducers for some other
  problems.

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

Modified: stable/12/sys/netinet/tcp_usrreq.c
==
--- stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 11:55:45 2020
(r365564)
+++ stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 12:01:35 2020
(r365565)
@@ -1032,6 +1032,12 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf
error = EINVAL;
goto out;
}
+   if ((inp->inp_vflag & INP_IPV6PROTO) == 0) {
+   if (m != NULL)
+   m_freem(m);
+   error = EAFNOSUPPORT;
+   goto out;
+   }
if (IN6_IS_ADDR_MULTICAST(>sin6_addr)) {
if (m)
m_freem(m);
___
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: r365560 - in stable/12/sys: amd64/amd64 amd64/include amd64/vmm amd64/vmm/intel i386/i386 x86/include

2020-09-10 Thread Peter Grehan
Author: grehan
Date: Thu Sep 10 10:49:59 2020
New Revision: 365560
URL: https://svnweb.freebsd.org/changeset/base/365560

Log:
  MFC r364340, r364343, r364656
  
r364340Support guest rdtscp and rdpid instructions on Intel VT-x
  
Follow-on commits:
r364343Export a routine to provide the TSC_AUX MSR value and use this 
in vmm
r364656assert caller is preventing CPU migration
  
Submitted by:   adam_fenn.io
Differential Revision: https://reviews.freebsd.org/D26003

Modified:
  stable/12/sys/amd64/amd64/initcpu.c
  stable/12/sys/amd64/include/vmm.h
  stable/12/sys/amd64/vmm/intel/vmx.c
  stable/12/sys/amd64/vmm/intel/vmx.h
  stable/12/sys/amd64/vmm/intel/vmx_msr.c
  stable/12/sys/amd64/vmm/intel/vmx_msr.h
  stable/12/sys/amd64/vmm/x86.c
  stable/12/sys/i386/i386/initcpu.c
  stable/12/sys/x86/include/x86_var.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/initcpu.c
==
--- stable/12/sys/amd64/amd64/initcpu.c Thu Sep 10 09:50:43 2020
(r365559)
+++ stable/12/sys/amd64/amd64/initcpu.c Thu Sep 10 10:49:59 2020
(r365560)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -218,6 +219,18 @@ init_via(void)
 }
 
 /*
+ * The value for the TSC_AUX MSR and rdtscp/rdpid on the invoking CPU.
+ *
+ * Caller should prevent CPU migration.
+ */
+u_int
+cpu_auxmsr(void)
+{
+   KASSERT((read_rflags() & PSL_I) == 0, ("context switch possible"));
+   return (PCPU_GET(cpuid));
+}
+
+/*
  * Initialize CPU control registers
  */
 void
@@ -283,7 +296,7 @@ initializecpu(void)
 
if ((amd_feature & AMDID_RDTSCP) != 0 ||
(cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)
-   wrmsr(MSR_TSC_AUX, PCPU_GET(cpuid));
+   wrmsr(MSR_TSC_AUX, cpu_auxmsr());
 }
 
 void

Modified: stable/12/sys/amd64/include/vmm.h
==
--- stable/12/sys/amd64/include/vmm.h   Thu Sep 10 09:50:43 2020
(r365559)
+++ stable/12/sys/amd64/include/vmm.h   Thu Sep 10 10:49:59 2020
(r365560)
@@ -436,6 +436,8 @@ enum vm_cap_type {
VM_CAP_UNRESTRICTED_GUEST,
VM_CAP_ENABLE_INVPCID,
VM_CAP_BPT_EXIT,
+   VM_CAP_RDPID,
+   VM_CAP_RDTSCP,
VM_CAP_MAX
 };
 

Modified: stable/12/sys/amd64/vmm/intel/vmx.c
==
--- stable/12/sys/amd64/vmm/intel/vmx.c Thu Sep 10 09:50:43 2020
(r365559)
+++ stable/12/sys/amd64/vmm/intel/vmx.c Thu Sep 10 10:49:59 2020
(r365560)
@@ -160,6 +160,14 @@ static int cap_pause_exit;
 SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, pause_exit, CTLFLAG_RD, _pause_exit,
 0, "PAUSE triggers a VM-exit");
 
+static int cap_rdpid;
+SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, rdpid, CTLFLAG_RD, _rdpid, 0,
+"Guests are allowed to use RDPID");
+
+static int cap_rdtscp;
+SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, rdtscp, CTLFLAG_RD, _rdtscp, 0,
+"Guests are allowed to use RDTSCP");
+
 static int cap_unrestricted_guest;
 SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, unrestricted_guest, CTLFLAG_RD,
 _unrestricted_guest, 0, "Unrestricted guests");
@@ -293,6 +301,18 @@ static int vmx_getreg(void *arg, int vcpu, int reg, ui
 static int vmxctx_setreg(struct vmxctx *vmxctx, int reg, uint64_t val);
 static void vmx_inject_pir(struct vlapic *vlapic);
 
+static inline bool
+host_has_rdpid(void)
+{
+   return ((cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0);
+}
+
+static inline bool
+host_has_rdtscp(void)
+{
+   return ((amd_feature & AMDID_RDTSCP) != 0);
+}
+
 #ifdef KTR
 static const char *
 exit_reason_to_str(int reason)
@@ -745,6 +765,43 @@ vmx_init(int ipinum)
 PROCBASED_PAUSE_EXITING, 0,
 ) == 0);
 
+   /*
+* Check support for RDPID and/or RDTSCP.
+*
+* Support a pass-through-based implementation of these via the
+* "enable RDTSCP" VM-execution control and the "RDTSC exiting"
+* VM-execution control.
+*
+* The "enable RDTSCP" VM-execution control applies to both RDPID
+* and RDTSCP (see SDM volume 3, section 25.3, "Changes to
+* Instruction Behavior in VMX Non-root operation"); this is why
+* only this VM-execution control needs to be enabled in order to
+* enable passing through whichever of RDPID and/or RDTSCP are
+* supported by the host.
+*
+* The "RDTSC exiting" VM-execution control applies to both RDTSC
+* and RDTSCP (again, per SDM volume 3, section 25.3), and is
+* already set up for RDTSC and RDTSCP pass-through by the current
+* implementation of RDTSC.
+*
+* Although RDPID and RDTSCP are optional capabilities, since there
+* does not currently 

svn commit: r365557 - head/sys/dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew
Date: Thu Sep 10 09:37:30 2020
New Revision: 365557
URL: https://svnweb.freebsd.org/changeset/base/365557

Log:
  Use the correct variable to check which interrupt mode to use
  
  In the PL061 driver we incorrectly used the mask rather than mode to find
  how to configure the interrupt.
  
  Sponsored by: Innovate UK

Modified:
  head/sys/dev/gpio/pl061.c

Modified: head/sys/dev/gpio/pl061.c
==
--- head/sys/dev/gpio/pl061.c   Thu Sep 10 09:10:33 2020(r365556)
+++ head/sys/dev/gpio/pl061.c   Thu Sep 10 09:37:30 2020(r365557)
@@ -335,22 +335,22 @@ pl061_pic_setup_intr(device_t dev, struct intr_irqsrc 
 
PL061_LOCK(sc);
 
-   if (mask & GPIO_INTR_EDGE_BOTH) {
+   if (mode & GPIO_INTR_EDGE_BOTH) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, mask);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
-   } else if (mask & GPIO_INTR_EDGE_RISING) {
+   } else if (mode & GPIO_INTR_EDGE_RISING) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
mask_and_set(sc, PL061_INTEVENT, mask, mask);
-   } else if (mask & GPIO_INTR_EDGE_FALLING) {
+   } else if (mode & GPIO_INTR_EDGE_FALLING) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, 0);
mask_and_set(sc, PL061_INTEVENT, mask, 0);
-   } else if (mask & GPIO_INTR_LEVEL_HIGH) {
+   } else if (mode & GPIO_INTR_LEVEL_HIGH) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, mask);
mask_and_set(sc, PL061_INTEVENT, mask, mask);
-   } else if (mask & GPIO_INTR_LEVEL_LOW) {
+   } else if (mode & GPIO_INTR_LEVEL_LOW) {
mask_and_set(sc, PL061_INTBOTHEDGES, mask, 0);
mask_and_set(sc, PL061_INTSENSE, mask, mask);
mask_and_set(sc, PL061_INTEVENT, mask, 0);
___
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: r365561 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 11:43:23 2020
New Revision: 365561
URL: https://svnweb.freebsd.org/changeset/base/365561

Log:
  MFC r361750:
  
  Restrict enabling TCP-FASTOPEN to end-points in CLOSED or LISTEN state
  
  Enabling TCP-FASTOPEN on an end-point which is in a state other than
  CLOSED or LISTEN, is a bug in the application. So it should not work.
  Also the TCP code does not (and needs not to) handle this.
  While there, also simplify the setting of the TF_FASTOPEN flag.

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

Modified: stable/12/sys/netinet/tcp_usrreq.c
==
--- stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 10:49:59 2020
(r365560)
+++ stable/12/sys/netinet/tcp_usrreq.c  Thu Sep 10 11:43:23 2020
(r365561)
@@ -2082,6 +2082,11 @@ unlock_and_done:
return (error);
 
INP_WLOCK_RECHECK(inp);
+   if ((tp->t_state != TCPS_CLOSED) &&
+   (tp->t_state != TCPS_LISTEN)) {
+   error = EINVAL;
+   goto unlock_and_done;
+   }
if (tfo_optval.enable) {
if (tp->t_state == TCPS_LISTEN) {
if (!V_tcp_fastopen_server_enable) {
@@ -2089,7 +2094,6 @@ unlock_and_done:
goto unlock_and_done;
}
 
-   tp->t_flags |= TF_FASTOPEN;
if (tp->t_tfo_pending == NULL)
tp->t_tfo_pending =

tcp_fastopen_alloc_counter();
@@ -2108,8 +2112,8 @@ unlock_and_done:
tp->t_tfo_client_cookie_len =
TCP_FASTOPEN_PSK_LEN;
}
-   tp->t_flags |= TF_FASTOPEN;
}
+   tp->t_flags |= TF_FASTOPEN;
} else
tp->t_flags &= ~TF_FASTOPEN;
goto unlock_and_done;
___
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: r365563 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 11:46:36 2020
New Revision: 365563
URL: https://svnweb.freebsd.org/changeset/base/365563

Log:
  MFC r364089:
  
  Fix the following issues related to the TCP SYN-cache:
  * Let the accepted TCP/IPv4 socket inherit the configured TTL and
TOS value.
  * Let the accepted TCP/IPv6 socket inherit the configured Hop Limit.
  * Use the configured Hop Limit and Traffic Class when sending
IPv6 packets.

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

Modified: stable/12/sys/netinet/tcp_syncache.c
==
--- stable/12/sys/netinet/tcp_syncache.cThu Sep 10 11:45:03 2020
(r365562)
+++ stable/12/sys/netinet/tcp_syncache.cThu Sep 10 11:46:36 2020
(r365563)
@@ -768,6 +768,8 @@ syncache_socket(struct syncache *sc, struct socket *ls
inp->inp_vflag &= ~INP_IPV6;
inp->inp_vflag |= INP_IPV4;
 #endif
+   inp->inp_ip_ttl = sc->sc_ip_ttl;
+   inp->inp_ip_tos = sc->sc_ip_tos;
inp->inp_laddr = sc->sc_inc.inc_laddr;
 #ifdef INET6
}
@@ -800,6 +802,7 @@ syncache_socket(struct syncache *sc, struct socket *ls
if (oinp->in6p_outputopts)
inp->in6p_outputopts =
ip6_copypktopts(oinp->in6p_outputopts, M_NOWAIT);
+   inp->in6p_hops = oinp->in6p_hops;
}
 
if (sc->sc_inc.inc_flags & INC_ISIPV6) {
@@ -1321,12 +1324,28 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *t
cred = crhold(so->so_cred);
 
 #ifdef INET6
-   if ((inc->inc_flags & INC_ISIPV6) &&
-   (inp->inp_flags & IN6P_AUTOFLOWLABEL))
-   autoflowlabel = 1;
+   if (inc->inc_flags & INC_ISIPV6) {
+   if (inp->inp_flags & IN6P_AUTOFLOWLABEL) {
+   autoflowlabel = 1;
+   }
+   ip_ttl = in6_selecthlim(inp, NULL);
+   if ((inp->in6p_outputopts == NULL) ||
+   (inp->in6p_outputopts->ip6po_tclass == -1)) {
+   ip_tos = 0;
+   } else {
+   ip_tos = inp->in6p_outputopts->ip6po_tclass;
+   }
+   }
 #endif
-   ip_ttl = inp->inp_ip_ttl;
-   ip_tos = inp->inp_ip_tos;
+#if defined(INET6) && defined(INET)
+   else
+#endif
+#ifdef INET
+   {
+   ip_ttl = inp->inp_ip_ttl;
+   ip_tos = inp->inp_ip_tos;
+   }
+#endif
win = so->sol_sbrcv_hiwat;
ltflags = (tp->t_flags & (TF_NOOPT | TF_SIGNATURE));
 
@@ -1512,13 +1531,8 @@ skip_alloc:
cred = NULL;
sc->sc_ipopts = ipopts;
bcopy(inc, >sc_inc, sizeof(struct in_conninfo));
-#ifdef INET6
-   if (!(inc->inc_flags & INC_ISIPV6))
-#endif
-   {
-   sc->sc_ip_tos = ip_tos;
-   sc->sc_ip_ttl = ip_ttl;
-   }
+   sc->sc_ip_tos = ip_tos;
+   sc->sc_ip_ttl = ip_ttl;
 #ifdef TCP_OFFLOAD
sc->sc_tod = tod;
sc->sc_todctx = todctx;
@@ -1715,6 +1729,7 @@ syncache_respond(struct syncache *sc, struct syncache_
/* Zero out traffic class and flow label. */
ip6->ip6_flow &= ~IPV6_FLOWINFO_MASK;
ip6->ip6_flow |= sc->sc_flowlabel;
+   ip6->ip6_flow |= htonl(sc->sc_ip_tos << 20);
 
th = (struct tcphdr *)(ip6 + 1);
}
@@ -1843,7 +1858,7 @@ syncache_respond(struct syncache *sc, struct syncache_
m->m_pkthdr.csum_flags = CSUM_TCP_IPV6;
th->th_sum = in6_cksum_pseudo(ip6, tlen + optlen - hlen,
IPPROTO_TCP, 0);
-   ip6->ip6_hlim = in6_selecthlim(NULL, NULL);
+   ip6->ip6_hlim = sc->sc_ip_ttl;
 #ifdef TCP_OFFLOAD
if (ADDED_BY_TOE(sc)) {
struct toedev *tod = sc->sc_tod;

Modified: stable/12/sys/netinet/tcp_syncache.h
==
--- stable/12/sys/netinet/tcp_syncache.hThu Sep 10 11:45:03 2020
(r365562)
+++ stable/12/sys/netinet/tcp_syncache.hThu Sep 10 11:46:36 2020
(r365563)
@@ -63,8 +63,8 @@ struct syncache {
struct  mbuf *sc_ipopts;/* source route */
u_int16_t   sc_peer_mss;/* peer's MSS */
u_int16_t   sc_wnd; /* advertised window */
-   u_int8_tsc_ip_ttl;  /* IPv4 TTL */
-   u_int8_tsc_ip_tos;  /* IPv4 TOS */
+   u_int8_tsc_ip_ttl;  /* TTL / Hop Limit */
+   u_int8_tsc_ip_tos;  /* TOS / Traffic Class */
u_int8_tsc_requested_s_scale:4,
sc_requested_r_scale:4;
u_int16_t   sc_flags;
___

svn commit: r365556 - stable/12/sys/dev/iicbus/twsi

2020-09-10 Thread Andriy Gapon
Author: avg
Date: Thu Sep 10 09:10:33 2020
New Revision: 365556
URL: https://svnweb.freebsd.org/changeset/base/365556

Log:
  MFC r365288: twsi: replace a couple of errno codes with i2c error codes

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

Modified: stable/12/sys/dev/iicbus/twsi/twsi.c
==
--- stable/12/sys/dev/iicbus/twsi/twsi.cThu Sep 10 09:01:59 2020
(r36)
+++ stable/12/sys/dev/iicbus/twsi/twsi.cThu Sep 10 09:10:33 2020
(r365556)
@@ -573,7 +573,7 @@ twsi_intr(void *arg)
case TWSI_STATUS_ADDR_R_NACK:
debugf(sc->dev, "No ack received after transmitting the 
address\n");
sc->transfer = 0;
-   sc->error = ETIMEDOUT;
+   sc->error = IIC_ENOACK;
sc->control_val = 0;
wakeup(sc);
break;
@@ -642,7 +642,7 @@ twsi_intr(void *arg)
default:
debugf(sc->dev, "status=%x hot handled\n", status);
sc->transfer = 0;
-   sc->error = ENXIO;
+   sc->error = IIC_EBUSERR;
sc->control_val = 0;
wakeup(sc);
break;
___
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: r365554 - head/sys/net/route

2020-09-10 Thread Alexander V. Chernikov
Author: melifaro
Date: Thu Sep 10 07:05:31 2020
New Revision: 365554
URL: https://svnweb.freebsd.org/changeset/base/365554

Log:
  Fix RADIX_MPATH build broken by r365521.
  
  Reported by:  jenkins, Hartmann, O. 

Modified:
  head/sys/net/route/route_ctl.c

Modified: head/sys/net/route/route_ctl.c
==
--- head/sys/net/route/route_ctl.c  Thu Sep 10 06:32:25 2020
(r365553)
+++ head/sys/net/route/route_ctl.c  Thu Sep 10 07:05:31 2020
(r365554)
@@ -577,9 +577,11 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo 
 */
 #ifdef RADIX_MPATH
info->rti_info[RTAX_GATEWAY] = >gw_sa;
-   if (rt_mpath_capable(rnh))
-   rn = rt_mpath_unlink(rnh, info, rt, perror);
-   else
+   if (rt_mpath_capable(rnh)) {
+   rn = rt_mpath_unlink(rnh, info, rt, );
+   if (error != 0)
+   return (error);
+   } else
 #endif
rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST],
info->rti_info[RTAX_NETMASK], >head);
___
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: r365555 - stable/12/sys/dev/iicbus/twsi

2020-09-10 Thread Andriy Gapon
Author: avg
Date: Thu Sep 10 09:01:59 2020
New Revision: 36
URL: https://svnweb.freebsd.org/changeset/base/36

Log:
  MFC r365289: twsi: no need to compare boolean with boolean constant

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

Modified: stable/12/sys/dev/iicbus/twsi/twsi.c
==
--- stable/12/sys/dev/iicbus/twsi/twsi.cThu Sep 10 07:05:31 2020
(r365554)
+++ stable/12/sys/dev/iicbus/twsi/twsi.cThu Sep 10 09:01:59 2020
(r36)
@@ -484,7 +484,7 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint
 
sc = device_get_softc(dev);
 
-   if (sc->have_intr == false)
+   if (!sc->have_intr)
return (iicbus_transfer_gen(dev, msgs, nmsgs));
 
sc->error = 0;
___
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: r365553 - in head: . share/man/man9

2020-09-10 Thread Li-Wen Hsu
Author: lwhsu
Date: Thu Sep 10 06:32:25 2020
New Revision: 365553
URL: https://svnweb.freebsd.org/changeset/base/365553

Log:
  Remove vm_map_create(9) KPI's manpage according to r364302
  
  Submitted by: Ka Ho Ng 
  Reviewed by:  markj
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D26372

Deleted:
  head/share/man/man9/vm_map_create.9
Modified:
  head/ObsoleteFiles.inc
  head/share/man/man9/Makefile
  head/share/man/man9/vm_map.9

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Sep 10 04:17:23 2020(r365552)
+++ head/ObsoleteFiles.inc  Thu Sep 10 06:32:25 2020(r365553)
@@ -36,6 +36,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200910: remove vm_map_create(9) to sync with the code
+OLD_FILES+=usr/share/man/man9/vm_map_create.9.gz
+
 # 20200820: Removal of the ufm driver.
 OLD_FILES+=usr/share/man/man4/ufm.4.gz
 

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileThu Sep 10 04:17:23 2020
(r365552)
+++ head/share/man/man9/MakefileThu Sep 10 06:32:25 2020
(r365553)
@@ -361,7 +361,6 @@ MAN=accept_filter.9 \
vm_fault_prefault.9 \
vm_map.9 \
vm_map_check_protection.9 \
-   vm_map_create.9 \
vm_map_delete.9 \
vm_map_entry_resize_free.9 \
vm_map_find.9 \

Modified: head/share/man/man9/vm_map.9
==
--- head/share/man/man9/vm_map.9Thu Sep 10 04:17:23 2020
(r365552)
+++ head/share/man/man9/vm_map.9Thu Sep 10 06:32:25 2020
(r365553)
@@ -310,7 +310,6 @@ is backed by a
 .Sh SEE ALSO
 .Xr pmap 9 ,
 .Xr vm_map_check_protection 9 ,
-.Xr vm_map_create 9 ,
 .Xr vm_map_delete 9 ,
 .Xr vm_map_entry_resize_free 9 ,
 .Xr vm_map_find 9 ,
___
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: r365579 - in head/sys: arm64/include dev/gpio

2020-09-10 Thread Andrew Turner
Author: andrew
Date: Thu Sep 10 14:58:46 2020
New Revision: 365579
URL: https://svnweb.freebsd.org/changeset/base/365579

Log:
  Move the pl061 acpi attachment earlier
  
  As the pl061 driver can be an interrupt controller attach it earlier in the
  boot so other drivers can use it.
  
  Use a new GPIO xref to not conflict with the existing root interrupt
  controller.
  
  Sponsored by: Innovate UK

Modified:
  head/sys/arm64/include/intr.h
  head/sys/dev/gpio/pl061_acpi.c

Modified: head/sys/arm64/include/intr.h
==
--- head/sys/arm64/include/intr.h   Thu Sep 10 14:13:49 2020
(r365578)
+++ head/sys/arm64/include/intr.h   Thu Sep 10 14:58:46 2020
(r365579)
@@ -51,6 +51,7 @@ void intr_ipi_dispatch(u_int, struct trapframe *);
 #ifdef DEV_ACPI
 #defineACPI_INTR_XREF  1
 #defineACPI_MSI_XREF   2
+#defineACPI_GPIO_XREF  3
 #endif
 
 #endif /* _MACHINE_INTR_H */

Modified: head/sys/dev/gpio/pl061_acpi.c
==
--- head/sys/dev/gpio/pl061_acpi.c  Thu Sep 10 14:13:49 2020
(r365578)
+++ head/sys/dev/gpio/pl061_acpi.c  Thu Sep 10 14:58:46 2020
(r365579)
@@ -76,7 +76,7 @@ pl061_acpi_attach(device_t dev)
if (error != 0)
return (error);
 
-   if (!intr_pic_register(dev, ACPI_INTR_XREF)) {
+   if (!intr_pic_register(dev, ACPI_GPIO_XREF)) {
device_printf(dev, "couldn't register PIC\n");
pl061_detach(dev);
error = ENXIO;
@@ -98,6 +98,7 @@ DEFINE_CLASS_1(gpio, pl061_acpi_driver, pl061_acpi_met
 
 static devclass_t pl061_devclass;
 
-DRIVER_MODULE(pl061, acpi, pl061_driver, pl061_devclass, NULL, NULL);
+EARLY_DRIVER_MODULE(pl061, acpi, pl061_acpi_driver, pl061_devclass, NULL, NULL,
+BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);
 MODULE_DEPEND(pl061, acpi, 1, 1, 1);
 MODULE_DEPEND(pl061, gpiobus, 1, 1, 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: r365575 - head

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 14:11:24 2020
New Revision: 365575
URL: https://svnweb.freebsd.org/changeset/base/365575

Log:
  Use the correct config names for some .clang-format entries
  
  Those values are enum entries and should use "Never" instead of "false".
  clang-format currently accepts false, but it's better to use the correct
  syntax in case that changes in the future.

Modified:
  head/.clang-format   (contents, props changed)

Modified: head/.clang-format
==
--- head/.clang-format  Thu Sep 10 13:57:57 2020(r365574)
+++ head/.clang-format  Thu Sep 10 14:11:24 2020(r365575)
@@ -9,10 +9,10 @@ AlignEscapedNewlines: Left
 AlignOperands: false
 AlignTrailingComments: false
 AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: false
+AllowShortBlocksOnASingleLine: Never
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: InlineOnly
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: TopLevelDefinitions
 AlwaysBreakBeforeMultilineStrings: false
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365576 - head

2020-09-10 Thread Alex Richardson
Author: arichardson
Date: Thu Sep 10 14:11:29 2020
New Revision: 365576
URL: https://svnweb.freebsd.org/changeset/base/365576

Log:
  Set AlignTrailingComments in the clang-format config
  
  This seems to be fairly common in existing code and often looks better when
  adding trailing comments to e.g. enumerators or array initializers.
  See D26340 for more context.
  
  Reviewed By:  emaste
  Differential Revision: https://reviews.freebsd.org/D26391

Modified:
  head/.clang-format   (contents, props changed)

Modified: head/.clang-format
==
--- head/.clang-format  Thu Sep 10 14:11:24 2020(r365575)
+++ head/.clang-format  Thu Sep 10 14:11:29 2020(r365576)
@@ -7,7 +7,7 @@ AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlines: Left
 AlignOperands: false
-AlignTrailingComments: false
+AlignTrailingComments: true
 AllowAllParametersOfDeclarationOnNextLine: false
 AllowShortBlocksOnASingleLine: Never
 AllowShortCaseLabelsOnASingleLine: false
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r365577 - in head/sys: dev/iommu x86/iommu

2020-09-10 Thread Ruslan Bukin
Author: br
Date: Thu Sep 10 14:12:25 2020
New Revision: 365577
URL: https://svnweb.freebsd.org/changeset/base/365577

Log:
  Move the rid variable to the generic iommu context.
  It could be used in various IOMMU platforms, not only DMAR.
  
  Reviewed by:  kib
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D26373

Modified:
  head/sys/dev/iommu/iommu.h
  head/sys/x86/iommu/intel_ctx.c
  head/sys/x86/iommu/intel_dmar.h

Modified: head/sys/dev/iommu/iommu.h
==
--- head/sys/dev/iommu/iommu.h  Thu Sep 10 14:11:29 2020(r365576)
+++ head/sys/dev/iommu/iommu.h  Thu Sep 10 14:12:25 2020(r365577)
@@ -135,6 +135,7 @@ struct iommu_ctx {
u_long loads;   /* atomic updates, for stat only */
u_long unloads; /* same */
u_int flags;/* (u) */
+   uint16_t rid;   /* (c) pci RID */
 };
 
 /* struct iommu_ctx flags */

Modified: head/sys/x86/iommu/intel_ctx.c
==
--- head/sys/x86/iommu/intel_ctx.c  Thu Sep 10 14:11:29 2020
(r365576)
+++ head/sys/x86/iommu/intel_ctx.c  Thu Sep 10 14:12:25 2020
(r365577)
@@ -118,9 +118,9 @@ dmar_map_ctx_entry(struct dmar_ctx *ctx, struct sf_buf
 
dmar = CTX2DMAR(ctx);
 
-   ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 +
-   PCI_RID2BUS(ctx->rid), IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp);
-   ctxp += ctx->rid & 0xff;
+   ctxp = dmar_map_pgtbl(dmar->ctx_obj, 1 + PCI_RID2BUS(ctx->context.rid),
+   IOMMU_PGF_NOALLOC | IOMMU_PGF_WAITOK, sfp);
+   ctxp += ctx->context.rid & 0xff;
return (ctxp);
 }
 
@@ -386,7 +386,7 @@ dmar_ctx_alloc(struct dmar_domain *domain, uint16_t ri
ctx->context.domain = DOM2IODOM(domain);
ctx->context.tag = malloc(sizeof(struct bus_dma_tag_iommu),
M_DMAR_CTX, M_WAITOK | M_ZERO);
-   ctx->rid = rid;
+   ctx->context.rid = rid;
ctx->refs = 1;
return (ctx);
 }
@@ -643,8 +643,9 @@ dmar_move_ctx_to_domain(struct dmar_domain *domain, st
error = dmar_flush_for_ctx_entry(dmar, true);
/* If flush failed, rolling back would not work as well. */
printf("dmar%d rid %x domain %d->%d %s-mapped\n",
-   dmar->iommu.unit, ctx->rid, old_domain->domain, domain->domain,
-   (domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0 ? "id" : "re");
+   dmar->iommu.unit, ctx->context.rid, old_domain->domain,
+   domain->domain, (domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0 ?
+   "id" : "re");
dmar_unref_domain_locked(dmar, old_domain);
TD_PINNED_ASSERT;
return (error);
@@ -776,7 +777,7 @@ dmar_find_ctx_locked(struct dmar_unit *dmar, uint16_t 
 
LIST_FOREACH(domain, >domains, link) {
LIST_FOREACH(ctx, >contexts, link) {
-   if (ctx->rid == rid)
+   if (ctx->context.rid == rid)
return (ctx);
}
}

Modified: head/sys/x86/iommu/intel_dmar.h
==
--- head/sys/x86/iommu/intel_dmar.h Thu Sep 10 14:11:29 2020
(r365576)
+++ head/sys/x86/iommu/intel_dmar.h Thu Sep 10 14:12:25 2020
(r365577)
@@ -75,7 +75,6 @@ struct dmar_domain {
 
 struct dmar_ctx {
struct iommu_ctx context;
-   uint16_t rid;   /* (c) pci RID */
uint64_t last_fault_rec[2]; /* Last fault reported */
LIST_ENTRY(dmar_ctx) link;  /* (u) Member in the domain list */
u_int refs; /* (u) References from tags */
___
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: r365578 - head/stand/efi/loader/arch/arm64

2020-09-10 Thread Andrew Turner
Author: andrew
Date: Thu Sep 10 14:13:49 2020
New Revision: 365578
URL: https://svnweb.freebsd.org/changeset/base/365578

Log:
  Ignore the .interp section in the arm64 EFI loader
  
  When building the loader an unneeded .interp section may be added. Move
  this to the unused section region so offsets of used sections don't
  change.
  
  Obtained from:CheriBSD
  Sponsored by: Innovate UK

Modified:
  head/stand/efi/loader/arch/arm64/ldscript.arm64

Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64
==
--- head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:12:25 
2020(r365577)
+++ head/stand/efi/loader/arch/arm64/ldscript.arm64 Thu Sep 10 14:13:49 
2020(r365578)
@@ -80,6 +80,7 @@ SECTIONS
   _edata = .;
 
   /* Unused sections */
+  .interp  : { *(.interp) }
   .dynstr  : { *(.dynstr) }
   .hash: { *(.hash) }
 }
___
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: r365578 - head/stand/efi/loader/arch/arm64

2020-09-10 Thread Brandon Bergren
You can truly get rid of it with /DISCARD/ and shave the bytes off entirely, by 
the way.

On Thu, Sep 10, 2020, at 9:13 AM, Andrew Turner wrote:
> Author: andrew
> Date: Thu Sep 10 14:13:49 2020
> New Revision: 365578
> URL: https://svnweb.freebsd.org/changeset/base/365578
> 
> Log:
>   Ignore the .interp section in the arm64 EFI loader
>   
>   When building the loader an unneeded .interp section may be added. Move
>   this to the unused section region so offsets of used sections don't
>   change.
>   
>   Obtained from:  CheriBSD
>   Sponsored by:   Innovate UK
> 
> Modified:
>   head/stand/efi/loader/arch/arm64/ldscript.arm64
> 
> Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64
> ==
> --- head/stand/efi/loader/arch/arm64/ldscript.arm64   Thu Sep 10 14:12:25 
> 2020  (r365577)
> +++ head/stand/efi/loader/arch/arm64/ldscript.arm64   Thu Sep 10 14:13:49 
> 2020  (r365578)
> @@ -80,6 +80,7 @@ SECTIONS
>_edata = .;
>  
>/* Unused sections */
> +  .interp: { *(.interp) }
>.dynstr: { *(.dynstr) }
>.hash  : { *(.hash) }
>  }
>

-- 
  Brandon Bergren
  bdra...@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"


Re: svn commit: r365578 - head/stand/efi/loader/arch/arm64

2020-09-10 Thread Andrew Turner
We already discard it via objcopy when converting from elf -> EFI as we only 
copy the sections needed in the final EFI file.

Andrew

> On 10 Sep 2020, at 15:22, Brandon Bergren  wrote:
> 
> You can truly get rid of it with /DISCARD/ and shave the bytes off entirely, 
> by the way.
> 
> On Thu, Sep 10, 2020, at 9:13 AM, Andrew Turner wrote:
>> Author: andrew
>> Date: Thu Sep 10 14:13:49 2020
>> New Revision: 365578
>> URL: https://svnweb.freebsd.org/changeset/base/365578
>> 
>> Log:
>>  Ignore the .interp section in the arm64 EFI loader
>> 
>>  When building the loader an unneeded .interp section may be added. Move
>>  this to the unused section region so offsets of used sections don't
>>  change.
>> 
>>  Obtained from:  CheriBSD
>>  Sponsored by:   Innovate UK
>> 
>> Modified:
>>  head/stand/efi/loader/arch/arm64/ldscript.arm64
>> 
>> Modified: head/stand/efi/loader/arch/arm64/ldscript.arm64
>> ==
>> --- head/stand/efi/loader/arch/arm64/ldscript.arm64  Thu Sep 10 14:12:25 
>> 2020 (r365577)
>> +++ head/stand/efi/loader/arch/arm64/ldscript.arm64  Thu Sep 10 14:13:49 
>> 2020 (r365578)
>> @@ -80,6 +80,7 @@ SECTIONS
>>   _edata = .;
>> 
>>   /* Unused sections */
>> +  .interp   : { *(.interp) }
>>   .dynstr: { *(.dynstr) }
>>   .hash  : { *(.hash) }
>> }
>> 
> 
> -- 
>  Brandon Bergren
>  bdra...@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: r365568 - in stable/12: share/man/man4 sys/netinet sys/netinet/tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 12:52:50 2020
New Revision: 365568
URL: https://svnweb.freebsd.org/changeset/base/365568

Log:
  MFC r359487:
  
  Allow the TCP backhole detection to be disabled at all, enabled only
  for IPv4, enabled only for IPv6, and enabled for IPv4 and IPv6.
  The current blackhole detection might classify a temporary outage as
  an MTU issue and reduces permanently the MSS. Since the consequences of
  such a reduction due to a misclassification are much more drastically
  for IPv4 than for IPv6, allow the administrator to enable it for IPv6 only.
  
  Manually resolve conflict for BBR, which does not exist in stable/12

Modified:
  stable/12/share/man/man4/tcp.4
  stable/12/sys/netinet/tcp_stacks/rack.c
  stable/12/sys/netinet/tcp_timer.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/tcp.4
==
--- stable/12/share/man/man4/tcp.4  Thu Sep 10 12:49:16 2020
(r365567)
+++ stable/12/share/man/man4/tcp.4  Thu Sep 10 12:52:50 2020
(r365568)
@@ -34,7 +34,7 @@
 .\" From: @(#)tcp.48.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd March 29, 2020
+.Dd March 31, 2020
 .Dt TCP 4
 .Os
 .Sh NAME
@@ -573,21 +573,31 @@ specific connection.
 This is needed to help with connection establishment
 when a broken firewall is in the network path.
 .It Va pmtud_blackhole_detection
-Turn on automatic path MTU blackhole detection.
-In case of retransmits OS will
-lower the MSS to check if it's MTU problem.
-If current MSS is greater than
-configured value to try
+Enable automatic path MTU blackhole detection.
+In case of retransmits of MSS sized segments,
+the OS will lower the MSS to check if it's an MTU problem.
+If the current MSS is greater than the configured value to try
 .Po Va net.inet.tcp.pmtud_blackhole_mss
 and
 .Va net.inet.tcp.v6pmtud_blackhole_mss
 .Pc ,
 it will be set to this value, otherwise,
-MSS will be set to default values
+the MSS will be set to the default values
 .Po Va net.inet.tcp.mssdflt
 and
 .Va net.inet.tcp.v6mssdflt
 .Pc .
+Settings:
+.Bl -tag -compact
+.It 0
+Disable path MTU blackhole detection.
+.It 1
+Enable path MTU blackhole detection for IPv4 and IPv6.
+.It 2
+Enable path MTU blackhole detection only for IPv4.
+.It 3
+Enable path MTU blackhole detection only for IPv6.
+.El
 .It Va pmtud_blackhole_mss
 MSS to try for IPv4 if PMTU blackhole detection is turned on.
 .It Va v6pmtud_blackhole_mss

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 12:49:16 2020
(r365567)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 12:52:50 2020
(r365568)
@@ -2934,6 +2934,7 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra
int32_t rexmt;
struct inpcb *inp;
int32_t retval = 0;
+   bool isipv6;
 
inp = tp->t_inpcb;
if (tp->t_timers->tt_flags & TT_STOPPED) {
@@ -3010,11 +3011,16 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra
 * of packets and process straight to FIN. In that case we won't
 * catch ESTABLISHED state.
 */
-   if (V_tcp_pmtud_blackhole_detect && (((tp->t_state == TCPS_ESTABLISHED))
-   || (tp->t_state == TCPS_FIN_WAIT_1))) {
 #ifdef INET6
-   int32_t isipv6;
+   isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? true : false;
+#else
+   isipv6 = false;
 #endif
+   if (((V_tcp_pmtud_blackhole_detect == 1) ||
+   (V_tcp_pmtud_blackhole_detect == 2 && !isipv6) ||
+   (V_tcp_pmtud_blackhole_detect == 3 && isipv6)) &&
+   ((tp->t_state == TCPS_ESTABLISHED) ||
+   (tp->t_state == TCPS_FIN_WAIT_1))) {
 
/*
 * Idea here is that at each stage of mtu probe (usually,
@@ -3044,7 +3050,6 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *ra
 * default in an attempt to retransmit.
 */
 #ifdef INET6
-   isipv6 = (tp->t_inpcb->inp_vflag & INP_IPV6) ? 1 : 0;
if (isipv6 &&
tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss) {
/* Use the sysctl tuneable blackhole MSS. */

Modified: stable/12/sys/netinet/tcp_timer.c
==
--- stable/12/sys/netinet/tcp_timer.c   Thu Sep 10 12:49:16 2020
(r365567)
+++ stable/12/sys/netinet/tcp_timer.c   Thu Sep 10 12:52:50 2020
(r365568)
@@ -589,6 +589,7 @@ tcp_timer_rexmt(void * xtp)
int rexmt;
struct inpcb *inp;
struct epoch_tracker et;
+   bool isipv6;
 #ifdef TCPDEBUG
int ostate;
 
@@ -687,12 +688,16 @@ tcp_timer_rexmt(void * xtp)
 * packets and process straight to FIN. In that case we won't catch

svn commit: r365571 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 13:17:23 2020
New Revision: 365571
URL: https://svnweb.freebsd.org/changeset/base/365571

Log:
  MFC r357101:
  
  Don't delay the ACK for a TCP segment with the CWR flag set.
  This allows the data sender to increase the CWND faster.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:15:17 2020
(r365570)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:17:23 2020
(r365571)
@@ -1610,8 +1610,10 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
 * TCP ECN processing.
 */
if (tp->t_flags & TF_ECN_PERMIT) {
-   if (thflags & TH_CWR)
+   if (thflags & TH_CWR) {
tp->t_flags &= ~TF_ECN_SND_ECE;
+   tp->t_flags |= TF_ACKNOW;
+   }
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
tp->t_flags |= TF_ECN_SND_ECE;

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 13:15:17 2020
(r365570)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 13:17:23 2020
(r365571)
@@ -6733,8 +6733,10 @@ rack_hpts_do_segment(struct mbuf *m, struct tcphdr *th
 * this to occur after we've validated the segment.
 */
if (tp->t_flags & TF_ECN_PERMIT) {
-   if (thflags & TH_CWR)
+   if (thflags & TH_CWR) {
tp->t_flags &= ~TF_ECN_SND_ECE;
+   tp->t_flags |= TF_ACKNOW;
+   }
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
tp->t_flags |= TF_ECN_SND_ECE;
___
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: r365572 - in stable/12/sys/netinet: . cc

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 13:27:53 2020
New Revision: 365572
URL: https://svnweb.freebsd.org/changeset/base/365572

Log:
  MFC r356235:
  Fix delayed ACK generation for DCTCP.
  Manually changed to use TF_ECN_SND_ECE.

Modified:
  stable/12/sys/netinet/cc/cc_dctcp.c
  stable/12/sys/netinet/tcp_input.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/cc/cc_dctcp.c
==
--- stable/12/sys/netinet/cc/cc_dctcp.c Thu Sep 10 13:17:23 2020
(r365571)
+++ stable/12/sys/netinet/cc/cc_dctcp.c Thu Sep 10 13:27:53 2020
(r365572)
@@ -272,9 +272,9 @@ dctcp_cong_signal(struct cc_var *ccv, uint32_t type)
dctcp_data->bytes_total = 0;
dctcp_data->save_sndnxt = CCV(ccv, 
snd_nxt);
} else
-   CCV(ccv, snd_ssthresh) = 
+   CCV(ccv, snd_ssthresh) =
max((cwin - (((uint64_t)cwin *
-   dctcp_data->alpha) >> 
(DCTCP_SHIFT+1))), 
+   dctcp_data->alpha) >> 
(DCTCP_SHIFT+1))),
2 * mss);
CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh);
ENTER_CONGRECOVERY(CCV(ccv, t_flags));
@@ -316,46 +316,43 @@ dctcp_post_recovery(struct cc_var *ccv)
 }
 
 /*
- * Execute an additional ECN processing using ECN field in IP header and the 
CWR
- * bit in TCP header.
- *
- * delay_ack == 0 - Delayed ACK disabled
- * delay_ack == 1 - Delayed ACK enabled
+ * Execute an additional ECN processing using ECN field in IP header
+ * and the CWR bit in TCP header.
  */
-
 static void
 dctcp_ecnpkt_handler(struct cc_var *ccv)
 {
struct dctcp *dctcp_data;
uint32_t ccflag;
-   int delay_ack;
+   int acknow;
 
dctcp_data = ccv->cc_data;
ccflag = ccv->flags;
-   delay_ack = 1;
+   acknow = 0;
 
/*
 * DCTCP responds with an ACK immediately when the CE state
 * in between this segment and the last segment has changed.
 */
if (ccflag & CCF_IPHDR_CE) {
-   if (!dctcp_data->ce_prev && (ccflag & CCF_DELACK))
-   delay_ack = 0;
-   dctcp_data->ce_prev = 1;
-   CCV(ccv, t_flags) |= TF_ECN_SND_ECE;
+   if (!dctcp_data->ce_prev) {
+   acknow = 1;
+   dctcp_data->ce_prev = 1;
+   CCV(ccv, t_flags2) |= TF_ECN_SND_ECE;
+   }
} else {
-   if (dctcp_data->ce_prev && (ccflag & CCF_DELACK))
-   delay_ack = 0;
-   dctcp_data->ce_prev = 0;
-   CCV(ccv, t_flags) &= ~TF_ECN_SND_ECE;
+   if (dctcp_data->ce_prev) {
+   acknow = 1;
+   dctcp_data->ce_prev = 0;
+   CCV(ccv, t_flags2) &= ~TF_ECN_SND_ECE;
+   }
}
 
-   /* DCTCP sets delayed ack when this segment sets the CWR flag. */
-   if ((ccflag & CCF_DELACK) && (ccflag & CCF_TCPHDR_CWR))
-   delay_ack = 1;
-
-   if (delay_ack == 0)
+   if ((acknow) || (ccflag & CCF_TCPHDR_CWR)) {
ccv->flags |= CCF_ACKNOW;
+   } else {
+   ccv->flags &= ~CCF_ACKNOW;
+   }
 }
 
 /*

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:17:23 2020
(r365571)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:27:53 2020
(r365572)
@@ -516,15 +516,12 @@ cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th,
else
tp->ccv->flags &= ~CCF_TCPHDR_CWR;
 
-   if (tp->t_flags & TF_DELACK)
-   tp->ccv->flags |= CCF_DELACK;
-   else
-   tp->ccv->flags &= ~CCF_DELACK;
-
CC_ALGO(tp)->ecnpkt_handler(tp->ccv);
 
-   if (tp->ccv->flags & CCF_ACKNOW)
+   if (tp->ccv->flags & CCF_ACKNOW) {
tcp_timer_activate(tp, TT_DELACK, tcp_delacktime);
+   tp->t_flags |= TF_ACKNOW;
+   }
}
 }
 
___
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: r365573 - in stable/12/sys/netinet: . tcp_stacks

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 13:44:35 2020
New Revision: 365573
URL: https://svnweb.freebsd.org/changeset/base/365573

Log:
  MFC r357114:
  As a TCP client only enable ECN when the corresponding sysctl variable
  indicates that ECN should be negotiated for the client side.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:27:53 2020
(r365572)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 13:44:35 2020
(r365573)
@@ -2044,7 +2044,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
tp->t_flags |= TF_ACKNOW;
 
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
-   V_tcp_do_ecn) {
+   (V_tcp_do_ecn == 1)) {
tp->t_flags |= TF_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==
--- stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 13:27:53 2020
(r365572)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Thu Sep 10 13:44:35 2020
(r365573)
@@ -5416,7 +5416,8 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, st
tp->t_flags |= TF_ACKNOW;
}
 
-   if ((thflags & TH_ECE) && V_tcp_do_ecn) {
+   if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
+   (V_tcp_do_ecn == 1)) {
tp->t_flags |= TF_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}
___
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: r365566 - in stable/12/cddl: contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/tools

2020-09-10 Thread Mark Johnston
Author: markj
Date: Thu Sep 10 12:41:01 2020
New Revision: 365566
URL: https://svnweb.freebsd.org/changeset/base/365566

Log:
  MFC r364438, r364440, r364483:
  Enable creation of static userspace probes in incremental builds.

Modified:
  stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
  stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c
  stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.h
  stable/12/cddl/usr.sbin/dtrace/tests/tools/exclude.sh
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==
--- stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c   Thu Sep 
10 12:01:35 2020(r365565)
+++ stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c   Thu Sep 
10 12:41:01 2020(r365566)
@@ -770,6 +770,7 @@ dt_symtab_lookup(Elf_Data *data_sym, int start, int en
 #defineDT_OP_RET   0xd65f03c0
 #defineDT_OP_CALL260x9400
 #defineDT_OP_JUMP260x1400
+#defineDT_REL_NONE R_AARCH64_NONE
 
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
@@ -828,7 +829,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
return (0);
 }
 #elif defined(__arm__)
-/* XXX */
+#defineDT_REL_NONE R_ARM_NONE
+
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
 uint32_t *off)
@@ -838,7 +840,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
return (-1);
 }
 #elif defined(__mips__)
-/* XXX */
+#defineDT_REL_NONE R_MIPS_NONE
+
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
 uint32_t *off)
@@ -858,7 +861,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 #define DT_IS_BRANCH(inst) ((inst & 0xfc00) == 0x4800)
 #define DT_IS_BL(inst) (DT_IS_BRANCH(inst) && (inst & 0x01))
 
-/* XXX */
+#defineDT_REL_NONE R_PPC_NONE
+
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
 uint32_t *off)
@@ -875,7 +879,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 * We only know about some specific relocation types.
 */
if (GELF_R_TYPE(rela->r_info) != R_PPC_REL24 &&
-   GELF_R_TYPE(rela->r_info) != R_PPC_PLTREL24)
+   GELF_R_TYPE(rela->r_info) != R_PPC_PLTREL24 &&
+   GELF_R_TYPE(rela->r_info) != R_PPC_NONE)
return (-1);
 
/*
@@ -929,7 +934,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
return (0);
 }
 #elif defined(__riscv)
-/* XXX */
+#defineDT_REL_NONE R_RISCV_NONE
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
 uint32_t *off)
@@ -949,6 +954,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 #defineDT_OP_XOR_EAX_0 0x33
 #defineDT_OP_XOR_EAX_1 0xc0
 
+#defineDT_REL_NONE R_386_NONE
+
 static int
 dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, GElf_Rela *rela,
 uint32_t *off)
@@ -971,7 +978,8 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 * x86 architectures.
 */
if (GELF_R_TYPE(rela->r_info) != R_386_PC32 &&
-   GELF_R_TYPE(rela->r_info) != R_386_PLT32)
+   GELF_R_TYPE(rela->r_info) != R_386_PLT32 &&
+   GELF_R_TYPE(rela->r_info) != R_386_NONE)
return (-1);
 
/*
@@ -1267,6 +1275,11 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e
 * We take a first pass through all the relocations to
 * populate our string table and count the number of extra
 * symbols we'll require.
+*
+* We also handle the case where the object has already been
+* processed, to support incremental rebuilds.  Relocations
+* of interest are converted to type NONE, but all information
+* needed to reconstruct the output DOF is retained.
 */
strtab = dt_strtab_create(1);
nsym = 0;
@@ -1274,7 +1287,6 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e
istr = data_str->d_size;
 
for (i = 0; i < shdr_rel.sh_size / shdr_rel.sh_entsize; i++) {
-
if (shdr_rel.sh_type == SHT_RELA) {
if (gelf_getrela(data_rel, i, ) == NULL)
continue;
@@ -1339,7 +1351,12 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e
objkey, s);
 
if (dt_strtab_index(strtab, p) == -1) {
-   nsym++;
+   /*
+  

svn commit: r365567 - stable/12/share/man/man4

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 12:49:16 2020
New Revision: 365567
URL: https://svnweb.freebsd.org/changeset/base/365567

Log:
  MFC 359422:
  Be a bit more precisly in the description of the sysctl variable
  net.inet.tcp.pmtud_blackhole_detection. Also remove three entries,
  which are not sysctl variables but statistic counters for TCP.
  Thanks to 0mp@ for suggesting an improvement.

Modified:
  stable/12/share/man/man4/tcp.4
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/man/man4/tcp.4
==
--- stable/12/share/man/man4/tcp.4  Thu Sep 10 12:41:01 2020
(r365566)
+++ stable/12/share/man/man4/tcp.4  Thu Sep 10 12:49:16 2020
(r365567)
@@ -34,7 +34,7 @@
 .\" From: @(#)tcp.48.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd December 1, 2019
+.Dd March 29, 2020
 .Dt TCP 4
 .Os
 .Sh NAME
@@ -577,7 +577,12 @@ Turn on automatic path MTU blackhole detection.
 In case of retransmits OS will
 lower the MSS to check if it's MTU problem.
 If current MSS is greater than
-configured value to try, it will be set to configured value, otherwise,
+configured value to try
+.Po Va net.inet.tcp.pmtud_blackhole_mss
+and
+.Va net.inet.tcp.v6pmtud_blackhole_mss
+.Pc ,
+it will be set to this value, otherwise,
 MSS will be set to default values
 .Po Va net.inet.tcp.mssdflt
 and
@@ -587,13 +592,6 @@ and
 MSS to try for IPv4 if PMTU blackhole detection is turned on.
 .It Va v6pmtud_blackhole_mss
 MSS to try for IPv6 if PMTU blackhole detection is turned on.
-.It Va pmtud_blackhole_activated
-Number of times configured values were used in an attempt to downshift.
-.It Va pmtud_blackhole_activated_min_mss
-Number of times default MSS was used in an attempt to downshift.
-.It Va pmtud_blackhole_failed
-Number of connections for which retransmits continued even after MSS
-downshift.
 .It Va functions_available
 List of available TCP function blocks (TCP stacks).
 .It Va functions_default
___
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: r365569 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 12:54:46 2020
New Revision: 365569
URL: https://svnweb.freebsd.org/changeset/base/365569

Log:
  MFC r359926:
  
  Improve the TCP blackhole detection. The principle is to reduce the
  MSS in two steps and try each candidate two times. However, if two
  candidates are the same (which is the case in TCP/IPv6), this candidate
  was tested four times. This patch ensures that each candidate actually
  reduced the MSS and is only tested 2 times. This reduces the time window
  of missclassifying a temporary outage as an MTU issue.

Modified:
  stable/12/sys/netinet/tcp_timer.c
  stable/12/sys/netinet/tcp_var.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_timer.c
==
--- stable/12/sys/netinet/tcp_timer.c   Thu Sep 10 12:52:50 2020
(r365568)
+++ stable/12/sys/netinet/tcp_timer.c   Thu Sep 10 12:54:46 2020
(r365569)
@@ -698,16 +698,40 @@ tcp_timer_rexmt(void * xtp)
(V_tcp_pmtud_blackhole_detect == 3 && isipv6)) &&
((tp->t_state == TCPS_ESTABLISHED) ||
(tp->t_state == TCPS_FIN_WAIT_1))) {
-   /*
-* Idea here is that at each stage of mtu probe (usually, 1448
-* -> 1188 -> 524) should be given 2 chances to recover before
-*  further clamping down. 'tp->t_rxtshift % 2 == 0' should
-*  take care of that.
-*/
+   if (tp->t_rxtshift == 1) {
+   /*
+* We enter blackhole detection after the first
+* unsuccessful timer based retransmission.
+* Then we reduce up to two times the MSS, each
+* candidate giving two tries of retransmissions.
+* But we give a candidate only two tries, if it
+* actually reduces the MSS.
+*/
+   tp->t_blackhole_enter = 2;
+   tp->t_blackhole_exit = tp->t_blackhole_enter;
+   if (isipv6) {
+#ifdef INET6
+   if (tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss)
+   tp->t_blackhole_exit += 2;
+   if (tp->t_maxseg > V_tcp_v6mssdflt &&
+   V_tcp_v6pmtud_blackhole_mss > 
V_tcp_v6mssdflt)
+   tp->t_blackhole_exit += 2;
+#endif
+   } else {
+#ifdef INET
+   if (tp->t_maxseg > V_tcp_pmtud_blackhole_mss)
+   tp->t_blackhole_exit += 2;
+   if (tp->t_maxseg > V_tcp_mssdflt &&
+   V_tcp_pmtud_blackhole_mss > V_tcp_mssdflt)
+   tp->t_blackhole_exit += 2;
+#endif
+   }
+   }
if (((tp->t_flags2 & (TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) ==
(TF2_PLPMTU_PMTUD|TF2_PLPMTU_MAXSEGSNT)) &&
-   (tp->t_rxtshift >= 2 && tp->t_rxtshift < 6 &&
-   tp->t_rxtshift % 2 == 0)) {
+   (tp->t_rxtshift >= tp->t_blackhole_enter &&
+   tp->t_rxtshift < tp->t_blackhole_exit &&
+   (tp->t_rxtshift - tp->t_blackhole_enter) % 2 == 0)) {
/*
 * Enter Path MTU Black-hole Detection mechanism:
 * - Disable Path MTU Discovery (IP "DF" bit).
@@ -727,7 +751,8 @@ tcp_timer_rexmt(void * xtp)
 */
 #ifdef INET6
if (isipv6 &&
-   tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss) {
+   tp->t_maxseg > V_tcp_v6pmtud_blackhole_mss &&
+   V_tcp_v6pmtud_blackhole_mss > V_tcp_v6mssdflt) {
/* Use the sysctl tuneable blackhole MSS. */
tp->t_maxseg = V_tcp_v6pmtud_blackhole_mss;
TCPSTAT_INC(tcps_pmtud_blackhole_activated);
@@ -746,7 +771,8 @@ tcp_timer_rexmt(void * xtp)
else
 #endif
 #ifdef INET
-   if (tp->t_maxseg > V_tcp_pmtud_blackhole_mss) {
+   if (tp->t_maxseg > V_tcp_pmtud_blackhole_mss &&
+   V_tcp_pmtud_blackhole_mss > V_tcp_mssdflt) {
/* Use the sysctl tuneable blackhole MSS. */
tp->t_maxseg = V_tcp_pmtud_blackhole_mss;
TCPSTAT_INC(tcps_pmtud_blackhole_activated);
@@ -773,11 +799,9 @@ tcp_timer_rexmt(void * xtp)
 * with a lowered MTU, maybe this isn't a blackhole and
 * we restore the previous MSS and blackhole detection
 

svn commit: r365574 - head/share/misc

2020-09-10 Thread Rainer Hurling
Author: rhurlin (ports committer)
Date: Thu Sep 10 13:57:57 2020
New Revision: 365574
URL: https://svnweb.freebsd.org/changeset/base/365574

Log:
  Add author entity for rhurlin, part 2
  
  Forgot to submit step 5 from procedure 1 in Chap. 6 of the Committers Guide:
  Update Mentor and Mentee Information
  
  Reviewed by:  arrowd (mentor), tcberner (mentor)
  Approved by:  arrowd (mentor), tcberner (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotThu Sep 10 13:44:35 2020
(r365573)
+++ head/share/misc/committers-ports.dotThu Sep 10 13:57:57 2020
(r365574)
@@ -229,6 +229,7 @@ rafan [label="Rong-En Fan\nra...@freebsd.org\n2006/06/
 rakuco [label="Raphael Kubo da Costa\nrak...@freebsd.org\n2011/08/22"]
 rene [label="Rene Ladan\nr...@freebsd.org\n2010/04/11"]
 rezny [label="Matthew Rezny\nre...@freebsd.org\n2017/01/09"]
+rhurlin [label="Rainer Hurling\nrhur...@freebsd.org\n2020/08/31"]
 riggs [label="Thomas Zander\nri...@freebsd.org\n2014/01/09"]
 rigoletto [label="Alexandre C. Guimaraes\nrigole...@freebsd.org\n2018/10/01"]
 rm [label="Ruslan Makhmatkhanov\n...@freebsd.org\n2011/11/06"]
@@ -320,6 +321,8 @@ araujo -> pclin
 araujo -> pgollucci
 araujo -> samm
 
+arrowd -> rhurlin
+
 arved -> markus
 arved -> stefan
 
@@ -746,6 +749,7 @@ tcberner -> joneum
 tcberner -> kai
 tcberner -> lbartoletti
 tcberner -> pkubaj
+tcberner -> rhurlin
 tcberner -> rigoletto
 tcberner -> salvadore
 tcberner -> yuri
___
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: r365570 - stable/12/sys/netinet

2020-09-10 Thread Michael Tuexen
Author: tuexen
Date: Thu Sep 10 13:15:17 2020
New Revision: 365570
URL: https://svnweb.freebsd.org/changeset/base/365570

Log:
  MFC r358621:
  When using automatically generated flow labels and using TCP SYN
  cookies, use the same flow label for the segments sent during the
  handshake and after the handshake.
  This fixes a bug by making sure that sc_flowlabel is always stored in
  network byte order.

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

Modified: stable/12/sys/netinet/tcp_syncache.c
==
--- stable/12/sys/netinet/tcp_syncache.cThu Sep 10 12:54:46 2020
(r365569)
+++ stable/12/sys/netinet/tcp_syncache.cThu Sep 10 13:15:17 2020
(r365570)
@@ -2161,7 +2161,8 @@ syncookie_lookup(struct in_conninfo *inc, struct synca
 #ifdef INET6
case INC_ISIPV6:
if (sotoinpcb(lso)->inp_flags & IN6P_AUTOFLOWLABEL)
-   sc->sc_flowlabel = sc->sc_iss & IPV6_FLOWLABEL_MASK;
+   sc->sc_flowlabel =
+   htonl(sc->sc_iss) & IPV6_FLOWLABEL_MASK;
break;
 #endif
}
___
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"