svn commit: r367095 - head/share/misc

2020-10-27 Thread Li-Wen Hsu
Author: lwhsu
Date: Wed Oct 28 02:30:44 2020
New Revision: 367095
URL: https://svnweb.freebsd.org/changeset/base/367095

Log:
  Add FreeBSD 12.2

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==
--- head/share/misc/bsd-family-tree Tue Oct 27 23:03:15 2020
(r367094)
+++ head/share/misc/bsd-family-tree Wed Oct 28 02:30:44 2020
(r367095)
@@ -407,11 +407,11 @@ FreeBSD 5.2   |  | |  
  | |   10.15.1   |   ||DragonFly 5.6.2
  | |  |  *--NetBSD   |||
  | v  |  |   9.0 |||
- ||  |   |||
- ||  |   ||DragonFly 5.8
- ||  |   |||
- ||  |   ||DragonFly 5.6.3
- ||  |NetBSD  ||
+ |  FreeBSD   |  |   |||
+ |   12.2 |  |   ||DragonFly 5.8
+ | |  |  |   |||
+ | |  |  |   ||DragonFly 5.6.3
+ | v  |  |NetBSD  ||
  ||  | 8.2||
  ||  |||
 FreeBSD 13 -current   |  NetBSD -current   OpenBSD -currentDragonFly 
-current
@@ -810,6 +810,7 @@ NetBSD 9.0  2020-02-14 [NBD]
 DragonFly 5.8  2020-03-03 [DFB]
 DragonFly 5.6.32020-03-11 [DFB]
 NetBSD 8.2 2020-03-31 [NBD]
+FreeBSD 12.2   2020-10-27 [FBD]
 
 Bibliography
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367094 - in head: contrib/unbound contrib/unbound/contrib contrib/unbound/daemon contrib/unbound/dnstap contrib/unbound/doc contrib/unbound/dynlibmod contrib/unbound/iterator contrib/u...

2020-10-27 Thread Cy Schubert
Author: cy
Date: Tue Oct 27 23:03:15 2020
New Revision: 367094
URL: https://svnweb.freebsd.org/changeset/base/367094

Log:
  MFV r367082:
  
  Update unbound 1.11.0 --> 1.12.0.
  
  MFC after:1 month.

Modified:
  head/contrib/unbound/Makefile.in
  head/contrib/unbound/README.md
  head/contrib/unbound/acx_nlnetlabs.m4
  head/contrib/unbound/config.guess
  head/contrib/unbound/config.h.in
  head/contrib/unbound/config.sub
  head/contrib/unbound/configure
  head/contrib/unbound/configure.ac
  head/contrib/unbound/contrib/-filter-iterator.patch
  head/contrib/unbound/contrib/unbound.service.in
  head/contrib/unbound/contrib/unbound_munin_
  head/contrib/unbound/daemon/daemon.c
  head/contrib/unbound/daemon/remote.c
  head/contrib/unbound/daemon/stats.c
  head/contrib/unbound/daemon/unbound.c
  head/contrib/unbound/daemon/worker.c
  head/contrib/unbound/dnstap/dnstap.c
  head/contrib/unbound/dnstap/dnstap.h
  head/contrib/unbound/dnstap/dtstream.c
  head/contrib/unbound/dnstap/dtstream.h
  head/contrib/unbound/dnstap/unbound-dnstap-socket.c
  head/contrib/unbound/doc/Changelog
  head/contrib/unbound/doc/README
  head/contrib/unbound/doc/example.conf.in
  head/contrib/unbound/doc/libunbound.3.in
  head/contrib/unbound/doc/unbound-anchor.8.in
  head/contrib/unbound/doc/unbound-checkconf.8.in
  head/contrib/unbound/doc/unbound-control.8.in
  head/contrib/unbound/doc/unbound-host.1.in
  head/contrib/unbound/doc/unbound.8.in
  head/contrib/unbound/doc/unbound.conf.5.in
  head/contrib/unbound/dynlibmod/dynlibmod.c
  head/contrib/unbound/iterator/iterator.c
  head/contrib/unbound/libunbound/context.c
  head/contrib/unbound/libunbound/libunbound.c
  head/contrib/unbound/libunbound/libworker.c
  head/contrib/unbound/libunbound/unbound.h
  head/contrib/unbound/services/cache/dns.c
  head/contrib/unbound/services/listen_dnsport.c
  head/contrib/unbound/services/listen_dnsport.h
  head/contrib/unbound/services/mesh.c
  head/contrib/unbound/services/mesh.h
  head/contrib/unbound/services/outside_network.c
  head/contrib/unbound/services/rpz.c
  head/contrib/unbound/sldns/parseutil.c
  head/contrib/unbound/sldns/parseutil.h
  head/contrib/unbound/sldns/rrdef.h
  head/contrib/unbound/smallapp/unbound-checkconf.c
  head/contrib/unbound/smallapp/unbound-control.c
  head/contrib/unbound/util/config_file.c
  head/contrib/unbound/util/config_file.h
  head/contrib/unbound/util/configlexer.lex
  head/contrib/unbound/util/configparser.y
  head/contrib/unbound/util/edns.c
  head/contrib/unbound/util/edns.h
  head/contrib/unbound/util/fptr_wlist.c
  head/contrib/unbound/util/iana_ports.inc
  head/contrib/unbound/util/mini_event.h
  head/contrib/unbound/util/module.h
  head/contrib/unbound/util/net_help.c
  head/contrib/unbound/util/net_help.h
  head/contrib/unbound/util/netevent.c
  head/contrib/unbound/util/netevent.h
  head/contrib/unbound/validator/val_anchor.c
  head/contrib/unbound/validator/val_anchor.h
  head/contrib/unbound/validator/val_neg.c
  head/contrib/unbound/validator/val_neg.h
  head/contrib/unbound/validator/val_nsec.c
  head/contrib/unbound/validator/val_nsec.h
  head/contrib/unbound/validator/validator.c
  head/contrib/unbound/validator/validator.h
  head/usr.sbin/unbound/config.h
Directory Properties:
  head/contrib/unbound/   (props changed)

Modified: head/contrib/unbound/Makefile.in
==
--- head/contrib/unbound/Makefile.inTue Oct 27 21:53:33 2020
(r367093)
+++ head/contrib/unbound/Makefile.inTue Oct 27 23:03:15 2020
(r367094)
@@ -231,6 +231,10 @@ STREAMTCP_SRC=testcode/streamtcp.c
 STREAMTCP_OBJ=streamtcp.lo
 STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \
 $(SLDNS_OBJ)
+DOHCLIENT_SRC=testcode/dohclient.c
+DOHCLIENT_OBJ=dohclient.lo
+DOHCLIENT_OBJ_LINK=$(DOHCLIENT_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) \
+$(SLDNS_OBJ)
 PERF_SRC=testcode/perf.c
 PERF_OBJ=perf.lo
 PERF_OBJ_LINK=$(PERF_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) $(SLDNS_OBJ)
@@ -272,7 +276,8 @@ ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \
$(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \
$(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) $(DNSTAP_SOCKET_SRC)\
$(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC) \
-   $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC)
+   $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) $(SLDNS_SRC) \
+   $(DOHCLIENT_SRC)
 
 ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \
$(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) \
@@ -280,7 +285,8 @@ ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \
$(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \
$(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) $(DNSTAP_SOCKET_OBJ)\
$(COMPAT_OBJ) $(PYUNBOUND_OBJ) \
-   $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) $(SLDNS_OBJ)
+   $(SVCINST_OBJ) $(SVCUNINST_OBJ) 

svn commit: r367093 - head/sys/net

2020-10-27 Thread Vincenzo Maffione
Author: vmaffione
Date: Tue Oct 27 21:53:33 2020
New Revision: 367093
URL: https://svnweb.freebsd.org/changeset/base/367093

Log:
  iflib: add per-tx-queue netmap timer
  
  The way netmap TX is handled in iflib when TX interrupts are not
  used (IFC_NETMAP_TX_IRQ not set) has some issues:
- The netmap_tx_irq() function gets called by iflib_timer(), which
  gets scheduled with tick granularity (hz). This is not frequent
  enough for 10Gbps NICs and beyond (e.g., ixgbe or ixl). The end
  result is that the transmitting netmap application is not woken
  up fast enough to saturate the link with small packets.
- The iflib_timer() functions also calls isc_txd_credits_update()
  to ask for more TX completion updates. However, this violates
  the netmap requirement that only txsync can access the TX queue
  for datapath operations. Only netmap_tx_irq() may be called out
  of the txsync context.
  
  This change introduces per-tx-queue netmap timers, using microsecond
  granularity to ensure that netmap_tx_irq() can be called often enough
  to allow for maximum packet rate. The timer routine simply calls
  netmap_tx_irq() to wake up the netmap application. The latter will
  wake up and call txsync to collect TX completion updates.
  
  This change brings back line rate speed with small packets for ixgbe.
  For the time being, timer expiration is hardcoded to 90 microseconds,
  in order to avoid introducing a new sysctl.
  We may eventually implement an adaptive expiration period or use another
  deferred work mechanism in place of timers.
  
  Also, fix the timers usage to make sure that each queue is serviced
  by a different CPU.
  
  PR:   248652
  Reported by:  s...@efficientip.com
  MFC after:2 weeks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cTue Oct 27 20:13:33 2020(r367092)
+++ head/sys/net/iflib.cTue Oct 27 21:53:33 2020(r367093)
@@ -346,6 +346,9 @@ struct iflib_txq {
qidx_t  ift_size;
uint16_tift_id;
struct callout  ift_timer;
+#ifdef DEV_NETMAP
+   struct callout  ift_netmap_timer;
+#endif /* DEV_NETMAP */
 
if_txsd_vec_t   ift_sds;
uint8_t ift_qstatus;
@@ -753,6 +756,7 @@ iflib_num_tx_descs(if_ctx_t ctx)
 MODULE_DEPEND(iflib, netmap, 1, 1, 1);
 
 static int netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool 
init);
+static void iflib_netmap_timer(void *arg);
 
 /*
  * device-specific sysctl variables:
@@ -918,6 +922,8 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring 
return (0);
 }
 
+#define NETMAP_TX_TIMER_US 90
+
 /*
  * Reconcile kernel and user view of the transmit ring.
  *
@@ -1047,9 +1053,8 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl
 * Second part: reclaim buffers for completed transmissions.
 *
 * If there are unclaimed buffers, attempt to reclaim them.
-* If none are reclaimed, and TX IRQs are not in use, do an initial
-* minimal delay, then trigger the tx handler which will spin in the
-* group task queue.
+* If we don't manage to reclaim them all, and TX IRQs are not in use,
+* trigger a per-tx-queue timer to try again later.
 */
if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) {
if (iflib_tx_credits_update(ctx, txq)) {
@@ -1058,11 +1063,13 @@ iflib_netmap_txsync(struct netmap_kring *kring, int fl
kring->nr_hwtail = nm_prev(netmap_idx_n2k(kring, 
nic_i), lim);
}
}
+
if (!(ctx->ifc_flags & IFC_NETMAP_TX_IRQ))
if (kring->nr_hwtail != nm_prev(kring->nr_hwcur, lim)) {
-   callout_reset_on(>ift_timer, hz < 2000 ? 1 : hz / 
1000,
-   iflib_timer, txq, txq->ift_timer.c_cpu);
-   }
+   callout_reset_sbt(>ift_netmap_timer,
+   NETMAP_TX_TIMER_US * SBT_1US, SBT_1US,
+   iflib_netmap_timer, txq, 
txq->ift_netmap_timer.c_cpu);
+   }
return (0);
 }
 
@@ -1263,28 +1270,16 @@ iflib_netmap_rxq_init(if_ctx_t ctx, iflib_rxq_t rxq)
 }
 
 static void
-iflib_netmap_timer_adjust(if_ctx_t ctx, iflib_txq_t txq, uint32_t *reset_on)
+iflib_netmap_timer(void *arg)
 {
-   struct netmap_kring *kring;
-   uint16_t txqid;
+   iflib_txq_t txq = arg;
+   if_ctx_t ctx = txq->ift_ctx;
 
-   txqid = txq->ift_id;
-   kring = netmap_kring_on(NA(ctx->ifc_ifp), txqid, NR_TX);
-   if (kring == NULL)
-   return;
-
-   if (kring->nr_hwcur != nm_next(kring->nr_hwtail, kring->nkr_num_slots - 
1)) {
-   bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map,
-   BUS_DMASYNC_POSTREAD);
-   if 

Re: svn commit: r366993 - head/sys/net

2020-10-27 Thread Warner Losh
On Tue, Oct 27, 2020 at 2:23 PM Konstantin Belousov 
wrote:

> On Tue, Oct 27, 2020 at 02:52:38PM -0400, Ed Maste wrote:
> > On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov 
> wrote:
> > >
> > > > -#include 
> > > sys/systm.h should come right after sys/param.h.  These two headers are
> > > exceptions to the normal alphabetical rule.
> >
> > style(9) claims that sys/types.h and sys/param.h are the special headers:
> >
> >  Kernel include files (sys/*.h) come first.  If  is
> needed
> >  for __FBSDID(), include it first.  If either  or
> >   is needed, include it before other include files.
> >  ( includes ; do not include both.) The
> >  remaining kernel headers should be sorted alphabetically.
> >
> > We should add sys/systm.h to style(9) as another special case if
> necessary.
> Yes sys/systm.h is very special because it defines a lot of basic things,
> like asserts, printf(9), and so on, and because it includes enough other
> popular headers.  Its intent is to gather all common stuff, which makes
> it both convenient and necessary to go before other (but sys/param.h is
> more
> prioritized).
>

So sorted after sys/types.h or sys/param.h should be documented in style(9).

https://reviews.freebsd.org/D26981

has a proposed change.

Warner


> >
> > > > -infiniband_ipv4_multicast_map(uint32_t addr,
> > > > -const uint8_t *broadcast, uint8_t *buf)
> > > > +infiniband_ipv4_multicast_map(
> > > > +uint32_t addr, const uint8_t *broadcast, uint8_t *buf)
> > > And this is arguably regression, we fill line up to columns 72-80
> before
> > > splitting to the continuation line.
> >
> > I agree with kib and arichardson has a clang-format fix for this in
> > D26978. That said I can see an argument for it being easier to read
> > with all function args on the same line.
> >
> > > > - m = NULL;   /* mbuf is consumed by
> resolver */
> > > > + m = NULL; /* mbuf is consumed by
> resolver */
> > > This is a regression as well, in-line comment is typically preceeded
> by tab.
> >
> > I suspect this is hard to do in an automated fashion in a way that's
> > sensible overall (i.e., lining up inline comments on different lines).
> >
> > This could be a case where we decide to just accept it when someone
> > uses clang-format on new code, and just discourage sweeping
> > clang-format changes on existing code.
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r366993 - head/sys/net

2020-10-27 Thread Konstantin Belousov
On Tue, Oct 27, 2020 at 02:52:38PM -0400, Ed Maste wrote:
> On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov  wrote:
> >
> > > -#include 
> > sys/systm.h should come right after sys/param.h.  These two headers are
> > exceptions to the normal alphabetical rule.
> 
> style(9) claims that sys/types.h and sys/param.h are the special headers:
> 
>  Kernel include files (sys/*.h) come first.  If  is needed
>  for __FBSDID(), include it first.  If either  or
>   is needed, include it before other include files.
>  ( includes ; do not include both.) The
>  remaining kernel headers should be sorted alphabetically.
> 
> We should add sys/systm.h to style(9) as another special case if necessary.
Yes sys/systm.h is very special because it defines a lot of basic things,
like asserts, printf(9), and so on, and because it includes enough other
popular headers.  Its intent is to gather all common stuff, which makes
it both convenient and necessary to go before other (but sys/param.h is more
prioritized).

> 
> > > -infiniband_ipv4_multicast_map(uint32_t addr,
> > > -const uint8_t *broadcast, uint8_t *buf)
> > > +infiniband_ipv4_multicast_map(
> > > +uint32_t addr, const uint8_t *broadcast, uint8_t *buf)
> > And this is arguably regression, we fill line up to columns 72-80 before
> > splitting to the continuation line.
> 
> I agree with kib and arichardson has a clang-format fix for this in
> D26978. That said I can see an argument for it being easier to read
> with all function args on the same line.
> 
> > > - m = NULL;   /* mbuf is consumed by 
> > > resolver */
> > > + m = NULL; /* mbuf is consumed by resolver */
> > This is a regression as well, in-line comment is typically preceeded by tab.
> 
> I suspect this is hard to do in an automated fashion in a way that's
> sensible overall (i.e., lining up inline comments on different lines).
> 
> This could be a case where we decide to just accept it when someone
> uses clang-format on new code, and just discourage sweeping
> clang-format changes on existing code.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367066 - head/sys/compat/linux

2020-10-27 Thread Ed Maste
On Mon, 26 Oct 2020 at 14:03, Mateusz Guzik  wrote:
>
> Author: mjg
> Date: Mon Oct 26 18:03:50 2020
> New Revision: 367066
> URL: https://svnweb.freebsd.org/changeset/base/367066
>
> Log:
>   linux: silence renameat2 flags warning

What flag(s) are missing?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r366993 - head/sys/net

2020-10-27 Thread Ed Maste
On Sat, 24 Oct 2020 at 06:46, Konstantin Belousov  wrote:
>
> > -#include 
> sys/systm.h should come right after sys/param.h.  These two headers are
> exceptions to the normal alphabetical rule.

style(9) claims that sys/types.h and sys/param.h are the special headers:

 Kernel include files (sys/*.h) come first.  If  is needed
 for __FBSDID(), include it first.  If either  or
  is needed, include it before other include files.
 ( includes ; do not include both.) The
 remaining kernel headers should be sorted alphabetically.

We should add sys/systm.h to style(9) as another special case if necessary.

> > -infiniband_ipv4_multicast_map(uint32_t addr,
> > -const uint8_t *broadcast, uint8_t *buf)
> > +infiniband_ipv4_multicast_map(
> > +uint32_t addr, const uint8_t *broadcast, uint8_t *buf)
> And this is arguably regression, we fill line up to columns 72-80 before
> splitting to the continuation line.

I agree with kib and arichardson has a clang-format fix for this in
D26978. That said I can see an argument for it being easier to read
with all function args on the same line.

> > - m = NULL;   /* mbuf is consumed by 
> > resolver */
> > + m = NULL; /* mbuf is consumed by resolver */
> This is a regression as well, in-line comment is typically preceeded by tab.

I suspect this is hard to do in an automated fashion in a way that's
sensible overall (i.e., lining up inline comments on different lines).

This could be a case where we decide to just accept it when someone
uses clang-format on new code, and just discourage sweeping
clang-format changes on existing code.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367091 - in head/share/man: man4 man5

2020-10-27 Thread Gordon Bergling
Author: gbe (doc committer)
Date: Tue Oct 27 18:30:43 2020
New Revision: 367091
URL: https://svnweb.freebsd.org/changeset/base/367091

Log:
  Use my FreeBSD.org mail address in man pages I have written
  
  MFC after:3 days

Modified:
  head/share/man/man4/smbios.4
  head/share/man/man5/smbfs.5
  head/share/man/man5/unionfs.5

Modified: head/share/man/man4/smbios.4
==
--- head/share/man/man4/smbios.4Tue Oct 27 18:13:09 2020
(r367090)
+++ head/share/man/man4/smbios.4Tue Oct 27 18:30:43 2020
(r367091)
@@ -62,4 +62,4 @@ The
 device driver was written by
 .An Matthew N. Dodd Aq Mt win...@jurai.net .
 This manual page was written by
-.An Gordon Bergling Aq Mt gbergl...@gmail.com .
+.An Gordon Bergling Aq Mt g...@freebsd.org .

Modified: head/share/man/man5/smbfs.5
==
--- head/share/man/man5/smbfs.5 Tue Oct 27 18:13:09 2020(r367090)
+++ head/share/man/man5/smbfs.5 Tue Oct 27 18:30:43 2020(r367091)
@@ -76,4 +76,4 @@ The
 device driver was written by
 .An Boris Popov Aq Mt b...@freebsd.org .
 The manual page was contributed by
-.An Gordon Bergling Aq Mt gbergl...@gmail.com .
+.An Gordon Bergling Aq Mt g...@freebsd.org .

Modified: head/share/man/man5/unionfs.5
==
--- head/share/man/man5/unionfs.5   Tue Oct 27 18:13:09 2020
(r367090)
+++ head/share/man/man5/unionfs.5   Tue Oct 27 18:30:43 2020
(r367091)
@@ -78,7 +78,7 @@ and
 reimplemented the handling of the locking for
 .Fx 7.0 .
 The manual page was written by
-.An Gordon Bergling Aq Mt gbergl...@gmail.com .
+.An Gordon Bergling Aq Mt g...@freebsd.org .
 .Sh BUGS
 Please see the
 .Xr mount_unionfs 8
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367090 - head/sys/kern

2020-10-27 Thread Mateusz Guzik
Author: mjg
Date: Tue Oct 27 18:13:09 2020
New Revision: 367090
URL: https://svnweb.freebsd.org/changeset/base/367090

Log:
  vfs: tidy up vnlru_free
  
  Apart from cosmeatic changes make sure to only decrease the recycled counter
  if vtryrecycle succeeded.
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cTue Oct 27 18:12:07 2020(r367089)
+++ head/sys/kern/vfs_subr.cTue Oct 27 18:13:09 2020(r367090)
@@ -1226,9 +1226,11 @@ vnlru_free_locked(int count, struct vfsops *mnt_op)
count = max_vnlru_free;
ocount = count;
mvp = vnode_list_free_marker;
-restart:
vp = mvp;
-   while (count > 0) {
+   for (;;) {
+   if (count == 0) {
+   break;
+   }
vp = TAILQ_NEXT(vp, v_vnodelist);
if (__predict_false(vp == NULL)) {
TAILQ_REMOVE(_list, mvp, v_vnodelist);
@@ -1237,17 +1239,16 @@ restart:
}
if (__predict_false(vp->v_type == VMARKER))
continue;
-
+   if (vp->v_holdcnt > 0)
+   continue;
/*
 * Don't recycle if our vnode is from different type
 * of mount point.  Note that mp is type-safe, the
 * check does not reach unmapped address even if
 * vnode is reclaimed.
-* Don't recycle if we can't get the interlock without
-* blocking.
 */
-   if (vp->v_holdcnt > 0 || (mnt_op != NULL && (mp = vp->v_mount) 
!= NULL &&
-   mp->mnt_op != mnt_op)) {
+   if (mnt_op != NULL && (mp = vp->v_mount) != NULL &&
+   mp->mnt_op != mnt_op) {
continue;
}
if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) {
@@ -1257,11 +1258,11 @@ restart:
continue;
TAILQ_REMOVE(_list, mvp, v_vnodelist);
TAILQ_INSERT_AFTER(_list, vp, mvp, v_vnodelist);
-   count--;
mtx_unlock(_list_mtx);
-   vtryrecycle(vp);
+   if (vtryrecycle(vp) == 0)
+   count--;
mtx_lock(_list_mtx);
-   goto restart;
+   vp = mvp;
}
return (ocount - count);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367089 - head/sys/kern

2020-10-27 Thread Mateusz Guzik
Author: mjg
Date: Tue Oct 27 18:12:07 2020
New Revision: 367089
URL: https://svnweb.freebsd.org/changeset/base/367089

Log:
  vfs: fix vnode reclaim races against getnwevnode
  
  All vnodes allocated by UMA are present on the global list used by
  vnlru. getnewvnode modifies the state of the vnode (most notably
  altering v_holdcnt) but never locks it. Moreover filesystems also
  modify it in arbitrary manners sometimes before taking the vnode
  lock or adding any other indicator that the vnode can be used.
  
  Picking up such a vnode by vnlru would be problematic.
  
  To that end there are 2 fixes:
  - vlrureclaim, not recycling v_holdcnt == 0 vnodes, takes the
  interlock and verifies that v_mount has been set. It is an
  invariant that the vnode lock is held by that point, providing
  the necessary serialisation against locking after vhold.
  - vnlru_free_locked, only wanting to free v_holdcnt == 0 vnodes,
  now makes sure to only transition the count 0->1 and newly allocated
  vnodes start with v_holdcnt == VHOLD_NO_SMR. getnewvnode will only
  transition VHOLD_NO_SMR->1 once more making the hold fail
  
  Tested by:pho

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cTue Oct 27 18:11:11 2020(r367088)
+++ head/sys/kern/vfs_subr.cTue Oct 27 18:12:07 2020(r367089)
@@ -109,7 +109,7 @@ static void syncer_shutdown(void *arg, int howto);
 static int vtryrecycle(struct vnode *vp);
 static voidv_init_counters(struct vnode *);
 static voidvgonel(struct vnode *);
-static boolvhold_recycle(struct vnode *);
+static boolvhold_recycle_free(struct vnode *);
 static voidvfs_knllock(void *arg);
 static voidvfs_knlunlock(void *arg);
 static voidvfs_knl_assert_locked(void *arg);
@@ -561,6 +561,11 @@ vnode_init(void *mem, int size, int flags)
 
vp->v_dbatchcpu = NOCPU;
 
+   /*
+* Check vhold_recycle_free for an explanation.
+*/
+   vp->v_holdcnt = VHOLD_NO_SMR;
+   vp->v_type = VNON;
mtx_lock(_list_mtx);
TAILQ_INSERT_BEFORE(vnode_list_free_marker, vp, v_vnodelist);
mtx_unlock(_list_mtx);
@@ -1127,8 +1132,25 @@ restart:
goto next_iter;
}
 
-   if (!vhold_recycle(vp))
+   /*
+* Handle races against vnode allocation. Filesystems lock the
+* vnode some time after it gets returned from getnewvnode,
+* despite type and hold count being manipulated earlier.
+* Resorting to checking v_mount restores guarantees present
+* before the global list was reworked to contain all vnodes.
+*/
+   if (!VI_TRYLOCK(vp))
goto next_iter;
+   if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) {
+   VI_UNLOCK(vp);
+   goto next_iter;
+   }
+   if (vp->v_mount == NULL) {
+   VI_UNLOCK(vp);
+   goto next_iter;
+   }
+   vholdl(vp);
+   VI_UNLOCK(vp);
TAILQ_REMOVE(_list, mvp, v_vnodelist);
TAILQ_INSERT_AFTER(_list, vp, mvp, v_vnodelist);
mtx_unlock(_list_mtx);
@@ -1228,13 +1250,13 @@ restart:
mp->mnt_op != mnt_op)) {
continue;
}
-   TAILQ_REMOVE(_list, mvp, v_vnodelist);
-   TAILQ_INSERT_AFTER(_list, vp, mvp, v_vnodelist);
if (__predict_false(vp->v_type == VBAD || vp->v_type == VNON)) {
continue;
}
-   if (!vhold_recycle(vp))
+   if (!vhold_recycle_free(vp))
continue;
+   TAILQ_REMOVE(_list, mvp, v_vnodelist);
+   TAILQ_INSERT_AFTER(_list, vp, mvp, v_vnodelist);
count--;
mtx_unlock(_list_mtx);
vtryrecycle(vp);
@@ -3251,11 +3273,13 @@ vholdnz(struct vnode *vp)
  * However, while this is more performant, it hinders debugging by eliminating
  * the previously mentioned invariant.
  */
-static bool __always_inline
-_vhold_cond(struct vnode *vp)
+bool
+vhold_smr(struct vnode *vp)
 {
int count;
 
+   VFS_SMR_ASSERT_ENTERED();
+
count = atomic_load_int(>v_holdcnt);
for (;;) {
if (count & VHOLD_NO_SMR) {
@@ -3263,7 +3287,6 @@ _vhold_cond(struct vnode *vp)
("non-zero hold count with flags %d\n", count));
return (false);
}
-
VNASSERT(count >= 0, vp, ("invalid hold count %d\n", count));
if (atomic_fcmpset_int(>v_holdcnt, , count + 1)) {
if (count == 0)
@@ -3273,26 +3296,45 @@ 

svn commit: r367088 - head/sys/sys

2020-10-27 Thread Mateusz Guzik
Author: mjg
Date: Tue Oct 27 18:11:11 2020
New Revision: 367088
URL: https://svnweb.freebsd.org/changeset/base/367088

Log:
  refcount: make it atomic-clean
  
  While here consistently use 'old' in all places.
  
  Tested by:pho

Modified:
  head/sys/sys/refcount.h

Modified: head/sys/sys/refcount.h
==
--- head/sys/sys/refcount.h Tue Oct 27 18:08:33 2020(r367087)
+++ head/sys/sys/refcount.h Tue Oct 27 18:11:11 2020(r367088)
@@ -63,7 +63,7 @@ refcount_init(volatile u_int *count, u_int value)
 {
KASSERT(!REFCOUNT_SATURATED(value),
("invalid initial refcount value %u", value));
-   *count = value;
+   atomic_store_int(count, value);
 }
 
 static __inline u_int
@@ -95,13 +95,14 @@ refcount_acquiren(volatile u_int *count, u_int n)
 static __inline __result_use_check bool
 refcount_acquire_checked(volatile u_int *count)
 {
-   u_int lcount;
+   u_int old;
 
-   for (lcount = *count;;) {
-   if (__predict_false(REFCOUNT_SATURATED(lcount + 1)))
+   old = atomic_load_int(count);
+   for (;;) {
+   if (__predict_false(REFCOUNT_SATURATED(old + 1)))
return (false);
-   if (__predict_true(atomic_fcmpset_int(count, ,
-   lcount + 1) == 1))
+   if (__predict_true(atomic_fcmpset_int(count, ,
+   old + 1) == 1))
return (true);
}
 }
@@ -115,7 +116,7 @@ refcount_acquire_if_gt(volatile u_int *count, u_int n)
 {
u_int old;
 
-   old = *count;
+   old = atomic_load_int(count);
for (;;) {
if (old <= n)
return (false);
@@ -174,7 +175,7 @@ refcount_release_if_gt(volatile u_int *count, u_int n)
 
KASSERT(n > 0,
("refcount_release_if_gt: Use refcount_release for final ref"));
-   old = *count;
+   old = atomic_load_int(count);
for (;;) {
if (old <= n)
return (false);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367087 - head/lib/libc/sys

2020-10-27 Thread Alan Cox
Author: alc
Date: Tue Oct 27 18:08:33 2020
New Revision: 367087
URL: https://svnweb.freebsd.org/changeset/base/367087

Log:
  Revise the description of MAP_STACK.  In particular, describe the guard
  in more detail.
  
  Reviewed by:  bcr, kib, markj
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D26908

Modified:
  head/lib/libc/sys/mmap.2

Modified: head/lib/libc/sys/mmap.2
==
--- head/lib/libc/sys/mmap.2Tue Oct 27 17:25:40 2020(r367086)
+++ head/lib/libc/sys/mmap.2Tue Oct 27 18:08:33 2020(r367087)
@@ -28,7 +28,7 @@
 .\"@(#)mmap.2  8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd October 21, 2020
+.Dd October 27, 2020
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -319,9 +319,30 @@ Modifications are private.
 .It Dv MAP_SHARED
 Modifications are shared.
 .It Dv MAP_STACK
+Creates both a mapped region that grows downward on demand and an
+adjoining guard that both reserves address space for the mapped region
+to grow into and limits the mapped region's growth.
+Together, the mapped region and the guard occupy
+.Fa len
+bytes of the address space.
+The guard starts at the returned address, and the mapped region ends at
+the returned address plus
+.Fa len
+bytes.
+Upon access to the guard, the mapped region automatically grows in size,
+and the guard shrinks by an equal amount.
+Essentially, the boundary between the guard and the mapped region moves
+downward so that the access falls within the enlarged mapped region.
+However, the guard will never shrink to less than the number of pages
+specified by the sysctl
+.Dv security.bsd.stack_guard_page ,
+thereby ensuring that a gap for detecting stack overflow always exists
+between the downward growing mapped region and the closest mapped region
+beneath it.
+.Pp
 .Dv MAP_STACK
 implies
-.Dv MAP_ANON ,
+.Dv MAP_ANON
 and
 .Fa offset
 of 0.
@@ -334,23 +355,6 @@ must include at least
 .Dv PROT_READ
 and
 .Dv PROT_WRITE .
-.Pp
-This option creates
-a memory region that grows to at most
-.Fa len
-bytes in size, starting from the stack top and growing down.
-The
-stack top is the starting address returned by the call, plus
-.Fa len
-bytes.
-The bottom of the stack at maximum growth is the starting
-address returned by the call.
-.Pp
-Stacks created with
-.Dv MAP_STACK
-automatically grow.
-Guards prevent inadvertent use of the regions into which those
-stacks can grow without requiring mapping the whole stack in advance.
 The size of the guard, in pages, is specified by sysctl
 .Dv security.bsd.stack_guard_page .
 .El
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367086 - release/12.2.0

2020-10-27 Thread Glen Barber
Author: gjb
Date: Tue Oct 27 17:25:40 2020
New Revision: 367086
URL: https://svnweb.freebsd.org/changeset/base/367086

Log:
  Tag releng/12.2@r366954 as release/12.2.0 (12.2-RELEASE).
  
  Approved by:  re (implicit)
  Sponsored by: Rubicon Communications, LLC (netgate.com)

Added:
  release/12.2.0/
 - copied from r366954, releng/12.2/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r366993 - head/sys/net

2020-10-27 Thread Alexander Richardson
On Sat, 24 Oct 2020 at 13:52, Alexey Dokuchaev  wrote:
>
> On Sat, Oct 24, 2020 at 10:23:22AM +, Hans Petter Selasky wrote:
> > New Revision: 366993
> > URL: https://svnweb.freebsd.org/changeset/base/366993
> >
> > Log:
> >   Run code through "clang-format -style=file" with some additional fixes.
> >   No functional change.
> >
> > ...
> > @@ -99,8 +97,8 @@ infiniband_ipv4_multicast_map(uint32_t addr,
> >
> >  #ifdef INET6
> >  static inline void
> > -infiniband_ipv6_multicast_map(const struct in6_addr *addr,
> > -const uint8_t *broadcast, uint8_t *buf)
> > +infiniband_ipv6_multicast_map(
> > +const struct in6_addr *addr, const uint8_t *broadcast, uint8_t *buf)
> >  {
>
> This is not how we format these in FreeBSD, please revert.  It was correct
> before and no "fix" is need here.
>
> ./danfe

Unfortunately this is a limitation of the current clang-format
version. I've submitted a patch upstream as
https://reviews.llvm.org/D90246 and the config file change is
https://reviews.freebsd.org/D26978.

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


svn commit: r367084 - head/sys/arm64/arm64

2020-10-27 Thread Ruslan Bukin
Author: br
Date: Tue Oct 27 15:18:10 2020
New Revision: 367084
URL: https://svnweb.freebsd.org/changeset/base/367084

Log:
  Take the ITS device lock around gicv3_its_release_irqsrc() since that
  function checks that the mutex lock is owned.
  
  This fixes 'devctl disable re0' operation.
  
  Sponsored by: Innovate DSbD
  Differential Revision:https://reviews.freebsd.org/D26904

Modified:
  head/sys/arm64/arm64/gicv3_its.c

Modified: head/sys/arm64/arm64/gicv3_its.c
==
--- head/sys/arm64/arm64/gicv3_its.cTue Oct 27 15:10:50 2020
(r367083)
+++ head/sys/arm64/arm64/gicv3_its.cTue Oct 27 15:18:10 2020
(r367084)
@@ -1418,7 +1418,9 @@ gicv3_its_release_msix(device_t dev, device_t child, s
 
sc = device_get_softc(dev);
girq = (struct gicv3_its_irqsrc *)isrc;
+   mtx_lock_spin(>sc_its_dev_lock);
gicv3_its_release_irqsrc(sc, girq);
+   mtx_unlock_spin(>sc_its_dev_lock);
its_dev->lpis.lpi_busy--;
 
if (its_dev->lpis.lpi_busy == 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367085 - head/sys/arm64/include

2020-10-27 Thread Ruslan Bukin
Author: br
Date: Tue Oct 27 15:29:53 2020
New Revision: 367085
URL: https://svnweb.freebsd.org/changeset/base/367085

Log:
  o Add the domain member to the struct bus_dma_tag_common as required by
busdma_iommu.c.
  o Add tag_set_domain() pointer to the struct bus_dma_impl as well.
  
  Sponsored by: Innovate DSbD

Modified:
  head/sys/arm64/include/bus_dma_impl.h

Modified: head/sys/arm64/include/bus_dma_impl.h
==
--- head/sys/arm64/include/bus_dma_impl.h   Tue Oct 27 15:18:10 2020
(r367084)
+++ head/sys/arm64/include/bus_dma_impl.h   Tue Oct 27 15:29:53 2020
(r367085)
@@ -48,6 +48,7 @@ struct bus_dma_tag_common {
bus_dma_lock_t   *lockfunc;
void *lockfuncarg;
int   ref_count;
+   int   domain;
 };
 
 struct bus_dma_impl {
@@ -58,6 +59,7 @@ struct bus_dma_impl {
bus_size_t maxsegsz, int flags, bus_dma_lock_t *lockfunc,
void *lockfuncarg, bus_dma_tag_t *dmat);
int (*tag_destroy)(bus_dma_tag_t dmat);
+   int (*tag_set_domain)(bus_dma_tag_t);
bool (*id_mapped)(bus_dma_tag_t, vm_paddr_t, bus_size_t);
int (*map_create)(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp);
int (*map_destroy)(bus_dma_tag_t dmat, bus_dmamap_t map);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367083 - vendor/unbound/1.12.0

2020-10-27 Thread Cy Schubert
Author: cy
Date: Tue Oct 27 15:10:50 2020
New Revision: 367083
URL: https://svnweb.freebsd.org/changeset/base/367083

Log:
  Tag unbound 1.12.0.

Added:
  vendor/unbound/1.12.0/
 - copied from r367082, vendor/unbound/dist/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367082 - in vendor/unbound/dist: . contrib daemon dnstap doc dynlibmod iterator libunbound pythonmod pythonmod/doc/modules pythonmod/examples services services/cache sldns smallapp tes...

2020-10-27 Thread Cy Schubert
Author: cy
Date: Tue Oct 27 15:09:16 2020
New Revision: 367082
URL: https://svnweb.freebsd.org/changeset/base/367082

Log:
  Vendor import of Unbound 1.12.0.

Added:
  vendor/unbound/dist/testcode/dohclient.c   (contents, props changed)
  vendor/unbound/dist/testdata/doh_downstream.tdir/
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.conf   
(contents, props changed)
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.dsc
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.post
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.pre
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.test
  vendor/unbound/dist/testdata/doh_downstream.tdir/doh_downstream.testns
  vendor/unbound/dist/testdata/doh_downstream.tdir/unbound_server.key
  vendor/unbound/dist/testdata/doh_downstream.tdir/unbound_server.pem
  vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.conf
   (contents, props changed)
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.dsc
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.post
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.pre
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/doh_downstream_buffer_size.test
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/unbound_server.key
  
vendor/unbound/dist/testdata/doh_downstream_buffer_size.tdir/unbound_server.pem
  vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/
  
vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.conf
   (contents, props changed)
  
vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.dsc
  
vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.post
  
vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.pre
  
vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/doh_downstream_endpoint.test
  vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/unbound_server.key
  vendor/unbound/dist/testdata/doh_downstream_endpoint.tdir/unbound_server.pem
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/
  
vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.conf  
 (contents, props changed)
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.dsc
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.post
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.pre
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.test
  
vendor/unbound/dist/testdata/doh_downstream_post.tdir/doh_downstream_post.testns
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/unbound_server.key
  vendor/unbound/dist/testdata/doh_downstream_post.tdir/unbound_server.pem
  vendor/unbound/dist/testdata/edns_client_tag.rpl
  vendor/unbound/dist/testdata/stat_values.tdir/
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.conf   (contents, 
props changed)
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.dsc
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.post
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.pre
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.test
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.testexpiredns
  vendor/unbound/dist/testdata/stat_values.tdir/stat_values.testns
  vendor/unbound/dist/testdata/stat_values.tdir/unbound_control.key
  vendor/unbound/dist/testdata/stat_values.tdir/unbound_control.pem
  vendor/unbound/dist/testdata/stat_values.tdir/unbound_server.key
  vendor/unbound/dist/testdata/stat_values.tdir/unbound_server.pem
Deleted:
  vendor/unbound/dist/testdata/dlv_anchor.rpl
  vendor/unbound/dist/testdata/dlv_ask_higher.rpl
  vendor/unbound/dist/testdata/dlv_below_ta.rpl
  vendor/unbound/dist/testdata/dlv_delegation.rpl
  vendor/unbound/dist/testdata/dlv_ds_lookup.rpl
  vendor/unbound/dist/testdata/dlv_insecure.rpl
  vendor/unbound/dist/testdata/dlv_insecure_negcache.rpl
  vendor/unbound/dist/testdata/dlv_keyretry.rpl
  vendor/unbound/dist/testdata/dlv_negnx.rpl
  vendor/unbound/dist/testdata/dlv_optout.rpl
  vendor/unbound/dist/testdata/dlv_remove.rpl
  vendor/unbound/dist/testdata/dlv_remove_empty.rpl
  vendor/unbound/dist/testdata/dlv_remove_nodel.rpl
  vendor/unbound/dist/testdata/dlv_remove_pos.rpl
  vendor/unbound/dist/testdata/dlv_unused.rpl
  vendor/unbound/dist/testdata/domain_insec_dlv.rpl
  vendor/unbound/dist/testdata/fwddlv_parse.rpl
  vendor/unbound/dist/testdata/val_unalgo_dlv.rpl
Modified:
  vendor/unbound/dist/.gitignore
  vendor/unbound/dist/Makefile.in
  vendor/unbound/dist/README.md
  vendor/unbound/dist/acx_nlnetlabs.m4
  vendor/unbound/dist/config.guess
  

svn commit: r367081 - head/sys/arm64/arm64

2020-10-27 Thread Mark Johnston
Author: markj
Date: Tue Oct 27 13:27:47 2020
New Revision: 367081
URL: https://svnweb.freebsd.org/changeset/base/367081

Log:
  arm64: Remove a racy KASSERT from pmap_remove_pages()
  
  PCPU_GET(curpmap) expands to multiple instructions on arm64, and if the
  current thread is migrated in between execution of those instructions, a
  stale value may be used in the assertion condition.
  
  Diagnosed by: mmel
  Reported by:  mmel, Bob Prohaska 
  Submitted by: alc
  MFC after:1 week

Modified:
  head/sys/arm64/arm64/pmap.c

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Tue Oct 27 13:13:04 2020(r367080)
+++ head/sys/arm64/arm64/pmap.c Tue Oct 27 13:27:47 2020(r367081)
@@ -4838,8 +4838,6 @@ pmap_remove_pages(pmap_t pmap)
int allfree, field, freed, idx, lvl;
vm_paddr_t pa;
 
-   KASSERT(pmap == PCPU_GET(curpmap), ("non-current pmap %p", pmap));
-
lock = NULL;
 
SLIST_INIT();
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367080 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux compat/freebsd32 i386/linux kern

2020-10-27 Thread Kyle Evans
Author: kevans
Date: Tue Oct 27 13:13:04 2020
New Revision: 367080
URL: https://svnweb.freebsd.org/changeset/base/367080

Log:
  MFC r367002, r367060
  
  r367002:
  audit: correct reporting of *execve(2) success
  
  r326145 corrected do_execve() to return EJUSTRETURN upon success so that
  important registers are not clobbered. This had the side effect of tapping
  out 'failures' for all *execve(2) audit records, which is less than useful
  for auditing purposes.
  
  Audit exec returns earlier, where we can know for sure that EJUSTRETURN
  translates to success. Note that this unsets TDP_AUDITREC as we commit the
  audit record, so the usual audit in the syscall return path will do nothing.
  
  r367060:
  audit: also correctly audit linux_execve()
  
  Linux execve() gets audited as AUE_EXECVE as well, we should also interpret
  the return from this correctly for the same reasoning as in r367002.
  
  PR:   249179, 242938

Modified:
  stable/12/sys/amd64/linux/linux_machdep.c
  stable/12/sys/amd64/linux32/linux32_machdep.c
  stable/12/sys/arm64/linux/linux_machdep.c
  stable/12/sys/compat/freebsd32/freebsd32_misc.c
  stable/12/sys/i386/linux/linux_machdep.c
  stable/12/sys/kern/kern_exec.c
  stable/12/sys/kern/subr_syscall.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/linux/linux_machdep.c
==
--- stable/12/sys/amd64/linux/linux_machdep.c   Tue Oct 27 12:49:40 2020
(r367079)
+++ stable/12/sys/amd64/linux/linux_machdep.c   Tue Oct 27 13:13:04 2020
(r367080)
@@ -81,6 +81,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -107,6 +109,7 @@ linux_execve(struct thread *td, struct linux_execve_ar
free(path, M_TEMP);
if (error == 0)
error = linux_common_execve(td, );
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td);
return (error);
 }
 

Modified: stable/12/sys/amd64/linux32/linux32_machdep.c
==
--- stable/12/sys/amd64/linux32/linux32_machdep.c   Tue Oct 27 12:49:40 
2020(r367079)
+++ stable/12/sys/amd64/linux32/linux32_machdep.c   Tue Oct 27 13:13:04 
2020(r367080)
@@ -69,6 +69,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -138,6 +140,7 @@ linux_execve(struct thread *td, struct linux_execve_ar
free(path, M_TEMP);
if (error == 0)
error = linux_common_execve(td, );
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td);
return (error);
 }
 

Modified: stable/12/sys/arm64/linux/linux_machdep.c
==
--- stable/12/sys/arm64/linux/linux_machdep.c   Tue Oct 27 12:49:40 2020
(r367079)
+++ stable/12/sys/arm64/linux/linux_machdep.c   Tue Oct 27 13:13:04 2020
(r367080)
@@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -74,6 +76,7 @@ linux_execve(struct thread *td, struct linux_execve_ar
free(path, M_TEMP);
if (error == 0)
error = linux_common_execve(td, );
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td);
return (error);
 }
 

Modified: stable/12/sys/compat/freebsd32/freebsd32_misc.c
==
--- stable/12/sys/compat/freebsd32/freebsd32_misc.c Tue Oct 27 12:49:40 
2020(r367079)
+++ stable/12/sys/compat/freebsd32/freebsd32_misc.c Tue Oct 27 13:13:04 
2020(r367080)
@@ -440,6 +440,7 @@ freebsd32_execve(struct thread *td, struct freebsd32_e
if (error == 0)
error = kern_execve(td, , NULL, oldvmspace);
post_execve(td, error, oldvmspace);
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td);
return (error);
 }
 
@@ -460,6 +461,7 @@ freebsd32_fexecve(struct thread *td, struct freebsd32_
error = kern_execve(td, , NULL, oldvmspace);
}
post_execve(td, error, oldvmspace);
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td);
return (error);
 }
 

Modified: stable/12/sys/i386/linux/linux_machdep.c
==
--- stable/12/sys/i386/linux/linux_machdep.cTue Oct 27 12:49:40 2020
(r367079)
+++ stable/12/sys/i386/linux/linux_machdep.cTue Oct 27 13:13:04 2020
(r367080)
@@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -111,6 +113,7 @@ linux_execve(struct thread *td, struct linux_execve_ar
free(newpath, M_TEMP);
if (error == 0)
error = linux_common_execve(td, );
+   AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 

Re: svn commit: r367076 - head/usr.bin/diff

2020-10-27 Thread Kyle Evans
On Tue, Oct 27, 2020 at 7:57 AM Baptiste Daroussin  wrote:
>
> On Tue, Oct 27, 2020 at 12:27:26PM +, Kyle Evans wrote:
> > Author: kevans
> > Date: Tue Oct 27 12:27:26 2020
> > New Revision: 367076
> > URL: https://svnweb.freebsd.org/changeset/base/367076
> >
> > Log:
> >   diff: don't force the format to 'context' with -p immediately
> >
> >   Instead, leave the fomat as unspecified (if it hasn't been) and use the
> >   -p flag as a hint to 'context' if no other formatting option is specified.
> >
> >   This fixes `diff -purw`, used frequently by emaste, and matches the 
> > behavior
> >   of its GNU counterpart.
> >
> >   PR: 250015
> >   Reviewed by:emaste
> >   MFC after:  1 week
> >
> > Modified:
> >   head/usr.bin/diff/diff.c
> >
> > Modified: head/usr.bin/diff/diff.c
> > ==
> > --- head/usr.bin/diff/diff.c  Tue Oct 27 11:29:11 2020(r367075)
> > +++ head/usr.bin/diff/diff.c  Tue Oct 27 12:27:26 2020(r367076)
> > @@ -210,17 +210,6 @@ main(int argc, char **argv)
> >   diff_format = D_NREVERSE;
> >   break;
> >   case 'p':
> > - /*
> > -  * If it's not unset and it's not set to context or
> > -  * unified, we'll error out here as a conflicting
> > -  * format.  If it's unset, we'll go ahead and set it 
> > to
> > -  * context.
> > -  */
> > - if (FORMAT_MISMATCHED(D_CONTEXT) &&
> > - FORMAT_MISMATCHED(D_UNIFIED))
> > - conflicting_format();
> > - if (diff_format == D_UNSET)
> > - diff_format = D_CONTEXT;
> >   dflags |= D_PROTOTYPE;
> >   break;
> >   case 'P':
> > @@ -320,6 +309,8 @@ main(int argc, char **argv)
> >   newarg = optind != prevoptind;
> >   prevoptind = optind;
> >   }
> > + if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0)
> > + diff_format = D_CONTEXT;
> >   if (diff_format == D_UNSET)
> >   diff_format = D_NORMAL;
> >   argc -= optind;
>
> I think it would be great to have a test to ensure we don't break it in the
> futur.
>

Yeah, I had the same thought right after :wq :-) I'll whip up a test
this afternoon.

Thanks,

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


Re: svn commit: r367076 - head/usr.bin/diff

2020-10-27 Thread Baptiste Daroussin
On Tue, Oct 27, 2020 at 12:27:26PM +, Kyle Evans wrote:
> Author: kevans
> Date: Tue Oct 27 12:27:26 2020
> New Revision: 367076
> URL: https://svnweb.freebsd.org/changeset/base/367076
> 
> Log:
>   diff: don't force the format to 'context' with -p immediately
>   
>   Instead, leave the fomat as unspecified (if it hasn't been) and use the
>   -p flag as a hint to 'context' if no other formatting option is specified.
>   
>   This fixes `diff -purw`, used frequently by emaste, and matches the behavior
>   of its GNU counterpart.
>   
>   PR: 250015
>   Reviewed by:emaste
>   MFC after:  1 week
> 
> Modified:
>   head/usr.bin/diff/diff.c
> 
> Modified: head/usr.bin/diff/diff.c
> ==
> --- head/usr.bin/diff/diff.c  Tue Oct 27 11:29:11 2020(r367075)
> +++ head/usr.bin/diff/diff.c  Tue Oct 27 12:27:26 2020(r367076)
> @@ -210,17 +210,6 @@ main(int argc, char **argv)
>   diff_format = D_NREVERSE;
>   break;
>   case 'p':
> - /*
> -  * If it's not unset and it's not set to context or
> -  * unified, we'll error out here as a conflicting
> -  * format.  If it's unset, we'll go ahead and set it to
> -  * context.
> -  */
> - if (FORMAT_MISMATCHED(D_CONTEXT) &&
> - FORMAT_MISMATCHED(D_UNIFIED))
> - conflicting_format();
> - if (diff_format == D_UNSET)
> - diff_format = D_CONTEXT;
>   dflags |= D_PROTOTYPE;
>   break;
>   case 'P':
> @@ -320,6 +309,8 @@ main(int argc, char **argv)
>   newarg = optind != prevoptind;
>   prevoptind = optind;
>   }
> + if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0)
> + diff_format = D_CONTEXT;
>   if (diff_format == D_UNSET)
>   diff_format = D_NORMAL;
>   argc -= optind;

I think it would be great to have a test to ensure we don't break it in the
futur.

Bapt


signature.asc
Description: PGP signature


svn commit: r367079 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux

2020-10-27 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Oct 27 12:49:40 2020
New Revision: 367079
URL: https://svnweb.freebsd.org/changeset/base/367079

Log:
  Fix misnomer - linux_to_bsd_errno() does the exact opposite.
  
  Reported by:  arichardson
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D26965

Modified:
  head/sys/amd64/linux/linux_sysvec.c
  head/sys/amd64/linux32/linux32_sysvec.c
  head/sys/arm64/linux/linux_sysvec.c
  head/sys/compat/linux/linux.h
  head/sys/compat/linux/linux_errno.c
  head/sys/compat/linux/linux_socket.c
  head/sys/i386/linux/linux_sysvec.c

Modified: head/sys/amd64/linux/linux_sysvec.c
==
--- head/sys/amd64/linux/linux_sysvec.c Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/amd64/linux/linux_sysvec.c Tue Oct 27 12:49:40 2020
(r367079)
@@ -231,7 +231,7 @@ linux_set_syscall_retval(struct thread *td, int error)
break;
 
default:
-   frame->tf_rax = linux_to_bsd_errno(error);
+   frame->tf_rax = bsd_to_linux_errno(error);
frame->tf_r10 = frame->tf_rcx;
break;
}

Modified: head/sys/amd64/linux32/linux32_sysvec.c
==
--- head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/amd64/linux32/linux32_sysvec.c Tue Oct 27 12:49:40 2020
(r367079)
@@ -678,7 +678,7 @@ linux32_set_syscall_retval(struct thread *td, int erro
 
if (__predict_false(error != 0)) {
if (error != ERESTART && error != EJUSTRETURN)
-   frame->tf_rax = linux_to_bsd_errno(error);
+   frame->tf_rax = bsd_to_linux_errno(error);
}
 }
 

Modified: head/sys/arm64/linux/linux_sysvec.c
==
--- head/sys/arm64/linux/linux_sysvec.c Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/arm64/linux/linux_sysvec.c Tue Oct 27 12:49:40 2020
(r367079)
@@ -142,10 +142,8 @@ linux_set_syscall_retval(struct thread *td, int error)
cpu_set_syscall_retval(td, error);
 
if (__predict_false(error != 0)) {
-   if (error != ERESTART && error != EJUSTRETURN) {
-   td->td_frame->tf_x[0] =
-   linux_to_bsd_errno(error);
-   }
+   if (error != ERESTART && error != EJUSTRETURN)
+   td->td_frame->tf_x[0] = bsd_to_linux_errno(error);
}
 }
 

Modified: head/sys/compat/linux/linux.h
==
--- head/sys/compat/linux/linux.h   Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/compat/linux/linux.h   Tue Oct 27 12:49:40 2020
(r367079)
@@ -196,6 +196,6 @@ int linux_to_bsd_bits_(int value, struct bsd_to_linux_
}
 #defineBITMAP_1t1_LINUX(_name) BITMAP_EASY_LINUX(_name, LINUX_##_name)
 
-int linux_to_bsd_errno(int error);
+int bsd_to_linux_errno(int error);
 
 #endif /* _LINUX_MI_H_ */

Modified: head/sys/compat/linux/linux_errno.c
==
--- head/sys/compat/linux/linux_errno.c Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/compat/linux/linux_errno.c Tue Oct 27 12:49:40 2020
(r367079)
@@ -11,7 +11,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 int
-linux_to_bsd_errno(int error)
+bsd_to_linux_errno(int error)
 {
 
KASSERT(error >= 0 && error <= ELAST,

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cTue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/compat/linux/linux_socket.cTue Oct 27 12:49:40 2020
(r367079)
@@ -1559,7 +1559,7 @@ linux_getsockopt(struct thread *td, struct linux_getso
name, , UIO_SYSSPACE, );
if (error != 0)
return (error);
-   newval = -linux_to_bsd_errno(newval);
+   newval = -bsd_to_linux_errno(newval);
return (copyout(, PTRIN(args->optval), len));
/* NOTREACHED */
default:

Modified: head/sys/i386/linux/linux_sysvec.c
==
--- head/sys/i386/linux/linux_sysvec.c  Tue Oct 27 12:44:49 2020
(r367078)
+++ head/sys/i386/linux/linux_sysvec.c  Tue Oct 27 12:49:40 2020
(r367079)
@@ -800,7 +800,7 @@ linux_set_syscall_retval(struct thread *td, int error)
 
if (__predict_false(error != 0)) {
if (error != ERESTART && error != EJUSTRETURN)
-   frame->tf_eax = 

svn commit: r367078 - head/sys/riscv/riscv

2020-10-27 Thread Kristof Provost
Author: kp
Date: Tue Oct 27 12:44:49 2020
New Revision: 367078
URL: https://svnweb.freebsd.org/changeset/base/367078

Log:
  riscv: Minor cleanup in startup code
  
   - remove setting of register value which is not used until the next value is
 set
   - Use the L2_SHIFT constant when setting up L2 superpages
  
  Submitted by: Antonin Houska 

Modified:
  head/sys/riscv/riscv/locore.S

Modified: head/sys/riscv/riscv/locore.S
==
--- head/sys/riscv/riscv/locore.S   Tue Oct 27 12:32:17 2020
(r367077)
+++ head/sys/riscv/riscv/locore.S   Tue Oct 27 12:44:49 2020
(r367078)
@@ -135,10 +135,9 @@ pagetables:
 
/* Level 2 superpages (512 x 2MiB) */
lla s1, pagetable_l2
-   srlit4, s9, 21  /* Div physmem base by 2 MiB */
+   srlit4, s9, L2_SHIFT/* Div physmem base by 2 MiB */
li  t2, 512 /* Build 512 entries */
add t3, t4, t2
-   li  t5, 0
li  t0, (PTE_KERN | PTE_X)
 1:
sllit2, t4, PTE_PPN1_S  /* << PTE_PPN1_S */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367077 - head/usr.bin/renice

2020-10-27 Thread Fernando Apesteguía
Author: fernape (ports committer)
Date: Tue Oct 27 12:32:17 2020
New Revision: 367077
URL: https://svnweb.freebsd.org/changeset/base/367077

Log:
  renice(8): Clarify "who" parameters.
  
  There was a question raised in freebsd-questions@ mail list[1] about the
  "who" parameters in this man page. It seems OpenBSD[2] amd NetBSD[3]
  both have more legible descriptions so I borrowed some of their ideas to try
  and make this page clearer.
  
  [1] 
https://lists.freebsd.org/pipermail/freebsd-questions/2020-October/291914.html
  [2] https://man.bsd.lv/renice
  [3] https://man.netbsd.org/renice.8
  
  Approved by:  manpages (bcr@)
  Differential Revision:https://reviews.freebsd.org/D26950

Modified:
  head/usr.bin/renice/renice.8

Modified: head/usr.bin/renice/renice.8
==
--- head/usr.bin/renice/renice.8Tue Oct 27 12:27:26 2020
(r367076)
+++ head/usr.bin/renice/renice.8Tue Oct 27 12:32:17 2020
(r367077)
@@ -28,7 +28,7 @@
 .\" @(#)renice.8   8.1 (Berkeley) 6/9/93
 .\" $FreeBSD$
 .\"
-.Dd June 9, 1993
+.Dd October 27, 2020
 .Dt RENICE 8
 .Os
 .Sh NAME
@@ -37,22 +37,18 @@
 .Sh SYNOPSIS
 .Nm
 .Ar priority
-.Op Oo Fl p Oc Ar pid ...
-.Op Oo Fl g Oc Ar pgrp ...
-.Op Oo Fl u Oc Ar user ...
+.Op Oo Fl gpu Oc Ar target
 .Nm
 .Fl n Ar increment
-.Op Oo Fl p Oc Ar pid ...
-.Op Oo Fl g Oc Ar pgrp ...
-.Op Oo Fl u Oc Ar user ...
+.Op Oo Fl gpu Oc Ar target
 .Sh DESCRIPTION
 The
 .Nm
 utility alters the
 scheduling priority of one or more running processes.
 The following
-.Ar who
-parameters are interpreted as process ID's, process group
+.Ar target
+parameters are interpreted as process ID's (the default), process group
 ID's, user ID's or user names.
 The
 .Nm Ns 'ing
@@ -62,27 +58,25 @@ The
 .Nm Ns 'ing
 of a user causes all processes owned by the user to have
 their scheduling priority altered.
-By default, the processes to be affected are specified by
-their process ID's.
 .Pp
 The following options are available:
 .Bl -tag -width indent
-.It Fl g
-Force
-.Ar who
-parameters to be interpreted as process group ID's.
 .It Fl n
 Instead of changing the specified processes to the given priority,
 interpret the following argument as an increment to be applied to
 the current priority of each process.
-.It Fl u
-Force the
-.Ar who
-parameters to be interpreted as user names or user ID's.
+.It Fl g
+Interpret
+.Ar target
+parameters as process group ID's.
 .It Fl p
-Reset the
-.Ar who
-interpretation to be (the default) process ID's.
+Interpret
+.Ar target
+parameters as process ID's (the default).
+.It Fl u
+Interpret
+.Ar target
+parameters as user names or user ID's.
 .El
 .Pp
 Users other than the super-user may only alter the priority of
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2020-10-27 Thread Kyle Evans
Author: kevans
Date: Tue Oct 27 12:27:26 2020
New Revision: 367076
URL: https://svnweb.freebsd.org/changeset/base/367076

Log:
  diff: don't force the format to 'context' with -p immediately
  
  Instead, leave the fomat as unspecified (if it hasn't been) and use the
  -p flag as a hint to 'context' if no other formatting option is specified.
  
  This fixes `diff -purw`, used frequently by emaste, and matches the behavior
  of its GNU counterpart.
  
  PR:   250015
  Reviewed by:  emaste
  MFC after:1 week

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

Modified: head/usr.bin/diff/diff.c
==
--- head/usr.bin/diff/diff.cTue Oct 27 11:29:11 2020(r367075)
+++ head/usr.bin/diff/diff.cTue Oct 27 12:27:26 2020(r367076)
@@ -210,17 +210,6 @@ main(int argc, char **argv)
diff_format = D_NREVERSE;
break;
case 'p':
-   /*
-* If it's not unset and it's not set to context or
-* unified, we'll error out here as a conflicting
-* format.  If it's unset, we'll go ahead and set it to
-* context.
-*/
-   if (FORMAT_MISMATCHED(D_CONTEXT) &&
-   FORMAT_MISMATCHED(D_UNIFIED))
-   conflicting_format();
-   if (diff_format == D_UNSET)
-   diff_format = D_CONTEXT;
dflags |= D_PROTOTYPE;
break;
case 'P':
@@ -320,6 +309,8 @@ main(int argc, char **argv)
newarg = optind != prevoptind;
prevoptind = optind;
}
+   if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0)
+   diff_format = D_CONTEXT;
if (diff_format == D_UNSET)
diff_format = D_NORMAL;
argc -= optind;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367075 - in head: crypto/openssh/regress/unittests/sshkey lib/libc/nls lib/libfetch sbin/nvmecontrol secure/lib/libssh secure/usr.bin/ssh-agent tools/tools/ath/athprom tools/tools/net8...

2020-10-27 Thread Stefan Eßer
Author: se
Date: Tue Oct 27 11:29:11 2020
New Revision: 367075
URL: https://svnweb.freebsd.org/changeset/base/367075

Log:
  Replace literal uses of /usr/local in C sources with _PATH_LOCALBASE
  
  Literal references to /usr/local exist in a large number of files in
  the FreeBSD base system. Many are in contributed software, in configuration
  files, or in the documentation, but 19 uses have been identified in C
  source files or headers outside the contrib and sys/contrib directories.
  
  This commit makes it possible to set _PATH_LOCALBASE in paths.h to use
  a different prefix for locally installed software.
  
  In order to avoid changes to openssh source files, LOCALBASE is passed to
  the build via Makefiles under src/secure. While _PATH_LOCALBASE could have
  been used here, there is precedent in the construction of the path used to
  a xauth program which depends on the LOCALBASE value passed on the compiler
  command line to select a non-default directory.
  
  This could be changed in a later commit to make the openssh build
  consistently use _PATH_LOCALBASE. It is considered out-of-scope for this
  commit.
  
  Reviewed by:  imp
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D26942

Modified:
  head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
  head/lib/libc/nls/msgcat.c
  head/lib/libfetch/common.c
  head/sbin/nvmecontrol/nvmecontrol.c
  head/secure/lib/libssh/Makefile
  head/secure/usr.bin/ssh-agent/Makefile
  head/tools/tools/ath/athprom/athprom.c
  head/tools/tools/net80211/wesside/wesside/wesside.c
  head/usr.bin/fortune/fortune/pathnames.h
  head/usr.bin/mail/pathnames.h
  head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpimport.c
  head/usr.sbin/cpucontrol/cpucontrol.c
  head/usr.sbin/cron/cron/pathnames.h
  head/usr.sbin/mailwrapper/mailwrapper.c
  head/usr.sbin/pciconf/pathnames.h
  head/usr.sbin/pkg/config.c
  head/usr.sbin/pkg/config.h
  head/usr.sbin/pkg/pkg.c

Modified: head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c
==
--- head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c  Tue Oct 27 
09:53:49 2020(r367074)
+++ head/crypto/openssh/regress/unittests/sshkey/test_sshkey.c  Tue Oct 27 
11:29:11 2020(r367075)
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #ifdef HAVE_STDINT_H
 #include 
@@ -79,7 +80,7 @@ build_cert(struct sshbuf *b, const struct sshkey *k, c
 
critopts = sshbuf_new();
ASSERT_PTR_NE(critopts, NULL);
-   put_opt(critopts, "force-command", "/usr/local/bin/nethack");
+   put_opt(critopts, "force-command", _PATH_LOCALBASE "/bin/nethack");
put_opt(critopts, "source-address", "192.168.0.0/24,127.0.0.1,::1");
 
exts = sshbuf_new();

Modified: head/lib/libc/nls/msgcat.c
==
--- head/lib/libc/nls/msgcat.c  Tue Oct 27 09:53:49 2020(r367074)
+++ head/lib/libc/nls/msgcat.c  Tue Oct 27 11:29:11 2020(r367075)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -58,7 +59,9 @@ __FBSDID("$FreeBSD$");
 
 #include "../locale/xlocale_private.h"
 
-#define _DEFAULT_NLS_PATH 
"/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L"
+#define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:" 
\
+   _PATH_LOCALBASE "/share/nls/%L/%N.cat:" 
\
+   _PATH_LOCALBASE "/share/nls/%N/%L"
 
 #define RLOCK(fail){ int ret;  
\
  if (__isthreaded &&   
\

Modified: head/lib/libfetch/common.c
==
--- head/lib/libfetch/common.c  Tue Oct 27 09:53:49 2020(r367074)
+++ head/lib/libfetch/common.c  Tue Oct 27 11:29:11 2020(r367075)
@@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1071,7 +1072,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verb
 /*
  * Configure peer verification based on environment.
  */
-#define LOCAL_CERT_FILE"/usr/local/etc/ssl/cert.pem"
+#define LOCAL_CERT_FILE_PATH_LOCALBASE "/etc/ssl/cert.pem"
 #define BASE_CERT_FILE "/etc/ssl/cert.pem"
 static int
 fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose)

Modified: head/sbin/nvmecontrol/nvmecontrol.c
==
--- head/sbin/nvmecontrol/nvmecontrol.c Tue Oct 27 09:53:49 2020
(r367074)
+++ head/sbin/nvmecontrol/nvmecontrol.c Tue Oct 27 11:29:11 2020
(r367075)
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
cmd_init();
 

svn commit: r367074 - head/tests

2020-10-27 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Tue Oct 27 09:53:49 2020
New Revision: 367074
URL: https://svnweb.freebsd.org/changeset/base/367074

Log:
  Do not recommend to install kyua with pkg in the tests README
  
  Kyua is now available in the base system.
  
  While here, reword the usage section a bit.

Modified:
  head/tests/README

Modified: head/tests/README
==
--- head/tests/README   Tue Oct 27 09:41:01 2020(r367073)
+++ head/tests/README   Tue Oct 27 09:53:49 2020(r367074)
@@ -1,13 +1,11 @@
 src/tests: The FreeBSD test suite
 =
 
-To run the FreeBSD test suite:
-(1)  Make sure that kyua is installed:
-   pkg install kyua
-(2)  To run the tests:
+Usage of the FreeBSD test suite:
+(1)  Run the tests:
kyua test -k /usr/tests/Kyuafile
-(3)  To see the test results:
-   kyua report  
+(2)  See the test results:
+   kyua report
 
 For further information on using the test suite, read tests(7):
man tests
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367073 - head/usr.bin/backlight

2020-10-27 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Tue Oct 27 09:41:01 2020
New Revision: 367073
URL: https://svnweb.freebsd.org/changeset/base/367073

Log:
  Clean up backlight.8
  
  - Sort flags
  - Stylize incr|+ and decr|- properly
  - Add a missing period at the end of the description
  - Use the standard layout for the EXAMPLES section (remove the list macro
and add indentation to the code block)

Modified:
  head/usr.bin/backlight/backlight.8

Modified: head/usr.bin/backlight/backlight.8
==
--- head/usr.bin/backlight/backlight.8  Tue Oct 27 09:32:06 2020
(r367072)
+++ head/usr.bin/backlight/backlight.8  Tue Oct 27 09:41:01 2020
(r367073)
@@ -22,7 +22,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 06, 2020
+.Dd October 27, 2020
 .Dt BACKLIGHT 8
 .Os
 .Sh NAME
@@ -31,21 +31,21 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl f Ar device
-.Op Fl q
 .Op Fl i
+.Op Fl q
 .Op Ar value
 .Nm
 .Op Fl f Ar device
-incr | +
+.Cm incr Ns | Ns Cm +
 .Op Ar value
 .Nm
 .Op Fl f Ar device
-decr | -
+.Cm decr Ns | Ns Cm -
 .Op Ar value
 .Sh DESCRIPTION
 The
 .Nm
-utility can be used to configure brightness levels for registered backlights
+utility can be used to configure brightness levels for registered backlights.
 .Pp
 The options are as follows:
 .Bl -tag -width "-f device"
@@ -57,30 +57,27 @@ is used.
 If an unqualified name is provided,
 .Pa /dev/backlight
 is automatically prepended.
-.It Fl q
-When querying the brightness level only print the value.
 .It Fl i
 Query information about the backlight (name, type).
+.It Fl q
+When querying the brightness level only print the value.
 .It Ar value
 Set the brightness level to this value, must be between 0 and 100.
-A trailing '%' is valid.
-.It Ar incr | +
-.Op Ar value
+A trailing
+.Dq %
+is valid.
+.It Cm incr Ns | Ns Cm + Op Ar value
 Decrement the backlight level.
 If no value is specified a default of 10 percent is used.
-.It Ar decr | -
-.Op Ar value
+.It Cm decr Ns | Ns Cm - Op Ar value
 Increment the backlight level.
 If no value is specified a default of 10 percent is used.
 .El
 .Sh EXAMPLES
-.Bl -bullet
-.It
 Show the current brightness level
-.Bd -literal
+.Bd -literal -offset indent
 backlight -f /dev/backlight/backlight0
 .Ed
-.El
 .Sh SEE ALSO
 .Xr backlight 9
 .Sh HISTORY
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367072 - head/tools/build

2020-10-27 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Tue Oct 27 09:32:06 2020
New Revision: 367072
URL: https://svnweb.freebsd.org/changeset/base/367072

Log:
  Mount devfs inside a beinstall(8) chroot
  
  It turns out that without /dev/null beinstall is not able to complete and
  instead exits with messages similar to these:
  
--
>>> Installing kernel GENERIC completed on Sun Oct 25 17:47:37 CET 2020
--
/tmp/beinstall.JleGoP/mnt: Inspecting dirs /usr/src 
/usr/obj/usr/src/amd64.amd64
--- installworld ---
make[1]: "/usr/obj/usr/src/amd64.amd64/toolchain-metadata.mk" line 1: Using 
cached toolchain metadata from build at t480 on Sun Oct 25 15:53:28 CET 2020
make[2]: "/dev/null" line 2: Need an operator
make[2]: Fatal errors encountered -- cannot continuemake[1]: 
"/usr/src/Makefile.inc1" line 593: CPUTYPE global should be set with ?=.
Cleaning up ...
umount -f /tmp/beinstall.JleGoP/mnt/usr/src 
/tmp/beinstall.JleGoP/mnt/usr/obj/usr/src/amd64.amd64 /tmp/beinstall.JleGoP/mnt
Destroyed successfully
error: Installworld failed!
  
  Upon a bit of debugging, it turns out that /dev/null inside the chroot
  environment is full random bytes, which cause "make -f /dev/null" to
  misbehave. Mounting a proper devfs inside the chroot seems to be the most
  appropriate way to fix it.
  
  will@ also noted that this change requires that whatever is needed in devfs
  must exist in the old kernel.
  
  Approved by:  will
  MFC after:2 week
  Differential Revision:https://reviews.freebsd.org/D26944

Modified:
  head/tools/build/beinstall.sh

Modified: head/tools/build/beinstall.sh
==
--- head/tools/build/beinstall.sh   Tue Oct 27 06:43:24 2020
(r367071)
+++ head/tools/build/beinstall.sh   Tue Oct 27 09:32:06 2020
(r367072)
@@ -223,6 +223,7 @@ fi
 create_be_dirs "${srcdir}" "${objdir}" || errx "Unable to create BE dirs"
 mount -t nullfs "${srcdir}" "${BE_MNTPT}${srcdir}" || errx "Unable to mount 
src"
 mount -t nullfs "${objdir}" "${BE_MNTPT}${objdir}" || errx "Unable to mount 
obj"
+mount -t devfs devfs "${BE_MNTPT}/dev" || errx "Unable to mount devfs"
 
 chroot ${BE_MNTPT} make "$@" -C ${srcdir} installworld || \
errx "Installworld failed!"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r366962 - in head: include usr.bin/calendar

2020-10-27 Thread Stefan Esser

Am 27.10.20 um 08:37 schrieb Alex Kozlov:

On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote:

So, first off, it's already hard coded. Stefan's changes change the hard
coding from 'impossible to change' to 'changeable with a recompile' which
is an improvement. It might even wind up as a build variable (or not, doing
that has some really ugly, nasty dependencies).

But even in ports-land, it's a compile time constant. Quite a large number
of ports will allow you to change it at compile / build time, but not
after. You have to rebuild if you want to change PREFIX...

So I'm a bit puzzled what makes this the wrong approach?

1) Making it buildtime instead of fixing a few regression cases which as
simple as reading environment variable before fallback to hardcoded /usr/local,
or make it kernel variable/sysctl if security is a concern.


Please provide patches that make the affected programs use a run-time
value for LOCALBASE (start with the base system, but do apply this to
ports that are extensions of the base system functionality to be able
to use packages on such a system with non-default LOCALBASE).

And please show that there are no security issues, that there is no
negative impact on the run-time for the huge majority of installations
that use the default value of LOCALBASE, and that there is no added
complexity to maintain such a system (starting from documentation that
needs to be adapted to a dynamically changeable LOCALBASE).

A compiled-in path is protected against manipulation by an attacker,
and, while a sysctl value could be as well, you ought to be able to
use different LOCALBASE values in jails, to make this really universal.

Please provide an architectural draft that accounts for all these points
and an estimate of the effort required to implement it and be assured
we'll openly discuss it.


2) Codifying LOCALBASE = /usr/local, so from now more people will use
it because it's in defines.


No, the _PATH_LOCALBASE makes it easier to refer to port provided files
*without* hard-coding /usr/local!

But LOCALBASE == /usr/local has been the default for so many decades
that I cannot remember when it started. Probably before BSD-4.2 already,
but we have committers that don't have to guess but have been there ;-)
(I've been a BSD user starting with BSD-4.2, and we have already used
/usr/local for the programs distributed over USENET at that time ...)

A verbatim /usr/local occurs in more than 1700 individual files in base,
and I'm going to remove some 20 of them that get compiled into binaries.

You are welcome to bring this number further down and we are awaiting
your patches.

We do not move base components to ports for fun, but to be able to
disconnect them from the release cycle, to ease outside contributions,
and to reduce the maintenance effort for release-agnostic components
(no need to MFC updates to the calendar files, for example).

And we have to compare the effort caused for the project with the effort
it takes to make FreeBSD use a non-default LOCALBASE for users that
really need it. Those will probably have forked off their own repository
to be able to make much bigger changes to the code base - adjusting the
_PATH_LOCALBASE before building the world is really a minor effort for
them.

And we want to make such a change of LOCALBASE easier than it used to
be for a long time.

If you are affected and the above does not apply to you, then please
provide the patches you probably already have ready since you relied
on them before the introduction of _PATH_LOCALBASE.

Regards, STefan


OpenPGP_signature
Description: OpenPGP digital signature


Re: svn commit: r366962 - in head: include usr.bin/calendar

2020-10-27 Thread Alex Kozlov
On Mon, Oct 26, 2020 at 12:11:56AM -0600, Warner Losh wrote:
> On Mon, Oct 26, 2020 at 12:01 AM Alex Kozlov  wrote:
> 
> > On Sun, Oct 25, 2020 at 11:37:34AM +0100, Stefan Esser wrote:
> > > Am 25.10.20 um 06:56 schrieb Alex Kozlov:
> > > > On Sat, Oct 24, 2020 at 04:37:45PM +0200, Stefan Esser wrote:
> > > > > Am 24.10.20 um 09:48 schrieb Alex Kozlov:
> > > [...]
> > > > > > You are hardcoding assumption that LOCALBASE = /usr/local. Please
> > make it
> > > > > > overridable with LOCALBASE environment variable.
> > > > > This was a trivial change to get us going with calendars provided by
> > > > > a port (which has not been committed, yet - therefore there are no
> > > > > port-provided calendars, neither under /usr/local nor under any other
> > > > > PREFIX, as of now).
> > > >
> > > > > I understand what you are asking for, but in such a case I'd rather
> > > > > think you want to rebuild FreeBSD with _PATH_LOCALBASE modified in
> > > > > paths.h.
> > > > The PREFIX != LOCALBASE and both != /usr/local configurations
> > > > are supported in the ports tree and the base for a long time, please
> > see
> > > >
> > https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/porting-prefix.html
> > >
> > > Yes, and I do not need to look that up in the handbook, having been
> > > a ports committer for 2 decades by now.
> > >
> > > > If after this commit you need to rebuild base to use non-default
> > LOCALBASE/PREFIX
> > > > it is pretty big regression and POLA.
> > >
> > > How is that any different than before?
> > >
> > > What I did is make the PATH easier to change when you rebuild base.
> > >
> > > There are numerous programs in base that contain the literal string
> > > /usr/local - and what I did was implement a mechanism that allows
> > > to replace this literal reference with a simple change in paths.h.
> > >
> > > If you do not modify paths.h for a different LOCALBASE, then you'll
> > > get a wrong _PATH_DEFPATH compiled into your binaries, for example.
> > >
> > > > > And I have made this a single instance that needs to be changed.
> > > > > Before my change there were 2 instances of /usr/local hard-coded
> > > > > in _PATH_DEFPATH - now you have to only change the definition of
> > > > > _PATH_LOCALBASE to adjust all 3 locations that use it.
> > > > I think you made situation worse, there were two stray hardcoded
> > > > string and now there is official LOCALBASE define which likely will be
> > > > used by other people in the future.
> > >
> > > I'd hope so to get rid of many of the 1713 literal uses of /usr/local
> > > in our source tree.
> > >
> > > > > If you can show me precedence of a LOCALBASE environment variable
> > > > > being used in the way you suggest, I'd be willing to make calendar
> > > > > use it.
> > > > Just an analogy from LOCALBASE make variable, perhaps CALENDAR_HOME
> > > > is a better name.
> > >
> > > Yes, I already suggested CALENDAR_HOME, but as an environment variable
> > > to check, if you want to be able to path an additional directory (or
> > > search path) to the calendar program at run-time. But why introduce
> > > a CALENDAR_HOME macro in the sources, if the port supplied calendar
> > > files are known to be found at LOCALBASE/share/calendar (for some value
> > > of LOCALBASE).
> > >
> > > I want to make more programs that currently hard-code /usr/local use
> > > _PATH_LOCALBASE instead. This C macro can then be default to /usr/local
> > > but can be overridden by passing LOCALBASE to the compiler (from the
> > > build infrastructure) when paths.h is included.
> > >
> > > Instead of referring to _PATH_LOCALBASE these files could directly use
> > > LOCALBASE, but since other paths are defined as _PATH_xxx in paths.h I
> > > think it is best to follow this precedent.
> > >
> > > > > But then I think a CALENDAR_HOME variable would be even more useful,
> > > > > since it would allow to search an additional user selected directory
> > > > > (and not just share/calendar within what you provide as LOCALBASE).
> > >
> > > My change did not add any dependency on LOCALBASE to any previously
> > > existing functionality. It added support for calendar files provided
> > > by a port (a feature that did not exist before) at a location that is
> > > correct for the big majority of users (who do not modify LOCALBASE).
> > >
> > > As I said: I'm going to make it easier to build the base system with
> > > a different LOCALBASE, but not by run-time checking an environment
> > > variable that specifies LOCALBASE in each affected program.
> > It seems that you intend to follow through no matter what. So, just for
> > the record, I think that hardcoding LOCALBASE and requiring base rebuild
> > to change it is a very wrong approach.
> >
> 
> So, first off, it's already hard coded. Stefan's changes change the hard
> coding from 'impossible to change' to 'changeable with a recompile' which
> is an improvement. It might even wind up as a build variable (or not, doing
> that has some 

svn commit: r367071 - in head/sys: geom sys

2020-10-27 Thread Warner Losh
Author: imp
Date: Tue Oct 27 06:43:24 2020
New Revision: 367071
URL: https://svnweb.freebsd.org/changeset/base/367071

Log:
  Remove frontstuff
  
  Nothing implements this in the tree. Remove the ioctl and the
  conversion to the geom atttribute stuff.
  
  This was introduced in r94287 in 2002 and was retired in r113390
  2003. It appeared in FreeBSD 5.0, but no other releases. This is a
  vestige that was missed at the time and overlooked until now. No
  compat is provided for this reason.  And there's no implementation of
  it today. And it was never part of a release from a stable branch.
  
  Reviewed by: phk@
  Differential Revision: https://reviews.freebsd.org/D26967

Modified:
  head/sys/geom/geom_dev.c
  head/sys/geom/geom_disk.c
  head/sys/sys/disk.h

Modified: head/sys/geom/geom_dev.c
==
--- head/sys/geom/geom_dev.cTue Oct 27 04:35:47 2020(r367070)
+++ head/sys/geom/geom_dev.cTue Oct 27 06:43:24 2020(r367071)
@@ -550,9 +550,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data
if (error == 0 && *(u_int *)data == 0)
error = ENOENT;
break;
-   case DIOCGFRONTSTUFF:
-   error = g_io_getattr("GEOM::frontstuff", cp, , data);
-   break;
 #ifdef COMPAT_FREEBSD11
case DIOCSKERNELDUMP_FREEBSD11:
{

Modified: head/sys/geom/geom_disk.c
==
--- head/sys/geom/geom_disk.c   Tue Oct 27 04:35:47 2020(r367070)
+++ head/sys/geom/geom_disk.c   Tue Oct 27 06:43:24 2020(r367071)
@@ -498,8 +498,6 @@ g_disk_start(struct bio *bp)
break;
else if (g_handleattr_int(bp, "GEOM::fwheads", dp->d_fwheads))
break;
-   else if (g_handleattr_off_t(bp, "GEOM::frontstuff", 0))
-   break;
else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident))
break;
else if (g_handleattr_str(bp, "GEOM::descr", dp->d_descr))

Modified: head/sys/sys/disk.h
==
--- head/sys/sys/disk.h Tue Oct 27 04:35:47 2020(r367070)
+++ head/sys/sys/disk.h Tue Oct 27 06:43:24 2020(r367071)
@@ -64,14 +64,6 @@ void disk_err(struct bio *bp, const char *what, int bl
 * core dumps.
 */
 
-#defineDIOCGFRONTSTUFF _IOR('d', 134, off_t)
-   /*
-* Many disk formats have some amount of space reserved at the
-* start of the disk to hold bootblocks, various disklabels and
-* similar stuff.  This ioctl returns the number of such bytes
-* which may apply to the device.
-*/
-
 #defineDIOCGFLUSH _IO('d', 135)/* Flush write cache */
/*
 * Flush write cache of the device.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"