svn commit: r361721 - head/contrib/ipfilter/man

2020-06-01 Thread Cy Schubert
Author: cy
Date: Tue Jun  2 03:44:22 2020
New Revision: 361721
URL: https://svnweb.freebsd.org/changeset/base/361721

Log:
  Per-rule hit counts (-h) can be used with either -i (input) or -o (output)
  filter rule lists.
  
  MFC after:3 days

Modified:
  head/contrib/ipfilter/man/ipfstat.8

Modified: head/contrib/ipfilter/man/ipfstat.8
==
--- head/contrib/ipfilter/man/ipfstat.8 Tue Jun  2 02:38:54 2020
(r361720)
+++ head/contrib/ipfilter/man/ipfstat.8 Tue Jun  2 03:44:22 2020
(r361721)
@@ -69,8 +69,7 @@ the kernel) if any is present.
 Show groups currently configured (both active and inactive).
 .TP
 .B \-h
-Show per-rule the number of times each one scores a "hit".  For use in
-combination with \fB\-i\fP.
+Show per-rule the number of times each one scores a "hit".
 .TP
 .B \-i
 Display the filter list used for the input side of the kernel IP processing.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/lib

2020-06-01 Thread Ravi Pokala
> > I generally feel the opposite -- I do a destressing amount of work on an 
> > 80x24 serial console :-/ -- but I agree that "> 3 lines" is a reasonable 
> > compromise.
> 
> I think we have had a communications breakdown?  To me it sounds as we both 
> agree that needlessly making Makefiles vertically long is not wanted, but 
> acceptable when folding these very long lists onto wide lines creates a 
> different problem.

That's exactly what I said: 'but I agree that "> 3 lines" is a reasonable 
compromise.'

:-)

-Ravi (rpokala@)

-Original Message-
From: "Rodney W. Grimes" 
Reply-To: 
Date: 2020-06-01, Monday at 19:47
To: Ravi Pokala 
Cc: , Ian Lepore , Dimitry Andric 
, , , 

Subject: Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr 
lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff 
lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/libs...

> -Original Message-
> From:  on behalf of "Rodney W. Grimes" 

> Reply-To: 
> Date: 2020-06-01, Monday at 09:40
> To: Ian Lepore 
> Cc: Dimitry Andric , , 
, 
> Subject: Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr 
lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff 
lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/libs...
> 
> > On Sun, 2020-05-31 at 22:04 +, Dimitry Andric wrote:
> > > Author: dim
> > > Date: Sun May 31 22:04:51 2020
> > > New Revision: 361677
> > > URL: https://svnweb.freebsd.org/changeset/base/361677
> > > 
> > > Log:
> > >   Change Makefiles under usr.bin/svn to make them easier to
> > > incrementally
> > >   update. No functional change intended.
> > >   
> > >   MFC after:  2 weeks
> > > 
> > 
> > I wish we could get style.Makefile(9) updated to mandate this 1-per-
> > line style when listing sources, dirs, etc, when the number of 
items is
> > greater than N, where N is something like 3-6 filenames.  Otherwise 
the
> > requirement to sort the names alphabetically pretty much mandates 
that
> > many lines of the file will change just to insert one or two new 
files,
> > and that makes it all but impossible to figure out from a diff what
> > actually changed.
> 
> I like this idea, though rather than 3-6 filenames I propose
> it to be anything longer than 3 lines, which is kinda about when
> the pain point should start.  See the immediate SUBDIR below, it
> is 11 items on 2ish/3 lines, and any change would worst case be a
> 3 line diff.  This probably covers a large portion of the tree.
> 
> FWIW, I'm partial to the 'FOO+=bar' syntax, rather than continuation 
lines. It's too easy to forget to add the continuation when appending or 
inserting.

That is indeed a better technique.

> 
> I particularly do not like massive amounts of vertical white
> space which this would create, but lacking an automated tool
> this is probably a reasonable compromise.
> 
> If we did it everywhere it would mean lots of scrolling when
> working on rather simple makefiles.
> 
> I generally feel the opposite -- I do a destressing amount of work on an 
80x24 serial console :-/ -- but I agree that "> 3 lines" is a reasonable 
compromise.

I think we have had a communications breakdown?  To me it sounds as we
both agree that needlessly making Makefiles vertically long is
not wanted, but acceptable when folding these very long lists
onto wide lines creates a different problem.

> -Ravi (rpokala@)
> 
> > -- Ian
> > 
> > > 
> > [...] 
> > > -SUBDIR=  lib .WAIT \
> > > - svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
> > > - svnsync svnversion svnmucc svnrdump
> > > +SUBDIR=  lib \
> > > + .WAIT \
> > > + svn \
> > > + svnadmin \
> > > + svnbench \
> > > + svndumpfilter \
> > > + svnfsfs \
> > > + svnlook \
> > > + svnserve \
> > > + svnsync \
> > > + svnversion \
> > > + svnmucc \
> > > + svnrdump
> > >  SUBDIR_PARALLEL=
> > >  
> > 
> > 
> 
> -- 
> Rod Grimes 
rgri...@freebsd.org
> 
> 
> 

-- 
Rod Grimes 
rgri...@freebsd.org


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


Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/lib

2020-06-01 Thread Rodney W. Grimes
> -Original Message-
> From:  on behalf of "Rodney W. Grimes" 
> 
> Reply-To: 
> Date: 2020-06-01, Monday at 09:40
> To: Ian Lepore 
> Cc: Dimitry Andric , , 
> , 
> Subject: Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr 
> lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta 
> lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/libs...
> 
> > On Sun, 2020-05-31 at 22:04 +, Dimitry Andric wrote:
> > > Author: dim
> > > Date: Sun May 31 22:04:51 2020
> > > New Revision: 361677
> > > URL: https://svnweb.freebsd.org/changeset/base/361677
> > > 
> > > Log:
> > >   Change Makefiles under usr.bin/svn to make them easier to
> > > incrementally
> > >   update. No functional change intended.
> > >   
> > >   MFC after:  2 weeks
> > > 
> > 
> > I wish we could get style.Makefile(9) updated to mandate this 1-per-
> > line style when listing sources, dirs, etc, when the number of items is
> > greater than N, where N is something like 3-6 filenames.  Otherwise the
> > requirement to sort the names alphabetically pretty much mandates that
> > many lines of the file will change just to insert one or two new files,
> > and that makes it all but impossible to figure out from a diff what
> > actually changed.
> 
> I like this idea, though rather than 3-6 filenames I propose
> it to be anything longer than 3 lines, which is kinda about when
> the pain point should start.  See the immediate SUBDIR below, it
> is 11 items on 2ish/3 lines, and any change would worst case be a
> 3 line diff.  This probably covers a large portion of the tree.
> 
> FWIW, I'm partial to the 'FOO+=bar' syntax, rather than continuation lines. 
> It's too easy to forget to add the continuation when appending or inserting.

That is indeed a better technique.

> 
> I particularly do not like massive amounts of vertical white
> space which this would create, but lacking an automated tool
> this is probably a reasonable compromise.
> 
> If we did it everywhere it would mean lots of scrolling when
> working on rather simple makefiles.
> 
> I generally feel the opposite -- I do a destressing amount of work on an 
> 80x24 serial console :-/ -- but I agree that "> 3 lines" is a reasonable 
> compromise.

I think we have had a communications breakdown?  To me it sounds as we
both agree that needlessly making Makefiles vertically long is
not wanted, but acceptable when folding these very long lists
onto wide lines creates a different problem.

> -Ravi (rpokala@)
> 
> > -- Ian
> > 
> > > 
> > [...] 
> > > -SUBDIR=  lib .WAIT \
> > > - svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
> > > - svnsync svnversion svnmucc svnrdump
> > > +SUBDIR=  lib \
> > > + .WAIT \
> > > + svn \
> > > + svnadmin \
> > > + svnbench \
> > > + svndumpfilter \
> > > + svnfsfs \
> > > + svnlook \
> > > + svnserve \
> > > + svnsync \
> > > + svnversion \
> > > + svnmucc \
> > > + svnrdump
> > >  SUBDIR_PARALLEL=
> > >  
> > 
> > 
> 
> -- 
> Rod Grimes 
> rgri...@freebsd.org
> 
> 
> 

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


svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper

2020-06-01 Thread Kyle Evans
Author: kevans
Date: Tue Jun  2 02:38:54 2020
New Revision: 361720
URL: https://svnweb.freebsd.org/changeset/base/361720

Log:
  pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL
  
  When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that
  conflict, and hilarity ensues. There's currently three different places that
  we might install mailer.conf:
  
  - ^/etc/Makefile (package=runtime, contingent on MK_MAIL != no)
  - ^/libexec/dma/dmagent/Makefile (package=dma, contingent on MK_SENDMAIL !=
  no)
  - ^/usr.sbin/mailwrapper/Makefile (package=utilities, contingent on
  not-installed)
  
  The mailwrapper installation will effectively never happen because the ^/etc
  one will first.
  
  This patch simplifies the whole situation; remove the ^/etc/Makefile version
  and install it primarily in mailwrapper if MK_MAILWRAPPER != "no". The
  scenarios covered in mailwrapper are:
  
  - sendmail(8) is installed, dma(8) may or may not be installed
  - neither sendmail(8) nor dma(8) is installed
  
  In the first scenario, sendmail(8) is dominant so we can go ahead and
  install the version in ^/etc/mail. In the unlisted scenario, sendmail(8) is
  not installed but dma(8) is, we'll let ^/libexec/dma/dmagent do the
  installation. In the second listed scenario, we still want to install an
  example mailer.conf so just install the base sendmail(8) version.
  
  Reviewed by:  bapt
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D24924

Modified:
  head/etc/Makefile
  head/etc/mail/mailer.conf
  head/usr.sbin/mailwrapper/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Tue Jun  2 01:21:48 2020(r361719)
+++ head/etc/Makefile   Tue Jun  2 02:38:54 2020(r361720)
@@ -17,11 +17,10 @@ SUBDIR+=sendmail
 
 # NB: keep these sorted by MK_* knobs
 
-.if ${MK_SENDMAIL} == "no"
-ETCMAIL=mailer.conf aliases
-.else
-ETCMAIL=Makefile README mailer.conf access.sample virtusertable.sample \
-   mailertable.sample aliases
+ETCMAIL=aliases
+.if ${MK_SENDMAIL} != "no"
+ETCMAIL+=Makefile README access.sample virtusertable.sample \
+   mailertable.sample
 .endif
 
 # Special top level files for FreeBSD

Modified: head/etc/mail/mailer.conf
==
--- head/etc/mail/mailer.conf   Tue Jun  2 01:21:48 2020(r361719)
+++ head/etc/mail/mailer.conf   Tue Jun  2 02:38:54 2020(r361720)
@@ -2,6 +2,9 @@
 #
 # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
 #
+# If dma(8) is installed, an example mailer.conf that uses dma(8) instead can
+# can be found in /usr/share/examples/dma.
+#
 sendmail   /usr/libexec/sendmail/sendmail
 mailq  /usr/libexec/sendmail/sendmail
 newaliases /usr/libexec/sendmail/sendmail

Modified: head/usr.sbin/mailwrapper/Makefile
==
--- head/usr.sbin/mailwrapper/Makefile  Tue Jun  2 01:21:48 2020
(r361719)
+++ head/usr.sbin/mailwrapper/Makefile  Tue Jun  2 02:38:54 2020
(r361720)
@@ -26,7 +26,11 @@ SYMLINKS+=   ..${BINDIR}/mailwrapper /bin/rmail
 .endif
 
 .if ${MK_MAILWRAPPER} != "no"
-.if !exists(${DESTDIR}/etc/mail/mailer.conf)
+# We install here if either sendmail(8) is enabled, or dma(8) isn't.  In the
+# latter scenario, we take care of the possibility that neither sendmail(8) nor
+# dma(8) are installed and simply provide a default that can be changed for an
+# alternative in ports.
+.if ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} == "no"
 FILES= ${SRCTOP}/etc/mail/mailer.conf
 FILESDIR=  /etc/mail
 FILESMODE= 644
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361719 - in head/sys: dev/vt kern

2020-06-01 Thread Jason A. Harmening
Author: jah
Date: Tue Jun  2 01:21:48 2020
New Revision: 361719
URL: https://svnweb.freebsd.org/changeset/base/361719

Log:
  vt(4): reset scrollback and cursor position after clearing history buffer
  
  r361601 implemented basic support for cleaing the console history buffer.
  But after clearing the history buffer, it's not especially useful to be
  able to scroll back through that buffer, or for the cursor position to
  remain at (very likely) the bottom of the screen.
  
  PR:   224436
  Reviewed by:  emaste
  Differential Revision:https://reviews.freebsd.org/D25079

Modified:
  head/sys/dev/vt/vt_buf.c
  head/sys/dev/vt/vt_core.c
  head/sys/kern/subr_terminal.c

Modified: head/sys/dev/vt/vt_buf.c
==
--- head/sys/dev/vt/vt_buf.cTue Jun  2 01:04:49 2020(r361718)
+++ head/sys/dev/vt/vt_buf.cTue Jun  2 01:21:48 2020(r361719)
@@ -433,17 +433,22 @@ vtbuf_do_clearhistory(struct vt_buf *vb)
vtbuf_do_fill(vb, &rect, VTBUF_SPACE_CHAR(ch));
 }
 
-void
-vtbuf_init_early(struct vt_buf *vb)
+static void
+vtbuf_reset_scrollback(struct vt_buf *vb)
 {
-   vb->vb_flags |= VBF_CURSOR;
vb->vb_roffset = 0;
vb->vb_curroffset = 0;
vb->vb_mark_start.tp_row = 0;
vb->vb_mark_start.tp_col = 0;
vb->vb_mark_end.tp_row = 0;
vb->vb_mark_end.tp_col = 0;
+}
 
+void
+vtbuf_init_early(struct vt_buf *vb)
+{
+   vb->vb_flags |= VBF_CURSOR;
+   vtbuf_reset_scrollback(vb);
vtbuf_init_rows(vb);
vtbuf_do_clearhistory(vb);
vtbuf_make_undirty(vb);
@@ -477,6 +482,8 @@ vtbuf_clearhistory(struct vt_buf *vb)
 {
VTBUF_LOCK(vb);
vtbuf_do_clearhistory(vb);
+   vtbuf_reset_scrollback(vb);
+   vb->vb_flags &= ~VBF_HISTORY_FULL;
VTBUF_UNLOCK(vb);
 }
 

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Tue Jun  2 01:04:49 2020(r361718)
+++ head/sys/dev/vt/vt_core.c   Tue Jun  2 01:21:48 2020(r361719)
@@ -2332,6 +2332,16 @@ skip_thunk:
return (0);
case CONS_CLRHIST:
vtbuf_clearhistory(&vd->vd_curwindow->vw_buf);
+   /*
+* Invalidate the entire visible window; it is not guaranteed
+* that this operation will be immediately followed by a scroll
+* event, so it would otherwise be possible for prior artifacts
+* to remain visible.
+*/
+   VT_LOCK(vd);
+   vd->vd_flags |= VDF_INVALID;
+   VT_UNLOCK(vd);
+   vt_resume_flush_timer(vd->vd_curwindow, 0);
return (0);
case CONS_GET:
/* XXX */

Modified: head/sys/kern/subr_terminal.c
==
--- head/sys/kern/subr_terminal.c   Tue Jun  2 01:04:49 2020
(r361718)
+++ head/sys/kern/subr_terminal.c   Tue Jun  2 01:21:48 2020
(r361719)
@@ -480,6 +480,16 @@ termtty_ioctl(struct tty *tp, u_long cmd, caddr_t data
tty_unlock(tp);
error = tm->tm_class->tc_ioctl(tm, cmd, data, td);
tty_lock(tp);
+   if ((error == 0) && (cmd == CONS_CLRHIST)) {
+   /*
+* Scrollback history has been successfully cleared,
+* so reset the cursor position to the top left of the screen.
+*/
+   teken_pos_t p;
+   p.tp_row = 0;
+   p.tp_col = 0;
+   teken_set_cursor(&tm->tm_emulator, &p);
+   }
return (error);
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/lib

2020-06-01 Thread Ravi Pokala
-Original Message-
From:  on behalf of "Rodney W. Grimes" 

Reply-To: 
Date: 2020-06-01, Monday at 09:40
To: Ian Lepore 
Cc: Dimitry Andric , , 
, 
Subject: Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr 
lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff 
lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/libs...

> On Sun, 2020-05-31 at 22:04 +, Dimitry Andric wrote:
> > Author: dim
> > Date: Sun May 31 22:04:51 2020
> > New Revision: 361677
> > URL: https://svnweb.freebsd.org/changeset/base/361677
> > 
> > Log:
> >   Change Makefiles under usr.bin/svn to make them easier to
> > incrementally
> >   update. No functional change intended.
> >   
> >   MFC after:2 weeks
> > 
> 
> I wish we could get style.Makefile(9) updated to mandate this 1-per-
> line style when listing sources, dirs, etc, when the number of items is
> greater than N, where N is something like 3-6 filenames.  Otherwise the
> requirement to sort the names alphabetically pretty much mandates that
> many lines of the file will change just to insert one or two new files,
> and that makes it all but impossible to figure out from a diff what
> actually changed.

I like this idea, though rather than 3-6 filenames I propose
it to be anything longer than 3 lines, which is kinda about when
the pain point should start.  See the immediate SUBDIR below, it
is 11 items on 2ish/3 lines, and any change would worst case be a
3 line diff.  This probably covers a large portion of the tree.

FWIW, I'm partial to the 'FOO+=bar' syntax, rather than continuation lines. 
It's too easy to forget to add the continuation when appending or inserting.

I particularly do not like massive amounts of vertical white
space which this would create, but lacking an automated tool
this is probably a reasonable compromise.

If we did it everywhere it would mean lots of scrolling when
working on rather simple makefiles.

I generally feel the opposite -- I do a destressing amount of work on an 80x24 
serial console :-/ -- but I agree that "> 3 lines" is a reasonable compromise.

-Ravi (rpokala@)

> -- Ian
> 
> > 
> [...] 
> > -SUBDIR=lib .WAIT \
> > -   svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
> > -   svnsync svnversion svnmucc svnrdump
> > +SUBDIR=lib \
> > +   .WAIT \
> > +   svn \
> > +   svnadmin \
> > +   svnbench \
> > +   svndumpfilter \
> > +   svnfsfs \
> > +   svnlook \
> > +   svnserve \
> > +   svnsync \
> > +   svnversion \
> > +   svnmucc \
> > +   svnrdump
> >  SUBDIR_PARALLEL=
> >  
> 
> 

-- 
Rod Grimes 
rgri...@freebsd.org


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


svn commit: r361718 - in head: share/man/man4 sys/dev/atkbdc

2020-06-01 Thread Vladimir Kondratyev
Author: wulf
Date: Tue Jun  2 01:04:49 2020
New Revision: 361718
URL: https://svnweb.freebsd.org/changeset/base/361718

Log:
  [psm] Workaround active PS/2 multiplexor hang
  
  which happens on some laptops after returning to legacy multiplexing mode
  at initialization stage.
  
  PR:   242542
  Reported by:  Felix Palmen 
  MFC after:1 week

Modified:
  head/share/man/man4/psm.4
  head/sys/dev/atkbdc/psm.c

Modified: head/share/man/man4/psm.4
==
--- head/share/man/man4/psm.4   Tue Jun  2 00:57:48 2020(r361717)
+++ head/share/man/man4/psm.4   Tue Jun  2 01:04:49 2020(r361718)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 26, 2016
+.Dd June 2, 2020
 .Dt PSM 4
 .Os
 .Sh NAME
@@ -361,6 +361,15 @@ the sysctl with the same name and by restarting
 .Xr moused 8
 using
 .Pa /etc/rc.d/moused .
+.Pp
+Active multiplexing support can be disabled by setting
+.Va hw.psm.mux_disabled
+to
+.Em 1
+at boot-time.
+This will prevent
+.Nm
+from enabling active multiplexing mode needed for some Synaptics touchpads.
 .Sh IOCTLS
 There are a few
 .Xr ioctl 2

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Tue Jun  2 00:57:48 2020(r361717)
+++ head/sys/dev/atkbdc/psm.c   Tue Jun  2 01:04:49 2020(r361718)
@@ -517,6 +517,7 @@ static int verbose = PSM_DEBUG;
 static int synaptics_support = 1;
 static int trackpoint_support = 1;
 static int elantech_support = 1;
+static int mux_disabled = 0;
 
 /* for backward compatibility */
 #defineOLD_MOUSE_GETHWINFO _IOR('M', 1, old_mousehw_t)
@@ -2989,6 +2990,9 @@ SYSCTL_INT(_hw_psm, OID_AUTO, trackpoint_support, CTLF
 SYSCTL_INT(_hw_psm, OID_AUTO, elantech_support, CTLFLAG_RDTUN,
 &elantech_support, 0, "Enable support for Elantech touchpads");
 
+SYSCTL_INT(_hw_psm, OID_AUTO, mux_disabled, CTLFLAG_RDTUN,
+&mux_disabled, 0, "Disable active multiplexing");
+
 static void
 psmintr(void *arg)
 {
@@ -6293,6 +6297,9 @@ enable_synaptics_mux(struct psm_softc *sc, enum probea
int active_ports_count = 0;
int active_ports_mask = 0;
 
+   if (mux_disabled != 0)
+   return (FALSE);
+
version = enable_aux_mux(kbdc);
if (version == -1)
return (FALSE);
@@ -6329,6 +6336,21 @@ enable_synaptics_mux(struct psm_softc *sc, enum probea
 
/* IRQ handler does not support active multiplexing mode */
disable_aux_mux(kbdc);
+
+   /* Is MUX still alive after switching back to legacy mode? */
+   if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) {
+   /*
+* On some laptops e.g. Lenovo X121e dead AUX MUX can be
+* brought back to life with resetting of keyboard.
+*/
+   reset_kbd(kbdc);
+   if (!enable_aux_dev(kbdc) || !disable_aux_dev(kbdc)) {
+   printf("psm%d: AUX MUX hang detected!\n", sc->unit);
+   printf("Consider adding hw.psm.mux_disabled=1 to "
+   "loader tunables\n");
+   }
+   }
+   empty_both_buffers(kbdc, 10);   /* remove stray data if any */
 
return (probe);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361715 - head/sys/dev/atkbdc

2020-06-01 Thread Vladimir Kondratyev
Author: wulf
Date: Tue Jun  2 00:53:39 2020
New Revision: 361715
URL: https://svnweb.freebsd.org/changeset/base/361715

Log:
  [psm] Do not disable trackpoint when hw.psm.elantech.touchpad_off is enabled
  
  PR:   246117
  Reported by:  Alexander Sieg 
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Tue Jun  2 00:49:13 2020(r361714)
+++ head/sys/dev/atkbdc/psm.c   Tue Jun  2 00:53:39 2020(r361715)
@@ -4441,7 +4441,7 @@ proc_elantech(struct psm_softc *sc, packetbuf_t *pb, m
*x = *y = *z = 0;
ms->button = ms->obutton;
 
-   if (sc->syninfo.touchpad_off)
+   if (sc->syninfo.touchpad_off && pkt != ELANTECH_PKT_TRACKPOINT)
return (0);
 
/* Common legend
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361713 - head/share/mk

2020-06-01 Thread Ed Maste
Author: emaste
Date: Tue Jun  2 00:46:15 2020
New Revision: 361713
URL: https://svnweb.freebsd.org/changeset/base/361713

Log:
  bsd.prog.mk: split MK_PIE test for clarity
  
  And a comment explaining why PIE flags are disabled for static binaries.

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

Modified: head/share/mk/bsd.prog.mk
==
--- head/share/mk/bsd.prog.mk   Tue Jun  2 00:32:36 2020(r361712)
+++ head/share/mk/bsd.prog.mk   Tue Jun  2 00:46:15 2020(r361713)
@@ -39,10 +39,13 @@ MK_DEBUG_FILES= no
 .if ${MK_BIND_NOW} != "no"
 LDFLAGS+= -Wl,-znow
 .endif
-.if ${MK_PIE} != "no" && (!defined(NO_SHARED) || ${NO_SHARED:tl} == "no")
+.if ${MK_PIE} != "no"
+# Static PIE is not yet supported/tested.
+.if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no"
 CFLAGS+= -fPIE
 CXXFLAGS+= -fPIE
 LDFLAGS+= -pie
+.endif
 .endif
 .if ${MK_RETPOLINE} != "no"
 .if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361712 - in head/sys/modules: . tcp

2020-06-01 Thread Kyle Evans
Author: kevans
Date: Tue Jun  2 00:32:36 2020
New Revision: 361712
URL: https://svnweb.freebsd.org/changeset/base/361712

Log:
  modules: don't build ipsec/tcpmd5 if the kernel is configured for IPSEC
  
  IPSEC_SUPPORT can currently only cope with either IPSEC || IPSEC_SUPPORT,
  not both. Refrain from building if IPSEC is set, as the resulting module
  won't be able to load anyways if it's built into the kernel.
  
  KERN_OPTS is safe here; for tied modules, it will reflect the kernel
  configuration. For untied modules, it will defer to whatever is set in
  ^/sys/conf/config.mk, which doesn't set IPSEC for modules. The latter
  situation has some risk to it for uncommon scenarios, but such is the life
  of untied kernel modules.
  
  Reported by:  jenkins (a lot), O. Hartmann (once)
  Generally discussed with: imp, jhb

Modified:
  head/sys/modules/Makefile
  head/sys/modules/tcp/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Tue Jun  2 00:03:26 2020(r361711)
+++ head/sys/modules/Makefile   Tue Jun  2 00:32:36 2020(r361712)
@@ -427,7 +427,7 @@ _if_enc=if_enc
 _if_gif=   if_gif
 _if_gre=   if_gre
 _ipfw_pmod=ipfw_pmod
-.if ${KERN_OPTS:MIPSEC_SUPPORT}
+.if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC}
 _ipsec=ipsec
 .endif
 .endif

Modified: head/sys/modules/tcp/Makefile
==
--- head/sys/modules/tcp/Makefile   Tue Jun  2 00:03:26 2020
(r361711)
+++ head/sys/modules/tcp/Makefile   Tue Jun  2 00:32:36 2020
(r361712)
@@ -16,7 +16,7 @@ _tcp_rack=rack
 
 .if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
defined(ALL_MODULES)
-.if ${KERN_OPTS:MIPSEC_SUPPORT}
+.if ${KERN_OPTS:MIPSEC_SUPPORT} && !${KERN_OPTS:MIPSEC}
 _tcpmd5=   tcpmd5
 .endif
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r359374 - in head: . share/man/man4 share/man/man7 share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe sys/dev/c

2020-06-01 Thread Kyle Evans
On Fri, Mar 27, 2020 at 1:31 PM John Baldwin  wrote:
>
> Author: jhb
> Date: Fri Mar 27 18:25:23 2020
> New Revision: 359374
> URL: https://svnweb.freebsd.org/changeset/base/359374
>
> Log:
>   Refactor driver and consumer interfaces for OCF (in-kernel crypto).
>
> [... snip ...]

Hi John,

^/sys/modules/crypto needs opt_compat.h added to SRCS after this commit. :-)

Thanks,

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


Re: svn commit: r361711 - head/sys/kern

2020-06-01 Thread Ryan Moeller

On 6/1/20 8:03 PM, Rick Macklem wrote:


Author: rmacklem
Date: Tue Jun  2 00:03:26 2020
New Revision: 361711
URL: https://svnweb.freebsd.org/changeset/base/361711

Log:
   Fix build issue introduced by r361699.

Oops, that was easily avoidable. :/ Thanks for picking up the pieces.
   
   Reported by:	cy (and others)


Modified:
   head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Mon Jun  1 23:44:03 2020(r361710)
+++ head/sys/kern/vfs_mount.c   Tue Jun  2 00:03:26 2020(r361711)
@@ -70,6 +70,9 @@ __FBSDID("$FreeBSD$");
  
  #include 
  
+#include 

+#include 
+
  #include 
  #include 
  

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


Re: svn commit: r361648 - head/share/mk

2020-06-01 Thread Ed Maste
On Sat, 30 May 2020 at 12:12, Ed Maste  wrote:
>
> Author: emaste
> Date: Sat May 30 16:12:00 2020
> New Revision: 361648
> URL: https://svnweb.freebsd.org/changeset/base/361648
>
> Log:
>   Disable BINUTILS by default on amd64

I received a private query about this but will follow up here because
the answer may be useful to others.

The concern: GNU as is still needed for skein_block_asm.s, so is this
not broken? Indeed, GNU as is still needed for exactly one case in the
base system, assembling skein_block_asm.s on amd64. It is still
enabled via BINUTILS_BOOTSTRAP there. Disabling BINUTILS (this commit)
means that GNU as is no longer installed as /usr/bin/as by
installworld, on any arch.

We still need to address skein so that we can completely remove
binutils for FreeBSD 13.0. We have a few possibilities for dealing
with the assmebly implementation, but I currently plan to switch back
to the C implementation for now and follow up with one of those
approaches later.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361711 - head/sys/kern

2020-06-01 Thread Rick Macklem
Author: rmacklem
Date: Tue Jun  2 00:03:26 2020
New Revision: 361711
URL: https://svnweb.freebsd.org/changeset/base/361711

Log:
  Fix build issue introduced by r361699.
  
  Reported by:  cy (and others)

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Mon Jun  1 23:44:03 2020(r361710)
+++ head/sys/kern/vfs_mount.c   Tue Jun  2 00:03:26 2020(r361711)
@@ -70,6 +70,9 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361710 - head/stand/uboot/lib

2020-06-01 Thread Simon J. Gerraty
Author: sjg
Date: Mon Jun  1 23:44:03 2020
New Revision: 361710
URL: https://svnweb.freebsd.org/changeset/base/361710

Log:
  stand/uboot: fix setting of gateip.s_addr
  
  Missplaced paren.
  
  Reviewed by:  imp
  MFC after:1 week

Modified:
  head/stand/uboot/lib/net.c

Modified: head/stand/uboot/lib/net.c
==
--- head/stand/uboot/lib/net.c  Mon Jun  1 23:26:37 2020(r361709)
+++ head/stand/uboot/lib/net.c  Mon Jun  1 23:44:03 2020(r361710)
@@ -187,7 +187,7 @@ get_env_net_params()
rootip.s_addr = 0;
return;
}
-   if ((gateip.s_addr = inet_addr(envstr) == INADDR_NONE)) {
+   if ((gateip.s_addr = inet_addr(envstr)) == INADDR_NONE) {
printf("Could not parse gatewayip '%s'\n", envstr);
rootip.s_addr = 0;
return;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361709 - head/stand/lua

2020-06-01 Thread Kyle Evans
Author: kevans
Date: Mon Jun  1 23:26:37 2020
New Revision: 361709
URL: https://svnweb.freebsd.org/changeset/base/361709

Log:
  lualoader: improve drawer error handling
  
  At least one user has landed in a scenario where logo files appear to be
  misnamed, and we failed to find them. Our fallback for missing logodefs is
  orb/orbbw, based on the color status. In a scenario where we can't locate
  the logos, though, this is not ideal. Add in one more layer of fallback
  to properly just don't draw any logo if the fan has been jam packed with
  foreign material.
  
  PR:   246046
  MFC after:3 days

Modified:
  head/stand/lua/drawer.lua

Modified: head/stand/lua/drawer.lua
==
--- head/stand/lua/drawer.lua   Mon Jun  1 21:52:24 2020(r361708)
+++ head/stand/lua/drawer.lua   Mon Jun  1 23:26:37 2020(r361709)
@@ -258,6 +258,11 @@ local function drawlogo()
else
logodef = getLogodef(drawer.default_bw_logodef)
end
+
+   -- Something has gone terribly wrong.
+   if logodef == nil then
+   logodef = getLogodef(drawer.default_fallback_logodef)
+   end
end
 
if logodef ~= nil and logodef.graphic == none then
@@ -355,6 +360,9 @@ shift = default_shift
 drawer.default_brand = 'fbsd'
 drawer.default_color_logodef = 'orb'
 drawer.default_bw_logodef = 'orbbw'
+-- For when things go terribly wrong; this def should be present here in the
+-- drawer module in case it's a filesystem issue.
+drawer.default_fallback_logodef = 'none'
 
 function drawer.addBrand(name, def)
branddefs[name] = def
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361706 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Alexander V . Chernikov
01.06.2020, 22:43, "Cy Schubert" :
> In message <6fe2c649-2d81-4c9c-b821-d8226b6bb...@fh-muenster.de>, Michael
> Tuexe
> n writes:
>>  --Apple-Mail=_30A6D176-B5FA-4F13-A949-3CE33C73C3B8
>>  Content-Transfer-Encoding: quoted-printable
>>  Content-Type: text/plain;
>>  charset=us-ascii
>>
>>  > On 1. Jun 2020, at 22:49, Alexander V. Chernikov =
>>   wrote:
>>  >=20
>>  > Author: melifaro
>>  > Date: Mon Jun 1 20:49:42 2020
>>  > New Revision: 361706
>>  > URL: https://svnweb.freebsd.org/changeset/base/361706
>>  >=20
>>  > Log:
>>  > * Add rib__route() functions to manipulate the =
>>  routing table.
>>  >=20
>>  > The main driver for the change is the need to improve notification =
>>  mechanism.
>>  > Currently callers guess the operation data based on the rtentry =
>>  structure
>>  > returned in case of successful operation result. There are two =
>>  problems with
>>  > this appoach. First is that it doesn't provide enough information =
>>  for the
>>  > upcoming multipath changes, where rtentry refers to a new nexthop =
>>  group,
>>  > and there is no way of guessing which paths were added during the =
>>  change.
>>  > Second is that some rtentry fields can change during notification =
>>  and
>>  > protecting from it by requiring customers to unlock rtentry is not =
>>  desired.
>>  >=20
>>  > Additionally, as the consumers such as rtsock do know which operation =
>>  they
>>  > request in advance, making explicit add/change/del versions of the =
>>  functions
>>  > makes sense, especially given the functions don't share a lot of =
>>  code.
>>  >=20
>>  > With that in mind, introduce rib_cmd_info notification structure and
>>  > rib__route() functions, with mandatory rib_cmd_info =
>>  pointer.
>>  > It will be used in upcoming generalized notifications.
>>  >=20
>>  > * Move definitions of the new functions and some other =
>>  functions/structures
>>  > used for the routing table manipulation to a separate header file,
>>  > net/route/route_ctl.h. net/route.h is a frequently used file =
>>  included in
>>  > ~140 places in kernel, and 90% of the users don't need these =
>>  definitions.
>>  >=20
>>  > Reviewed by: ae
>>  > Differential Revision: https://reviews.freebsd.org/D25067
>>  >=20
>>  > Modified:
>>  > head/sys/net/if_llatbl.c
>>  > head/sys/net/route.c
>>  > head/sys/net/route.h
>>  > head/sys/net/route/nhop_ctl.c
>>  > head/sys/net/route/route_ctl.c
>>  > head/sys/net/route/route_ddb.c
>>  > head/sys/net/route/route_helpers.c
>>  > head/sys/net/route/route_temporal.c
>>  > head/sys/net/route/route_var.h
>>  > head/sys/netinet/in_rmx.c
>>  > head/sys/netinet/ip_icmp.c
>>  > head/sys/netinet6/icmp6.c
>>  > head/sys/netinet6/in6_rmx.c
>>  > head/sys/netinet6/nd6_rtr.c
>>  >=20
>>  > Modified: head/sys/net/if_llatbl.c
>>  > =
>>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>>  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>>  =3D=3D=3D
>>  > --- head/sys/net/if_llatbl.c Mon Jun 1 20:40:40 2020 =
>>  (r361705)
>>  > +++ head/sys/net/if_llatbl.c Mon Jun 1 20:49:42 2020 =
>>  (r361706)
>>  > @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
>>  > #include 
>>  > #include 
>>  > #include 
>>  > +#include 
>>  Where is this file coming from?
>
> That was in r361704 and reverted in r361705, but should have been in this
> commit too.
Thanks for the notification and sorry for the breakage.
Didn't realise it was not added and was testin another change.
Commited back in r361707.
>
>>  Best regards
>>  Michael
>
> --
> Cheers,
> Cy Schubert 
> FreeBSD UNIX:  Web: https://FreeBSD.org
> NTP:  Web: https://nwtime.org
>
> The need of the many outweighs the greed of the few.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361708 - head/sys/net/route

2020-06-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jun  1 21:52:24 2020
New Revision: 361708
URL: https://svnweb.freebsd.org/changeset/base/361708

Log:
  Add rib subscription API.
  
  Currently there is no easy way of subscribing for the routing table changes.
  The only existing way is to set ifa_rtrequest callback in the each protocol
   ifaddr, which is not convenient or extandable.
  
  This change provides generic notification subscription mechanism, that will
   replace current ifa_rtrequest one and allow other applications such as
   accelerated routing lookup modules subscribe for the changes.
  
  In particular, this change provides 2 hooks: 1) synchronous one
   (RIB_NOTIFY_IMMEDIATE), called under RIB_WLOCK, which ensures exact
   ordering of the changes and 2) async one, (RIB_NOTIFY_DELAYED)
   that is called after the change w/o holding locks. The latter one does not
   provide any notification ordering guarantee.
  
  Differential Revision:  https://reviews.freebsd.org/D25070

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

Modified: head/sys/net/route/route_ctl.c
==
--- head/sys/net/route/route_ctl.c  Mon Jun  1 21:51:20 2020
(r361707)
+++ head/sys/net/route/route_ctl.c  Mon Jun  1 21:52:24 2020
(r361708)
@@ -68,10 +68,19 @@ __FBSDID("$FreeBSD$");
  * All functions assumes they are called in net epoch.
  */
 
+struct rib_subscription {
+   CK_STAILQ_ENTRY(rib_subscription)   next;
+   rib_subscription_cb_t   *func;
+   void*arg;
+   enum rib_subscription_type  type;
+   struct epoch_contextepoch_ctx;
+};
+
 static void rib_notify(struct rib_head *rnh, enum rib_subscription_type type,
 struct rib_cmd_info *rc);
 
 static void rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info);
+static void destroy_subscription_epoch(epoch_context_t ctx);
 
 static struct rib_head *
 get_rnh(uint32_t fibnum, const struct rt_addrinfo *info)
@@ -263,6 +272,9 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *in
}
RIB_WUNLOCK(rnh);
 
+   if ((rn != NULL) || (rt_old != NULL))
+   rib_notify(rnh, RIB_NOTIFY_DELAYED, rc);
+
if (rt_old != NULL) {
rt_notifydelete(rt_old, info);
rtfree(rt_old);
@@ -419,6 +431,7 @@ del_route(struct rib_head *rnh, struct rt_addrinfo *in
if (error != 0)
return (error);
 
+   rib_notify(rnh, RIB_NOTIFY_DELAYED, rc);
rt_notifydelete(rt, info);
 
/*
@@ -559,11 +572,12 @@ change_route_one(struct rib_head *rnh, struct rt_addri
 
/* Update generation id to reflect rtable change */
rnh->rnh_gen++;
-
rib_notify(rnh, RIB_NOTIFY_IMMEDIATE, rc);
 
RIB_WUNLOCK(rnh);
 
+   rib_notify(rnh, RIB_NOTIFY_DELAYED, rc);
+
nhop_free(nh_orig);
 
return (0);
@@ -614,6 +628,7 @@ struct rt_delinfo
struct rt_addrinfo info;
struct rib_head *rnh;
struct rtentry *head;
+   struct rib_cmd_info rc;
 };
 
 /*
@@ -643,7 +658,13 @@ rt_checkdelroute(struct radix_node *rn, void *arg)
return (0);
}
 
-   /* Entry was unlinked. Add to the list and return */
+   /* Entry was unlinked. Notify subscribers */
+   di->rnh->rnh_gen++;
+   di->rc.rc_rt = rt;
+   di->rc.rc_nh_old = rt->rt_nhop;
+   rib_notify(di->rnh, RIB_NOTIFY_IMMEDIATE, &di->rc);
+
+   /* Add to the list and return */
rt->rt_chain = di->head;
di->head = rt;
 
@@ -665,6 +686,7 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t *
struct rib_head *rnh;
struct rt_delinfo di;
struct rtentry *rt;
+   struct epoch_tracker et;
 
rnh = rt_tables_get_rnh(fibnum, family);
if (rnh == NULL)
@@ -674,20 +696,24 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t *
di.info.rti_filter = filter_f;
di.info.rti_filterdata = arg;
di.rnh = rnh;
+   di.rc.rc_cmd = RTM_DELETE;
 
+   NET_EPOCH_ENTER(et);
+
RIB_WLOCK(rnh);
rnh->rnh_walktree(&rnh->head, rt_checkdelroute, &di);
RIB_WUNLOCK(rnh);
 
-   if (di.head == NULL)
-   return;
-
/* We might have something to reclaim. */
while (di.head != NULL) {
rt = di.head;
di.head = rt->rt_chain;
rt->rt_chain = NULL;
 
+   di.rc.rc_rt = rt;
+   di.rc.rc_nh_old = rt->rt_nhop;
+   rib_notify(rnh, RIB_NOTIFY_DELAYED, &di.rc);
+
/* TODO std rt -> rt_addrinfo export */
di.info.rti_info[RTAX_DST] = rt_key(rt);
di.info.rti_info[RTAX_NETMASK] = rt_mask(rt);
@@ -699,6 +725,8 @@ rib_walk_del(u_int fibnum, int family, rt_filter_f_t *
fibnum);
rtfree(rt);
 

svn commit: r361707 - head/sys/net/route

2020-06-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jun  1 21:51:20 2020
New Revision: 361707
URL: https://svnweb.freebsd.org/changeset/base/361707

Log:
  Finish r361706: add sys/net/route/route_ctl.h, missed in previous commit.

Added:
  head/sys/net/route/route_ctl.h   (contents, props changed)

Added: head/sys/net/route/route_ctl.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/net/route/route_ctl.h  Mon Jun  1 21:51:20 2020
(r361707)
@@ -0,0 +1,68 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2020 Alexander V. Chernikov
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * This header file contains public functions and structures used for
+ * routing table manipulations.
+ */
+
+#ifndef_NET_ROUTE_ROUTE_CTL_H_
+#define_NET_ROUTE_ROUTE_CTL_H_
+
+struct rib_cmd_info {
+   uint8_t rc_cmd; /* RTM_ADD|RTM_DEL|RTM_CHANGE */
+   uint8_t spare[3];
+   uint32_trc_nh_weight;   /* new nhop weight */
+   struct rtentry  *rc_rt; /* Target entry */
+   struct nhop_object  *rc_nh_old; /* Target nhop OR mpath */
+   struct nhop_object  *rc_nh_new; /* Target nhop OR mpath */
+};
+
+
+int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info,
+  struct rib_cmd_info *rc);
+int rib_del_route(uint32_t fibnum, struct rt_addrinfo *info,
+  struct rib_cmd_info *rc);
+int rib_change_route(uint32_t fibnum, struct rt_addrinfo *info,
+  struct rib_cmd_info *rc);
+
+int rib_add_redirect(u_int fibnum, struct sockaddr *dst,
+  struct sockaddr *gateway, struct sockaddr *author, struct ifnet *ifp,
+  int flags, int expire_sec);
+
+typedef int rt_walktree_f_t(struct rtentry *, void *);
+void rib_walk(int af, u_int fibnum, rt_walktree_f_t *wa_f, void *arg);
+void rib_walk_del(u_int fibnum, int family, rt_filter_f_t *filter_f,
+  void *arg, bool report);
+
+typedef void rt_setwarg_t(struct rib_head *, uint32_t, int, void *);
+void rt_foreach_fib_walk(int af, rt_setwarg_t *, rt_walktree_f_t *, void *);
+void rt_foreach_fib_walk_del(int af, rt_filter_f_t *filter_f, void *arg);
+#endif
+
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361706 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Cy Schubert
In message <6fe2c649-2d81-4c9c-b821-d8226b6bb...@fh-muenster.de>, Michael 
Tuexe
n writes:
> 
> --Apple-Mail=_30A6D176-B5FA-4F13-A949-3CE33C73C3B8
> Content-Transfer-Encoding: quoted-printable
> Content-Type: text/plain;
>   charset=us-ascii
>
> > On 1. Jun 2020, at 22:49, Alexander V. Chernikov =
>  wrote:
> >=20
> > Author: melifaro
> > Date: Mon Jun  1 20:49:42 2020
> > New Revision: 361706
> > URL: https://svnweb.freebsd.org/changeset/base/361706
> >=20
> > Log:
> >  * Add rib__route() functions to manipulate the =
> routing table.
> >=20
> >  The main driver for the change is the need to improve notification =
> mechanism.
> >  Currently callers guess the operation data based on the rtentry =
> structure
> >   returned in case of successful operation result. There are two =
> problems with
> >   this appoach. First is that it doesn't provide enough information =
> for the
> >   upcoming multipath changes, where rtentry refers to a new nexthop =
> group,
> >   and there is no way of guessing which paths were added during the =
> change.
> >   Second is that some rtentry fields can change during notification =
> and
> >   protecting from it by requiring customers to unlock rtentry is not =
> desired.
> >=20
> >  Additionally, as the consumers such as rtsock do know which operation =
> they
> >   request in advance, making explicit add/change/del versions of the =
> functions
> >   makes sense, especially given the functions don't share a lot of =
> code.
> >=20
> >  With that in mind, introduce rib_cmd_info notification structure and
> >   rib__route() functions, with mandatory rib_cmd_info =
> pointer.
> >   It will be used in upcoming generalized notifications.
> >=20
> >  * Move definitions of the new functions and some other =
> functions/structures
> >   used for the routing table manipulation to a separate header file,
> >   net/route/route_ctl.h. net/route.h is a frequently used file =
> included in
> >   ~140 places in kernel, and 90% of the users don't need these =
> definitions.
> >=20
> >  Reviewed by:   ae
> >  Differential Revision: https://reviews.freebsd.org/D25067
> >=20
> > Modified:
> >  head/sys/net/if_llatbl.c
> >  head/sys/net/route.c
> >  head/sys/net/route.h
> >  head/sys/net/route/nhop_ctl.c
> >  head/sys/net/route/route_ctl.c
> >  head/sys/net/route/route_ddb.c
> >  head/sys/net/route/route_helpers.c
> >  head/sys/net/route/route_temporal.c
> >  head/sys/net/route/route_var.h
> >  head/sys/netinet/in_rmx.c
> >  head/sys/netinet/ip_icmp.c
> >  head/sys/netinet6/icmp6.c
> >  head/sys/netinet6/in6_rmx.c
> >  head/sys/netinet6/nd6_rtr.c
> >=20
> > Modified: head/sys/net/if_llatbl.c
> > =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D
> > --- head/sys/net/if_llatbl.cMon Jun  1 20:40:40 2020=
> (r361705)
> > +++ head/sys/net/if_llatbl.cMon Jun  1 20:49:42 2020=
> (r361706)
> > @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
> > #include 
> > #include 
> > #include 
> > +#include 
> Where is this file coming from?

That was in r361704 and reverted in r361705, but should have been in this 
commit too.

>
> Best regards
> Michael


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.


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


Re: svn commit: r361706 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Michael Tuexen
> On 1. Jun 2020, at 22:49, Alexander V. Chernikov  wrote:
> 
> Author: melifaro
> Date: Mon Jun  1 20:49:42 2020
> New Revision: 361706
> URL: https://svnweb.freebsd.org/changeset/base/361706
> 
> Log:
>  * Add rib__route() functions to manipulate the routing table.
> 
>  The main driver for the change is the need to improve notification mechanism.
>  Currently callers guess the operation data based on the rtentry structure
>   returned in case of successful operation result. There are two problems with
>   this appoach. First is that it doesn't provide enough information for the
>   upcoming multipath changes, where rtentry refers to a new nexthop group,
>   and there is no way of guessing which paths were added during the change.
>   Second is that some rtentry fields can change during notification and
>   protecting from it by requiring customers to unlock rtentry is not desired.
> 
>  Additionally, as the consumers such as rtsock do know which operation they
>   request in advance, making explicit add/change/del versions of the functions
>   makes sense, especially given the functions don't share a lot of code.
> 
>  With that in mind, introduce rib_cmd_info notification structure and
>   rib__route() functions, with mandatory rib_cmd_info pointer.
>   It will be used in upcoming generalized notifications.
> 
>  * Move definitions of the new functions and some other functions/structures
>   used for the routing table manipulation to a separate header file,
>   net/route/route_ctl.h. net/route.h is a frequently used file included in
>   ~140 places in kernel, and 90% of the users don't need these definitions.
> 
>  Reviewed by: ae
>  Differential Revision:   https://reviews.freebsd.org/D25067
> 
> Modified:
>  head/sys/net/if_llatbl.c
>  head/sys/net/route.c
>  head/sys/net/route.h
>  head/sys/net/route/nhop_ctl.c
>  head/sys/net/route/route_ctl.c
>  head/sys/net/route/route_ddb.c
>  head/sys/net/route/route_helpers.c
>  head/sys/net/route/route_temporal.c
>  head/sys/net/route/route_var.h
>  head/sys/netinet/in_rmx.c
>  head/sys/netinet/ip_icmp.c
>  head/sys/netinet6/icmp6.c
>  head/sys/netinet6/in6_rmx.c
>  head/sys/netinet6/nd6_rtr.c
> 
> Modified: head/sys/net/if_llatbl.c
> ==
> --- head/sys/net/if_llatbl.c  Mon Jun  1 20:40:40 2020(r361705)
> +++ head/sys/net/if_llatbl.c  Mon Jun  1 20:49:42 2020(r361706)
> @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
> #include 
> #include 
> #include 
> +#include 
Where is this file coming from?

Best regards
Michael
> #include 
> #include 
> #include 
> 
> Modified: head/sys/net/route.c
> ==
> --- head/sys/net/route.c  Mon Jun  1 20:40:40 2020(r361705)
> +++ head/sys/net/route.c  Mon Jun  1 20:49:42 2020(r361706)
> @@ -61,6 +61,7 @@
> #include 
> #include 
> #include 
> +#include 
> #include 
> #include 
> #include 
> @@ -346,6 +347,9 @@ rt_table_init(int offset, int family, u_int fibnum)
> 
>   nhops_init_rib(rh);
> 
> + /* Init subscription system */
> + CK_STAILQ_INIT(&rh->rnh_subscribers);
> +
>   /* Finally, set base callbacks */
>   rh->rnh_addaddr = rn_addroute;
>   rh->rnh_deladdr = rn_delete;
> @@ -1148,6 +1152,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
> {
>   const struct sockaddr *dst;
>   struct rib_head *rnh;
> + struct rib_cmd_info rc;
>   int error;
> 
>   KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum"));
> @@ -1180,10 +1185,11 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
>   if (info->rti_flags & RTF_HOST)
>   info->rti_info[RTAX_NETMASK] = NULL;
> 
> + bzero(&rc, sizeof(struct rib_cmd_info));
>   error = 0;
>   switch (req) {
>   case RTM_DELETE:
> - error = del_route(rnh, info, ret_nrt);
> + error = del_route(rnh, info, &rc);
>   break;
>   case RTM_RESOLVE:
>   /*
> @@ -1192,14 +1198,17 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
>*/
>   break;
>   case RTM_ADD:
> - error = add_route(rnh, info, ret_nrt);
> + error = add_route(rnh, info, &rc);
>   break;
>   case RTM_CHANGE:
> - error = change_route(rnh, info, ret_nrt);
> + error = change_route(rnh, info, &rc);
>   break;
>   default:
>   error = EOPNOTSUPP;
>   }
> +
> + if (ret_nrt != NULL)
> + *ret_nrt = rc.rc_rt;
> 
>   return (error);
> }
> 
> Modified: head/sys/net/route.h
> ==
> --- head/sys/net/route.h  Mon Jun  1 20:40:40 2020(r361705)
> +++ head/sys/net/route.h  Mon Jun  1 20:49:42 2020(r361706)
> @@ -399,12 +399,6 @@ void  rtfree(struct rtentry *);
> void 

Re: svn commit: r361683 - head/usr.sbin/certctl

2020-06-01 Thread Brooks Davis
On Sun, May 31, 2020 at 08:37:41PM -0500, Kyle Evans wrote:
> n Sun, May 31, 2020 at 8:25 PM Kyle Evans  wrote:
> >
> > Author: kevans
> > Date: Mon Jun  1 01:25:19 2020
> > New Revision: 361683
> > URL: https://svnweb.freebsd.org/changeset/base/361683
> >
> > Log:
> >   certctl: fix test syntax
> >
> >   test doesn't understand &&, but it does understand -a.
> >
> >   MFC after:1 week
> >
> 
> Sorry, this was a pretty low-quality commit message; && is a shell
> construct, so the previous version lead to a lot of spam as the [
> invocation was split and the ] terminator lost.

I'm pretty sure this was a result of my failing to test sufficiently
after a merge conflict when committing.  Sorry about that.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r361706 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jun  1 20:49:42 2020
New Revision: 361706
URL: https://svnweb.freebsd.org/changeset/base/361706

Log:
  * Add rib__route() functions to manipulate the routing table.
  
  The main driver for the change is the need to improve notification mechanism.
  Currently callers guess the operation data based on the rtentry structure
   returned in case of successful operation result. There are two problems with
   this appoach. First is that it doesn't provide enough information for the
   upcoming multipath changes, where rtentry refers to a new nexthop group,
   and there is no way of guessing which paths were added during the change.
   Second is that some rtentry fields can change during notification and
   protecting from it by requiring customers to unlock rtentry is not desired.
  
  Additionally, as the consumers such as rtsock do know which operation they
   request in advance, making explicit add/change/del versions of the functions
   makes sense, especially given the functions don't share a lot of code.
  
  With that in mind, introduce rib_cmd_info notification structure and
   rib__route() functions, with mandatory rib_cmd_info pointer.
   It will be used in upcoming generalized notifications.
  
  * Move definitions of the new functions and some other functions/structures
   used for the routing table manipulation to a separate header file,
   net/route/route_ctl.h. net/route.h is a frequently used file included in
   ~140 places in kernel, and 90% of the users don't need these definitions.
  
  Reviewed by:  ae
  Differential Revision:https://reviews.freebsd.org/D25067

Modified:
  head/sys/net/if_llatbl.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/route/nhop_ctl.c
  head/sys/net/route/route_ctl.c
  head/sys/net/route/route_ddb.c
  head/sys/net/route/route_helpers.c
  head/sys/net/route/route_temporal.c
  head/sys/net/route/route_var.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/if_llatbl.c
==
--- head/sys/net/if_llatbl.cMon Jun  1 20:40:40 2020(r361705)
+++ head/sys/net/if_llatbl.cMon Jun  1 20:49:42 2020(r361706)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Jun  1 20:40:40 2020(r361705)
+++ head/sys/net/route.cMon Jun  1 20:49:42 2020(r361706)
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -346,6 +347,9 @@ rt_table_init(int offset, int family, u_int fibnum)
 
nhops_init_rib(rh);
 
+   /* Init subscription system */
+   CK_STAILQ_INIT(&rh->rnh_subscribers);
+
/* Finally, set base callbacks */
rh->rnh_addaddr = rn_addroute;
rh->rnh_deladdr = rn_delete;
@@ -1148,6 +1152,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 {
const struct sockaddr *dst;
struct rib_head *rnh;
+   struct rib_cmd_info rc;
int error;
 
KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum"));
@@ -1180,10 +1185,11 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
if (info->rti_flags & RTF_HOST)
info->rti_info[RTAX_NETMASK] = NULL;
 
+   bzero(&rc, sizeof(struct rib_cmd_info));
error = 0;
switch (req) {
case RTM_DELETE:
-   error = del_route(rnh, info, ret_nrt);
+   error = del_route(rnh, info, &rc);
break;
case RTM_RESOLVE:
/*
@@ -1192,14 +1198,17 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 */
break;
case RTM_ADD:
-   error = add_route(rnh, info, ret_nrt);
+   error = add_route(rnh, info, &rc);
break;
case RTM_CHANGE:
-   error = change_route(rnh, info, ret_nrt);
+   error = change_route(rnh, info, &rc);
break;
default:
error = EOPNOTSUPP;
}
+
+   if (ret_nrt != NULL)
+   *ret_nrt = rc.rc_rt;
 
return (error);
 }

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hMon Jun  1 20:40:40 2020(r361705)
+++ head/sys/net/route.hMon Jun  1 20:49:42 2020(r361706)
@@ -399,12 +399,6 @@ voidrtfree(struct rtentry *);
 voidrtfree_func(struct rtentry *);
 void   rt_updatemtu(struct ifnet *);
 
-typedef int rt_walktree_f_t(struct rtentry *, void *);
-typedef void rt_setwarg_t(struct rib_head *, uint32_t, int, void *);
-void   rib_walk_del(u_

svn commit: r361705 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jun  1 20:40:40 2020
New Revision: 361705
URL: https://svnweb.freebsd.org/changeset/base/361705

Log:
  Revert r361704, it accidentally committed merged D25067 and D25070.

Deleted:
  head/sys/net/route/route_ctl.h
Modified:
  head/sys/net/if_llatbl.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/route/nhop_ctl.c
  head/sys/net/route/route_ctl.c
  head/sys/net/route/route_ddb.c
  head/sys/net/route/route_helpers.c
  head/sys/net/route/route_temporal.c
  head/sys/net/route/route_var.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/if_llatbl.c
==
--- head/sys/net/if_llatbl.cMon Jun  1 20:32:02 2020(r361704)
+++ head/sys/net/if_llatbl.cMon Jun  1 20:40:40 2020(r361705)
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Jun  1 20:32:02 2020(r361704)
+++ head/sys/net/route.cMon Jun  1 20:40:40 2020(r361705)
@@ -61,7 +61,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -347,9 +346,6 @@ rt_table_init(int offset, int family, u_int fibnum)
 
nhops_init_rib(rh);
 
-   /* Init subscription system */
-   CK_STAILQ_INIT(&rh->rnh_subscribers);
-
/* Finally, set base callbacks */
rh->rnh_addaddr = rn_addroute;
rh->rnh_deladdr = rn_delete;
@@ -1152,7 +1148,6 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 {
const struct sockaddr *dst;
struct rib_head *rnh;
-   struct rib_cmd_info rc;
int error;
 
KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum"));
@@ -1185,11 +1180,10 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
if (info->rti_flags & RTF_HOST)
info->rti_info[RTAX_NETMASK] = NULL;
 
-   bzero(&rc, sizeof(struct rib_cmd_info));
error = 0;
switch (req) {
case RTM_DELETE:
-   error = del_route(rnh, info, &rc);
+   error = del_route(rnh, info, ret_nrt);
break;
case RTM_RESOLVE:
/*
@@ -1198,17 +1192,14 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 */
break;
case RTM_ADD:
-   error = add_route(rnh, info, &rc);
+   error = add_route(rnh, info, ret_nrt);
break;
case RTM_CHANGE:
-   error = change_route(rnh, info, &rc);
+   error = change_route(rnh, info, ret_nrt);
break;
default:
error = EOPNOTSUPP;
}
-
-   if (ret_nrt != NULL)
-   *ret_nrt = rc.rc_rt;
 
return (error);
 }

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hMon Jun  1 20:32:02 2020(r361704)
+++ head/sys/net/route.hMon Jun  1 20:40:40 2020(r361705)
@@ -399,6 +399,12 @@ voidrtfree(struct rtentry *);
 voidrtfree_func(struct rtentry *);
 void   rt_updatemtu(struct ifnet *);
 
+typedef int rt_walktree_f_t(struct rtentry *, void *);
+typedef void rt_setwarg_t(struct rib_head *, uint32_t, int, void *);
+void   rib_walk_del(u_int fibnum, int family, rt_filter_f_t *filter_f,
+   void *arg, bool report);
+void   rt_foreach_fib_walk(int af, rt_setwarg_t *, rt_walktree_f_t *, void *);
+void   rt_foreach_fib_walk_del(int af, rt_filter_f_t *filter_f, void *arg);
 void   rt_flushifroutes_af(struct ifnet *, int);
 void   rt_flushifroutes(struct ifnet *ifp);
 
@@ -417,8 +423,12 @@ int rtrequest1_fib(int, struct rt_addrinfo *, 
struct 
 intrib_lookup_info(uint32_t, const struct sockaddr *, uint32_t, uint32_t,
struct rt_addrinfo *);
 void   rib_free_info(struct rt_addrinfo *info);
+intrib_add_redirect(u_int fibnum, struct sockaddr *dst,
+  struct sockaddr *gateway, struct sockaddr *author, struct ifnet *ifp,
+  int flags, int expire_sec);
 
 /* New API */
+void   rib_walk(int af, u_int fibnum, rt_walktree_f_t *wa_f, void *arg);
 struct nhop_object *rib_lookup(uint32_t fibnum, const struct sockaddr *dst,
uint32_t flags, uint32_t flowid);
 #endif

Modified: head/sys/net/route/nhop_ctl.c
==
--- head/sys/net/route/nhop_ctl.c   Mon Jun  1 20:32:02 2020
(r361704)
+++ head/sys/net/route/nhop_ctl.c   Mon Jun  1 20:40:40 2020
(r361705)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified:

svn commit: r361704 - in head/sys: net net/route netinet netinet6

2020-06-01 Thread Alexander V. Chernikov
Author: melifaro
Date: Mon Jun  1 20:32:02 2020
New Revision: 361704
URL: https://svnweb.freebsd.org/changeset/base/361704

Log:
  * Add rib__route() functions to manipulate the routing table.
  
  The main driver for the change is the need to improve notification mechanism.
  Currently callers guess the operation data based on the rtentry structure
   returned in case of successful operation result. There are two problems with
   this appoach. First is that it doesn't provide enough information for the
   upcoming multipath changes, where rtentry refers to a new nexthop group,
   and there is no way of guessing which paths were added during the change.
   Second is that some rtentry fields can change during notification and
   protecting from it by requiring customers to unlock rtentry is not desired.
  
  Additionally, as the consumers such as rtsock do know which operation they
   request in advance, making explicit add/change/del versions of the functions
   makes sense, especially given the functions don't share a lot of code.
  
  With that in mind, introduce rib_cmd_info notification structure and
   rib__route() functions, with mandatory rib_cmd_info pointer.
   It will be used in upcoming generalized notifications.
  
  * Move definitions of the new functions and some other functions/structures
   used for the routing table manipulation to a separate header file,
   net/route/route_ctl.h. net/route.h is a frequently used file included in
   ~140 places in kernel, and 90% of the users don't need these definitions.
  
  Reviewed by:  ae
  Differential Revision: https://reviews.freebsd.org/D25067

Added:
  head/sys/net/route/route_ctl.h   (contents, props changed)
Modified:
  head/sys/net/if_llatbl.c
  head/sys/net/route.c
  head/sys/net/route.h
  head/sys/net/route/nhop_ctl.c
  head/sys/net/route/route_ctl.c
  head/sys/net/route/route_ddb.c
  head/sys/net/route/route_helpers.c
  head/sys/net/route/route_temporal.c
  head/sys/net/route/route_var.h
  head/sys/netinet/in_rmx.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/nd6_rtr.c

Modified: head/sys/net/if_llatbl.c
==
--- head/sys/net/if_llatbl.cMon Jun  1 19:40:59 2020(r361703)
+++ head/sys/net/if_llatbl.cMon Jun  1 20:32:02 2020(r361704)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/net/route.c
==
--- head/sys/net/route.cMon Jun  1 19:40:59 2020(r361703)
+++ head/sys/net/route.cMon Jun  1 20:32:02 2020(r361704)
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -346,6 +347,9 @@ rt_table_init(int offset, int family, u_int fibnum)
 
nhops_init_rib(rh);
 
+   /* Init subscription system */
+   CK_STAILQ_INIT(&rh->rnh_subscribers);
+
/* Finally, set base callbacks */
rh->rnh_addaddr = rn_addroute;
rh->rnh_deladdr = rn_delete;
@@ -1148,6 +1152,7 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 {
const struct sockaddr *dst;
struct rib_head *rnh;
+   struct rib_cmd_info rc;
int error;
 
KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum"));
@@ -1180,10 +1185,11 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
if (info->rti_flags & RTF_HOST)
info->rti_info[RTAX_NETMASK] = NULL;
 
+   bzero(&rc, sizeof(struct rib_cmd_info));
error = 0;
switch (req) {
case RTM_DELETE:
-   error = del_route(rnh, info, ret_nrt);
+   error = del_route(rnh, info, &rc);
break;
case RTM_RESOLVE:
/*
@@ -1192,14 +1198,17 @@ rtrequest1_fib(int req, struct rt_addrinfo *info, stru
 */
break;
case RTM_ADD:
-   error = add_route(rnh, info, ret_nrt);
+   error = add_route(rnh, info, &rc);
break;
case RTM_CHANGE:
-   error = change_route(rnh, info, ret_nrt);
+   error = change_route(rnh, info, &rc);
break;
default:
error = EOPNOTSUPP;
}
+
+   if (ret_nrt != NULL)
+   *ret_nrt = rc.rc_rt;
 
return (error);
 }

Modified: head/sys/net/route.h
==
--- head/sys/net/route.hMon Jun  1 19:40:59 2020(r361703)
+++ head/sys/net/route.hMon Jun  1 20:32:02 2020(r361704)
@@ -399,12 +399,6 @@ voidrtfree(struct rtentry *);
 voidrtfree_func(struct rtentry *);
 void   rt_updatemtu(struct ifnet *);
 
-typedef int rt_walktree_f_t(struct rtentry *, void *);
-typedef void rt_setwarg_t(struct rib_he

Re: svn commit: r361699 - head/sys/kern

2020-06-01 Thread Eric van Gyzen

  void
  vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
  {
  
  	bcopy(oexp, exp, sizeof(*oexp));

-   exp->ex_numsecflavors = 0;
+   if (exp->ex_flags & MNT_EXPORTED) {
+   exp->ex_numsecflavors = 1;
+   exp->ex_secflavors[0] = AUTH_SYS;


#include  will be needed for this.

This of course opens a new can of worms with regard to namespace pollution.


rpc/types.h and rpc/auth.h are sufficient, but that doesn't make the can 
much smaller.


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


Re: svn commit: r361699 - head/sys/kern

2020-06-01 Thread Cy Schubert
In message <202006011843.051ihpmm085...@repo.freebsd.org>, Ryan Moeller 
writes:
> Author: freqlabs
> Date: Mon Jun  1 18:43:51 2020
> New Revision: 361699
> URL: https://svnweb.freebsd.org/changeset/base/361699
>
> Log:
>   Assign default security flavor when converting old export args
>   
>   vfs_export requires security flavors be explicitly listed when
>   exporting as of r360900.
>   
>   Use the default AUTH_SYS flavor when converting old export args to
>   ensure compatibility with the legacy mount syscall.
>   
>   Reported by:rmacklem
>   Reviewed by:rmacklem
>   Approved by:mav (mentor)
>   MFC after:  3 days
>   Sponsored by:   iXsystems, Inc.
>   Differential Revision:  https://reviews.freebsd.org/D25045
>
> Modified:
>   head/sys/kern/vfs_mount.c
>
> Modified: head/sys/kern/vfs_mount.c
> =
> =
> --- head/sys/kern/vfs_mount.c Mon Jun  1 16:14:29 2020(r361698)
> +++ head/sys/kern/vfs_mount.c Mon Jun  1 18:43:51 2020(r361699)
> @@ -2343,10 +2343,22 @@ kernel_vmount(int flags, ...)
>   return (error);
>  }
>  
> +/*
> + * Convert the old export args format into new export args.
> + *
> + * The old export args struct does not have security flavors.  Otherwise, th
> e
> + * structs are identical.  The default security flavor 'sys' is applied when
> + * the given args export the filesystem.
> + */
>  void
>  vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
>  {
>  
>   bcopy(oexp, exp, sizeof(*oexp));
> - exp->ex_numsecflavors = 0;
> + if (exp->ex_flags & MNT_EXPORTED) {
> + exp->ex_numsecflavors = 1;
> + exp->ex_secflavors[0] = AUTH_SYS;

#include  will be needed for this.

This of course opens a new can of worms with regard to namespace pollution.

> + } else {
> + exp->ex_numsecflavors = 0;
> + }
>  }
>


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  https://FreeBSD.org
NTP:   Web:  https://nwtime.org

The need of the many outweighs the greed of the few.


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


svn commit: r361703 - head/sys/conf

2020-06-01 Thread Brandon Bergren
Author: bdragon
Date: Mon Jun  1 19:40:59 2020
New Revision: 361703
URL: https://svnweb.freebsd.org/changeset/base/361703

Log:
  [PowerPC] Fix build-id note on powerpc64 kernel
  
  Due to the ordering of the powerpc64 linker script, we were discarding
  all notes before emitting .note.gnu.build-id. This had the effect of
  generating an empty build id section and breaking the kern.build_id
  sysctl added in r348611.
  
  powerpc and powerpcspe are uneffected.
  
  PR:   246430
  MFC after:3 days
  Sponsored by: Tag1 Consulting, Inc.

Modified:
  head/sys/conf/ldscript.powerpc64

Modified: head/sys/conf/ldscript.powerpc64
==
--- head/sys/conf/ldscript.powerpc64Mon Jun  1 19:34:21 2020
(r361702)
+++ head/sys/conf/ldscript.powerpc64Mon Jun  1 19:40:59 2020
(r361703)
@@ -37,9 +37,6 @@ SECTIONS
   /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */
   /DISCARD/   : { *(.interp)   } 
 
-  /* Also delete notes */
-  /DISCARD/   : { *(.note.*)   } 
-
   .hash  : { *(.hash)  }
   .dynsym: { *(.dynsym)}
   .dynstr: { *(.dynstr)}
@@ -51,6 +48,10 @@ SECTIONS
 *(.note.gnu.build-id)
 PROVIDE (__build_id_end = .);
   }
+
+  /* Do not emit any additional notes. */
+  /DISCARD/   : { *(.note.*)   } 
+
   .rela.text :
 { *(.rela.text) *(.rela.gnu.linkonce.t*) }
   .rela.data :
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361702 - head

2020-06-01 Thread Jung-uk Kim
Author: jkim
Date: Mon Jun  1 19:34:21 2020
New Revision: 361702
URL: https://svnweb.freebsd.org/changeset/base/361702

Log:
  Catch up with r361700.
  
  OpenSSL 32-bit compat engines are moved to /usr/lib32/engines.

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Jun  1 19:26:16 2020(r361701)
+++ head/ObsoleteFiles.inc  Mon Jun  1 19:34:21 2020(r361702)
@@ -36,6 +36,10 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20200601: OpenSSL 32-bit compat engines moved to /usr/lib32/engines
+OLD_LIBS+=usr/lib32/capi.so
+OLD_LIBS+=usr/lib32/padlock.so
+
 # 20200528: libevent renamed libevent1
 OLD_FILES+=usr/include/private/event/event.h
 OLD_DIRS+=usr/include/private/event
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361701 - head/tests/sys/net

2020-06-01 Thread Kristof Provost
Author: kp
Date: Mon Jun  1 19:26:16 2020
New Revision: 361701
URL: https://svnweb.freebsd.org/changeset/base/361701

Log:
  bridge tests: Avoid building a switching loop
  
  Enable STP before bringing the bridges up. This avoids a switching loop,
  which has a tendency to drown out progress in userspace processes,
  especially on single-core systems.
  
  Only check that we have indeed shut down one of the looped interfaces
  
  PR:   246448
  Reviewed by:  melifaro
  Differential Revision:https://reviews.freebsd.org/D25084

Modified:
  head/tests/sys/net/if_bridge_test.sh

Modified: head/tests/sys/net/if_bridge_test.sh
==
--- head/tests/sys/net/if_bridge_test.shMon Jun  1 18:58:09 2020
(r361700)
+++ head/tests/sys/net/if_bridge_test.shMon Jun  1 19:26:16 2020
(r361701)
@@ -72,7 +72,6 @@ stp_head()
 {
atf_set descr 'Spanning tree test'
atf_set require.user root
-   atf_set require.progs jq
 }
 
 stp_body()
@@ -91,13 +90,11 @@ stp_body()
vnet_mkjail a ${bridge_a} ${epair_one}a ${epair_two}a
vnet_mkjail b ${bridge_b} ${epair_one}b ${epair_two}b
 
-   jexec a ifconfig ${bridge_a} up
jexec a ifconfig ${epair_one}a up
jexec a ifconfig ${epair_two}a up
jexec a ifconfig ${bridge_a} addm ${epair_one}a
jexec a ifconfig ${bridge_a} addm ${epair_two}a
 
-   jexec b ifconfig ${bridge_b} up
jexec b ifconfig ${epair_one}b up
jexec b ifconfig ${epair_two}b up
jexec b ifconfig ${bridge_b} addm ${epair_one}b
@@ -105,22 +102,14 @@ stp_body()
 
jexec a ifconfig ${bridge_a} 192.0.2.1/24
 
-   # Give the interfaces some time to come up and pass some traffic
-   sleep 5
-
-   # Confirm that there's looping traffic
-   nbr=$(jexec a netstat -I ${bridge_a} --libxo json \
-   | jq ".statistics.interface[0].\"received-packets\"")
-   if [ ${nbr} -lt 100 ]
-   then
-   atf_fail "Expected bridging loop, but found very few packets."
-   fi
-
# Enable spanning tree
jexec a ifconfig ${bridge_a} stp ${epair_one}a
jexec a ifconfig ${bridge_a} stp ${epair_two}a
jexec b ifconfig ${bridge_b} stp ${epair_one}b
jexec b ifconfig ${bridge_b} stp ${epair_two}b
+
+   jexec b ifconfig ${bridge_b} up
+   jexec a ifconfig ${bridge_a} up
 
# Give STP time to do its thing
sleep 5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361700 - in head: etc/mtree secure/lib/libcrypto secure/lib/libcrypto/engines

2020-06-01 Thread Tijl Coosemans
Author: tijl
Date: Mon Jun  1 18:58:09 2020
New Revision: 361700
URL: https://svnweb.freebsd.org/changeset/base/361700

Log:
  Install 32-bit libcrypto engines in /usr/lib32/engines instead of
  /usr/lib32 and let 32-bit libcrypto search that location instead of
  /usr/lib/engines.
  
  Reviewed by:  jkim

Modified:
  head/etc/mtree/BSD.lib32.dist
  head/secure/lib/libcrypto/Makefile.inc
  head/secure/lib/libcrypto/engines/Makefile.inc

Modified: head/etc/mtree/BSD.lib32.dist
==
--- head/etc/mtree/BSD.lib32.dist   Mon Jun  1 18:43:51 2020
(r361699)
+++ head/etc/mtree/BSD.lib32.dist   Mon Jun  1 18:58:09 2020
(r361700)
@@ -8,6 +8,8 @@
 lib32
 dtrace
 ..
+engines
+..
 geom
 ..
 i18n

Modified: head/secure/lib/libcrypto/Makefile.inc
==
--- head/secure/lib/libcrypto/Makefile.inc  Mon Jun  1 18:43:51 2020
(r361699)
+++ head/secure/lib/libcrypto/Makefile.inc  Mon Jun  1 18:58:09 2020
(r361700)
@@ -75,7 +75,7 @@ CFLAGS+=  -DPOLY1305_ASM
 
 .if defined(LIB)
 CFLAGS+=   -DOPENSSLDIR="\"/etc/ssl\""
-CFLAGS+=   -DENGINESDIR="\"/usr/lib/engines\""
+CFLAGS+=   -DENGINESDIR="\"${LIBDIR}/engines\""
 .endif
 
 CFLAGS+=   -DNDEBUG

Modified: head/secure/lib/libcrypto/engines/Makefile.inc
==
--- head/secure/lib/libcrypto/engines/Makefile.inc  Mon Jun  1 18:43:51 
2020(r361699)
+++ head/secure/lib/libcrypto/engines/Makefile.inc  Mon Jun  1 18:58:09 
2020(r361700)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-SHLIBDIR?= /usr/lib/engines
+SHLIBDIR=  ${LIBDIR}/engines
 
 LCRYPTO_SRC=   ${SRCTOP}/crypto/openssl
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361699 - head/sys/kern

2020-06-01 Thread Ryan Moeller
Author: freqlabs
Date: Mon Jun  1 18:43:51 2020
New Revision: 361699
URL: https://svnweb.freebsd.org/changeset/base/361699

Log:
  Assign default security flavor when converting old export args
  
  vfs_export requires security flavors be explicitly listed when
  exporting as of r360900.
  
  Use the default AUTH_SYS flavor when converting old export args to
  ensure compatibility with the legacy mount syscall.
  
  Reported by:  rmacklem
  Reviewed by:  rmacklem
  Approved by:  mav (mentor)
  MFC after:3 days
  Sponsored by: iXsystems, Inc.
  Differential Revision:https://reviews.freebsd.org/D25045

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Mon Jun  1 16:14:29 2020(r361698)
+++ head/sys/kern/vfs_mount.c   Mon Jun  1 18:43:51 2020(r361699)
@@ -2343,10 +2343,22 @@ kernel_vmount(int flags, ...)
return (error);
 }
 
+/*
+ * Convert the old export args format into new export args.
+ *
+ * The old export args struct does not have security flavors.  Otherwise, the
+ * structs are identical.  The default security flavor 'sys' is applied when
+ * the given args export the filesystem.
+ */
 void
 vfs_oexport_conv(const struct oexport_args *oexp, struct export_args *exp)
 {
 
bcopy(oexp, exp, sizeof(*oexp));
-   exp->ex_numsecflavors = 0;
+   if (exp->ex_flags & MNT_EXPORTED) {
+   exp->ex_numsecflavors = 1;
+   exp->ex_secflavors[0] = AUTH_SYS;
+   } else {
+   exp->ex_numsecflavors = 0;
+   }
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/lib

2020-06-01 Thread Rodney W. Grimes
> On Sun, 2020-05-31 at 22:04 +, Dimitry Andric wrote:
> > Author: dim
> > Date: Sun May 31 22:04:51 2020
> > New Revision: 361677
> > URL: https://svnweb.freebsd.org/changeset/base/361677
> > 
> > Log:
> >   Change Makefiles under usr.bin/svn to make them easier to
> > incrementally
> >   update. No functional change intended.
> >   
> >   MFC after:2 weeks
> > 
> 
> I wish we could get style.Makefile(9) updated to mandate this 1-per-
> line style when listing sources, dirs, etc, when the number of items is
> greater than N, where N is something like 3-6 filenames.  Otherwise the
> requirement to sort the names alphabetically pretty much mandates that
> many lines of the file will change just to insert one or two new files,
> and that makes it all but impossible to figure out from a diff what
> actually changed.

I like this idea, though rather than 3-6 filenames I propose
it to be anything longer than 3 lines, which is kinda about when
the pain point should start.  See the immediate SUBDIR below, it
is 11 items on 2ish/3 lines, and any change would worst case be a
3 line diff.  This probably covers a large portion of the tree.

I particularly do not like massive amounts of vertical white
space which this would create, but lacking an automated tool
this is probably a reasonable compromise.

If we did it everywhere it would mean lots of scrolling when
working on rather simple makefiles.

> -- Ian
> 
> > 
> [...] 
> > -SUBDIR=lib .WAIT \
> > -   svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
> > -   svnsync svnversion svnmucc svnrdump
> > +SUBDIR=lib \
> > +   .WAIT \
> > +   svn \
> > +   svnadmin \
> > +   svnbench \
> > +   svndumpfilter \
> > +   svnfsfs \
> > +   svnlook \
> > +   svnserve \
> > +   svnsync \
> > +   svnversion \
> > +   svnmucc \
> > +   svnrdump
> >  SUBDIR_PARALLEL=
> >  
> 
> 

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


svn commit: r361698 - head/sys/dev/netmap

2020-06-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Jun  1 16:14:29 2020
New Revision: 361698
URL: https://svnweb.freebsd.org/changeset/base/361698

Log:
  netmap: if_vtnet: avoid netmap ring wraparound
  
  netmap assumes the one "slot" is left unused to distinguish
  the empty ring and full ring conditions. This assumption was
  violated by vtnet_netmap_rxq_populate().
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/if_vtnet_netmap.h

Modified: head/sys/dev/netmap/if_vtnet_netmap.h
==
--- head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 16:12:09 2020
(r361697)
+++ head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 16:14:29 2020
(r361698)
@@ -275,8 +275,8 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq)
/* Expose all the RX netmap buffers we can. In case of no indirect
 * buffers, the number of netmap slots in the RX ring matches the
 * maximum number of 2-elements sglist that the RX virtqueue can
-* accommodate. */
-   error = vtnet_netmap_kring_refill(kring, na->num_rx_desc);
+* accommodate (minus 1 to avoid netmap ring wraparound). */
+   error = vtnet_netmap_kring_refill(kring, na->num_rx_desc - 1);
virtqueue_notify(rxq->vtnrx_vq);
 
return error < 0 ? ENXIO : 0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361697 - head/sys/dev/netmap

2020-06-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Jun  1 16:12:09 2020
New Revision: 361697
URL: https://svnweb.freebsd.org/changeset/base/361697

Log:
  netmap: if_vtnet: replace vtnet_free_used()
  
  The functionality contained in this function is duplicated,
  as it is already available in vtnet_txq_free_mbufs()
  and vtnet_rxq_free_mbufs().
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/if_vtnet_netmap.h

Modified: head/sys/dev/netmap/if_vtnet_netmap.h
==
--- head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 16:10:44 2020
(r361696)
+++ head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 16:12:09 2020
(r361697)
@@ -52,37 +52,6 @@ vtnet_netmap_queue_on(struct vtnet_softc *sc, enum txr
na->tx_rings[idx]->nr_mode == NKR_NETMAP_ON);
 }
 
-static void
-vtnet_free_used(struct virtqueue *vq, int netmap_bufs, enum txrx t, int idx)
-{
-   void *cookie;
-   int deq = 0;
-
-   while ((cookie = virtqueue_dequeue(vq, NULL)) != NULL) {
-   if (netmap_bufs) {
-   /* These are netmap buffers: there is nothing to do. */
-   } else {
-   /* These are mbufs that we need to free. */
-   struct mbuf *m;
-
-   if (t == NR_TX) {
-   struct vtnet_tx_header *txhdr = cookie;
-   m = txhdr->vth_mbuf;
-   m_freem(m);
-   uma_zfree(vtnet_tx_header_zone, txhdr);
-   } else {
-   m = cookie;
-   m_freem(m);
-   }
-   }
-   deq++;
-   }
-
-   if (deq)
-   nm_prinf("%d sgs dequeued from %s-%d (netmap=%d)",
-deq, nm_txrx2str(t), idx, netmap_bufs);
-}
-
 /* Register and unregister. */
 static int
 vtnet_netmap_reg(struct netmap_adapter *na, int state)
@@ -113,18 +82,13 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state)
for (i = 0; i < sc->vtnet_act_vq_pairs; i++) {
struct vtnet_txq *txq = &sc->vtnet_txqs[i];
struct vtnet_rxq *rxq = &sc->vtnet_rxqs[i];
-   struct netmap_kring *kring;
 
VTNET_TXQ_LOCK(txq);
-   kring = NMR(na, NR_TX)[i];
-   vtnet_free_used(txq->vtntx_vq,
-   kring->nr_mode == NKR_NETMAP_ON, NR_TX, i);
+   vtnet_txq_free_mbufs(txq);
VTNET_TXQ_UNLOCK(txq);
 
VTNET_RXQ_LOCK(rxq);
-   kring = NMR(na, NR_RX)[i];
-   vtnet_free_used(rxq->vtnrx_vq,
-   kring->nr_mode == NKR_NETMAP_ON, NR_RX, i);
+   vtnet_rxq_free_mbufs(rxq);
VTNET_RXQ_UNLOCK(rxq);
}
vtnet_init_locked(sc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361696 - head/sys/dev/netmap

2020-06-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Mon Jun  1 16:10:44 2020
New Revision: 361696
URL: https://svnweb.freebsd.org/changeset/base/361696

Log:
  netmap: vtnet: fix RX virtqueue initialization bug
  
  The vtnet_netmap_rxq_populate() function erroneously assumed
  that kring->nr_hwcur = 0, i.e. the kring was in the initial
  state. However, this is not always the case: for example,
  when a vtnet reinit is triggered by some changes in the
  interface flags or capenable.
  This patch changes the behaviour of vtnet_netmap_kring_refill()
  so that it always starts publishing the netmap buffers starting
  from the current value of kring->nr_hwcur.
  
  MFC after:1 week

Modified:
  head/sys/dev/netmap/if_vtnet_netmap.h

Modified: head/sys/dev/netmap/if_vtnet_netmap.h
==
--- head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 15:58:22 2020
(r361695)
+++ head/sys/dev/netmap/if_vtnet_netmap.h   Mon Jun  1 16:10:44 2020
(r361696)
@@ -232,14 +232,20 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int fl
return 0;
 }
 
+/*
+ * Publish (up to) num netmap receive buffers to the host,
+ * starting from the first one that the user made available
+ * (kring->nr_hwcur).
+ */
 static int
-vtnet_netmap_kring_refill(struct netmap_kring *kring, u_int nm_i, u_int head)
+vtnet_netmap_kring_refill(struct netmap_kring *kring, u_int num)
 {
struct netmap_adapter *na = kring->na;
struct ifnet *ifp = na->ifp;
struct netmap_ring *ring = kring->ring;
u_int ring_nr = kring->ring_id;
u_int const lim = kring->nkr_num_slots - 1;
+   u_int nm_i = kring->nr_hwcur;
 
/* device-specific */
struct vtnet_softc *sc = ifp->if_softc;
@@ -250,7 +256,7 @@ vtnet_netmap_kring_refill(struct netmap_kring *kring, 
struct sglist_seg ss[2];
struct sglist sg = { ss, 0, 0, 2 };
 
-   for (; nm_i != head; nm_i = nm_next(nm_i, lim)) {
+   for (; num > 0; nm_i = nm_next(nm_i, lim), num--) {
struct netmap_slot *slot = &ring->slot[nm_i];
uint64_t paddr;
void *addr = PNMB(na, slot, &paddr);
@@ -302,10 +308,11 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq)
kring->nr_pending_mode == NKR_NETMAP_ON))
return -1;
 
-   /* Expose all the RX netmap buffers. Note that the number of
-* netmap slots in the RX ring matches the maximum number of
-* 2-elements sglist that the RX virtqueue can accommodate. */
-   error = vtnet_netmap_kring_refill(kring, 0, na->num_rx_desc);
+   /* Expose all the RX netmap buffers we can. In case of no indirect
+* buffers, the number of netmap slots in the RX ring matches the
+* maximum number of 2-elements sglist that the RX virtqueue can
+* accommodate. */
+   error = vtnet_netmap_kring_refill(kring, na->num_rx_desc);
virtqueue_notify(rxq->vtnrx_vq);
 
return error < 0 ? ENXIO : 0;
@@ -381,7 +388,12 @@ vtnet_netmap_rxsync(struct netmap_kring *kring, int fl
 */
nm_i = kring->nr_hwcur; /* netmap ring index */
if (nm_i != head) {
-   int nm_j = vtnet_netmap_kring_refill(kring, nm_i, head);
+   int howmany = head - nm_i;
+   int nm_j;
+
+   if (howmany < 0)
+   howmany += kring->nkr_num_slots;
+   nm_j = vtnet_netmap_kring_refill(kring, howmany);
if (nm_j < 0)
return nm_j;
kring->nr_hwcur = nm_j;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361695 - head/sys/sys

2020-06-01 Thread Mateusz Guzik
Author: mjg
Date: Mon Jun  1 15:58:22 2020
New Revision: 361695
URL: https://svnweb.freebsd.org/changeset/base/361695

Log:
  Remove ->f_label from struct file
  
  The field was added in r141137 in 2005 and is unused.
  
  It avoidably grows a struct which is NOFREE and easily gets hundreds of
  thousands of instances.
  
  Reviewed by:  kib
  Differential Revision:https://reviews.freebsd.org/D25036

Modified:
  head/sys/sys/file.h

Modified: head/sys/sys/file.h
==
--- head/sys/sys/file.h Mon Jun  1 15:32:13 2020(r361694)
+++ head/sys/sys/file.h Mon Jun  1 15:58:22 2020(r361695)
@@ -200,10 +200,6 @@ struct file {
 *  DFLAG_SEEKABLE specific fields
 */
off_t   f_offset;
-   /*
-* Mandatory Access control information.
-*/
-   void*f_label;   /* Place-holder for MAC label. */
 };
 
 #definef_cdevpriv  f_vnun.fvn_cdevpriv
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361677 - in head/usr.bin/svn: . lib lib/libapr lib/libapr_util lib/libserf lib/libsvn_client lib/libsvn_delta lib/libsvn_diff lib/libsvn_fs lib/libsvn_fs_fs lib/libsvn_fs_util lib/lib

2020-06-01 Thread Ian Lepore
On Sun, 2020-05-31 at 22:04 +, Dimitry Andric wrote:
> Author: dim
> Date: Sun May 31 22:04:51 2020
> New Revision: 361677
> URL: https://svnweb.freebsd.org/changeset/base/361677
> 
> Log:
>   Change Makefiles under usr.bin/svn to make them easier to
> incrementally
>   update. No functional change intended.
>   
>   MFC after:  2 weeks
> 

I wish we could get style.Makefile(9) updated to mandate this 1-per-
line style when listing sources, dirs, etc, when the number of items is
greater than N, where N is something like 3-6 filenames.  Otherwise the
requirement to sort the names alphabetically pretty much mandates that
many lines of the file will change just to insert one or two new files,
and that makes it all but impossible to figure out from a diff what
actually changed.

-- Ian

> 
[...] 
> -SUBDIR=  lib .WAIT \
> - svn svnadmin svnbench svndumpfilter svnfsfs svnlook svnserve \
> - svnsync svnversion svnmucc svnrdump
> +SUBDIR=  lib \
> + .WAIT \
> + svn \
> + svnadmin \
> + svnbench \
> + svndumpfilter \
> + svnfsfs \
> + svnlook \
> + svnserve \
> + svnsync \
> + svnversion \
> + svnmucc \
> + svnrdump
>  SUBDIR_PARALLEL=
>  

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


svn commit: r361694 - head/lib/libcasper/services/cap_fileargs

2020-06-01 Thread Mark Johnston
Author: markj
Date: Mon Jun  1 15:32:13 2020
New Revision: 361694
URL: https://svnweb.freebsd.org/changeset/base/361694

Log:
  cap_fileargs: Fix a descriptor leak in the service process.
  
  The service handler for fileargs_open() tries to pre-open multiple files
  and pass descriptors for each back to the sandboxed process in a single
  message.  This is to amortize the cost of round-trips between the two
  processes.
  
  The service process adds a "cache" nvlist to the reply to "open",
  containing file descriptors for pre-opened files.  However, when adding
  that nvlist to the reply, it was making a copy, effectively leaking the
  cached descriptors.
  
  While here, fix spelling in a local variable name.
  
  PR:   241226
  Reviewed by:  oshogbo
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D25095

Modified:
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.c

Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.c
==
--- head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Mon Jun  1 
10:27:05 2020(r361693)
+++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.c Mon Jun  1 
15:32:13 2020(r361694)
@@ -500,7 +500,7 @@ open_file(const char *name)
 
 static void
 fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *limits,
-const char *curent_name)
+const char *current_name)
 {
int type, i, fd;
void *cookie;
@@ -527,9 +527,9 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *l
break;
}
 
-   if (type != NV_TYPE_NULL ||
-   (curent_name != NULL && strcmp(fname, curent_name) == 0)) {
-   curent_name = NULL;
+   if (type != NV_TYPE_NULL || (current_name != NULL &&
+   strcmp(fname, current_name) == 0)) {
+   current_name = NULL;
i--;
continue;
}
@@ -553,7 +553,7 @@ fileargs_add_cache(nvlist_t *nvlout, const nvlist_t *l
nvlist_add_binary(new, "stat", &sb, sizeof(sb));
}
 
-   nvlist_add_nvlist(nvlout, fname, new);
+   nvlist_move_nvlist(nvlout, fname, new);
}
cacheposition = cookie;
lastname = fname;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361633 - in head/sys: net netipsec

2020-06-01 Thread Kyle Evans
On Mon, Jun 1, 2020 at 1:18 AM Hartmann, O.  wrote:
>
> On Sun, 31 May 2020 11:43:18 +0200
> "Hartmann, O."  wrote:
>
> > On Fri, 29 May 2020 19:22:40 + (UTC)
> > John Baldwin  wrote:
> >
> > > Author: jhb
> > > Date: Fri May 29 19:22:40 2020
> > > New Revision: 361633
> > > URL: https://svnweb.freebsd.org/changeset/base/361633
> > >
> > > Log:
> > >   Consistently include opt_ipsec.h for consumers of
> > > .
> > >   This fixes ipsec.ko to include all of IPSEC_DEBUG.
> > >
> > [... snip ...]
> >
> > [...]
> > --- all_subdir_ipsec ---
> > --- ipsec_mod.o ---
> > /usr/src/sys/netipsec/ipsec_mod.c:114:3: error: implicit declaration
> > of function 'ipsec_support_enable' is invalid in C99
> > [-Werror,-Wimplicit-function-declaration]
> > ipsec_support_enable(ipv4_ipsec_support, &ipv4_methods); ^
> > /usr/src/sys/netipsec/ipsec_mod.c:125:3: error: implicit declaration
> > of function 'ipsec_support_disable' is invalid in C99
> > [-Werror,-Wimplicit-function-declaration]
> > ipsec_support_disable(ipv4_ipsec_support); ^ --- all_subdir_ipwfw ---
> > Building
> > /usr/obj/usr/src/amd64.amd64/sys/WALHALL/modules/usr/src/sys/modules/ipwfw/ipw_bss/ipw_bss.ko
> > --- all_subdir_ipsec --- /usr/src/sys/netipsec/ipsec_mod.c:125:3:
> > note: did you mean 'ipsec_support_enable'?
> > /usr/src/sys/netipsec/ipsec_mod.c:114:3: note: 'ipsec_support_enable'
> > declared here ipsec_support_enable(ipv4_ipsec_support, &ipv4_methods);
> > ^ 2 errors generated. *** [ipsec_mod.o] Error code 1
> >
> > make[4]: stopped in /usr/src/sys/modules/ipsec
>
> FYI: IPSEC is statically built into the kernel via "options IPSEC"

This is the same failure as we're seeing on LINT kernels, which also
have both. I've got a tentative diff at [0] that teaches the modules
to cope with the possibility, but I haven't thought too much on how
useful the result is. IIRC we're building the modules into the kernel
anyways in this scenario, so the result probably just won't load
because it's already loaded.

[0] https://people.freebsd.org/~kevans.ipsec.diff
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r361685 - head/sys/kern

2020-06-01 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: peter
> Date: Mon Jun  1 03:37:58 2020
> New Revision: 361685
> URL: https://svnweb.freebsd.org/changeset/base/361685
> 
> Log:
>   Clarify which hints file is the source of an error message.

Better correction could be to use the variable storing the name
that is used.

>   
>   PR: 246688
>   Submitted by:   Ashish Gupta 
>   MFC after:  1 week
> 
> Modified:
>   head/sys/kern/kern_linker.c
> 
> Modified: head/sys/kern/kern_linker.c
> ==
> --- head/sys/kern/kern_linker.c   Mon Jun  1 02:54:10 2020
> (r361684)
> +++ head/sys/kern/kern_linker.c   Mon Jun  1 03:37:58 2020
> (r361685)
> @@ -1870,7 +1870,7 @@ linker_hints_lookup(const char *path, int pathlen, con
>* XXX: we need to limit this number to some reasonable value
>*/
>   if (vattr.va_size > LINKER_HINTS_MAX) {
> - printf("hints file too large %ld\n", (long)vattr.va_size);
> + printf("linker.hints file too large %ld\n", 
> (long)vattr.va_size);

+   printf("%s file too large %ld\n", linker_hintfile, 
(long)vattr.va_size);

>   goto bad;
>   }
>   hints = malloc(vattr.va_size, M_TEMP, M_WAITOK);
> @@ -1888,7 +1888,7 @@ linker_hints_lookup(const char *path, int pathlen, con
>   intp = (int *)hints;
>   ival = *intp++;
>   if (ival != LINKER_HINTS_VERSION) {
> - printf("hints file version mismatch %d\n", ival);
> + printf("linker.hints file version mismatch %d\n", ival);

Ditto.

>   goto bad;
>   }
>   bufend = hints + vattr.va_size;
> 

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


svn commit: r361693 - in head: contrib/subversion contrib/subversion/doc contrib/subversion/doc/programmer contrib/subversion/doc/user contrib/subversion/subversion contrib/subversion/subversion/in...

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:27:05 2020
New Revision: 361693
URL: https://svnweb.freebsd.org/changeset/base/361693

Log:
  Update Subversion to 1.14.0 LTS. See contrib/subversion/CHANGES for a
  summary of changes, or for a more thorough overview:
  
  https://subversion.apache.org/docs/release-notes/1.14
  
  NOTE: there is no need to dump and reload repositories, and the working
  copy format is still the same as Subversion 1.8 through 1.13.
  
  Relnotes: yes
  MFC after:2 weeks
  X-MFC-With:   r361677

Added:
  head/contrib/subversion/.swig_pl_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_pl_checked
  head/contrib/subversion/.swig_py_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_py_checked
  head/contrib/subversion/.swig_rb_checked
 - copied unchanged from r361678, vendor/subversion/dist/.swig_rb_checked
  head/contrib/subversion/subversion/include/private/svn_client_shelf.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_client_shelf.h
  head/contrib/subversion/subversion/include/private/svn_client_shelf2.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_client_shelf2.h
  head/contrib/subversion/subversion/include/private/svn_dirent_uri_private.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/private/svn_dirent_uri_private.h
  head/contrib/subversion/subversion/include/svn_opt_impl.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/svn_opt_impl.h
  head/contrib/subversion/subversion/include/svn_types_impl.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/include/svn_types_impl.h
  head/contrib/subversion/subversion/libsvn_client/layout.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/layout.c
  head/contrib/subversion/subversion/libsvn_client/shelf.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/shelf.c
  head/contrib/subversion/subversion/libsvn_client/shelf2.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/shelf2.c
  head/contrib/subversion/subversion/libsvn_client/wc_editor.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_client/wc_editor.c
  head/contrib/subversion/subversion/libsvn_repos/dump_editor.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/libsvn_repos/dump_editor.c
  head/contrib/subversion/subversion/svn/filesize.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/filesize.c
  head/contrib/subversion/subversion/svn/shelf-cmd.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf-cmd.c
  head/contrib/subversion/subversion/svn/shelf-cmd.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf-cmd.h
  head/contrib/subversion/subversion/svn/shelf2-cmd.c
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf2-cmd.c
  head/contrib/subversion/subversion/svn/shelf2-cmd.h
 - copied unchanged from r361678, 
vendor/subversion/dist/subversion/svn/shelf2-cmd.h
Deleted:
  head/contrib/subversion/doc/programmer/gtest-guide.txt
  head/contrib/subversion/subversion/libsvn_client/copy_foreign.c
  head/contrib/subversion/subversion/libsvn_client/shelve.c
  head/contrib/subversion/subversion/svn/shelve-cmd.c
Modified:
  head/contrib/subversion/.editorconfig
  head/contrib/subversion/CHANGES
  head/contrib/subversion/COMMITTERS
  head/contrib/subversion/INSTALL
  head/contrib/subversion/LICENSE
  head/contrib/subversion/Makefile.in
  head/contrib/subversion/NOTICE
  head/contrib/subversion/aclocal.m4
  head/contrib/subversion/autogen.sh
  head/contrib/subversion/build-outputs.mk
  head/contrib/subversion/build.conf
  head/contrib/subversion/configure
  head/contrib/subversion/configure.ac
  head/contrib/subversion/doc/doxygen.conf
  head/contrib/subversion/doc/user/svn-best-practices.html
  head/contrib/subversion/gen-make.py
  head/contrib/subversion/get-deps.sh
  head/contrib/subversion/subversion/include/private/svn_branch.h
  head/contrib/subversion/subversion/include/private/svn_client_mtcc.h
  head/contrib/subversion/subversion/include/private/svn_client_private.h
  head/contrib/subversion/subversion/include/private/svn_dep_compat.h
  head/contrib/subversion/subversion/include/private/svn_diff_tree.h
  head/contrib/subversion/subversion/include/private/svn_element.h
  head/contrib/subversion/subversion/include/private/svn_fs_fs_private.h
  head/contrib/subversion/subversion/include/private/svn_repos_private.h
  head/contrib/subversion/subversion/include/private/svn_sorts_private.h
  head/contrib/subversion/subversion/include/private/svn_subr_private.h
  head/contrib/subversion/subversion/include/private/svn_wc_private.h
  head/contrib/subversion/subversion/incl

svn commit: r361692 - in head: contrib/apr-util contrib/apr-util/buckets contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbd/unsupported contrib/apr-util/dbm/sdbm contrib/apr-util/inc...

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:14:45 2020
New Revision: 361692
URL: https://svnweb.freebsd.org/changeset/base/361692

Log:
  Update apr-util to 1.6.1. See contrib/apr-util/CHANGES for a summary of
  changes.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Added:
  head/contrib/apr-util/CMakeLists.txt
 - copied unchanged from r361691, vendor/apr-util/dist/CMakeLists.txt
  head/contrib/apr-util/README.FREETDS
 - copied unchanged from r361691, vendor/apr-util/dist/README.FREETDS
  head/contrib/apr-util/README.cmake
 - copied unchanged from r361691, vendor/apr-util/dist/README.cmake
  head/contrib/apr-util/crypto/apr_crypto_commoncrypto.c
 - copied unchanged from r361691, 
vendor/apr-util/dist/crypto/apr_crypto_commoncrypto.c
  head/contrib/apr-util/crypto/apr_siphash.c
 - copied unchanged from r361691, vendor/apr-util/dist/crypto/apr_siphash.c
  head/contrib/apr-util/dbd/unsupported/
 - copied from r361691, vendor/apr-util/dist/dbd/unsupported/
  head/contrib/apr-util/include/apr_ldap.hwc
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_ldap.hwc
  head/contrib/apr-util/include/apr_redis.h
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_redis.h
  head/contrib/apr-util/include/apr_siphash.h
 - copied unchanged from r361691, vendor/apr-util/dist/include/apr_siphash.h
  head/contrib/apr-util/include/apu.hwc
 - copied unchanged from r361691, vendor/apr-util/dist/include/apu.hwc
  head/contrib/apr-util/redis/
 - copied from r361691, vendor/apr-util/dist/redis/
  head/contrib/apr-util/test/testredis.c
 - copied unchanged from r361691, vendor/apr-util/dist/test/testredis.c
  head/contrib/apr-util/test/testsiphash.c
 - copied unchanged from r361691, vendor/apr-util/dist/test/testsiphash.c
Deleted:
  head/contrib/apr-util/dbd/NWGNUdbdfreetds
  head/contrib/apr-util/dbd/apr_dbd_freetds.c
Modified:
  head/contrib/apr-util/CHANGES
  head/contrib/apr-util/LICENSE
  head/contrib/apr-util/Makefile.in
  head/contrib/apr-util/Makefile.win
  head/contrib/apr-util/NOTICE
  head/contrib/apr-util/NWGNUmakefile
  head/contrib/apr-util/README
  head/contrib/apr-util/apr-util.spec
  head/contrib/apr-util/aprutil.dsw
  head/contrib/apr-util/apu-config.in
  head/contrib/apr-util/buckets/apr_buckets_alloc.c
  head/contrib/apr-util/buckets/apr_buckets_file.c
  head/contrib/apr-util/build-outputs.mk
  head/contrib/apr-util/build.conf
  head/contrib/apr-util/buildconf
  head/contrib/apr-util/configure
  head/contrib/apr-util/configure.in
  head/contrib/apr-util/crypto/apr_crypto.c
  head/contrib/apr-util/crypto/apr_crypto_nss.c
  head/contrib/apr-util/crypto/apr_crypto_openssl.c
  head/contrib/apr-util/crypto/crypt_blowfish.c
  head/contrib/apr-util/dbd/NWGNUmakefile
  head/contrib/apr-util/dbd/apr_dbd.c
  head/contrib/apr-util/dbm/sdbm/sdbm.c
  head/contrib/apr-util/dbm/sdbm/sdbm_pair.c
  head/contrib/apr-util/include/apr_buckets.h
  head/contrib/apr-util/include/apr_crypto.h
  head/contrib/apr-util/include/apr_dbd.h
  head/contrib/apr-util/include/apr_xml.h
  head/contrib/apr-util/include/apu.h.in
  head/contrib/apr-util/include/apu.hnw
  head/contrib/apr-util/include/apu.hw
  head/contrib/apr-util/include/apu_version.h
  head/contrib/apr-util/include/private/apr_crypto_internal.h
  head/contrib/apr-util/include/private/apu_config.h.in
  head/contrib/apr-util/memcache/apr_memcache.c
  head/contrib/apr-util/test/Makefile.in
  head/contrib/apr-util/test/Makefile.win
  head/contrib/apr-util/test/NWGNUaputest
  head/contrib/apr-util/test/abts_tests.h
  head/contrib/apr-util/test/testall.dsw
  head/contrib/apr-util/test/testcrypto.c
  head/contrib/apr-util/test/testutil.h
  head/contrib/apr-util/xml/apr_xml.c
  head/usr.bin/svn/lib/libapr_util/apu.h
  head/usr.bin/svn/lib/libapr_util/apu_config.h
Directory Properties:
  head/contrib/apr-util/   (props changed)

Modified: head/contrib/apr-util/CHANGES
==
--- head/contrib/apr-util/CHANGES   Mon Jun  1 10:08:18 2020
(r361691)
+++ head/contrib/apr-util/CHANGES   Mon Jun  1 10:14:45 2020
(r361692)
@@ -1,141 +1,62 @@
  -*- coding: utf-8 -*-
-Changes with APR-util 1.5.4
+Changes with APR-util 1.6.1
 
-  *) MySQL driver: Fix incorrect handling of bad parameter in the
- driver support for apr_dbd_transaction_end().  PR 56330.
- [Weiqiang Li ]
+  *) Win32: Add function exports from new apr_crypto API's missing in 1.6.0.
 
-  *) apr_crypto_get_driver(): Fix invalid storage reference on error path.
- [Philip Martin ]
+  *) Win32: Introduce XML_PARSER build-time variable to select the expat
+ library name to be linked to libaprutil-1.dll. See Makefile.win
 
-  *) Fix compile failure for Android.  PR 56627.  [Fredrik Fornwall 
- , Jeff Trawick]
+  *) Win32: Removed lingering xml/xml.dsp project forked from the expat
+ Project in the 1.9x era

svn commit: r361691 - head/usr.bin/svn/lib/libapr

2020-06-01 Thread Dimitry Andric
Author: dim
Date: Mon Jun  1 10:08:18 2020
New Revision: 361691
URL: https://svnweb.freebsd.org/changeset/base/361691

Log:
  Follow-up r361678 (update apr to 1.7.0) by also regenerating the apr
  internal headers through the upstream configure script, with some minor
  custom tweaks.
  
  MFC after:2 weeks
  X-MFC-With:   r361677

Modified:
  head/usr.bin/svn/lib/libapr/apr.h
  head/usr.bin/svn/lib/libapr/apr_private.h

Modified: head/usr.bin/svn/lib/libapr/apr.h
==
--- head/usr.bin/svn/lib/libapr/apr.h   Mon Jun  1 09:15:15 2020
(r361690)
+++ head/usr.bin/svn/lib/libapr/apr.h   Mon Jun  1 10:08:18 2020
(r361691)
@@ -95,6 +95,7 @@
 #define APR_HAVE_STDLIB_H1
 #define APR_HAVE_STRING_H1
 #define APR_HAVE_STRINGS_H   1
+#define APR_HAVE_INTTYPES_H  1
 #define APR_HAVE_SYS_IOCTL_H 1
 #define APR_HAVE_SYS_SENDFILE_H  0
 #define APR_HAVE_SYS_SIGNAL_H1
@@ -170,16 +171,25 @@
 #include 
 #endif
 
-#if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
+#if APR_HAVE_STDINT_H
+#ifdef __cplusplus
 /* C99 7.18.4 requires that stdint.h only exposes INT64_C 
  * and UINT64_C for C++ implementations if this is defined: */
+#ifndef __STDC_CONSTANT_MACROS
 #define __STDC_CONSTANT_MACROS
 #endif
-
-#if APR_HAVE_STDINT_H
+/* C++ needs this too for PRI*NN formats: */
+#ifndef __STDC_FORMAT_MACROS
+#define __STDC_FORMAT_MACROS
+#endif
+#endif /* __cplusplus */
 #include 
 #endif
 
+#if APR_HAVE_INTTYPES_H
+#include 
+#endif
+
 #if APR_HAVE_SYS_WAIT_H
 #include 
 #endif
@@ -199,6 +209,13 @@
 #endif
 #endif
 
+/* __APPLE__ is now the official pre-defined macro for macOS */
+#ifdef __APPLE__
+#undef DARWIN
+#undef DARWIN_10
+#define DARWIN
+#define DARWIN_10
+#endif /* __APPLE__ */
 
 #ifdef __cplusplus
 extern "C" {
@@ -219,10 +236,10 @@ extern "C" {
 #define APR_HAVE_SHMEM_BEOS 0
 
 #define APR_USE_SHMEM_MMAP_TMP 0
-#define APR_USE_SHMEM_MMAP_SHM 1
+#define APR_USE_SHMEM_MMAP_SHM 0
 #define APR_USE_SHMEM_MMAP_ZERO0
 #define APR_USE_SHMEM_SHMGET_ANON  0
-#define APR_USE_SHMEM_SHMGET   0
+#define APR_USE_SHMEM_SHMGET   1
 #define APR_USE_SHMEM_MMAP_ANON1
 #define APR_USE_SHMEM_BEOS 0
 
@@ -237,7 +254,7 @@ extern "C" {
 #define APR_HAS_SYSVSEM_SERIALIZE 1
 #define APR_HAS_POSIXSEM_SERIALIZE1
 #define APR_HAS_FCNTL_SERIALIZE   1
-#define APR_HAS_PROC_PTHREAD_SERIALIZE0
+#define APR_HAS_PROC_PTHREAD_SERIALIZE1
 
 #define APR_PROCESS_LOCK_IS_GLOBAL0
 
@@ -247,6 +264,7 @@ extern "C" {
 #define APR_HAVE_INET_ADDR  1
 #define APR_HAVE_INET_NETWORK   1
 #define APR_HAVE_IPV6   1
+#define APR_HAVE_SOCKADDR_UN1
 #define APR_HAVE_MEMMOVE1
 #define APR_HAVE_SETRLIMIT  1
 #define APR_HAVE_SIGACTION  1
@@ -273,7 +291,7 @@ extern "C" {
 #define APR_HAS_FORK  1
 #define APR_HAS_RANDOM1
 #define APR_HAS_OTHER_CHILD   1
-#define APR_HAS_DSO   0
+#define APR_HAS_DSO   1
 #define APR_HAS_SO_ACCEPTFILTER   1
 #define APR_HAS_UNICODE_FS0
 #define APR_HAS_PROC_INVOKED  0
@@ -281,6 +299,7 @@ extern "C" {
 #define APR_HAS_LARGE_FILES   0
 #define APR_HAS_XTHREAD_FILES 0
 #define APR_HAS_OS_UUID   1
+#define APR_HAS_TIMEDLOCKS1
 
 #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
 
@@ -340,31 +359,35 @@ typedef  unsigned intapr_uint32_t;
  */
 #ifdef DARWIN_10
 #undef APR_SIZEOF_VOIDP
-#undef INT64_C
-#undef UINT64_C
+#undef APR_INT64_C
+#undef APR_UINT64_C
 #ifdef __LP64__
  typedef  longapr_int64_t;
  typedef  unsigned long   apr_uint64_t;
  #define APR_SIZEOF_VOIDP 8
- #define INT64_C(v)   (v ## L)
- #define UINT64_C(v)  (v ## UL)
+ #define APR_INT64_C(v)   (v ## L)
+ #define APR_UINT64_C(v)  (v ## UL)
 #else
  typedef  long longapr_int64_t;
  typedef  unsigned long long   apr_uint64_t;
  #define APR_SIZEOF_VOIDP 4
- #define INT64_C(v)   (v ## LL)
- #define UINT64_C(v)  (v ## ULL)
+ #define APR_INT64_C(v)   (v ## LL)
+ #define APR_UINT64_C(v)  (v ## ULL)
 #endif
 #else
  typedef  __int64_tapr_int64_t;
  typedef  __uint64_t   apr_uint64_t;
+
+ /* Mechanisms to properly type numeric literals */
+ #define APR_INT64_C(val) INT64_C(val)
+ #define APR_UINT64_C(val) UINT64_C(val)
 #endif
 
 typedef  size_t  apr_size_t;
 typedef  ssize_t apr_ssize_t;
 typedef  off_t   apr_off_t;
 typedef  socklen_t   apr_socklen_t;
-typedef  unsigned int   apr_ino_t;
+typedef  __ino_t apr_ino_t;
 
 #if APR_SIZEOF_VOIDP == 8
 typedef  apr_uint64_tapr_uintptr_t;
@@ -380,10 +403,6 @@ typedef  apr_uint32_tapr_uintptr_t;
 #else
 #error Unknown byte order.
 #endif
-
-/* Mechanisms to properly type numeric literals */
-#define APR_INT64_C(val) INT64_C(val)
-#define APR_UINT64_C(val) UINT64_C(val)
 
 #ifdef INT16_MIN
 #define APR_

svn commit: r361690 - head/usr.bin/diff

2020-06-01 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun  1 09:15:15 2020
New Revision: 361690
URL: https://svnweb.freebsd.org/changeset/base/361690

Log:
  Document long version of -b option
  
  PR:   234195
  Submitted by: Fehmi Noyan Isi 
  Reported by:  Andras Farkas 
  MFC after:3 days

Modified:
  head/usr.bin/diff/diff.1

Modified: head/usr.bin/diff/diff.1
==
--- head/usr.bin/diff/diff.1Mon Jun  1 09:09:36 2020(r361689)
+++ head/usr.bin/diff/diff.1Mon Jun  1 09:15:15 2020(r361690)
@@ -30,7 +30,7 @@
 .\" @(#)diff.1 8.1 (Berkeley) 6/30/93
 .\" $FreeBSD$
 .\"
-.Dd February 13, 2020
+.Dd June 1, 2020
 .Dt DIFF 1
 .Os
 .Sh NAME
@@ -330,7 +330,7 @@ Use of this option forces
 to produce a diff.
 .It Fl B Fl -ignore-blank-lines
 Causes chunks that include only blank lines to be ignored.
-.It Fl b
+.It Fl b -ignore-space-change
 Causes trailing blanks (spaces and tabs) to be ignored, and other
 strings of blanks to compare equal.
 .It Fl d -minimal
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361689 - in head/usr.bin/diff: . tests

2020-06-01 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun  1 09:09:36 2020
New Revision: 361689
URL: https://svnweb.freebsd.org/changeset/base/361689

Log:
  diff: restore compatibility with GNU diff regarding -N option
  
  When -N is used the missing files are treated as empty.
  
  PR:   233402
  Submitted by: Fehmi Noyan Isi 
  Reported by:  Roman Neuhauser 
  MFC after:3 days
  Differential Revision:D25081

Modified:
  head/usr.bin/diff/diff.c
  head/usr.bin/diff/tests/diff_test.sh

Modified: head/usr.bin/diff/diff.c
==
--- head/usr.bin/diff/diff.cMon Jun  1 09:01:13 2020(r361688)
+++ head/usr.bin/diff/diff.cMon Jun  1 09:09:36 2020(r361689)
@@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -351,13 +352,33 @@ main(int argc, char **argv)
if (strcmp(argv[0], "-") == 0) {
fstat(STDIN_FILENO, &stb1);
gotstdin = 1;
-   } else if (stat(argv[0], &stb1) != 0)
-   err(2, "%s", argv[0]);
+   } else if (stat(argv[0], &stb1) != 0) {
+   if (!Nflag || errno != ENOENT)
+   err(2, "%s", argv[0]);
+   dflags |= D_EMPTY1;
+   memset(&stb1, 0, sizeof(struct stat));
+   }
+
if (strcmp(argv[1], "-") == 0) {
fstat(STDIN_FILENO, &stb2);
gotstdin = 1;
-   } else if (stat(argv[1], &stb2) != 0)
-   err(2, "%s", argv[1]);
+   } else if (stat(argv[1], &stb2) != 0) {
+   if (!Nflag || errno != ENOENT)
+   err(2, "%s", argv[1]);
+   dflags |= D_EMPTY2;
+   memset(&stb2, 0, sizeof(stb2));
+   stb2.st_mode = stb1.st_mode;
+   }
+
+   if (dflags & D_EMPTY1 && dflags & D_EMPTY2){
+   warn("%s", argv[0]);
+   warn("%s", argv[1]);
+   exit(2);
+   }
+
+   if (stb1.st_mode == 0)
+   stb1.st_mode = stb2.st_mode;
+
if (gotstdin && (S_ISDIR(stb1.st_mode) || S_ISDIR(stb2.st_mode)))
errx(2, "can't compare - to a directory");
set_argstr(oargv, argv);

Modified: head/usr.bin/diff/tests/diff_test.sh
==
--- head/usr.bin/diff/tests/diff_test.shMon Jun  1 09:01:13 2020
(r361688)
+++ head/usr.bin/diff/tests/diff_test.shMon Jun  1 09:09:36 2020
(r361689)
@@ -10,6 +10,7 @@ atf_test_case side_by_side
 atf_test_case brief_format
 atf_test_case b230049
 atf_test_case Bflag
+atf_test_case Nflag
 atf_test_case tabsize
 atf_test_case conflicting_format
 atf_test_case label
@@ -165,6 +166,15 @@ Bflag_body()
atf_check -s exit:1 -o file:"$(atf_get_srcdir)/Bflag_F.out" diff -B E F
 }
 
+Nflag_body()
+{
+   atf_check -x 'printf "foo" > A'
+
+   atf_check -s exit:1 -o ignore -e ignore diff -N A NOFILE 
+   atf_check -s exit:1 -o ignore -e ignore diff -N NOFILE A 
+   atf_check -s exit:2 -o ignore -e ignore diff -N NOFILE1 NOFILE2 
+}
+
 tabsize_body()
 {
printf "\tA\n" > A
@@ -219,6 +229,7 @@ atf_init_test_cases()
atf_add_test_case brief_format
atf_add_test_case b230049
atf_add_test_case Bflag
+   atf_add_test_case Nflag
atf_add_test_case tabsize
atf_add_test_case conflicting_format
atf_add_test_case label
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r361688 - in head/usr.bin/diff: . tests

2020-06-01 Thread Baptiste Daroussin
Author: bapt
Date: Mon Jun  1 09:01:13 2020
New Revision: 361688
URL: https://svnweb.freebsd.org/changeset/base/361688

Log:
  Restore compatibility with GNU diff regarding --label
  
  Various options to "diff(1)" show filenames, and traditionally make use of the
  "--label" parameter, if set.
  
  Restore this behaviour in BSD diff.
  
  While here add a regression test
  
  PR:   244533
  Submitted by: Jamie Landeg-Jones 
  MFC after:3 days

Modified:
  head/usr.bin/diff/diff.c
  head/usr.bin/diff/tests/diff_test.sh

Modified: head/usr.bin/diff/diff.c
==
--- head/usr.bin/diff/diff.cMon Jun  1 06:10:25 2020(r361687)
+++ head/usr.bin/diff/diff.cMon Jun  1 09:01:13 2020(r361688)
@@ -465,6 +465,9 @@ print_only(const char *path, size_t dirlen, const char
 void
 print_status(int val, char *path1, char *path2, const char *entry)
 {
+   if (label[0] != NULL) path1 = label[0];
+   if (label[1] != NULL) path2 = label[1];
+
switch (val) {
case D_BINARY:
printf("Binary files %s%s and %s%s differ\n",

Modified: head/usr.bin/diff/tests/diff_test.sh
==
--- head/usr.bin/diff/tests/diff_test.shMon Jun  1 06:10:25 2020
(r361687)
+++ head/usr.bin/diff/tests/diff_test.shMon Jun  1 09:01:13 2020
(r361688)
@@ -12,6 +12,7 @@ atf_test_case b230049
 atf_test_case Bflag
 atf_test_case tabsize
 atf_test_case conflicting_format
+atf_test_case label
 
 simple_body()
 {
@@ -195,6 +196,17 @@ conflicting_format_body()
atf_check -s exit:1 -o ignore -e ignore diff --normal --normal A B
 }
 
+label_body()
+{
+   printf "\tA\n" > A
+
+   atf_check -o inline:"Files hello and world are identical\n" \
+   -s exit:0 diff --label hello --label world -s A A
+
+   atf_check -o inline:"Binary files hello and world differ\n" \
+   -s exit:1 diff --label hello --label world `which diff` `which 
ls`
+}
+
 atf_init_test_cases()
 {
atf_add_test_case simple
@@ -209,4 +221,5 @@ atf_init_test_cases()
atf_add_test_case Bflag
atf_add_test_case tabsize
atf_add_test_case conflicting_format
+   atf_add_test_case label
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"