Re: svn commit: r345707 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk u

2019-03-29 Thread Enji Cooper

> On Mar 29, 2019, at 8:09 PM, Rodney W. Grimes  
> wrote:
> 
>> Author: ngie
>> Date: Fri Mar 29 18:43:46 2019
>> New Revision: 345707
>> URL: https://svnweb.freebsd.org/changeset/base/345707
>> 
>> Log:
>>  Revert r345706: the third time will be the charm
>> 
>>  When a review is closed via Phabricator it updates the patch attached to the
>>  review. I downloaded the raw patch from Phabricator, applied it, and 
>> repeated
>>  my mistake from r345704 by accident mixing content from D19732 and D19738.
> 
> Which, arguable is a feature or mis feature depending on the point
> of view.  I do not like it when I go to look at someone elses
> committed code siting a review, as I want to actually see what
> it was that was committed.  You can find the pre-commit diff,
> but it takes a bit of probling.  The upside is you can get
> both diffs from the same place and diff the diffs :-)
> 
>>  For my own personal sanity, I will try not to mix reviews like this in the
>>  future.
> 
> :-)  Been there, almost did that too.
> Pre commit last minute svn diff saved me.

…

This is why I’m doing the following from here on out:

$ arc patch
$ svn ci

Unfortunately svn doesn’t support all of the niceties of “arc land”. Otherwise, 
I would have used that.

The Facebook version of “arc land” (before their new non-public variation) 
supported verifying diffs in local repos vs Phabricator to make sure that the 
diff content was consistent/correct.

* Pro: it would catch issues like what I did the first time.
* Con: I couldn’t make last minute changes (I would need to resubmit the change 
and have it re-reviewed, which I argue is a good feature).

Just some food for thought. For now, arc patch/svn ci works for me.

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


Re: svn commit: r345707 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk u

2019-03-29 Thread Warner Losh
On Fri, Mar 29, 2019, 9:15 PM Enji Cooper  wrote:

>
> > On Mar 29, 2019, at 8:09 PM, Rodney W. Grimes 
> wrote:
> >
> >> Author: ngie
> >> Date: Fri Mar 29 18:43:46 2019
> >> New Revision: 345707
> >> URL: https://svnweb.freebsd.org/changeset/base/345707
> >>
> >> Log:
> >>  Revert r345706: the third time will be the charm
> >>
> >>  When a review is closed via Phabricator it updates the patch attached
> to the
> >>  review. I downloaded the raw patch from Phabricator, applied it, and
> repeated
> >>  my mistake from r345704 by accident mixing content from D19732 and
> D19738.
> >
> > Which, arguable is a feature or mis feature depending on the point
> > of view.  I do not like it when I go to look at someone elses
> > committed code siting a review, as I want to actually see what
> > it was that was committed.  You can find the pre-commit diff,
> > but it takes a bit of probling.  The upside is you can get
> > both diffs from the same place and diff the diffs :-)
> >
> >>  For my own personal sanity, I will try not to mix reviews like this in
> the
> >>  future.
> >
> > :-)  Been there, almost did that too.
> > Pre commit last minute svn diff saved me.
>
> …
>
> This is why I’m doing the following from here on out:
>
> $ arc patch
> $ svn ci
>
> Unfortunately svn doesn’t support all of the niceties of “arc land”.
> Otherwise, I would have used that.
>
> The Facebook version of “arc land” (before their new non-public variation)
> supported verifying diffs in local repos vs Phabricator to make sure that
> the diff content was consistent/correct.
>
> * Pro: it would catch issues like what I did the first time.
> * Con: I couldn’t make last minute changes (I would need to resubmit the
> change and have it re-reviewed, which I argue is a good feature).
>
> Just some food for thought. For now, arc patch/svn ci works for me.
>

I use git svn and git show every commit so I'm sure when I want to do
multiple at once. Phab doesn't make that easy, alas, so I often choose the
lesser evil of just getting a review on the squashed branch. I only split
when there is a good reason. If we had better tools, I wouldn't be forced
to pick, but you go to wat with the tools you have...

Warner

>
___
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: r345707 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk u

2019-03-29 Thread Rodney W. Grimes
> Author: ngie
> Date: Fri Mar 29 18:43:46 2019
> New Revision: 345707
> URL: https://svnweb.freebsd.org/changeset/base/345707
> 
> Log:
>   Revert r345706: the third time will be the charm
>   
>   When a review is closed via Phabricator it updates the patch attached to the
>   review. I downloaded the raw patch from Phabricator, applied it, and 
> repeated
>   my mistake from r345704 by accident mixing content from D19732 and D19738.

Which, arguable is a feature or mis feature depending on the point
of view.  I do not like it when I go to look at someone elses
committed code siting a review, as I want to actually see what
it was that was committed.  You can find the pre-commit diff,
but it takes a bit of probling.  The upside is you can get
both diffs from the same place and diff the diffs :-)

>   For my own personal sanity, I will try not to mix reviews like this in the
>   future.

:-)  Been there, almost did that too.
Pre commit last minute svn diff saved me.


>   MFC after:  1 month
>   MFC with:   r345706
>   Approved by:emaste (mentor, implicit)
...

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


svn commit: r345723 - head/share/mk

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Sat Mar 30 00:57:33 2019
New Revision: 345723
URL: https://svnweb.freebsd.org/changeset/base/345723

Log:
  PROG_OVERRIDE_VARS should override default values if specified
  
  The behavior prior to this change would not override default values if set in
  `bsd.own.mk`, or (in the more general case) globally before `bsd.progs.mk` was
  included. This affected `bsd.test.mk` as well, since it consumes
  `bsd.progs.mk`.
  
  Some examples of this failing behavior are as follows:
  
  * `BINMODE` defaults to 0555 per `bsd.own.mk`. If someone wanted to set the
`BINMODE` to `NOBINMODE` (0444) for `prog`, for example, like
`BINMODE.prog= ${NOBINMODE}`, `bsd.progs.mk` would not honor the per-PROG
setting.
  * An application, `prog`, does not build at `WARNS?= 6`. Before this change,
setting to a lower `WARNS` value, e.g., `WARNS.prog= 3`, would have been
impossible, requiring that `prog` be built from another directory,
the global `WARNS` be lowered, or a per-PROG value needing to be set
across the board. None of the above workarounds is desirable.
  
  This change unbreaks variables defined in `PROG_OVERRIDE_VARS` which have
  defaults set before `bsd.progs.mk` is included, by setting them to their
  defined values if set on a per-PROG basis.
  
  Reviewed by:  asomers
  Approved by:  emaste (mentor)
  MFC after:1 month
  Differential Revision: https://reviews.freebsd.org/D19755

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Sat Mar 30 00:57:07 2019(r345722)
+++ head/share/mk/bsd.progs.mk  Sat Mar 30 00:57:33 2019(r345723)
@@ -34,6 +34,11 @@ $v += ${${v}.${PROG}}
 $v += ${${v}_${PROG}}
 .endif
 .else
+.if defined(${v}.${PROG})
+$v = ${${v}.${PROG}}
+.elif defined(${v}_${PROG})
+$v = ${${v}_${PROG}}
+.endif
 $v ?=
 .endif
 .endfor
___
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: r345715 - vendor/google/capsicum-test/dist

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 21:41:14 2019
New Revision: 345715
URL: https://svnweb.freebsd.org/changeset/base/345715

Log:
  Merge the following changes from the capsicum-test project [1]
  
  Log:
  ```
  commit feb47278d7cffa8cf4bc8c8ff78047126fa41e82 (HEAD -> dev, origin/dev, 
origin/HEAD)
  Author: ngie-eign <1574099+ngie-e...@users.noreply.github.com>
  Date:   Fri Mar 22 10:51:04 2019 -0700
  
  Remove `FAIL` macro use for non-x86 architectures when testing 
`sysarch(2)` (#38)
  
  `FAIL()` does not support being called in the form noted in the test,
  which causes a test failure on non-x86 architectures.
  
  The alternatives (use `ADD_TEST_FAILURE()` or `GTEST_SKIP()`) would be
  misleading (in both cases), and in the case of `GTEST_SKIP()` is 
unavailable
  on the version of googletest packaged with capsicum-test.
  
  Signed-off-by: Enji Cooper 
  
  commit 32ad0f3e4c11be7f7463d40eef8d4a78ac9f61a5
  Author: Enji Cooper 
  Date:   Fri Mar 15 20:01:56 2019 -0700
  
  Fix `-Wunused-parameter` issues
  
  Remove variable declarations from functions/methods where the variable
  is not required.
  
  Signed-off-by: Enji Cooper 
  
  commit 9437b4c550110200ef190ac39fb26c1d8fc55d9a
  Author: Enji Cooper 
  Date:   Fri Mar 15 19:59:00 2019 -0700
  
  Fix `-Wshadow` issues with `EXPECT_OPEN_OK(..)` macro
  
  * Wrap in do-while(0) block to avoid variable shadowing issue with
multiple calls in the same function.
  * Prefix block local variables with `_` to try and avoid variable
name clashes with values local to test methods.
  
  Signed-off-by: Enji Cooper 
  
  commit adf4a21a233b5da5cac440f4006e258ffba09510
  Author: Enji Cooper 
  Date:   Fri Mar 15 19:55:00 2019 -0700
  
  Fix `-Wmissing-variable-declarations` issue with `known_rights` global
  
  Staticize it since it is only used in the file.
  
  Signed-off-by: Enji Cooper 
  ```
  
  This merges a number of the outstanding changes made locally to
  ^/projects/capsicum-test that were accepted into the upstream project.
  
  The sync was done like so:
  ```
  curl -L https://github.com/google/capsicum-test/tarball/dd7eac98c0cf | tar 
--strip-components=1 -xvzf - -C dist/
  rm -Rf dist/*/
  ```
  
  1. https://github.com/google/capsicum-test

Modified:
  vendor/google/capsicum-test/dist/capability-fd.cc
  vendor/google/capsicum-test/dist/capmode.cc
  vendor/google/capsicum-test/dist/capsicum-test.h
  vendor/google/capsicum-test/dist/mqueue.cc
  vendor/google/capsicum-test/dist/openat.cc
  vendor/google/capsicum-test/dist/procdesc.cc
  vendor/google/capsicum-test/dist/syscalls.h

Modified: vendor/google/capsicum-test/dist/capability-fd.cc
==
--- vendor/google/capsicum-test/dist/capability-fd.cc   Fri Mar 29 21:39:47 
2019(r345714)
+++ vendor/google/capsicum-test/dist/capability-fd.cc   Fri Mar 29 21:41:14 
2019(r345715)
@@ -25,7 +25,7 @@ typedef struct {
   uint64_t right;
   const char* name;
 } right_info;
-right_info known_rights[] = {
+static right_info known_rights[] = {
   /* Rights that are common to all versions of Capsicum */
   RIGHTS_INFO(CAP_READ),
   RIGHTS_INFO(CAP_WRITE),
@@ -713,22 +713,34 @@ static void TryDirOps(int dirfd, cap_rights_t rights) 
   EXPECT_OK(close(rc));
   rc = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDONLY);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_READ, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   rc = openat(dfd_cap, "cap_fsync", O_FSYNC | O_WRONLY | O_APPEND);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_WRITE, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   rc = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR | O_APPEND);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_READ, CAP_WRITE, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   rc = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDONLY);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_READ, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   rc = openat(dfd_cap, "cap_fsync", O_SYNC | O_WRONLY | O_APPEND);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_WRITE, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   rc = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR | O_APPEND);
   CHECK_RIGHT_RESULT(rc, rights, CAP_FSYNC, CAP_READ, CAP_WRITE, CAP_LOOKUP);
-  if (rc >= 0) EXPECT_OK(close(rc));
+  if (rc >= 0) {
+EXPECT_OK(close(rc));
+  }
   EXPECT_OK(unlinkat(dirfd, "cap_fsync", 0));
 
   rc = openat(dirfd, "cap_ftruncate", O_CREAT, 0600);
@@ -736,13 +748,19 @@ static void TryDirOps(int dirfd, cap_rights_t rights) 
   EXPECT_OK(close(rc));
   rc = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDONLY);
   

svn commit: r345714 - head/sys/netinet

2019-03-29 Thread Navdeep Parhar
Author: np
Date: Fri Mar 29 21:39:47 2019
New Revision: 345714
URL: https://svnweb.freebsd.org/changeset/base/345714

Log:
  tcp_autorcvbuf_inc was removed in r344433.
  
  Discussed with:   tuexen@
  Sponsored by: Chelsio Communications

Modified:
  head/sys/netinet/tcp_var.h

Modified: head/sys/netinet/tcp_var.h
==
--- head/sys/netinet/tcp_var.h  Fri Mar 29 20:21:28 2019(r345713)
+++ head/sys/netinet/tcp_var.h  Fri Mar 29 21:39:47 2019(r345714)
@@ -754,7 +754,6 @@ extern  int tcp_log_in_vain;
 VNET_DECLARE(int, drop_synfin);
 VNET_DECLARE(int, path_mtu_discovery);
 VNET_DECLARE(int, tcp_abc_l_var);
-VNET_DECLARE(int, tcp_autorcvbuf_inc);
 VNET_DECLARE(int, tcp_autorcvbuf_max);
 VNET_DECLARE(int, tcp_autosndbuf_inc);
 VNET_DECLARE(int, tcp_autosndbuf_max);
@@ -789,7 +788,6 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo);
 #defineV_tcb   VNET(tcb)
 #defineV_tcbinfo   VNET(tcbinfo)
 #defineV_tcp_abc_l_var VNET(tcp_abc_l_var)
-#defineV_tcp_autorcvbuf_incVNET(tcp_autorcvbuf_inc)
 #defineV_tcp_autorcvbuf_maxVNET(tcp_autorcvbuf_max)
 #defineV_tcp_autosndbuf_incVNET(tcp_autosndbuf_inc)
 #defineV_tcp_autosndbuf_maxVNET(tcp_autosndbuf_max)
___
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: r345713 - in head: sys/amd64/acpica sys/arm64/acpica sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/...

2019-03-29 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar 29 20:21:28 2019
New Revision: 345713
URL: https://svnweb.freebsd.org/changeset/base/345713

Log:
  Merge ACPICA 20190329.

Modified:
  head/sys/amd64/acpica/acpi_machdep.c
  head/sys/arm64/acpica/acpi_machdep.c
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/acfileio.c
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/adwalk.c
  head/sys/contrib/dev/acpica/common/ahpredef.c
  head/sys/contrib/dev/acpica/common/ahtable.c
  head/sys/contrib/dev/acpica/common/dmrestag.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtables.c
  head/sys/contrib/dev/acpica/compiler/aslanalyze.c
  head/sys/contrib/dev/acpica/compiler/aslcodegen.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslload.c
  head/sys/contrib/dev/acpica/compiler/aslmessages.c
  head/sys/contrib/dev/acpica/compiler/aslmethod.c
  head/sys/contrib/dev/acpica/compiler/asloffset.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslopt.c
  head/sys/contrib/dev/acpica/compiler/aslpredef.c
  head/sys/contrib/dev/acpica/compiler/asltransform.c
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/aslxref.c
  head/sys/contrib/dev/acpica/compiler/dtcompile.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.c
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbnames.c
  head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
  head/sys/contrib/dev/acpica/components/disassembler/dmnames.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
  head/sys/contrib/dev/acpica/components/events/evgpeinit.c
  head/sys/contrib/dev/acpica/components/executer/exnames.c
  head/sys/contrib/dev/acpica/components/namespace/nsaccess.c
  head/sys/contrib/dev/acpica/components/namespace/nsdump.c
  head/sys/contrib/dev/acpica/components/namespace/nsinit.c
  head/sys/contrib/dev/acpica/components/namespace/nsnames.c
  head/sys/contrib/dev/acpica/components/namespace/nsobject.c
  head/sys/contrib/dev/acpica/components/namespace/nsparse.c
  head/sys/contrib/dev/acpica/components/namespace/nsrepair.c
  head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
  head/sys/contrib/dev/acpica/components/namespace/nsutils.c
  head/sys/contrib/dev/acpica/components/namespace/nsxfname.c
  head/sys/contrib/dev/acpica/components/parser/psargs.c
  head/sys/contrib/dev/acpica/components/resources/rsxface.c
  head/sys/contrib/dev/acpica/components/tables/tbdata.c
  head/sys/contrib/dev/acpica/components/tables/tbfind.c
  head/sys/contrib/dev/acpica/components/tables/tbinstal.c
  head/sys/contrib/dev/acpica/components/tables/tbprint.c
  head/sys/contrib/dev/acpica/components/tables/tbutils.c
  head/sys/contrib/dev/acpica/components/tables/tbxface.c
  head/sys/contrib/dev/acpica/components/tables/tbxfload.c
  head/sys/contrib/dev/acpica/components/utilities/utascii.c
  head/sys/contrib/dev/acpica/components/utilities/utdecode.c
  head/sys/contrib/dev/acpica/components/utilities/utmisc.c
  head/sys/contrib/dev/acpica/components/utilities/utpredef.c
  head/sys/contrib/dev/acpica/components/utilities/utstring.c
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl.h
  head/sys/contrib/dev/acpica/include/actypes.h
  head/sys/dev/acpica/Osd/OsdTable.c
  head/sys/dev/acpica/acpi_quirk.c
  head/sys/i386/acpica/acpi_machdep.c
  head/usr.sbin/acpi/acpidump/acpi.c
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/amd64/acpica/acpi_machdep.c
==
--- head/sys/amd64/acpica/acpi_machdep.cFri Mar 29 19:47:42 2019
(r345712)
+++ head/sys/amd64/acpica/acpi_machdep.cFri Mar 29 20:21:28 2019
(r345713)
@@ -164,7 +164,7 @@ map_table(vm_paddr_t pa, int offset, const char *sig)
void *table;
 
header = table_map(pa, offset, sizeof(ACPI_TABLE_HEADER));
-   if (strncmp(header->Signature, sig, ACPI_NAME_SIZE) != 0) {
+   if (strncmp(header->Signature, sig, ACPI_NAMESEG_SIZE) != 0) {
table_unmap(header, sizeof(ACPI_TABLE_HEADER));
return (NULL);
}
@@ -202,7 +202,7 @@ probe_table(vm_paddr_t address, const char *sig)
printf("Table '%.4s' at 0x%jx\n", table->Signature,
(uintmax_t)address);
 
-   if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0) {
+   if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) {
table_unmap(table, sizeof(ACPI_TABLE_HEADER));

svn commit: r345712 - head/sys/netinet

2019-03-29 Thread John Baldwin
Author: jhb
Date: Fri Mar 29 19:47:42 2019
New Revision: 345712
URL: https://svnweb.freebsd.org/changeset/base/345712

Log:
  Don't check the inp socket pointer in in_pcboutput_eagain.
  
  Reviewed by:  hps (by saying it was ok to be removed)
  MFC after:1 month
  Sponsored by: Netflix

Modified:
  head/sys/netinet/in_pcb.c

Modified: head/sys/netinet/in_pcb.c
==
--- head/sys/netinet/in_pcb.c   Fri Mar 29 19:40:04 2019(r345711)
+++ head/sys/netinet/in_pcb.c   Fri Mar 29 19:47:42 2019(r345712)
@@ -3397,14 +3397,9 @@ in_pcboutput_txrtlmt(struct inpcb *inp, struct ifnet *
 void
 in_pcboutput_eagain(struct inpcb *inp)
 {
-   struct socket *socket;
bool did_upgrade;
 
if (inp == NULL)
-   return;
-
-   socket = inp->inp_socket;
-   if (socket == NULL)
return;
 
if (inp->inp_snd_tag == 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: r345711 - head/sys/arm/allwinner/clkng

2019-03-29 Thread Emmanuel Vadot
Author: manu
Date: Fri Mar 29 19:40:04 2019
New Revision: 345711
URL: https://svnweb.freebsd.org/changeset/base/345711

Log:
  arm: allwinner: clk: Fix nm_recalc
  
  When comparing best frequencies use the absolute value.
  If we do not do that we end up choosing an always lower value than
  the best one if the exact freq cannot be met.
  
  MFC after:2 weeks

Modified:
  head/sys/arm/allwinner/clkng/aw_clk_nm.c

Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c
==
--- head/sys/arm/allwinner/clkng/aw_clk_nm.cFri Mar 29 18:51:14 2019
(r345710)
+++ head/sys/arm/allwinner/clkng/aw_clk_nm.cFri Mar 29 19:40:04 2019
(r345711)
@@ -155,7 +155,7 @@ aw_clk_nm_find_best(struct aw_clk_nm_sc *sc, uint64_t 
for (m = min_m; m <= max_m; ) {
for (n = min_m; n <= max_n; ) {
cur = fparent / n / m;
-   if ((*fout - cur) < (*fout - best)) {
+   if (abs(*fout - cur) < abs(*fout - best)) {
best = cur;
*factor_n = n;
*factor_m = 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: r345709 - in head: lib/libc/tests/stdlib share/mk

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:49:08 2019
New Revision: 345709
URL: https://svnweb.freebsd.org/changeset/base/345709

Log:
  Allow users to override CSTD/CXXSTD on a per-prog basis
  
  The current logic for CSTD/CXXSTD requires homogenity as far as the
  supported C/C++ standards, which is a sensible default. However, when
  dealing with differing versions of C++, some code may compile with C++11, but
  not C++17 (for instance). So in order to avoid having people convert over 
their
  code to the new standard, give the users the ability to specify the standard 
on
  a per-program basis.
  
  This will allow a user to override the supporting standard for a set of
  programs, mixing C++11 with C++14 (for instance).
  
  Reviewed by:  asomers
  Apprved by:   emaste (mentor)
  MFC after:1 month
  MFC with: r345708
  Differential Revision: https://reviews.freebsd.org/D19738

Modified:
  head/lib/libc/tests/stdlib/Makefile
  head/share/mk/bsd.progs.mk

Modified: head/lib/libc/tests/stdlib/Makefile
==
--- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:45:27 2019
(r345708)
+++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:49:08 2019
(r345709)
@@ -50,8 +50,8 @@ PROGS+=   h_getopt h_getopt_long
 
 CFLAGS+=   -I${.CURDIR}
 
-CXXFLAGS.cxa_thread_atexit_test+=  -std=c++11
-CXXFLAGS.cxa_thread_atexit_nothr_test+=-std=c++11
+CXXSTD.cxa_thread_atexit_test= c++11
+CXXSTD.cxa_thread_atexit_nothr_test=   c++11
 LIBADD.cxa_thread_atexit_test+=pthread
 
 .for t in h_getopt h_getopt_long

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Fri Mar 29 18:45:27 2019(r345708)
+++ head/share/mk/bsd.progs.mk  Fri Mar 29 18:49:08 2019(r345709)
@@ -22,8 +22,8 @@ PROGS += ${PROGS_CXX}
 
 .if defined(PROG)
 # just one of many
-PROG_OVERRIDE_VARS +=  BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \
-   PROGNAME SRCS STRIP WARNS
+PROG_OVERRIDE_VARS +=  BINDIR BINGRP BINOWN BINMODE CSTD CXXSTD DPSRCS MAN \
+   NO_WERROR PROGNAME SRCS STRIP WARNS
 PROG_VARS +=   CFLAGS CXXFLAGS DEBUG_FLAGS DPADD INTERNALPROG LDADD LIBADD \
LINKS LDFLAGS MLINKS ${PROG_OVERRIDE_VARS}
 .for v in ${PROG_VARS:O:u}
___
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: r345708 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk usr.bin/dtc usr.sbin/pmc

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:45:27 2019
New Revision: 345708
URL: https://svnweb.freebsd.org/changeset/base/345708

Log:
  Standardize `-std=c++* as `CXXSTD`
  
  CXXSTD was added as the C++ analogue to CSTD.
  
  CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
  otherwise for older versions of g++.
  
  This change standardizes the CXXSTD variable, originally added to
  googletest.test.inc.mk as part of r345203.
  
  As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.
  
  Notes:
  
  This value is not sanity checked in bsd.sys.mk, however, given the two
  most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
  likely to work with both toolchains. This method will be refined in the future
  to support more variants of C++, as not all versions of clang++ and g++ (for
  instance) support C++14, C++17, etc.
  
  Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
  Example:
  
  Before this commit:
  ```
  CXXFLAGS+=-std=c++14
  ```
  
  After this commit:
  ```
  CXXSTD=   c++14
  ```
  
  Reviewed by:  asomers
  Approved by:  emaste (mentor)
  MFC after:1 month
  MFC with: r345203, r345704, r345705
  Relnotes: yes
  Tested with:  make tinderbox
  Differential Revision:https://reviews.freebsd.org/D19732

Modified:
  head/lib/clang/llvm.build.mk
  head/lib/libc++/Makefile
  head/lib/libc++experimental/Makefile
  head/lib/libc++fs/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/lib/libcxxrt/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libomp/Makefile
  head/lib/ofed/libibnetdisc/Makefile
  head/share/mk/bsd.sys.mk
  head/share/mk/googletest.test.inc.mk
  head/usr.bin/dtc/Makefile
  head/usr.sbin/pmc/Makefile

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkFri Mar 29 18:43:46 2019
(r345707)
+++ head/lib/clang/llvm.build.mkFri Mar 29 18:45:27 2019
(r345708)
@@ -95,7 +95,7 @@ CFLAGS+=  -ffunction-sections
 CFLAGS+=   -fdata-sections
 LDFLAGS+=  -Wl,--gc-sections
 
-CXXFLAGS+= -std=c++11
+CXXSTD?=   c++11
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri Mar 29 18:43:46 2019(r345707)
+++ head/lib/libc++/MakefileFri Mar 29 18:45:27 2019(r345708)
@@ -76,9 +76,7 @@ CFLAGS+=  -nostdinc++
 CFLAGS+=   -nostdlib
 CFLAGS+=   -D_LIBCPP_BUILDING_LIBRARY
 CFLAGS+=   -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++11
-.endif
+CXXSTD=c++11
 
 LIBADD+=   cxxrt
 INCSGROUPS=STD EXP EXT

Modified: head/lib/libc++experimental/Makefile
==
--- head/lib/libc++experimental/MakefileFri Mar 29 18:43:46 2019
(r345707)
+++ head/lib/libc++experimental/MakefileFri Mar 29 18:45:27 2019
(r345708)
@@ -20,8 +20,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libc++fs/Makefile
==
--- head/lib/libc++fs/Makefile  Fri Mar 29 18:43:46 2019(r345707)
+++ head/lib/libc++fs/Makefile  Fri Mar 29 18:45:27 2019(r345708)
@@ -22,8 +22,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:43:46 2019
(r345707)
+++ head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:45:27 2019
(r345708)
@@ -41,4 +41,4 @@ CFLAGS+=  -funwind-tables
 CXXFLAGS+= -fvisibility-inlines-hidden
 CXXFLAGS+= -fvisibility=hidden
 CFLAGS+=   -I${CRTSRC}/lib
-CXXFLAGS+= -std=c++11
+CXXSTD=c++11

Modified: head/lib/libcxxrt/Makefile
==
--- head/lib/libcxxrt/Makefile  Fri Mar 29 18:43:46 2019(r345707)
+++ head/lib/libcxxrt/Makefile  Fri Mar 29 18:45:27 2019(r345708)
@@ -22,9 +22,7 @@ SRCS+=libelftc_dem_gnu3.c\
 
 WARNS= 0
 CFLAGS+=   -isystem ${SRCDIR} -nostdinc++
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++11
-.endif
+CXXSTD=c++11
 VERSION_MAP=   ${.CURDIR}/Version.map
 
 .include 


svn commit: r345707 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk us...

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:43:46 2019
New Revision: 345707
URL: https://svnweb.freebsd.org/changeset/base/345707

Log:
  Revert r345706: the third time will be the charm
  
  When a review is closed via Phabricator it updates the patch attached to the
  review. I downloaded the raw patch from Phabricator, applied it, and repeated
  my mistake from r345704 by accident mixing content from D19732 and D19738.
  
  For my own personal sanity, I will try not to mix reviews like this in the
  future.
  
  MFC after:1 month
  MFC with: r345706
  Approved by:  emaste (mentor, implicit)

Modified:
  head/lib/clang/llvm.build.mk
  head/lib/libc++/Makefile
  head/lib/libc++experimental/Makefile
  head/lib/libc++fs/Makefile
  head/lib/libc/tests/stdlib/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/lib/libcxxrt/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libomp/Makefile
  head/lib/ofed/libibnetdisc/Makefile
  head/share/mk/bsd.progs.mk
  head/share/mk/bsd.sys.mk
  head/share/mk/googletest.test.inc.mk
  head/usr.bin/dtc/Makefile
  head/usr.sbin/pmc/Makefile

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkFri Mar 29 18:31:48 2019
(r345706)
+++ head/lib/clang/llvm.build.mkFri Mar 29 18:43:46 2019
(r345707)
@@ -95,7 +95,7 @@ CFLAGS+=  -ffunction-sections
 CFLAGS+=   -fdata-sections
 LDFLAGS+=  -Wl,--gc-sections
 
-CXXSTD?=   c++11
+CXXFLAGS+= -std=c++11
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri Mar 29 18:31:48 2019(r345706)
+++ head/lib/libc++/MakefileFri Mar 29 18:43:46 2019(r345707)
@@ -76,7 +76,9 @@ CFLAGS+=  -nostdinc++
 CFLAGS+=   -nostdlib
 CFLAGS+=   -D_LIBCPP_BUILDING_LIBRARY
 CFLAGS+=   -DLIBCXXRT
-CXXSTD=c++11
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
 
 LIBADD+=   cxxrt
 INCSGROUPS=STD EXP EXT

Modified: head/lib/libc++experimental/Makefile
==
--- head/lib/libc++experimental/MakefileFri Mar 29 18:31:48 2019
(r345706)
+++ head/lib/libc++experimental/MakefileFri Mar 29 18:43:46 2019
(r345707)
@@ -20,6 +20,8 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-CXXSTD=c++14
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++14
+.endif
 
 .include 

Modified: head/lib/libc++fs/Makefile
==
--- head/lib/libc++fs/Makefile  Fri Mar 29 18:31:48 2019(r345706)
+++ head/lib/libc++fs/Makefile  Fri Mar 29 18:43:46 2019(r345707)
@@ -22,6 +22,8 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-CXXSTD=c++14
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++14
+.endif
 
 .include 

Modified: head/lib/libc/tests/stdlib/Makefile
==
--- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:31:48 2019
(r345706)
+++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:43:46 2019
(r345707)
@@ -50,8 +50,8 @@ PROGS+=   h_getopt h_getopt_long
 
 CFLAGS+=   -I${.CURDIR}
 
-CXXSTD.cxa_thread_atexit_test= c++11
-CXXSTD.cxa_thread_atexit_nothr_test=   c++11
+CXXFLAGS.cxa_thread_atexit_test+=  -std=c++11
+CXXFLAGS.cxa_thread_atexit_nothr_test+=-std=c++11
 LIBADD.cxa_thread_atexit_test+=pthread
 
 .for t in h_getopt h_getopt_long

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:31:48 2019
(r345706)
+++ head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:43:46 2019
(r345707)
@@ -41,4 +41,4 @@ CFLAGS+=  -funwind-tables
 CXXFLAGS+= -fvisibility-inlines-hidden
 CXXFLAGS+= -fvisibility=hidden
 CFLAGS+=   -I${CRTSRC}/lib
-CXXSTD=c++11
+CXXFLAGS+= -std=c++11

Modified: head/lib/libcxxrt/Makefile
==
--- head/lib/libcxxrt/Makefile  Fri Mar 29 18:31:48 2019(r345706)
+++ head/lib/libcxxrt/Makefile  Fri Mar 29 18:43:46 2019(r345707)
@@ -22,7 +22,9 @@ SRCS+=libelftc_dem_gnu3.c\
 
 WARNS= 0
 CFLAGS+=   -isystem ${SRCDIR} -nostdinc++
-CXXSTD=c++11
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
 VERSION_MAP=   ${.CURDIR}/Version.map
 
 .include 

Modified: 

Re: svn commit: r345706 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk u

2019-03-29 Thread Enji Cooper


> On Mar 29, 2019, at 11:31 AM, Enji Cooper  wrote:
> 
> Author: ngie
> Date: Fri Mar 29 18:31:48 2019
> New Revision: 345706
> URL: https://svnweb.freebsd.org/changeset/base/345706 
> 
*grumbles* I downloaded the last version posted on Phabricator, which (sadly) 
was the version from r345704 :>.
-Enji
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r345706 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk us...

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:31:48 2019
New Revision: 345706
URL: https://svnweb.freebsd.org/changeset/base/345706

Log:
  Standardize `-std=c++* as `CXXSTD`
  
  CXXSTD was added as the C++ analogue to CSTD.
  
  CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
  otherwise for older versions of g++.
  
  This change standardizes the CXXSTD variable, originally added to
  googletest.test.inc.mk as part of r345203.
  
  As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.
  
  Notes:
  
  This value is not sanity checked in bsd.sys.mk, however, given the two
  most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
  likely to work with both toolchains. This method will be refined in the future
  to support more variants of C++, as not all versions of clang++ and g++ (for
  instance) support C++14, C++17, etc.
  
  Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
  Example:
  
  Before this commit:
  ```
  CXXFLAGS+=-std=c++14
  ```
  
  After this commit:
  ```
  CXXSTD=   c++14
  ```
  
  Reviewed by:  asomers
  Approved by:  emaste (mentor)
  MFC after:1 month
  MFC with: r345203, r345704, r345705
  Relnotes: yes
  Tested with:  make tinderbox
  Differential Revision:https://reviews.freebsd.org/D19732

Modified:
  head/lib/clang/llvm.build.mk
  head/lib/libc++/Makefile
  head/lib/libc++experimental/Makefile
  head/lib/libc++fs/Makefile
  head/lib/libc/tests/stdlib/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/lib/libcxxrt/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libomp/Makefile
  head/lib/ofed/libibnetdisc/Makefile
  head/share/mk/bsd.progs.mk
  head/share/mk/bsd.sys.mk
  head/share/mk/googletest.test.inc.mk
  head/usr.bin/dtc/Makefile
  head/usr.sbin/pmc/Makefile

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkFri Mar 29 18:16:33 2019
(r345705)
+++ head/lib/clang/llvm.build.mkFri Mar 29 18:31:48 2019
(r345706)
@@ -95,7 +95,7 @@ CFLAGS+=  -ffunction-sections
 CFLAGS+=   -fdata-sections
 LDFLAGS+=  -Wl,--gc-sections
 
-CXXFLAGS+= -std=c++11
+CXXSTD?=   c++11
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri Mar 29 18:16:33 2019(r345705)
+++ head/lib/libc++/MakefileFri Mar 29 18:31:48 2019(r345706)
@@ -76,9 +76,7 @@ CFLAGS+=  -nostdinc++
 CFLAGS+=   -nostdlib
 CFLAGS+=   -D_LIBCPP_BUILDING_LIBRARY
 CFLAGS+=   -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++11
-.endif
+CXXSTD=c++11
 
 LIBADD+=   cxxrt
 INCSGROUPS=STD EXP EXT

Modified: head/lib/libc++experimental/Makefile
==
--- head/lib/libc++experimental/MakefileFri Mar 29 18:16:33 2019
(r345705)
+++ head/lib/libc++experimental/MakefileFri Mar 29 18:31:48 2019
(r345706)
@@ -20,8 +20,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libc++fs/Makefile
==
--- head/lib/libc++fs/Makefile  Fri Mar 29 18:16:33 2019(r345705)
+++ head/lib/libc++fs/Makefile  Fri Mar 29 18:31:48 2019(r345706)
@@ -22,8 +22,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libc/tests/stdlib/Makefile
==
--- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:16:33 2019
(r345705)
+++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:31:48 2019
(r345706)
@@ -50,8 +50,8 @@ PROGS+=   h_getopt h_getopt_long
 
 CFLAGS+=   -I${.CURDIR}
 
-CXXFLAGS.cxa_thread_atexit_test+=  -std=c++11
-CXXFLAGS.cxa_thread_atexit_nothr_test+=-std=c++11
+CXXSTD.cxa_thread_atexit_test= c++11
+CXXSTD.cxa_thread_atexit_nothr_test=   c++11
 LIBADD.cxa_thread_atexit_test+=pthread
 
 .for t in h_getopt h_getopt_long

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:16:33 2019
(r345705)
+++ head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:31:48 2019
(r345706)
@@ -41,4 +41,4 @@ 

Re: svn commit: r345696 - head/lib/libvgl

2019-03-29 Thread Konstantin Belousov
On Fri, Mar 29, 2019 at 03:57:09PM +, Bruce Evans wrote:
> Author: bde
> Date: Fri Mar 29 15:57:08 2019
> New Revision: 345696
> URL: https://svnweb.freebsd.org/changeset/base/345696
> 
> Log:
>   Fix endless loops for handling SIGBUS and SIGSEGV.
>   
>   r80270 has the usual wrong fix for unsafe signal handling -- just set
>   a flag and return to let an event loop check the flag and do safe
>   handling.  This never works for signals like SIGBUS and SIGSEGV that
>   repeat and works poorly for others unless the application has an event
>   loop designed to support this.
>   
>   For these signals, clean up unsafely as before, except for arranging that
>   nested signals are fatal and forcing a nested signal if the cleanup doesn't
>   cause one.
> 
> Modified:
>   head/lib/libvgl/main.c
> 
> Modified: head/lib/libvgl/main.c
> ==
> --- head/lib/libvgl/main.cFri Mar 29 15:20:48 2019(r345695)
> +++ head/lib/libvgl/main.cFri Mar 29 15:57:08 2019(r345696)
> @@ -31,9 +31,9 @@
>  #include 
>  __FBSDID("$FreeBSD$");
>  
> +#include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> @@ -107,14 +107,22 @@ struct vt_mode smode;
>  }
>  
>  static void 
> -VGLAbort(int arg __unused)
> +VGLAbort(int arg)
>  {
> +  sigset_t mask;
> +
>VGLAbortPending = 1;
>signal(SIGINT, SIG_IGN);
>signal(SIGTERM, SIG_IGN);
> -  signal(SIGSEGV, SIG_IGN);
> -  signal(SIGBUS, SIG_IGN);
>signal(SIGUSR2, SIG_IGN);
> +  if (arg == SIGBUS || arg == SIGSEGV) {
> +signal(arg, SIG_DFL);
> +sigemptyset();
> +sigaddset(, arg);
> +sigprocmask(SIG_UNBLOCK, , NULL);
> +VGLEnd();
> +kill(getpid(), arg);
This of course misses the siginfo information from the real fault.
Why SIGBUS/SIGSEGV are caught at all ?

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


svn commit: r345705 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk us...

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:16:33 2019
New Revision: 345705
URL: https://svnweb.freebsd.org/changeset/base/345705

Log:
  Revert r345704
  
  I accidentally committed code from two reviews. I will reintroduce the code to
  bsd.progs.mk as part of a separate commit from r345704.
  
  Approved by:  emaste (mentor, implicit)
  MFC after:2 months
  MFC with: r345704

Modified:
  head/lib/clang/llvm.build.mk
  head/lib/libc++/Makefile
  head/lib/libc++experimental/Makefile
  head/lib/libc++fs/Makefile
  head/lib/libc/tests/stdlib/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/lib/libcxxrt/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libomp/Makefile
  head/lib/ofed/libibnetdisc/Makefile
  head/share/mk/bsd.progs.mk
  head/share/mk/bsd.sys.mk
  head/share/mk/googletest.test.inc.mk
  head/usr.bin/dtc/Makefile
  head/usr.sbin/pmc/Makefile

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkFri Mar 29 18:13:44 2019
(r345704)
+++ head/lib/clang/llvm.build.mkFri Mar 29 18:16:33 2019
(r345705)
@@ -95,7 +95,7 @@ CFLAGS+=  -ffunction-sections
 CFLAGS+=   -fdata-sections
 LDFLAGS+=  -Wl,--gc-sections
 
-CXXSTD?=   c++11
+CXXFLAGS+= -std=c++11
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri Mar 29 18:13:44 2019(r345704)
+++ head/lib/libc++/MakefileFri Mar 29 18:16:33 2019(r345705)
@@ -76,7 +76,9 @@ CFLAGS+=  -nostdinc++
 CFLAGS+=   -nostdlib
 CFLAGS+=   -D_LIBCPP_BUILDING_LIBRARY
 CFLAGS+=   -DLIBCXXRT
-CXXSTD=c++11
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
 
 LIBADD+=   cxxrt
 INCSGROUPS=STD EXP EXT

Modified: head/lib/libc++experimental/Makefile
==
--- head/lib/libc++experimental/MakefileFri Mar 29 18:13:44 2019
(r345704)
+++ head/lib/libc++experimental/MakefileFri Mar 29 18:16:33 2019
(r345705)
@@ -20,6 +20,8 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-CXXSTD=c++14
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++14
+.endif
 
 .include 

Modified: head/lib/libc++fs/Makefile
==
--- head/lib/libc++fs/Makefile  Fri Mar 29 18:13:44 2019(r345704)
+++ head/lib/libc++fs/Makefile  Fri Mar 29 18:16:33 2019(r345705)
@@ -22,6 +22,8 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-CXXSTD=c++14
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++14
+.endif
 
 .include 

Modified: head/lib/libc/tests/stdlib/Makefile
==
--- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:13:44 2019
(r345704)
+++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:16:33 2019
(r345705)
@@ -50,8 +50,8 @@ PROGS+=   h_getopt h_getopt_long
 
 CFLAGS+=   -I${.CURDIR}
 
-CXXSTD.cxa_thread_atexit_test= c++11
-CXXSTD.cxa_thread_atexit_nothr_test=   c++11
+CXXFLAGS.cxa_thread_atexit_test+=  -std=c++11
+CXXFLAGS.cxa_thread_atexit_nothr_test+=-std=c++11
 LIBADD.cxa_thread_atexit_test+=pthread
 
 .for t in h_getopt h_getopt_long

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:13:44 2019
(r345704)
+++ head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:16:33 2019
(r345705)
@@ -41,4 +41,4 @@ CFLAGS+=  -funwind-tables
 CXXFLAGS+= -fvisibility-inlines-hidden
 CXXFLAGS+= -fvisibility=hidden
 CFLAGS+=   -I${CRTSRC}/lib
-CXXSTD=c++11
+CXXFLAGS+= -std=c++11

Modified: head/lib/libcxxrt/Makefile
==
--- head/lib/libcxxrt/Makefile  Fri Mar 29 18:13:44 2019(r345704)
+++ head/lib/libcxxrt/Makefile  Fri Mar 29 18:16:33 2019(r345705)
@@ -22,7 +22,9 @@ SRCS+=libelftc_dem_gnu3.c\
 
 WARNS= 0
 CFLAGS+=   -isystem ${SRCDIR} -nostdinc++
-CXXSTD=c++11
+.if empty(CXXFLAGS:M-std=*)
+CXXFLAGS+= -std=c++11
+.endif
 VERSION_MAP=   ${.CURDIR}/Version.map
 
 .include 

Modified: head/lib/libgcc_eh/Makefile.inc
==
--- head/lib/libgcc_eh/Makefile.inc Fri Mar 29 18:13:44 2019
(r345704)
+++ head/lib/libgcc_eh/Makefile.inc 

svn commit: r345704 - in head: lib/clang lib/libc++ lib/libc++experimental lib/libc++fs lib/libc/tests/stdlib lib/libclang_rt lib/libcxxrt lib/libgcc_eh lib/libomp lib/ofed/libibnetdisc share/mk us...

2019-03-29 Thread Enji Cooper
Author: ngie
Date: Fri Mar 29 18:13:44 2019
New Revision: 345704
URL: https://svnweb.freebsd.org/changeset/base/345704

Log:
  CXXSTD is the C++ analogue to CSTD.
  
  CXXSTD defaults to `-std=c++11` with supporting compilers; `-std=gnu++98`,
  otherwise for older versions of g++.
  
  This change standardizes the CXXSTD variable, originally added to
  googletest.test.inc.mk as part of r345203.
  
  As part of this effort, convert all `CXXFLAGS+= -std=*` calls to use `CXXSTD`.
  
  Notes:
  
  This value is not sanity checked in bsd.sys.mk, however, given the two
  most used C++ compilers on FreeBSD (clang++ and g++) support both modes, it is
  likely to work with both toolchains. This method will be refined in the future
  to support more variants of C++, as not all versions of clang++ and g++ (for
  instance) support C++14, C++17, etc.
  
  Any manual appending of `-std=*` to `CXXFLAGS` should be replaced with CXXSTD.
  Example:
  
  Before this commit:
  ```
  CXXFLAGS+=-std=c++14
  ```
  
  After this commit:
  ```
  CXXSTD=   c++14
  ```
  
  Reviewed by:  asomers
  Approved by:  emaste (mentor)
  MFC after:1 month
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D19732

Modified:
  head/lib/clang/llvm.build.mk
  head/lib/libc++/Makefile
  head/lib/libc++experimental/Makefile
  head/lib/libc++fs/Makefile
  head/lib/libc/tests/stdlib/Makefile
  head/lib/libclang_rt/Makefile.inc
  head/lib/libcxxrt/Makefile
  head/lib/libgcc_eh/Makefile.inc
  head/lib/libomp/Makefile
  head/lib/ofed/libibnetdisc/Makefile
  head/share/mk/bsd.progs.mk
  head/share/mk/bsd.sys.mk
  head/share/mk/googletest.test.inc.mk
  head/usr.bin/dtc/Makefile
  head/usr.sbin/pmc/Makefile

Modified: head/lib/clang/llvm.build.mk
==
--- head/lib/clang/llvm.build.mkFri Mar 29 17:52:57 2019
(r345703)
+++ head/lib/clang/llvm.build.mkFri Mar 29 18:13:44 2019
(r345704)
@@ -95,7 +95,7 @@ CFLAGS+=  -ffunction-sections
 CFLAGS+=   -fdata-sections
 LDFLAGS+=  -Wl,--gc-sections
 
-CXXFLAGS+= -std=c++11
+CXXSTD?=   c++11
 CXXFLAGS+= -fno-exceptions
 CXXFLAGS+= -fno-rtti
 CXXFLAGS.clang+= -stdlib=libc++

Modified: head/lib/libc++/Makefile
==
--- head/lib/libc++/MakefileFri Mar 29 17:52:57 2019(r345703)
+++ head/lib/libc++/MakefileFri Mar 29 18:13:44 2019(r345704)
@@ -76,9 +76,7 @@ CFLAGS+=  -nostdinc++
 CFLAGS+=   -nostdlib
 CFLAGS+=   -D_LIBCPP_BUILDING_LIBRARY
 CFLAGS+=   -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++11
-.endif
+CXXSTD=c++11
 
 LIBADD+=   cxxrt
 INCSGROUPS=STD EXP EXT

Modified: head/lib/libc++experimental/Makefile
==
--- head/lib/libc++experimental/MakefileFri Mar 29 17:52:57 2019
(r345703)
+++ head/lib/libc++experimental/MakefileFri Mar 29 18:13:44 2019
(r345704)
@@ -20,8 +20,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libc++fs/Makefile
==
--- head/lib/libc++fs/Makefile  Fri Mar 29 17:52:57 2019(r345703)
+++ head/lib/libc++fs/Makefile  Fri Mar 29 18:13:44 2019(r345704)
@@ -22,8 +22,6 @@ CXXFLAGS+=-nostdinc++
 CXXFLAGS+= -nostdlib
 CXXFLAGS+= -D_LIBCPP_BUILDING_LIBRARY
 CXXFLAGS+= -DLIBCXXRT
-.if empty(CXXFLAGS:M-std=*)
-CXXFLAGS+= -std=c++14
-.endif
+CXXSTD=c++14
 
 .include 

Modified: head/lib/libc/tests/stdlib/Makefile
==
--- head/lib/libc/tests/stdlib/Makefile Fri Mar 29 17:52:57 2019
(r345703)
+++ head/lib/libc/tests/stdlib/Makefile Fri Mar 29 18:13:44 2019
(r345704)
@@ -50,8 +50,8 @@ PROGS+=   h_getopt h_getopt_long
 
 CFLAGS+=   -I${.CURDIR}
 
-CXXFLAGS.cxa_thread_atexit_test+=  -std=c++11
-CXXFLAGS.cxa_thread_atexit_nothr_test+=-std=c++11
+CXXSTD.cxa_thread_atexit_test= c++11
+CXXSTD.cxa_thread_atexit_nothr_test=   c++11
 LIBADD.cxa_thread_atexit_test+=pthread
 
 .for t in h_getopt h_getopt_long

Modified: head/lib/libclang_rt/Makefile.inc
==
--- head/lib/libclang_rt/Makefile.inc   Fri Mar 29 17:52:57 2019
(r345703)
+++ head/lib/libclang_rt/Makefile.inc   Fri Mar 29 18:13:44 2019
(r345704)
@@ -41,4 +41,4 @@ CFLAGS+=  -funwind-tables
 CXXFLAGS+= -fvisibility-inlines-hidden
 CXXFLAGS+= -fvisibility=hidden
 CFLAGS+=   

svn commit: r345703 - in head: lib/libc/aarch64 lib/libc/amd64 lib/libc/arm lib/libc/gen lib/libc/i386 lib/libc/include lib/libc/mips lib/libc/powerpc lib/libc/powerpc64 lib/libc/riscv lib/libc/spa...

2019-03-29 Thread Konstantin Belousov
Author: kib
Date: Fri Mar 29 17:52:57 2019
New Revision: 345703
URL: https://svnweb.freebsd.org/changeset/base/345703

Log:
  Fix initial exec TLS mode for dynamically loaded shared objects.
  
  If dso uses initial exec TLS mode, rtld tries to allocate TLS in
  static space. If there is no space left, the dlopen(3) fails. If space
  if allocated, initial content from PT_TLS segment is distributed to
  all threads' pcbs, which was missed and caused un-initialized TLS
  segment for such dso after dlopen(3).
  
  The mode is auto-detected either due to the relocation used, or if the
  DF_STATIC_TLS dynamic flag is set.  In the later case, the TLS segment
  is tried to allocate earlier, which increases chance of the dlopen(3)
  to succeed.  LLD was recently fixed to properly emit the flag, ld.bdf
  did it always.
  
  Initial test by:  dumbbell
  Tested by:emaste (amd64), ian (arm)
  Tested by:Gerald Aryeetey  (arm64)
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D19072

Added:
  head/lib/libc/aarch64/static_tls.h   (contents, props changed)
  head/lib/libc/amd64/static_tls.h   (contents, props changed)
  head/lib/libc/arm/static_tls.h   (contents, props changed)
  head/lib/libc/i386/static_tls.h   (contents, props changed)
  head/lib/libc/mips/static_tls.h   (contents, props changed)
  head/lib/libc/powerpc/static_tls.h   (contents, props changed)
  head/lib/libc/powerpc64/static_tls.h   (contents, props changed)
  head/lib/libc/riscv/static_tls.h   (contents, props changed)
  head/lib/libc/sparc64/static_tls.h   (contents, props changed)
  head/lib/libthr/arch/aarch64/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/amd64/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/arm/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/i386/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/mips/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/powerpc/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/riscv/include/pthread_tls.h   (contents, props changed)
  head/lib/libthr/arch/sparc64/include/pthread_tls.h   (contents, props changed)
Modified:
  head/lib/libc/gen/Symbol.map
  head/lib/libc/gen/elf_utils.c
  head/lib/libc/include/libc_private.h
  head/lib/libc/sys/interposing_table.c
  head/lib/libthr/Makefile
  head/lib/libthr/pthread.map
  head/lib/libthr/thread/thr_list.c
  head/lib/libthr/thread/thr_private.h
  head/libexec/rtld-elf/rtld.c
  head/libexec/rtld-elf/rtld.h

Added: head/lib/libc/aarch64/static_tls.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/aarch64/static_tls.h  Fri Mar 29 17:52:57 2019
(r345703)
@@ -0,0 +1,46 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2019 The FreeBSD Foundation
+ *
+ * This software was developed by Konstantin Belousov 
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * 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$
+ */
+
+#ifndef _LIBC_AARCH64_STATIC_TLS_H
+#define _LIBC_AARCH64_STATIC_TLS_H
+
+static __inline uintptr_t
+_libc_get_static_tls_base(size_t offset)
+{
+   uintptr_t tlsbase;
+
+   __asm __volatile("mrs   %x0, tpidr_el0" : "=r" (tlsbase));
+   tlsbase += offset;
+   return (tlsbase);
+}
+
+#endif

Added: head/lib/libc/amd64/static_tls.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ 

svn commit: r345702 - head/sys/vm

2019-03-29 Thread Konstantin Belousov
Author: kib
Date: Fri Mar 29 16:53:46 2019
New Revision: 345702
URL: https://svnweb.freebsd.org/changeset/base/345702

Log:
  Eliminate adj_free field from vm_map_entry.
  
  Drop the adj_free field from vm_map_entry_t. Refine the max_free field
  so that p->max_free is the size of the largest gap with one endpoint
  in the subtree rooted at p. Change vm_map_findspace so that, first,
  the address-based splay is restricted to tree nodes with large-enough
  max_free value, to avoid searching for the right starting point in a
  subtree where all the gaps are too small. Second, when the address
  search leads to a tree search for the first large-enough gap, that gap
  is the subject of a splay-search that brings the gap to the top of the
  tree, so that an immediate insertion will take constant time.
  
  Break up the splay code into separate components, one for searching
  and breaking up the tree and another for reassembling it. Use these
  components, and not splay itself, for linking and unlinking. Drop the
  after-where parameter to link, as it is computed as a side-effect of
  the splay search.
  
  Submitted by: Doug Moore 
  Reviewed by:  markj
  Tested by:pho
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D17794

Modified:
  head/sys/vm/vm_kern.c
  head/sys/vm/vm_map.c
  head/sys/vm/vm_map.h

Modified: head/sys/vm/vm_kern.c
==
--- head/sys/vm/vm_kern.c   Fri Mar 29 16:43:24 2019(r345701)
+++ head/sys/vm/vm_kern.c   Fri Mar 29 16:53:46 2019(r345702)
@@ -641,7 +641,8 @@ kmap_alloc_wait(vm_map_t map, vm_size_t size)
 * to lock out sleepers/wakers.
 */
vm_map_lock(map);
-   if (vm_map_findspace(map, vm_map_min(map), size, ) == 0)
+   addr = vm_map_findspace(map, vm_map_min(map), size);
+   if (addr + size <= vm_map_max(map))
break;
/* no space now; see if we can ever get space */
if (vm_map_max(map) - vm_map_min(map) < size) {

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cFri Mar 29 16:43:24 2019(r345701)
+++ head/sys/vm/vm_map.cFri Mar 29 16:53:46 2019(r345702)
@@ -132,9 +132,6 @@ static int vmspace_zinit(void *mem, int size, int flag
 static int vm_map_zinit(void *mem, int ize, int flags);
 static void _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min,
 vm_offset_t max);
-static int vm_map_alignspace(vm_map_t map, vm_object_t object,
-vm_ooffset_t offset, vm_offset_t *addr, vm_size_t length,
-vm_offset_t max_addr, vm_offset_t alignment);
 static void vm_map_entry_deallocate(vm_map_entry_t entry, boolean_t 
system_map);
 static void vm_map_entry_dispose(vm_map_t map, vm_map_entry_t entry);
 static void vm_map_entry_unwire(vm_map_t map, vm_map_entry_t entry);
@@ -672,8 +669,51 @@ _vm_map_assert_locked(vm_map_t map, const char *file, 
 
 #defineVM_MAP_ASSERT_LOCKED(map) \
 _vm_map_assert_locked(map, LOCK_FILE, LOCK_LINE)
+
+static void
+_vm_map_assert_consistent(vm_map_t map)
+{
+   vm_map_entry_t entry;
+   vm_map_entry_t child;
+   vm_size_t max_left, max_right;
+
+   for (entry = map->header.next; entry != >header;
+   entry = entry->next) {
+   KASSERT(entry->prev->end <= entry->start,
+   ("map %p prev->end = %jx, start = %jx", map,
+   (uintmax_t)entry->prev->end, (uintmax_t)entry->start));
+   KASSERT(entry->start < entry->end,
+   ("map %p start = %jx, end = %jx", map,
+   (uintmax_t)entry->start, (uintmax_t)entry->end));
+   KASSERT(entry->end <= entry->next->start,
+   ("map %p end = %jx, next->start = %jx", map,
+   (uintmax_t)entry->end, (uintmax_t)entry->next->start));
+   KASSERT(entry->left == NULL ||
+   entry->left->start < entry->start,
+   ("map %p left->start = %jx, start = %jx", map,
+   (uintmax_t)entry->left->start, (uintmax_t)entry->start));
+   KASSERT(entry->right == NULL ||
+   entry->start < entry->right->start,
+   ("map %p start = %jx, right->start = %jx", map,
+   (uintmax_t)entry->start, (uintmax_t)entry->right->start));
+   child = entry->left;
+   max_left = (child != NULL) ? child->max_free :
+   entry->start - entry->prev->end;
+   child = entry->right;
+   max_right = (child != NULL) ? child->max_free :
+   entry->next->start - entry->end;
+   KASSERT(entry->max_free == MAX(max_left, max_right),
+   ("map %p max = %jx, max_left = %jx, max_right = %jx", map,
+  

svn commit: r345701 - in head/sys/dev/cxgbe: . tom

2019-03-29 Thread Navdeep Parhar
Author: np
Date: Fri Mar 29 16:43:24 2019
New Revision: 345701
URL: https://svnweb.freebsd.org/changeset/base/345701

Log:
  cxgbe/t4_tom: Catch up with r344433, which removed tcb_autorcvbuf_inc.
  
  The declaration in tcp_var.h is still around so t4_tom continued to
  compile but wouldn't load.  A separate commit will fix tcp_var.h
  
  Reported By: Dustin Marquess (dmarquess at gmail)
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/offload.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/tom/t4_cpl_io.c
  head/sys/dev/cxgbe/tom/t4_ddp.c
  head/sys/dev/cxgbe/tom/t4_tls.c

Modified: head/sys/dev/cxgbe/offload.h
==
--- head/sys/dev/cxgbe/offload.hFri Mar 29 16:41:01 2019
(r345700)
+++ head/sys/dev/cxgbe/offload.hFri Mar 29 16:43:24 2019
(r345701)
@@ -230,6 +230,7 @@ struct tom_tunables {
int tx_align;
int tx_zcopy;
int cop_managed_offloading;
+   int autorcvbuf_inc;
 };
 /* iWARP driver tunables */
 struct iw_tunables {

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cFri Mar 29 16:41:01 2019
(r345700)
+++ head/sys/dev/cxgbe/t4_main.cFri Mar 29 16:43:24 2019
(r345701)
@@ -6266,6 +6266,11 @@ t4_sysctls(struct adapter *sc)
>tt.cop_managed_offloading, 0,
"COP (Connection Offload Policy) controls all TOE offload");
 
+   sc->tt.autorcvbuf_inc = 16 * 1024;
+   SYSCTL_ADD_INT(ctx, children, OID_AUTO, "autorcvbuf_inc",
+   CTLFLAG_RW, >tt.autorcvbuf_inc, 0,
+   "autorcvbuf increment");
+
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "timer_tick",
CTLTYPE_STRING | CTLFLAG_RD, sc, 0, sysctl_tp_tick, "A",
"TP timer tick (us)");

Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c  Fri Mar 29 16:41:01 2019
(r345700)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c  Fri Mar 29 16:43:24 2019
(r345701)
@@ -1631,7 +1631,7 @@ do_rx_data(struct sge_iq *iq, const struct rss_header 
sb->sb_hiwat < V_tcp_autorcvbuf_max &&
len > (sbspace(sb) / 8 * 7)) {
unsigned int hiwat = sb->sb_hiwat;
-   unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc,
+   unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc,
V_tcp_autorcvbuf_max);
 
if (!sbreserve_locked(sb, newsize, so, NULL))

Modified: head/sys/dev/cxgbe/tom/t4_ddp.c
==
--- head/sys/dev/cxgbe/tom/t4_ddp.c Fri Mar 29 16:41:01 2019
(r345700)
+++ head/sys/dev/cxgbe/tom/t4_ddp.c Fri Mar 29 16:43:24 2019
(r345701)
@@ -549,8 +549,9 @@ handle_ddp_data(struct toepcb *toep, __be32 ddp_report
V_tcp_do_autorcvbuf &&
sb->sb_hiwat < V_tcp_autorcvbuf_max &&
len > (sbspace(sb) / 8 * 7)) {
+   struct adapter *sc = td_adapter(toep->td);
unsigned int hiwat = sb->sb_hiwat;
-   unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc,
+   unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc,
V_tcp_autorcvbuf_max);
 
if (!sbreserve_locked(sb, newsize, so, NULL))

Modified: head/sys/dev/cxgbe/tom/t4_tls.c
==
--- head/sys/dev/cxgbe/tom/t4_tls.c Fri Mar 29 16:41:01 2019
(r345700)
+++ head/sys/dev/cxgbe/tom/t4_tls.c Fri Mar 29 16:43:24 2019
(r345701)
@@ -1588,7 +1588,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_head
sb->sb_hiwat < V_tcp_autorcvbuf_max &&
sb_length > (sbspace(sb) / 8 * 7)) {
unsigned int hiwat = sb->sb_hiwat;
-   unsigned int newsize = min(hiwat + V_tcp_autorcvbuf_inc,
+   unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc,
V_tcp_autorcvbuf_max);
 
if (!sbreserve_locked(sb, newsize, so, 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: r345700 - vendor-sys/acpica/20190329

2019-03-29 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar 29 16:41:01 2019
New Revision: 345700
URL: https://svnweb.freebsd.org/changeset/base/345700

Log:
  Tag ACPICA 20190329.

Added:
  vendor-sys/acpica/20190329/
 - copied from r345699, vendor-sys/acpica/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: r345699 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour...

2019-03-29 Thread Jung-uk Kim
Author: jkim
Date: Fri Mar 29 16:40:11 2019
New Revision: 345699
URL: https://svnweb.freebsd.org/changeset/base/345699

Log:
  Import ACPICA 20190329.

Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/source/common/acfileio.c
  vendor-sys/acpica/dist/source/common/adisasm.c
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/ahpredef.c
  vendor-sys/acpica/dist/source/common/ahtable.c
  vendor-sys/acpica/dist/source/common/dmrestag.c
  vendor-sys/acpica/dist/source/common/dmtable.c
  vendor-sys/acpica/dist/source/common/dmtables.c
  vendor-sys/acpica/dist/source/compiler/aslanalyze.c
  vendor-sys/acpica/dist/source/compiler/aslcodegen.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.l
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslerror.c
  vendor-sys/acpica/dist/source/compiler/aslload.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.c
  vendor-sys/acpica/dist/source/compiler/aslmethod.c
  vendor-sys/acpica/dist/source/compiler/asloffset.c
  vendor-sys/acpica/dist/source/compiler/asloperands.c
  vendor-sys/acpica/dist/source/compiler/aslopt.c
  vendor-sys/acpica/dist/source/compiler/aslpredef.c
  vendor-sys/acpica/dist/source/compiler/asltransform.c
  vendor-sys/acpica/dist/source/compiler/aslutils.c
  vendor-sys/acpica/dist/source/compiler/aslxref.c
  vendor-sys/acpica/dist/source/compiler/dtcompile.c
  vendor-sys/acpica/dist/source/compiler/dttemplate.c
  vendor-sys/acpica/dist/source/components/debugger/dbexec.c
  vendor-sys/acpica/dist/source/components/debugger/dbnames.c
  vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c
  vendor-sys/acpica/dist/source/components/disassembler/dmnames.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c
  vendor-sys/acpica/dist/source/components/events/evgpeinit.c
  vendor-sys/acpica/dist/source/components/executer/exnames.c
  vendor-sys/acpica/dist/source/components/namespace/nsaccess.c
  vendor-sys/acpica/dist/source/components/namespace/nsdump.c
  vendor-sys/acpica/dist/source/components/namespace/nsinit.c
  vendor-sys/acpica/dist/source/components/namespace/nsnames.c
  vendor-sys/acpica/dist/source/components/namespace/nsobject.c
  vendor-sys/acpica/dist/source/components/namespace/nsparse.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair.c
  vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c
  vendor-sys/acpica/dist/source/components/namespace/nsutils.c
  vendor-sys/acpica/dist/source/components/namespace/nsxfname.c
  vendor-sys/acpica/dist/source/components/parser/psargs.c
  vendor-sys/acpica/dist/source/components/resources/rsxface.c
  vendor-sys/acpica/dist/source/components/tables/tbdata.c
  vendor-sys/acpica/dist/source/components/tables/tbfind.c
  vendor-sys/acpica/dist/source/components/tables/tbinstal.c
  vendor-sys/acpica/dist/source/components/tables/tbprint.c
  vendor-sys/acpica/dist/source/components/tables/tbutils.c
  vendor-sys/acpica/dist/source/components/tables/tbxface.c
  vendor-sys/acpica/dist/source/components/tables/tbxfload.c
  vendor-sys/acpica/dist/source/components/utilities/utascii.c
  vendor-sys/acpica/dist/source/components/utilities/utdecode.c
  vendor-sys/acpica/dist/source/components/utilities/utmisc.c
  vendor-sys/acpica/dist/source/components/utilities/utpredef.c
  vendor-sys/acpica/dist/source/components/utilities/utstring.c
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/actbl.h
  vendor-sys/acpica/dist/source/include/actypes.h
  vendor-sys/acpica/dist/source/include/platform/aclinux.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c
  vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c
  vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c
  vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c
  vendor-sys/acpica/dist/source/tools/acpidump/apdump.c
  vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h
  vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aetests.c
  vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c
  vendor-sys/acpica/dist/source/tools/acpinames/antables.c
  vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c
  vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c

Modified: vendor-sys/acpica/dist/changes.txt
==
--- vendor-sys/acpica/dist/changes.txt  Fri Mar 29 16:30:19 2019
(r345698)
+++ vendor-sys/acpica/dist/changes.txt  Fri Mar 29 16:40:11 2019
(r345699)
@@ -1,7 +1,75

svn commit: r345698 - head/lib/libvgl

2019-03-29 Thread Bruce Evans
Author: bde
Date: Fri Mar 29 16:30:19 2019
New Revision: 345698
URL: https://svnweb.freebsd.org/changeset/base/345698

Log:
  Fix restoring to graphics modes in VGLEnd().
  
  Correct restoring was only attempted for mode 258 (800x600x4 P).  (This
  was the only useful graphics mode supported in the kernel until 10-15
  years ago, and is still the only one explicitly documented in the man
  page).  The comment says that it is the geometry (subscreen size) that
  is restored, but it seems to only be necessary to restore the font
  size, with the geometry only needed since it is set by the same ioctl.
  The font size was not restored for this mode, but was forced to 16.
  
  For other graphics modes, the font size was clobbered to 0.  This
  confuses but doesn't crash the kernel (font size 0 gives null text).
  This confuses and crashes vidcontrol.  The only way to recover was to
  use vidcontrol to set the mode to any text mode on the way back to the
  original graphics mode.
  
  vidcontrol gets this wrong in the opposite way when backing out of
  changes after an error.  It restores the font size correctly, but
  forces the geometry to the full screen size.

Modified:
  head/lib/libvgl/main.c

Modified: head/lib/libvgl/main.c
==
--- head/lib/libvgl/main.c  Fri Mar 29 16:05:30 2019(r345697)
+++ head/lib/libvgl/main.c  Fri Mar 29 16:30:19 2019(r345698)
@@ -61,12 +61,14 @@ static int VGLAbortPending;
 static int VGLOnDisplay;
 static unsigned int VGLCurWindow;
 static int VGLInitDone = 0;
+static video_info_t VGLOldModeInfo;
 static vid_info_t VGLOldVInfo;
 
 void
 VGLEnd()
 {
 struct vt_mode smode;
+  int size[3];
 
   if (!VGLInitDone)
 return;
@@ -81,18 +83,15 @@ struct vt_mode smode;
 munmap(VGLMem, VGLAdpInfo.va_window_size);
   }
 
-  if (VGLOldMode >= M_VESA_BASE) {
-/* ugly, but necessary */
+  if (VGLOldMode >= M_VESA_BASE)
 ioctl(0, _IO('V', VGLOldMode - M_VESA_BASE), 0);
-if (VGLOldMode == M_VESA_800x600) {
-  int size[3];
-  size[0] = VGLOldVInfo.mv_csz;
-  size[1] = VGLOldVInfo.mv_rsz;
-  size[2] = 16;
-  ioctl(0, KDRASTER, size);
-}
-  } else {
+  else
 ioctl(0, _IO('S', VGLOldMode), 0);
+  if (VGLOldModeInfo.vi_flags & V_INFO_GRAPHICS) {
+size[0] = VGLOldVInfo.mv_csz;
+size[1] = VGLOldVInfo.mv_rsz;
+size[2] = VGLOldVInfo.font_size;;
+ioctl(0, KDRASTER, size);
   }
   ioctl(0, KDDISABIO, 0);
   ioctl(0, KDSETMODE, KD_TEXT);
@@ -165,12 +164,13 @@ VGLInit(int mode)
   if (ioctl(0, CONS_MODEINFO, ))   /* FBIO_MODEINFO */
 return -1;
 
-  /* If current mode is VESA_800x600 then save its geometry to restore later */
-  if ((VGLOldMode >= M_VESA_BASE) && (VGLOldMode == M_VESA_800x600)) {
-VGLOldVInfo.size = sizeof(VGLOldVInfo);
-if (ioctl(0, CONS_GETINFO, ))
-  return -1;
-  }
+  /* Save info for old mode to restore font size if old mode is graphics. */
+  VGLOldModeInfo.vi_mode = VGLOldMode;
+  if (ioctl(0, CONS_MODEINFO, ))
+return -1;
+  VGLOldVInfo.size = sizeof(VGLOldVInfo);
+  if (ioctl(0, CONS_GETINFO, ))
+return -1;
 
   VGLDisplay = (VGLBitmap *)malloc(sizeof(VGLBitmap));
   if (VGLDisplay == 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: r345697 - head/usr.sbin/iostat

2019-03-29 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Mar 29 16:05:30 2019
New Revision: 345697
URL: https://svnweb.freebsd.org/changeset/base/345697

Log:
  Reduce the precision of "MB/s" by one, making room for displaying
  transfer rates larger 99MB/s.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/iostat/iostat.c

Modified: head/usr.sbin/iostat/iostat.c
==
--- head/usr.sbin/iostat/iostat.c   Fri Mar 29 15:57:08 2019
(r345696)
+++ head/usr.sbin/iostat/iostat.c   Fri Mar 29 16:05:30 2019
(r345697)
@@ -945,7 +945,7 @@ devstats(int perf_select, long double etime, int havel
   ms_per_transaction);
} else {
if (Iflag == 0)
-   printf(" %4.1Lf %4.0Lf %5.2Lf ",
+   printf(" %4.1Lf %4.0Lf %5.1Lf ",
   kb_per_transfer,
   transfers_per_second,
   mb_per_second);
___
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: r345696 - head/lib/libvgl

2019-03-29 Thread Bruce Evans
Author: bde
Date: Fri Mar 29 15:57:08 2019
New Revision: 345696
URL: https://svnweb.freebsd.org/changeset/base/345696

Log:
  Fix endless loops for handling SIGBUS and SIGSEGV.
  
  r80270 has the usual wrong fix for unsafe signal handling -- just set
  a flag and return to let an event loop check the flag and do safe
  handling.  This never works for signals like SIGBUS and SIGSEGV that
  repeat and works poorly for others unless the application has an event
  loop designed to support this.
  
  For these signals, clean up unsafely as before, except for arranging that
  nested signals are fatal and forcing a nested signal if the cleanup doesn't
  cause one.

Modified:
  head/lib/libvgl/main.c

Modified: head/lib/libvgl/main.c
==
--- head/lib/libvgl/main.c  Fri Mar 29 15:20:48 2019(r345695)
+++ head/lib/libvgl/main.c  Fri Mar 29 15:57:08 2019(r345696)
@@ -31,9 +31,9 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -107,14 +107,22 @@ struct vt_mode smode;
 }
 
 static void 
-VGLAbort(int arg __unused)
+VGLAbort(int arg)
 {
+  sigset_t mask;
+
   VGLAbortPending = 1;
   signal(SIGINT, SIG_IGN);
   signal(SIGTERM, SIG_IGN);
-  signal(SIGSEGV, SIG_IGN);
-  signal(SIGBUS, SIG_IGN);
   signal(SIGUSR2, SIG_IGN);
+  if (arg == SIGBUS || arg == SIGSEGV) {
+signal(arg, SIG_DFL);
+sigemptyset();
+sigaddset(, arg);
+sigprocmask(SIG_UNBLOCK, , NULL);
+VGLEnd();
+kill(getpid(), arg);
+  }
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r345695 - head/lib/libvgl

2019-03-29 Thread Bruce Evans
Author: bde
Date: Fri Mar 29 15:20:48 2019
New Revision: 345695
URL: https://svnweb.freebsd.org/changeset/base/345695

Log:
  Fix races in mouse signal handling almost properly using the INTOFF/INTON
  method as in /bin/sh.
  
  We still do technically undefined things in the signal handler, but it
  is safe in practice to access state that is protected by INTOFF/INTON.
  
  In a recent commit, I sprinkled VGLMouseFrozen++/-- operations in
  places that need INTOFF/INTON.  This prevented clobbering of pixels
  under the mouse, but left mouse signals deferred for too long.  It is
  necessary to call the signal handler when the count goes to 0.  Old
  versions did this in the unfreeze function, but didn't block actual
  signals, so the signal handler raced itself.  The sprinkled operations
  reduced the races, but when then worked to block a race they left
  signals deferred for too long.
  
  Use INTOFF/INTON to fix complete loss of mouse signals while reading
  the mouse status.  Clobbering of the state was prevented by SIG_IGN'ing
  mouse signals, but that has a high overhead and broke more than it
  fixed by losing mouse signals completely.  sigprocmask() works to block
  signals without losing them completely, but its overhead is also too
  high.
  
  libvgl's mouse signal handling is often worse than none.  Applications
  can't block waiting for a mouse or keyboard or other event, but have
  to busy-wait.  The SIG_IGN's lost about half of all mouse events while
  busy-waiting for mouse events.

Modified:
  head/lib/libvgl/mouse.c

Modified: head/lib/libvgl/mouse.c
==
--- head/lib/libvgl/mouse.c Fri Mar 29 15:07:00 2019(r345694)
+++ head/lib/libvgl/mouse.c Fri Mar 29 15:20:48 2019(r345695)
@@ -86,12 +86,19 @@ static byte map[MOUSE_IMG_SIZE*MOUSE_IMG_SIZE*4];
 static VGLBitmap VGLMouseSave = 
 VGLBITMAP_INITIALIZER(MEMBUF, MOUSE_IMG_SIZE, MOUSE_IMG_SIZE, map);
 static int VGLMouseVisible = 0;
-static int VGLMouseFrozen = 0;
 static int VGLMouseShown = 0;
 static int VGLMouseXpos = 0;
 static int VGLMouseYpos = 0;
 static int VGLMouseButtons = 0;
+static volatile sig_atomic_t VGLMintpending;
+static volatile sig_atomic_t VGLMsuppressint;
 
+#defineINTOFF()(VGLMsuppressint++)
+#defineINTON() do {
\
+   if (--VGLMsuppressint == 0 && VGLMintpending) \
+   VGLMouseAction(0);  \
+   } while (0)
+
 void
 VGLMousePointerShow()
 {
@@ -102,7 +109,7 @@ VGLMousePointerShow()
   int i, pos, pos1;
 
   if (!VGLMouseVisible) {
-VGLMouseFrozen++;
+INTOFF();
 VGLMouseVisible = 1;
 crtcidx = inb(0x3c4);
 crtcval = inb(0x3c5);
@@ -125,7 +132,7 @@ VGLMousePointerShow()
 outb(0x3c5, crtcval);
 outb(0x3ce, gdcidx);
 outb(0x3cf, gdcval);
-VGLMouseFrozen--;
+INTON();
   }
 }
 
@@ -135,7 +142,7 @@ VGLMousePointerHide()
   byte crtcidx, crtcval, gdcidx, gdcval;
 
   if (VGLMouseVisible) {
-VGLMouseFrozen++;
+INTOFF();
 VGLMouseVisible = 0;
 crtcidx = inb(0x3c4);
 crtcval = inb(0x3c5);
@@ -147,7 +154,7 @@ VGLMousePointerHide()
 outb(0x3c5, crtcval);
 outb(0x3ce, gdcidx);
 outb(0x3cf, gdcval);
-VGLMouseFrozen--;
+INTON();
   }
 }
 
@@ -173,10 +180,13 @@ VGLMouseAction(int dummy) 
 {
   struct mouse_info mouseinfo;
 
-  if (VGLMouseFrozen) {
-VGLMouseFrozen += 8;
+  if (VGLMsuppressint) {
+VGLMintpending = 1;
 return;
   }
+again:
+  INTOFF();
+  VGLMintpending = 0;
   mouseinfo.operation = MOUSE_GETINFO;
   ioctl(0, CONS_MOUSECTL, );
   if (VGLMouseShown == VGL_MOUSESHOW)
@@ -186,6 +196,15 @@ VGLMouseAction(int dummy)  
   VGLMouseButtons = mouseinfo.u.data.buttons;
   if (VGLMouseShown == VGL_MOUSESHOW)
 VGLMousePointerShow();
+
+  /* 
+   * Loop to handle any new (suppressed) signals.  This is INTON() without
+   * recursion.  !SA_RESTART prevents recursion in signal handling.  So the
+   * maximum recursion is 2 levels.
+   */
+  VGLMsuppressint = 0;
+  if (VGLMintpending)
+goto again;
 }
 
 void
@@ -248,11 +267,11 @@ VGLMouseInit(int mode)
 int
 VGLMouseStatus(int *x, int *y, char *buttons)
 {
-  signal(SIGUSR2, SIG_IGN);
+  INTOFF();
   *x =  VGLMouseXpos;
   *y =  VGLMouseYpos;
   *buttons =  VGLMouseButtons;
-  signal(SIGUSR2, VGLMouseAction);
+  INTON();
   return VGLMouseShown;
 }
 
@@ -261,7 +280,7 @@ VGLMouseFreeze(int x, int y, int width, int hight, u_l
 {
   int i, xstride, ystride;
 
-VGLMouseFrozen++;
+INTOFF();
 if (width > 1 || hight > 1 || (color & 0xc000) == 0) { /* bitmap */
   if (VGLMouseShown == 1) {
 int overlap;
@@ -311,13 +330,8 @@ VGLMouseFreeze(int x, int y, int width, int hight, u_l
 void
 VGLMouseUnFreeze()
 {
-  if (VGLMouseFrozen > 8) {
-VGLMouseFrozen = 0;
-VGLMouseAction(0);
-  }
-  else {
-   

svn commit: r345694 - head/libexec/rtld-elf/mips

2019-03-29 Thread Ed Maste
Author: emaste
Date: Fri Mar 29 15:07:00 2019
New Revision: 345694
URL: https://svnweb.freebsd.org/changeset/base/345694

Log:
  rtld: attempt to fix reloc_non_plt TLS allocation on MIPS
  
  allocate_tls_offset returns true on success.  The same issue existed
  on arm and was fixed in r345693.
  
  PR:   236880
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/libexec/rtld-elf/mips/reloc.c

Modified: head/libexec/rtld-elf/mips/reloc.c
==
--- head/libexec/rtld-elf/mips/reloc.c  Fri Mar 29 14:35:23 2019
(r345693)
+++ head/libexec/rtld-elf/mips/reloc.c  Fri Mar 29 15:07:00 2019
(r345694)
@@ -588,7 +588,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int
if (def == NULL)
return -1;
 
-   if (!defobj->tls_done && allocate_tls_offset(obj))
+   if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
 
val += (Elf_Addr)def->st_value - TLS_DTP_OFFSET;
@@ -616,7 +616,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int
if (def == NULL)
return -1;
 
-   if (!defobj->tls_done && allocate_tls_offset(obj))
+   if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
 
val += (Elf_Addr)(def->st_value + defobj->tlsoffset
___
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: r345693 - head/libexec/rtld-elf/arm

2019-03-29 Thread Ed Maste
On Fri, 29 Mar 2019 at 10:35, Ed Maste  wrote:
>
> Author: emaste
> Date: Fri Mar 29 14:35:23 2019
> New Revision: 345693
> URL: https://svnweb.freebsd.org/changeset/base/345693
>
> Log:
>   rtld: attempt to fix reloc_nonplt_object TLS allocation

... on arm
___
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: r345692 - in stable/12/sys: net netpfil/pf

2019-03-29 Thread Kristof Provost
Author: kp
Date: Fri Mar 29 14:34:51 2019
New Revision: 345692
URL: https://svnweb.freebsd.org/changeset/base/345692

Log:
  MFC r345177:
  
  pf :Use counter(9) in pf tables.
  
  The counters of pf tables are updated outside the rule lock. That means state
  updates might overwrite each other. Furthermore allocation and
  freeing of counters happens outside the lock as well.
  
  Use counter(9) for the counters, and always allocate the counter table
  element, so that the race condition cannot happen any more.
  
  PR:   230619
  Submitted by: Kajetan Staszkiewicz 

Modified:
  stable/12/sys/net/pfvar.h
  stable/12/sys/netpfil/pf/pf_table.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/pfvar.h
==
--- stable/12/sys/net/pfvar.h   Fri Mar 29 14:34:50 2019(r345691)
+++ stable/12/sys/net/pfvar.h   Fri Mar 29 14:34:51 2019(r345692)
@@ -1021,6 +1021,17 @@ struct pfr_tstats {
int  pfrts_cnt;
int  pfrts_refcnt[PFR_REFCNT_MAX];
 };
+
+struct pfr_ktstats {
+   struct pfr_table pfrts_t;
+   counter_u64_tpfrkts_packets[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+   counter_u64_tpfrkts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+   counter_u64_tpfrkts_match;
+   counter_u64_tpfrkts_nomatch;
+   long pfrkts_tzero;
+   int  pfrkts_cnt;
+   int  pfrkts_refcnt[PFR_REFCNT_MAX];
+};
 #definepfrts_name  pfrts_t.pfrt_name
 #define pfrts_flagspfrts_t.pfrt_flags
 
@@ -1034,8 +1045,9 @@ union sockaddr_union {
 #endif /* _SOCKADDR_UNION_DEFINED */
 
 struct pfr_kcounters {
-   u_int64_tpfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
-   u_int64_tpfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   counter_u64_tpfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   counter_u64_tpfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   long pfrkc_tzero;
 };
 
 SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
@@ -1043,8 +1055,7 @@ struct pfr_kentry {
struct radix_nodepfrke_node[2];
union sockaddr_union pfrke_sa;
SLIST_ENTRY(pfr_kentry)  pfrke_workq;
-   struct pfr_kcounters*pfrke_counters;
-   long pfrke_tzero;
+   struct pfr_kcounters pfrke_counters;
u_int8_t pfrke_af;
u_int8_t pfrke_net;
u_int8_t pfrke_not;
@@ -1054,7 +1065,7 @@ struct pfr_kentry {
 SLIST_HEAD(pfr_ktableworkq, pfr_ktable);
 RB_HEAD(pfr_ktablehead, pfr_ktable);
 struct pfr_ktable {
-   struct pfr_tstatspfrkt_ts;
+   struct pfr_ktstats   pfrkt_kts;
RB_ENTRY(pfr_ktable) pfrkt_tree;
SLIST_ENTRY(pfr_ktable)  pfrkt_workq;
struct radix_node_head  *pfrkt_ip4;
@@ -1065,18 +1076,18 @@ struct pfr_ktable {
long pfrkt_larg;
int  pfrkt_nflags;
 };
-#define pfrkt_tpfrkt_ts.pfrts_t
+#define pfrkt_tpfrkt_kts.pfrts_t
 #define pfrkt_name pfrkt_t.pfrt_name
 #define pfrkt_anchor   pfrkt_t.pfrt_anchor
 #define pfrkt_ruleset  pfrkt_t.pfrt_ruleset
 #define pfrkt_flagspfrkt_t.pfrt_flags
-#define pfrkt_cnt  pfrkt_ts.pfrts_cnt
-#define pfrkt_refcnt   pfrkt_ts.pfrts_refcnt
-#define pfrkt_packets  pfrkt_ts.pfrts_packets
-#define pfrkt_bytespfrkt_ts.pfrts_bytes
-#define pfrkt_matchpfrkt_ts.pfrts_match
-#define pfrkt_nomatch  pfrkt_ts.pfrts_nomatch
-#define pfrkt_tzeropfrkt_ts.pfrts_tzero
+#define pfrkt_cnt  pfrkt_kts.pfrkts_cnt
+#define pfrkt_refcnt   pfrkt_kts.pfrkts_refcnt
+#define pfrkt_packets  pfrkt_kts.pfrkts_packets
+#define pfrkt_bytespfrkt_kts.pfrkts_bytes
+#define pfrkt_matchpfrkt_kts.pfrkts_match
+#define pfrkt_nomatch  pfrkt_kts.pfrkts_nomatch
+#define pfrkt_tzeropfrkt_kts.pfrkts_tzero
 
 /* keep synced with pfi_kif, used in RB_FIND */
 struct pfi_kif_cmp {

Modified: stable/12/sys/netpfil/pf/pf_table.c
==
--- stable/12/sys/netpfil/pf/pf_table.c Fri Mar 29 14:34:50 2019
(r345691)
+++ stable/12/sys/netpfil/pf/pf_table.c Fri Mar 29 14:34:51 2019
(r345692)
@@ -113,6 +113,7 @@ struct pfr_walktree {
struct pfi_dynaddr  *pfrw1_dyn;
}pfrw_1;
int  pfrw_free;
+   int  pfrw_flags;
 };
 #definepfrw_addr   pfrw_1.pfrw1_addr
 #definepfrw_astats pfrw_1.pfrw1_astats
@@ -126,15 +127,16 @@ struct pfr_walktree {
 static MALLOC_DEFINE(M_PFTABLE, "pf_table", "pf(4) tables structures");
 VNET_DEFINE_STATIC(uma_zone_t, pfr_kentry_z);
 #defineV_pfr_kentry_z  VNET(pfr_kentry_z)
-VNET_DEFINE_STATIC(uma_zone_t, pfr_kcounters_z);
-#defineV_pfr_kcounters_z   

svn commit: r345691 - in stable/11/sys: net netpfil/pf

2019-03-29 Thread Kristof Provost
Author: kp
Date: Fri Mar 29 14:34:50 2019
New Revision: 345691
URL: https://svnweb.freebsd.org/changeset/base/345691

Log:
  MFC r345177:
  
  pf :Use counter(9) in pf tables.
  
  The counters of pf tables are updated outside the rule lock. That means state
  updates might overwrite each other. Furthermore allocation and
  freeing of counters happens outside the lock as well.
  
  Use counter(9) for the counters, and always allocate the counter table
  element, so that the race condition cannot happen any more.
  
  PR:   230619
  Submitted by: Kajetan Staszkiewicz 

Modified:
  stable/11/sys/net/pfvar.h
  stable/11/sys/netpfil/pf/pf_table.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/pfvar.h
==
--- stable/11/sys/net/pfvar.h   Fri Mar 29 14:19:31 2019(r345690)
+++ stable/11/sys/net/pfvar.h   Fri Mar 29 14:34:50 2019(r345691)
@@ -1013,6 +1013,17 @@ struct pfr_tstats {
int  pfrts_cnt;
int  pfrts_refcnt[PFR_REFCNT_MAX];
 };
+
+struct pfr_ktstats {
+   struct pfr_table pfrts_t;
+   counter_u64_tpfrkts_packets[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+   counter_u64_tpfrkts_bytes[PFR_DIR_MAX][PFR_OP_TABLE_MAX];
+   counter_u64_tpfrkts_match;
+   counter_u64_tpfrkts_nomatch;
+   long pfrkts_tzero;
+   int  pfrkts_cnt;
+   int  pfrkts_refcnt[PFR_REFCNT_MAX];
+};
 #definepfrts_name  pfrts_t.pfrt_name
 #define pfrts_flagspfrts_t.pfrt_flags
 
@@ -1026,8 +1037,9 @@ union sockaddr_union {
 #endif /* _SOCKADDR_UNION_DEFINED */
 
 struct pfr_kcounters {
-   u_int64_tpfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
-   u_int64_tpfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   counter_u64_tpfrkc_packets[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   counter_u64_tpfrkc_bytes[PFR_DIR_MAX][PFR_OP_ADDR_MAX];
+   long pfrkc_tzero;
 };
 
 SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
@@ -1035,8 +1047,7 @@ struct pfr_kentry {
struct radix_nodepfrke_node[2];
union sockaddr_union pfrke_sa;
SLIST_ENTRY(pfr_kentry)  pfrke_workq;
-   struct pfr_kcounters*pfrke_counters;
-   long pfrke_tzero;
+   struct pfr_kcounters pfrke_counters;
u_int8_t pfrke_af;
u_int8_t pfrke_net;
u_int8_t pfrke_not;
@@ -1046,7 +1057,7 @@ struct pfr_kentry {
 SLIST_HEAD(pfr_ktableworkq, pfr_ktable);
 RB_HEAD(pfr_ktablehead, pfr_ktable);
 struct pfr_ktable {
-   struct pfr_tstatspfrkt_ts;
+   struct pfr_ktstats   pfrkt_kts;
RB_ENTRY(pfr_ktable) pfrkt_tree;
SLIST_ENTRY(pfr_ktable)  pfrkt_workq;
struct radix_node_head  *pfrkt_ip4;
@@ -1057,18 +1068,18 @@ struct pfr_ktable {
long pfrkt_larg;
int  pfrkt_nflags;
 };
-#define pfrkt_tpfrkt_ts.pfrts_t
+#define pfrkt_tpfrkt_kts.pfrts_t
 #define pfrkt_name pfrkt_t.pfrt_name
 #define pfrkt_anchor   pfrkt_t.pfrt_anchor
 #define pfrkt_ruleset  pfrkt_t.pfrt_ruleset
 #define pfrkt_flagspfrkt_t.pfrt_flags
-#define pfrkt_cnt  pfrkt_ts.pfrts_cnt
-#define pfrkt_refcnt   pfrkt_ts.pfrts_refcnt
-#define pfrkt_packets  pfrkt_ts.pfrts_packets
-#define pfrkt_bytespfrkt_ts.pfrts_bytes
-#define pfrkt_matchpfrkt_ts.pfrts_match
-#define pfrkt_nomatch  pfrkt_ts.pfrts_nomatch
-#define pfrkt_tzeropfrkt_ts.pfrts_tzero
+#define pfrkt_cnt  pfrkt_kts.pfrkts_cnt
+#define pfrkt_refcnt   pfrkt_kts.pfrkts_refcnt
+#define pfrkt_packets  pfrkt_kts.pfrkts_packets
+#define pfrkt_bytespfrkt_kts.pfrkts_bytes
+#define pfrkt_matchpfrkt_kts.pfrkts_match
+#define pfrkt_nomatch  pfrkt_kts.pfrkts_nomatch
+#define pfrkt_tzeropfrkt_kts.pfrkts_tzero
 
 /* keep synced with pfi_kif, used in RB_FIND */
 struct pfi_kif_cmp {

Modified: stable/11/sys/netpfil/pf/pf_table.c
==
--- stable/11/sys/netpfil/pf/pf_table.c Fri Mar 29 14:19:31 2019
(r345690)
+++ stable/11/sys/netpfil/pf/pf_table.c Fri Mar 29 14:34:50 2019
(r345691)
@@ -111,6 +111,7 @@ struct pfr_walktree {
struct pfi_dynaddr  *pfrw1_dyn;
}pfrw_1;
int  pfrw_free;
+   int  pfrw_flags;
 };
 #definepfrw_addr   pfrw_1.pfrw1_addr
 #definepfrw_astats pfrw_1.pfrw1_astats
@@ -124,15 +125,16 @@ struct pfr_walktree {
 static MALLOC_DEFINE(M_PFTABLE, "pf_table", "pf(4) tables structures");
 static VNET_DEFINE(uma_zone_t, pfr_kentry_z);
 #defineV_pfr_kentry_z  VNET(pfr_kentry_z)
-static VNET_DEFINE(uma_zone_t, pfr_kcounters_z);
-#defineV_pfr_kcounters_z   

svn commit: r345693 - head/libexec/rtld-elf/arm

2019-03-29 Thread Ed Maste
Author: emaste
Date: Fri Mar 29 14:35:23 2019
New Revision: 345693
URL: https://svnweb.freebsd.org/changeset/base/345693

Log:
  rtld: attempt to fix reloc_nonplt_object TLS allocation
  
  allocate_tls_offset returns true on success.  This still needs more
  testing and review, but this change is consistent with other archs.
  
  PR:   236880
  Reported by:  Andrew Gierth 
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/libexec/rtld-elf/arm/reloc.c

Modified: head/libexec/rtld-elf/arm/reloc.c
==
--- head/libexec/rtld-elf/arm/reloc.c   Fri Mar 29 14:34:51 2019
(r345692)
+++ head/libexec/rtld-elf/arm/reloc.c   Fri Mar 29 14:35:23 2019
(r345693)
@@ -319,7 +319,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel
if (def == NULL)
return -1;
 
-   if (!defobj->tls_done && allocate_tls_offset(obj))
+   if (!defobj->tls_done && !allocate_tls_offset(obj))
return -1;
 
tmp = (Elf_Addr)def->st_value + defobj->tlsoffset;
___
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: r345680 - head/sys/conf

2019-03-29 Thread Kyle Evans
On Fri, Mar 29, 2019 at 12:34 AM Rodney W. Grimes
 wrote:
>
> > -Original Message-
> > From:  on behalf of Kyle Evans 
> > 
> > Date: 2019-03-28, Thursday at 21:00
> > To: , , 
> > 
> > Subject: svn commit: r345680 - head/sys/conf
> >
> > > Author: kevans
> > > Date: Fri Mar 29 04:00:46 2019
> > > New Revision: 345680
> > > URL: https://svnweb.freebsd.org/changeset/base/345680
> > >
> > > Log:
> > >   NOTES: Use non-default value for BOOT_TAG
> >
> > Why?
> >
> > (I was on IRC when jhb debugged this, but I didn't quite get it; and of 
> > course lots of us *weren't* on IRC at the time.)
>
> Yes, please, why is this beeing changed, do I need to revise my .sh that
> was hunting for the old string to use what now?  Or do I need to now
> override this in my KERNCONF files?
>
> I think changing this in stable/12 is a POLA issue.
>
> > Thanks,
> >
> > Ravi (rpokala@)
> >
> > >   Reported by:  jhb
> > >   MFC after:1 week (except non-empty value in stable/11)
>
> Why is 11 being treated special, or is it that it does not implement
> BOOT_TAG at all?
>
> Does this deserve a RELNOTES Y, or UPDATING entry?
>

The short answer to all of this is "No, no, no" -- see Bruce's
response about the purpose of NOTES, and the NOTES header itself. It's
the kitchen sink, and you can't/won't/don't include the kitchen sink
when you need a pipelet.

11 is special because BOOT_TAG was implemented after stable/11
branched. I MFC'd it because I used it on stable/11, but the MFC had
to result in a no-op to the msgbuf to not violate POLA.
___
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: r345689 - head/sys/fs/fuse

2019-03-29 Thread Alan Somers
Author: asomers
Date: Fri Mar 29 14:07:30 2019
New Revision: 345689
URL: https://svnweb.freebsd.org/changeset/base/345689

Log:
  fix the GENERIC-NODEBUG build after r345675
  
  Submitted by: cy
  Reported by:  cy, Michael Butler 
  MFC after:2 weeks
  X-MFC-With:   345675

Modified:
  head/sys/fs/fuse/fuse_ipc.c

Modified: head/sys/fs/fuse/fuse_ipc.c
==
--- head/sys/fs/fuse/fuse_ipc.c Fri Mar 29 13:38:47 2019(r345688)
+++ head/sys/fs/fuse/fuse_ipc.c Fri Mar 29 14:07:30 2019(r345689)
@@ -220,7 +220,9 @@ fticket_ctor(void *mem, int size, void *arg, int flags
 static void
 fticket_dtor(void *mem, int size, void *arg)
 {
+#ifdef INVARIANTS
struct fuse_ticket *ftick = mem;
+#endif
 
FUSE_ASSERT_MS_DONE(ftick);
FUSE_ASSERT_AW_DONE(ftick);
___
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: r345680 - head/sys/conf

2019-03-29 Thread Mark Linimon
On Fri, Mar 29, 2019 at 09:49:03AM +, Alexey Dokuchaev wrote:
> P.S.  Boot tag of a healthy human is "Copyright (c) 1992-2018 The FreeBSD
> Project".

ITYM 2019.

mcl
___
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: r345680 - head/sys/conf

2019-03-29 Thread Kyle Evans
On Fri, Mar 29, 2019 at 1:40 AM Bruce Evans  wrote:
>
> On Thu, 28 Mar 2019, Ravi Pokala wrote:
>
> > -Original Message-
> > From:  on behalf of Kyle Evans 
> > 
> > Date: 2019-03-28, Thursday at 21:00
> > To: , , 
> > 
> > Subject: svn commit: r345680 - head/sys/conf
> >> [... snip ...]
> >>  # Maximum boot tag size the kernel's static buffer should accomodate.  
> >> Maximum
> >>  # size for both BOOT_TAG and the assocated tunable.
> >>  options BOOT_TAG_SZ=32
>
> This bug remains unfixed.  32 is the default.  This option shouldn't exist.
> Instead, just use size strlen(BOOT_TAG) + 1 for the static string and keep
> the dynamic string in the environment.  The string is only used once, and
> msgbufinit() already has to check both the static string and the environment
> to find the right string (it does this by fetching the dynamic string to
> overwrite the static string, but it is easier to not use a tunable or
> support a sysctl and just keep the dynamic string in the environment).
>

I will consider doing just that. Where I was going with this turned
out to be logistically annoying because of kenv's val length
limitation. I had some one-off test setups where I wanted to dump some
cherry-picked information about the build into the BOOT_TAG via the
tunable for reference when looking back and comparing msgbufs between
boots. However, we can't reasonably support values the length I need
in the environment (with a caveat, see [0]), so I would need to break
them up -- likely by hand, which means I'm more inclined to just hunt
down the current BOOT_TAG and modify these msgbufs post-mortem to
include the information I want to see. This process is still less
convenient than it would've been to be able to set it in loader.conf,
because for many of these I already have to edit loader.conf for other
reasons.

Enlarging the BOOT_TAG_SZ in the 'breaking up' scenario is convenient
because I'd rather not stitch the boot tag back together from the
environment when observed via sysctl -- I want to do this once, and
observe it exactly as it is after it's printed, so pushing it into the
boot tag buffer that already holds the statically configured boot tag
is convenient there. There are other reasons it'd be convenient to
push them into the same buffer, but they're rather moot now since I'm
likely the only one that wanted to use larger boot tags like that and
I'm just not going to go that far to support my use case.

[0] Merging into the dynamic environment is kind of broken here, and I
didn't really fix it when I touched that. We only verify that the
whole assignment line isn't more than MNAMELEN + MVALLEN + 2, rather
than the individual components, so I could take advantage of this and
have way-too-long values... that's not much more helpful, though.
___
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: r345688 - stable/11/sys/netinet

2019-03-29 Thread Mark Johnston
Author: markj
Date: Fri Mar 29 13:38:47 2019
New Revision: 345688
URL: https://svnweb.freebsd.org/changeset/base/345688

Log:
  MFC r345560:
  Add CTLFLAG_VNET to the net.inet.icmp.tstamprepl definition.

Modified:
  stable/11/sys/netinet/ip_icmp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/ip_icmp.c
==
--- stable/11/sys/netinet/ip_icmp.c Fri Mar 29 13:37:29 2019
(r345687)
+++ stable/11/sys/netinet/ip_icmp.c Fri Mar 29 13:38:47 2019
(r345688)
@@ -151,7 +151,7 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFL
 
 static VNET_DEFINE(int, icmptstamprepl) = 1;
 #defineV_icmptstampreplVNET(icmptstamprepl)
-SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW,
+SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_VNET | CTLFLAG_RW,
_NAME(icmptstamprepl), 0,
"Respond to ICMP Timestamp packets");
 
___
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: r345687 - stable/12/sys/netinet

2019-03-29 Thread Mark Johnston
Author: markj
Date: Fri Mar 29 13:37:29 2019
New Revision: 345687
URL: https://svnweb.freebsd.org/changeset/base/345687

Log:
  MFC r345560:
  Add CTLFLAG_VNET to the net.inet.icmp.tstamprepl definition.

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

Modified: stable/12/sys/netinet/ip_icmp.c
==
--- stable/12/sys/netinet/ip_icmp.c Fri Mar 29 13:15:16 2019
(r345686)
+++ stable/12/sys/netinet/ip_icmp.c Fri Mar 29 13:37:29 2019
(r345687)
@@ -154,7 +154,7 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFL
 
 VNET_DEFINE_STATIC(int, icmptstamprepl) = 1;
 #defineV_icmptstampreplVNET(icmptstamprepl)
-SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW,
+SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_VNET | CTLFLAG_RW,
_NAME(icmptstamprepl), 0,
"Respond to ICMP Timestamp packets");
 
___
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: r345686 - vendor/mandoc/1.14.5

2019-03-29 Thread Baptiste Daroussin
Author: bapt
Date: Fri Mar 29 13:15:16 2019
New Revision: 345686
URL: https://svnweb.freebsd.org/changeset/base/345686

Log:
  Tag import of mandoc 1.14.5

Added:
  vendor/mandoc/1.14.5/
 - copied from r345684, vendor/mandoc/dist/
  vendor/mandoc/1.14.5/arch.c
 - copied unchanged from r345685, vendor/mandoc/dist/arch.c
  vendor/mandoc/1.14.5/eqn.h
 - copied unchanged from r345685, vendor/mandoc/dist/eqn.h
  vendor/mandoc/1.14.5/eqn_parse.h
 - copied unchanged from r345685, vendor/mandoc/dist/eqn_parse.h
  vendor/mandoc/1.14.5/mandoc_msg.c
 - copied unchanged from r345685, vendor/mandoc/dist/mandoc_msg.c
  vendor/mandoc/1.14.5/mandoc_parse.h
 - copied unchanged from r345685, vendor/mandoc/dist/mandoc_parse.h
  vendor/mandoc/1.14.5/tbl.h
 - copied unchanged from r345685, vendor/mandoc/dist/tbl.h
  vendor/mandoc/1.14.5/tbl_int.h
 - copied unchanged from r345685, vendor/mandoc/dist/tbl_int.h
  vendor/mandoc/1.14.5/tbl_parse.h
 - copied unchanged from r345685, vendor/mandoc/dist/tbl_parse.h
Replaced:
  vendor/mandoc/1.14.5/INSTALL
 - copied unchanged from r345685, vendor/mandoc/dist/INSTALL
  vendor/mandoc/1.14.5/LICENSE
 - copied unchanged from r345685, vendor/mandoc/dist/LICENSE
  vendor/mandoc/1.14.5/Makefile
 - copied unchanged from r345685, vendor/mandoc/dist/Makefile
  vendor/mandoc/1.14.5/Makefile.depend
 - copied unchanged from r345685, vendor/mandoc/dist/Makefile.depend
  vendor/mandoc/1.14.5/NEWS
 - copied unchanged from r345685, vendor/mandoc/dist/NEWS
  vendor/mandoc/1.14.5/TODO
 - copied unchanged from r345685, vendor/mandoc/dist/TODO
  vendor/mandoc/1.14.5/apropos.1
 - copied unchanged from r345685, vendor/mandoc/dist/apropos.1
  vendor/mandoc/1.14.5/att.c
 - copied unchanged from r345685, vendor/mandoc/dist/att.c
  vendor/mandoc/1.14.5/cgi.c
 - copied unchanged from r345685, vendor/mandoc/dist/cgi.c
  vendor/mandoc/1.14.5/chars.c
 - copied unchanged from r345685, vendor/mandoc/dist/chars.c
  vendor/mandoc/1.14.5/configure
 - copied unchanged from r345685, vendor/mandoc/dist/configure
  vendor/mandoc/1.14.5/configure.local.example
 - copied unchanged from r345685, vendor/mandoc/dist/configure.local.example
  vendor/mandoc/1.14.5/dbm.c
 - copied unchanged from r345685, vendor/mandoc/dist/dbm.c
  vendor/mandoc/1.14.5/demandoc.c
 - copied unchanged from r345685, vendor/mandoc/dist/demandoc.c
  vendor/mandoc/1.14.5/eqn.c
 - copied unchanged from r345685, vendor/mandoc/dist/eqn.c
  vendor/mandoc/1.14.5/eqn_html.c
 - copied unchanged from r345685, vendor/mandoc/dist/eqn_html.c
  vendor/mandoc/1.14.5/eqn_term.c
 - copied unchanged from r345685, vendor/mandoc/dist/eqn_term.c
  vendor/mandoc/1.14.5/gmdiff
 - copied unchanged from r345685, vendor/mandoc/dist/gmdiff
  vendor/mandoc/1.14.5/html.c
 - copied unchanged from r345685, vendor/mandoc/dist/html.c
  vendor/mandoc/1.14.5/html.h
 - copied unchanged from r345685, vendor/mandoc/dist/html.h
  vendor/mandoc/1.14.5/lib.c
 - copied unchanged from r345685, vendor/mandoc/dist/lib.c
  vendor/mandoc/1.14.5/lib.in
 - copied unchanged from r345685, vendor/mandoc/dist/lib.in
  vendor/mandoc/1.14.5/libman.h
 - copied unchanged from r345685, vendor/mandoc/dist/libman.h
  vendor/mandoc/1.14.5/libmandoc.h
 - copied unchanged from r345685, vendor/mandoc/dist/libmandoc.h
  vendor/mandoc/1.14.5/libmdoc.h
 - copied unchanged from r345685, vendor/mandoc/dist/libmdoc.h
  vendor/mandoc/1.14.5/main.c
 - copied unchanged from r345685, vendor/mandoc/dist/main.c
  vendor/mandoc/1.14.5/main.h
 - copied unchanged from r345685, vendor/mandoc/dist/main.h
  vendor/mandoc/1.14.5/man.1
 - copied unchanged from r345685, vendor/mandoc/dist/man.1
  vendor/mandoc/1.14.5/man.7
 - copied unchanged from r345685, vendor/mandoc/dist/man.7
  vendor/mandoc/1.14.5/man.c
 - copied unchanged from r345685, vendor/mandoc/dist/man.c
  vendor/mandoc/1.14.5/man.conf.5
 - copied unchanged from r345685, vendor/mandoc/dist/man.conf.5
  vendor/mandoc/1.14.5/man.h
 - copied unchanged from r345685, vendor/mandoc/dist/man.h
  vendor/mandoc/1.14.5/man_html.c
 - copied unchanged from r345685, vendor/mandoc/dist/man_html.c
  vendor/mandoc/1.14.5/man_macro.c
 - copied unchanged from r345685, vendor/mandoc/dist/man_macro.c
  vendor/mandoc/1.14.5/man_term.c
 - copied unchanged from r345685, vendor/mandoc/dist/man_term.c
  vendor/mandoc/1.14.5/man_validate.c
 - copied unchanged from r345685, vendor/mandoc/dist/man_validate.c
  vendor/mandoc/1.14.5/manconf.h
 - copied unchanged from r345685, vendor/mandoc/dist/manconf.h
  vendor/mandoc/1.14.5/mandoc.1
 - copied unchanged from r345685, vendor/mandoc/dist/mandoc.1
  vendor/mandoc/1.14.5/mandoc.3
 - copied unchanged from r345685, vendor/mandoc/dist/mandoc.3
  vendor/mandoc/1.14.5/mandoc.c
 - copied unchanged from r345685, vendor/mandoc/dist/mandoc.c
  

Re: svn commit: r345685 - vendor/mandoc/dist

2019-03-29 Thread Baptiste Daroussin
On Fri, Mar 29, 2019 at 01:13:31PM +, Baptiste Daroussin wrote:
> Author: bapt
> Date: Fri Mar 29 13:13:30 2019
> New Revision: 345685
> URL: https://svnweb.freebsd.org/changeset/base/345685
> 
> Log:
>   Import mandoc 1.4.5

One should have read 1.14.5

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r345685 - vendor/mandoc/dist

2019-03-29 Thread Baptiste Daroussin
Author: bapt
Date: Fri Mar 29 13:13:30 2019
New Revision: 345685
URL: https://svnweb.freebsd.org/changeset/base/345685

Log:
  Import mandoc 1.4.5

Added:
  vendor/mandoc/dist/arch.c   (contents, props changed)
  vendor/mandoc/dist/eqn.h   (contents, props changed)
  vendor/mandoc/dist/eqn_parse.h   (contents, props changed)
  vendor/mandoc/dist/mandoc_msg.c   (contents, props changed)
  vendor/mandoc/dist/mandoc_parse.h   (contents, props changed)
  vendor/mandoc/dist/tbl.h   (contents, props changed)
  vendor/mandoc/dist/tbl_int.h   (contents, props changed)
  vendor/mandoc/dist/tbl_parse.h   (contents, props changed)
Deleted:
  vendor/mandoc/dist/st.in
Modified:
  vendor/mandoc/dist/INSTALL
  vendor/mandoc/dist/LICENSE
  vendor/mandoc/dist/Makefile
  vendor/mandoc/dist/Makefile.depend
  vendor/mandoc/dist/NEWS
  vendor/mandoc/dist/TODO
  vendor/mandoc/dist/apropos.1
  vendor/mandoc/dist/att.c
  vendor/mandoc/dist/cgi.c
  vendor/mandoc/dist/chars.c
  vendor/mandoc/dist/configure
  vendor/mandoc/dist/configure.local.example
  vendor/mandoc/dist/dbm.c
  vendor/mandoc/dist/demandoc.c
  vendor/mandoc/dist/eqn.c
  vendor/mandoc/dist/eqn_html.c
  vendor/mandoc/dist/eqn_term.c
  vendor/mandoc/dist/gmdiff
  vendor/mandoc/dist/html.c
  vendor/mandoc/dist/html.h
  vendor/mandoc/dist/lib.c
  vendor/mandoc/dist/lib.in
  vendor/mandoc/dist/libman.h
  vendor/mandoc/dist/libmandoc.h
  vendor/mandoc/dist/libmdoc.h
  vendor/mandoc/dist/main.c
  vendor/mandoc/dist/main.h
  vendor/mandoc/dist/man.1
  vendor/mandoc/dist/man.7
  vendor/mandoc/dist/man.c
  vendor/mandoc/dist/man.conf.5
  vendor/mandoc/dist/man.h
  vendor/mandoc/dist/man_html.c
  vendor/mandoc/dist/man_macro.c
  vendor/mandoc/dist/man_term.c
  vendor/mandoc/dist/man_validate.c
  vendor/mandoc/dist/manconf.h
  vendor/mandoc/dist/mandoc.1
  vendor/mandoc/dist/mandoc.3
  vendor/mandoc/dist/mandoc.c
  vendor/mandoc/dist/mandoc.css
  vendor/mandoc/dist/mandoc.h
  vendor/mandoc/dist/mandoc_char.7
  vendor/mandoc/dist/mandoc_headers.3
  vendor/mandoc/dist/mandoc_html.3
  vendor/mandoc/dist/mandocd.c
  vendor/mandoc/dist/mandocdb.c
  vendor/mandoc/dist/manpath.c
  vendor/mandoc/dist/mansearch.c
  vendor/mandoc/dist/mansearch.h
  vendor/mandoc/dist/mdoc.7
  vendor/mandoc/dist/mdoc.c
  vendor/mandoc/dist/mdoc.h
  vendor/mandoc/dist/mdoc_argv.c
  vendor/mandoc/dist/mdoc_html.c
  vendor/mandoc/dist/mdoc_macro.c
  vendor/mandoc/dist/mdoc_man.c
  vendor/mandoc/dist/mdoc_markdown.c
  vendor/mandoc/dist/mdoc_state.c
  vendor/mandoc/dist/mdoc_term.c
  vendor/mandoc/dist/mdoc_validate.c
  vendor/mandoc/dist/msec.c
  vendor/mandoc/dist/out.c
  vendor/mandoc/dist/out.h
  vendor/mandoc/dist/preconv.c
  vendor/mandoc/dist/read.c
  vendor/mandoc/dist/roff.7
  vendor/mandoc/dist/roff.c
  vendor/mandoc/dist/roff.h
  vendor/mandoc/dist/roff_html.c
  vendor/mandoc/dist/roff_int.h
  vendor/mandoc/dist/roff_term.c
  vendor/mandoc/dist/roff_validate.c
  vendor/mandoc/dist/st.c
  vendor/mandoc/dist/tag.c
  vendor/mandoc/dist/tag.h
  vendor/mandoc/dist/tbl.3
  vendor/mandoc/dist/tbl.7
  vendor/mandoc/dist/tbl.c
  vendor/mandoc/dist/tbl_data.c
  vendor/mandoc/dist/tbl_html.c
  vendor/mandoc/dist/tbl_layout.c
  vendor/mandoc/dist/tbl_opts.c
  vendor/mandoc/dist/tbl_term.c
  vendor/mandoc/dist/term.c
  vendor/mandoc/dist/term.h
  vendor/mandoc/dist/term_ascii.c
  vendor/mandoc/dist/term_tab.c
  vendor/mandoc/dist/test-getsubopt.c
  vendor/mandoc/dist/test-strcasestr.c
  vendor/mandoc/dist/test-stringlist.c
  vendor/mandoc/dist/test-strptime.c
  vendor/mandoc/dist/test-vasprintf.c
  vendor/mandoc/dist/test-wchar.c
  vendor/mandoc/dist/tree.c

Modified: vendor/mandoc/dist/INSTALL
==
--- vendor/mandoc/dist/INSTALL  Fri Mar 29 13:03:05 2019(r345684)
+++ vendor/mandoc/dist/INSTALL  Fri Mar 29 13:13:30 2019(r345685)
@@ -1,4 +1,4 @@
-$Id: INSTALL,v 1.22 2018/07/31 15:34:00 schwarze Exp $
+$Id: INSTALL,v 1.23 2019/03/06 15:58:10 schwarze Exp $
 
 About the portable mandoc distribution
 --
@@ -18,7 +18,7 @@ tech@ mailing list, too.
 
 Enjoy using the mandoc toolset!
 
-Ingo Schwarze, Karlsruhe, August 2018
+Ingo Schwarze, Karlsruhe, March 2019
 
 
 Installation
@@ -67,7 +67,8 @@ variables into "configure.local" and go back to step 4
 7. Optionally run the regression suite.
 Basically, that amounts to "cd regress && ./regress.pl".
 But you should probably look at "./mandoc -l regress/regress.pl.1"
-first.
+first.  In particular, regarding Solaris systems, look at the BUGS
+section of that manual page.
 
 8. Run "sudo make install".  If you intend to build a binary
 package using some kind of fake root mechanism, you may need a

Modified: vendor/mandoc/dist/LICENSE
==
--- vendor/mandoc/dist/LICENSE  Fri Mar 29 13:03:05 2019(r345684)
+++ vendor/mandoc/dist/LICENSE  Fri Mar 29 13:13:30 2019

svn commit: r345684 - stable/12/libexec/rc/rc.d

2019-03-29 Thread Kurt Lidl
Author: lidl
Date: Fri Mar 29 13:03:05 2019
New Revision: 345684
URL: https://svnweb.freebsd.org/changeset/base/345684

Log:
  MFC r345005:
  Remove an unneeded 'tail -n 1' from a pipeline in growfs rc script

Modified:
  stable/12/libexec/rc/rc.d/growfs
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rc/rc.d/growfs
==
--- stable/12/libexec/rc/rc.d/growfsFri Mar 29 11:59:54 2019
(r345683)
+++ stable/12/libexec/rc/rc.d/growfsFri Mar 29 13:03:05 2019
(r345684)
@@ -57,7 +57,7 @@ growfs_start ()
;;
zfs)
pool=${FSDEV%%/*}
-   rootdev=$(zpool list -v $pool | tail -n 1 | awk '{ print $1 }')
+   rootdev=$(zpool list -v $pool | awk 'END { print $1 }')
;;
*)
echo "Don't know how to grow root filesystem type: $FSTYPE"
___
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: r345683 - stable/11/sys/net

2019-03-29 Thread Kristof Provost
Author: kp
Date: Fri Mar 29 11:59:54 2019
New Revision: 345683
URL: https://svnweb.freebsd.org/changeset/base/345683

Log:
  MFC r345178:
  
  bridge: Fix panic if the STP root is removed
  
  If the spanning tree root interface is removed from the bridge we panic
  on the next 'ifconfig'.
  While the STP code is notified whenever a bridge member interface is
  removed from the bridge it does not clear the bs_root_port. This means
  bs_root_port can still point at an bridge_iflist which has been free()d.
  The next access to it will panic.
  
  Explicitly check if the interface we're removing in bstp_destroy() is
  the root, and if so re-assign the roles, which clears bs_root_port.
  
  Reviewed by:  philip

Modified:
  stable/11/sys/net/bridgestp.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net/bridgestp.c
==
--- stable/11/sys/net/bridgestp.c   Fri Mar 29 11:59:53 2019
(r345682)
+++ stable/11/sys/net/bridgestp.c   Fri Mar 29 11:59:54 2019
(r345683)
@@ -2271,4 +2271,7 @@ bstp_destroy(struct bstp_port *bp)
taskqueue_drain(taskqueue_swi, >bp_statetask);
taskqueue_drain(taskqueue_swi, >bp_rtagetask);
taskqueue_drain(taskqueue_swi, >bp_mediatask);
+
+   if (bp->bp_bs->bs_root_port == bp)
+   bstp_assign_roles(bp->bp_bs);
 }
___
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: r345682 - stable/12/sys/net

2019-03-29 Thread Kristof Provost
Author: kp
Date: Fri Mar 29 11:59:53 2019
New Revision: 345682
URL: https://svnweb.freebsd.org/changeset/base/345682

Log:
  MFC r345178:
  
  bridge: Fix panic if the STP root is removed
  
  If the spanning tree root interface is removed from the bridge we panic
  on the next 'ifconfig'.
  While the STP code is notified whenever a bridge member interface is
  removed from the bridge it does not clear the bs_root_port. This means
  bs_root_port can still point at an bridge_iflist which has been free()d.
  The next access to it will panic.
  
  Explicitly check if the interface we're removing in bstp_destroy() is
  the root, and if so re-assign the roles, which clears bs_root_port.
  
  Reviewed by:  philip

Modified:
  stable/12/sys/net/bridgestp.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/net/bridgestp.c
==
--- stable/12/sys/net/bridgestp.c   Fri Mar 29 08:43:21 2019
(r345681)
+++ stable/12/sys/net/bridgestp.c   Fri Mar 29 11:59:53 2019
(r345682)
@@ -2273,4 +2273,7 @@ bstp_destroy(struct bstp_port *bp)
taskqueue_drain(taskqueue_swi, >bp_statetask);
taskqueue_drain(taskqueue_swi, >bp_rtagetask);
taskqueue_drain(taskqueue_swi, >bp_mediatask);
+
+   if (bp->bp_bs->bs_root_port == bp)
+   bstp_assign_roles(bp->bp_bs);
 }
___
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: r345680 - head/sys/conf

2019-03-29 Thread Bruce Evans

On Fri, 29 Mar 2019, Alexey Dokuchaev wrote:


On Fri, Mar 29, 2019 at 05:40:05PM +1100, Bruce Evans wrote:

...
-optionsBOOT_TAG=\"---<>---\"
+optionsBOOT_TAG=\"\"


Useful variations are not always easy to invent.  I usually just add 1 for
numeric values.  This example is useful.  It kills the boot tag.  It gives
an empty tag, and the kernel does extra work to avoid printing a newline
after an empty tag.


That's a nice idea, thanks Bruce.  I always had to revert commits that had
added this stupid boot tag; if empty tag does not imply a newline, then it
makes things much easier.

./danfe

P.S.  Boot tag of a healthy human is "Copyright (c) 1992-2018 The FreeBSD
Project".


Actually, there are ordering problems.  After fixing lost messages, I get
for the simplest case of a non-verbose cold boot:

XX Mar 29 19:14:08 gamplex syslogd: kernel boot file is /kernel

This boot file message is the first one.  I often grep for it, so as to
ignore messages for previous boots.

XX Mar 29 19:14:08 gamplex kernel: ---<>---

This is almost first.

XX Mar 29 19:14:08 gamplex kernel: Test of early printf to msgbuf
XX Mar 29 19:14:08 gamplex kernel: Test of early printf to console

Tests for my fixes.  msgbufinit() is called early and uses a statically
allocated buffer until the dynamic message buffer is mapped.  Early messages
are thus not lost for the message buffer.  They may be lost for the
console.

XX Mar 29 19:14:08 gamplex kernel: GDB: debug ports: sio
XX Mar 29 19:14:08 gamplex kernel: GDB: current port: sio
XX Mar 29 19:14:08 gamplex kernel: KDB: debugger backends: ddb gdb
XX Mar 29 19:14:08 gamplex kernel: KDB: current backend: ddb

Standard early messages if DDB is configured.

XX Mar 29 19:14:08 gamplex kernel: WARNING: loader(8) metadata is missing!

I don't use loader on i386, and am reminded that I don't like it by this
warning.

XX Mar 29 19:14:08 gamplex kernel: Copyright (c) 1992-2019 The FreeBSD Project.

Finally the copyright message.  The source code still obfuscates the order
of this using SYSINIT(), and on x86 and powerpc still has a bogus "Good
{morning,afternoon,evening, night}" comment that isn't even attached to its
code (the printf() of the message).  The comment is in cpu_startup()
which runs at SI_SUB_CPU, SI_ORDER_FIRST.  This is much later than printing
the copyright, which runs at SI_SUB_COPYRIGHT.  In between, there are SUBs
for VM, KMEM, HYPERISOR, WITNESS, MTX_POOL_DYNAMIC, LOCK, EVENTHANDLER,
VNET_PRELINK and KLD.  Before COPYRIGHT, there are only DUMMY, DONE and
TUNABLES under sysinit, but lots more in early initialization including
early console use for the above messages and ddb.  The comment on
SI_SUB_COPYRIGHT wrongly says that it is for the first use of the console.

Booting with -v gives many more early messages that are usually lost.  E.g.,
ones about SMAP on x86.

Warm boots sometimes give a dynamic message buffer that is actually useful.
To be useful, it must be retained at boot.  Otherwise, it is easier to
put the message buffer in the bss.

The dynamic message buffer only works for me on amd64 and i386 with pae_mode=1
(and probably also more than 4GB RAM).  Otherwise, it is below 4GB and the
BIOS scribbles on it (fairly sparsely, but it doesn't have enough error
correcting to recover).  Recovering it fixes loss of the last few messages
for the previous boot, but risks doubling of non-lost messages.  The BOOT
tags are useful for seeing where the new messages start.

Everything usually works as well as possible:

XX Mar 25 02:59:49 iotaplex syslogd: exiting on signal 15

The use of an amd64 kernel a few days ago was terminated by turning the
system off.  Messages printed after killing syslogd were lost.

XX Mar 29 21:33:49 iotaplex syslogd: kernel boot file is /boot/kernel/kernel
XX Mar 29 21:33:49 iotaplex kernel: ---<>---
XX Mar 29 21:33:49 iotaplex kernel: Test of early printf to msgbuf
XX Mar 29 21:33:49 iotaplex kernel: GDB: debug ports: sio
XX Mar 29 21:33:49 iotaplex kernel: GDB: current port: sio
XX Mar 29 21:33:49 iotaplex kernel: KDB: debugger backends: ddb gdb
XX Mar 29 21:33:49 iotaplex kernel: KDB: current backend: ddb
XX Mar 29 21:33:49 iotaplex kernel: Copyright (c) 1992-2019 The FreeBSD Project.

Cold boot of the same kernel today (actually, i386 was running before this,
but the boot was cold enough for the message buffer).

XX ...
XX Mar 29 21:34:32 iotaplex syslogd: exiting on signal 15

As usual, messages printed after killing syslogd are not logged properly...

XX Mar 29 21:35:55 iotaplex syslogd: kernel boot file is /boot/kernel/kernel

Warm boot of the same amd64 kernel.

XX Mar 29 21:35:55 iotaplex kernel: Waiting (max 60 seconds) for system process 
`vnlru' to stop... done
XX Mar 29 21:35:55 iotaplex kernel: Waiting (max 60 seconds) for system process `syncer' to stop... 
XX Mar 29 21:35:55 iotaplex kernel: Syncing disks, vnodes remaining... 0 0 0 done

XX Mar 29 21:35:55 iotaplex kernel: Waiting (max 60 seconds) for system thread 

Re: svn commit: r345680 - head/sys/conf

2019-03-29 Thread Alexey Dokuchaev
On Fri, Mar 29, 2019 at 05:40:05PM +1100, Bruce Evans wrote:
> >> ...
> >> -options   BOOT_TAG=\"---<>---\"
> >> +options   BOOT_TAG=\"\"
> 
> Useful variations are not always easy to invent.  I usually just add 1 for
> numeric values.  This example is useful.  It kills the boot tag.  It gives
> an empty tag, and the kernel does extra work to avoid printing a newline
> after an empty tag.

That's a nice idea, thanks Bruce.  I always had to revert commits that had
added this stupid boot tag; if empty tag does not imply a newline, then it
makes things much easier.

./danfe

P.S.  Boot tag of a healthy human is "Copyright (c) 1992-2018 The FreeBSD
Project".
___
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: r345681 - head/tests/sys/capsicum

2019-03-29 Thread Olivier Cochard
Author: olivier (ports committer)
Date: Fri Mar 29 08:43:21 2019
New Revision: 345681
URL: https://svnweb.freebsd.org/changeset/base/345681

Log:
  Skip test if feature security_capabilities is not available
  
  PR:   236863
  Approved by:  asomers
  MFC after:1 month
  Sponsored by: Netflix

Modified:
  head/tests/sys/capsicum/Makefile
  head/tests/sys/capsicum/ioctls_test.c

Modified: head/tests/sys/capsicum/Makefile
==
--- head/tests/sys/capsicum/MakefileFri Mar 29 04:00:46 2019
(r345680)
+++ head/tests/sys/capsicum/MakefileFri Mar 29 08:43:21 2019
(r345681)
@@ -5,7 +5,7 @@ TESTSDIR=   ${TESTSBASE}/sys/capsicum
 ATF_TESTS_C+=  bindat_connectat
 ATF_TESTS_C+=  ioctls_test
 
-CFLAGS.bindat_connectat.c+=-I${SRCTOP}/tests
+CFLAGS+=   -I${SRCTOP}/tests
 
 WARNS?=6
 

Modified: head/tests/sys/capsicum/ioctls_test.c
==
--- head/tests/sys/capsicum/ioctls_test.c   Fri Mar 29 04:00:46 2019
(r345680)
+++ head/tests/sys/capsicum/ioctls_test.c   Fri Mar 29 08:43:21 2019
(r345681)
@@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include "freebsd_test_suite/macros.h"
+
 /*
  * A variant of ATF_REQUIRE that is suitable for use in child
  * processes.  This only works if the parent process is tripped up by
@@ -72,6 +74,8 @@ ATF_TC_BODY(cap_ioctls__listen_copy, tc)
pid_t pid;
char dummy;
int s[2], status;
+
+   ATF_REQUIRE_FEATURE("security_capabilities");
 
s[0] = socket(AF_INET, SOCK_STREAM, 0);
ATF_REQUIRE(s[0] > 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"


Re: svn commit: r345680 - head/sys/conf

2019-03-29 Thread Bruce Evans

On Thu, 28 Mar 2019, Ravi Pokala wrote:


-Original Message-
From:  on behalf of Kyle Evans 

Date: 2019-03-28, Thursday at 21:00
To: , , 

Subject: svn commit: r345680 - head/sys/conf


Author: kevans
Date: Fri Mar 29 04:00:46 2019
New Revision: 345680
URL: https://svnweb.freebsd.org/changeset/base/345680

Log:
  NOTES: Use non-default value for BOOT_TAG


Why?

(I was on IRC when jhb debugged this, but I didn't quite get it; and of course 
lots of us *weren't* on IRC at the time.)


Because NOTES is primarily for generating LINT, and LINT's reason for
existence is to test as many cases as possible.  Testing the default cases
again is not very useful, so by convention NOTES never configures defaults,
except of course where it is broken.  This commit is to fix 1 broken place.

Not repeating the default is also good for NOTES' secondary purpose of
documentation.  Defaults are easy to find by grepping the source code for
them if there is no documentation.  Changing defaults to valid and useful
values requires understanding more of the source if there is no documentation.


Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Fri Mar 29 03:25:20 2019(r345679)
+++ head/sys/conf/NOTES Fri Mar 29 04:00:46 2019(r345680)
@@ -150,7 +150,7 @@ options BOOTHOWTO=RB_MULTIPLE
 #
 # Default boot tag; may use 'kern.boot_tag' loader tunable to override.  The
 # current boot's tag is also exposed via the 'kern.boot_tag' sysctl.
-optionsBOOT_TAG=\"---<>---\"
+optionsBOOT_TAG=\"\"


Useful variations are not always easy to invent.  I usually just add 1 for
numeric values.  This example is useful.  It kills the boot tag.  It gives
an empty tag, and the kernel does extra work to avoid printing a newline
after an empty tag.


 # Maximum boot tag size the kernel's static buffer should accomodate.  Maximum
 # size for both BOOT_TAG and the assocated tunable.
 optionsBOOT_TAG_SZ=32


This bug remains unfixed.  32 is the default.  This option shouldn't exist.
Instead, just use size strlen(BOOT_TAG) + 1 for the static string and keep
the dynamic string in the environment.  The string is only used once, and
msgbufinit() already has to check both the static string and the environment
to find the right string (it does this by fetching the dynamic string to
overwrite the static string, but it is easier to not use a tunable or
support a sysctl and just keep the dynamic string in the environment).

Bruce
___
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"