svn commit: r360067 - stable/12/libexec/rtld-elf

2020-04-17 Thread Konstantin Belousov
Author: kib
Date: Sat Apr 18 03:14:16 2020
New Revision: 360067
URL: https://svnweb.freebsd.org/changeset/base/360067

Log:
  MFC r359634:
  Make p_vaddr % p_align == p_offset % p_align for (some) TLS segments.

Modified:
  stable/12/libexec/rtld-elf/map_object.c
  stable/12/libexec/rtld-elf/rtld.c
  stable/12/libexec/rtld-elf/rtld.h
  stable/12/libexec/rtld-elf/xmalloc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/libexec/rtld-elf/map_object.c
==
--- stable/12/libexec/rtld-elf/map_object.c Sat Apr 18 03:09:25 2020
(r360066)
+++ stable/12/libexec/rtld-elf/map_object.c Sat Apr 18 03:14:16 2020
(r360067)
@@ -308,6 +308,7 @@ map_object(int fd, const char *path, const struct stat
obj->tlsindex = ++tls_max_index;
obj->tlssize = phtls->p_memsz;
obj->tlsalign = phtls->p_align;
+   obj->tlspoffset = phtls->p_offset;
obj->tlsinitsize = phtls->p_filesz;
obj->tlsinit = mapbase + phtls->p_vaddr;
 }

Modified: stable/12/libexec/rtld-elf/rtld.c
==
--- stable/12/libexec/rtld-elf/rtld.c   Sat Apr 18 03:09:25 2020
(r360066)
+++ stable/12/libexec/rtld-elf/rtld.c   Sat Apr 18 03:14:16 2020
(r360067)
@@ -1454,6 +1454,7 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t e
obj->tlsalign = ph->p_align;
obj->tlsinitsize = ph->p_filesz;
obj->tlsinit = (void*)(ph->p_vaddr + obj->relocbase);
+   obj->tlspoffset = ph->p_offset;
break;
 
case PT_GNU_STACK:
@@ -4821,7 +4822,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb
 Elf_Addr addr;
 Elf_Addr i;
 size_t extra_size, maxalign, post_size, pre_size, tls_block_size;
-size_t tls_init_align;
+size_t tls_init_align, tls_init_offset;
 
 if (oldtcb != NULL && tcbsize == TLS_TCB_SIZE)
return (oldtcb);
@@ -4838,7 +4839,7 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb
 tls_block_size += pre_size + tls_static_space - TLS_TCB_SIZE - post_size;
 
 /* Allocate whole TLS block */
-tls_block = malloc_aligned(tls_block_size, maxalign);
+tls_block = malloc_aligned(tls_block_size, maxalign, 0);
 tcb = (Elf_Addr **)(tls_block + pre_size + extra_size);
 
 if (oldtcb != NULL) {
@@ -4862,15 +4863,21 @@ allocate_tls(Obj_Entry *objs, void *oldtcb, size_t tcb
 
for (obj = globallist_curr(objs); obj != NULL;
  obj = globallist_next(obj)) {
-   if (obj->tlsoffset > 0) {
-   addr = (Elf_Addr)tcb + obj->tlsoffset;
-   if (obj->tlsinitsize > 0)
-   memcpy((void*) addr, obj->tlsinit, obj->tlsinitsize);
-   if (obj->tlssize > obj->tlsinitsize)
-   memset((void*)(addr + obj->tlsinitsize), 0,
-  obj->tlssize - obj->tlsinitsize);
-   dtv[obj->tlsindex + 1] = addr;
+   if (obj->tlsoffset == 0)
+   continue;
+   tls_init_offset = obj->tlspoffset & (obj->tlsalign - 1);
+   addr = (Elf_Addr)tcb + obj->tlsoffset;
+   if (tls_init_offset > 0)
+   memset((void *)addr, 0, tls_init_offset);
+   if (obj->tlsinitsize > 0) {
+   memcpy((void *)(addr + tls_init_offset), obj->tlsinit,
+   obj->tlsinitsize);
}
+   if (obj->tlssize > obj->tlsinitsize) {
+   memset((void *)(addr + tls_init_offset + obj->tlsinitsize),
+   0, obj->tlssize - obj->tlsinitsize - tls_init_offset);
+   }
+   dtv[obj->tlsindex + 1] = addr;
}
 }
 
@@ -4928,7 +4935,7 @@ allocate_tls(Obj_Entry *objs, void *oldtls, size_t tcb
 size = round(tls_static_space, ralign) + round(tcbsize, ralign);
 
 assert(tcbsize >= 2*sizeof(Elf_Addr));
-tls = malloc_aligned(size, ralign);
+tls = malloc_aligned(size, ralign, 0 /* XXX */);
 dtv = xcalloc(tls_max_index + 2, sizeof(Elf_Addr));
 
 segbase = (Elf_Addr)(tls + round(tls_static_space, ralign));
@@ -5021,25 +5028,24 @@ free_tls(void *tls, size_t tcbsize  __unused, size_t t
 void *
 allocate_module_tls(int index)
 {
-Obj_Entry* obj;
-char* p;
+   Obj_Entry *obj;
+   char *p;
 
-TAILQ_FOREACH(obj, _list, next) {
-   if (obj->marker)
-   continue;
-   if (obj->tlsindex == index)
-   break;
-}
-if (!obj) {
-   _rtld_error("Can't find module with TLS index %d", index);
-   rtld_die();
-}
+   TAILQ_FOREACH(obj, _list, next) {
+   if (obj->marker)
+   continue;
+   if (obj->tlsindex == index)
+   break;
+   }
+   if (obj == NULL) {
+   _rtld_error("Can't find module with TLS index %d", index);
+   rtld_die();
+   }
 
-p = 

svn commit: r360066 - head/sys/kern

2020-04-17 Thread Konstantin Belousov
Author: kib
Date: Sat Apr 18 03:09:25 2020
New Revision: 360066
URL: https://svnweb.freebsd.org/changeset/base/360066

Log:
  sendfile: When all io finished, assert that sfio->pa[] is in expected state.
  
  It must contain fully restored contigous run of the wired pages from
  the object, except possible trimmed tail.
  
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_sendfile.c

Modified: head/sys/kern/kern_sendfile.c
==
--- head/sys/kern/kern_sendfile.c   Sat Apr 18 03:07:18 2020
(r360065)
+++ head/sys/kern/kern_sendfile.c   Sat Apr 18 03:09:25 2020
(r360066)
@@ -313,6 +313,24 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, i
if (!refcount_release(>nios))
return;
 
+#ifdef INVARIANTS
+   for (i = 1; i < sfio->npages; i++) {
+   if (sfio->pa[i] == NULL)
+   break;
+   KASSERT(vm_page_wired(sfio->pa[i]),
+   ("sfio %p page %d %p not wired", sfio, i, sfio->pa[i]));
+   if (i == 0)
+   continue;
+   KASSERT(sfio->pa[0]->object == sfio->pa[i]->object,
+   ("sfio %p page %d %p wrong owner %p %p", sfio, i,
+   sfio->pa[i], sfio->pa[0]->object, sfio->pa[i]->object));
+   KASSERT(sfio->pa[0]->pindex + i == sfio->pa[i]->pindex,
+   ("sfio %p page %d %p wrong index %jx %jx", sfio, i,
+   sfio->pa[i], (uintmax_t)sfio->pa[0]->pindex,
+   (uintmax_t)sfio->pa[i]->pindex));
+   }
+#endif
+
vm_object_pip_wakeup(sfio->obj);
 
if (sfio->m == NULL) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360065 - head/sys/kern

2020-04-17 Thread Konstantin Belousov
Author: kib
Date: Sat Apr 18 03:07:18 2020
New Revision: 360065
URL: https://svnweb.freebsd.org/changeset/base/360065

Log:
  The pa argument for sendfile_iodone() is not necessary a slice of sfio->pa.
  
  It is true for zfs, but it is not for e.g. vnode or buffer pagers.
  When fixing bogus pages, fix them in both places.  Rely on the fact
  that pa[0] must have been invalid so it cannot be bogus.
  
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_sendfile.c

Modified: head/sys/kern/kern_sendfile.c
==
--- head/sys/kern/kern_sendfile.c   Sat Apr 18 02:53:19 2020
(r360064)
+++ head/sys/kern/kern_sendfile.c   Sat Apr 18 03:07:18 2020
(r360065)
@@ -295,10 +295,12 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, i
 * unbusied the swapped-in pages, they can become
 * invalid under us.
 */
+   MPASS(count == 0 || pa[0] != bogus_page);
for (i = 0; i < count; i++) {
if (pa[i] == bogus_page) {
-   pa[i] = vm_page_relookup(sfio->obj,
-   sfio->pindex0 + i + (pa - sfio->pa));
+   sfio->pa[(pa[0]->pindex - sfio->pindex0) + i] =
+   pa[i] = vm_page_relookup(sfio->obj,
+   pa[0]->pindex + i);
KASSERT(pa[i] != NULL,
("%s: page %p[%d] disappeared",
__func__, pa, i));
___
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: r360064 - in head: share/man/man4 sys/dev/amr

2020-04-17 Thread Warner Losh
Author: imp
Date: Sat Apr 18 02:53:19 2020
New Revision: 360064
URL: https://svnweb.freebsd.org/changeset/base/360064

Log:
  Add deprecation notice to amr(4)

Modified:
  head/share/man/man4/amr.4
  head/sys/dev/amr/amr_pci.c

Modified: head/share/man/man4/amr.4
==
--- head/share/man/man4/amr.4   Sat Apr 18 02:53:14 2020(r360063)
+++ head/share/man/man4/amr.4   Sat Apr 18 02:53:19 2020(r360064)
@@ -45,6 +45,11 @@ module at boot time, place the following line in
 .Bd -literal -offset indent
 amr_load="YES"
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/sys/dev/amr/amr_pci.c
==
--- head/sys/dev/amr/amr_pci.c  Sat Apr 18 02:53:14 2020(r360063)
+++ head/sys/dev/amr/amr_pci.c  Sat Apr 18 02:53:19 2020(r360064)
@@ -341,6 +341,8 @@ amr_pci_attach(device_t dev)
 out:
 if (error)
amr_pci_free(sc);
+else
+   gone_in_dev(dev, 13, "amr(4) driver");
 return(error);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360062 - in head: share/man/man4 sys/dev/iir

2020-04-17 Thread Warner Losh
Author: imp
Date: Sat Apr 18 02:53:09 2020
New Revision: 360062
URL: https://svnweb.freebsd.org/changeset/base/360062

Log:
  Deprecation notice for iir

Modified:
  head/share/man/man4/iir.4
  head/sys/dev/iir/iir_pci.c

Modified: head/share/man/man4/iir.4
==
--- head/share/man/man4/iir.4   Sat Apr 18 02:53:04 2020(r360061)
+++ head/share/man/man4/iir.4   Sat Apr 18 02:53:09 2020(r360062)
@@ -8,6 +8,11 @@
 .Sh NAME
 .Nm iir
 .Nd Intel Integrated RAID controller and ICP Vortex driver
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0 .
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your

Modified: head/sys/dev/iir/iir_pci.c
==
--- head/sys/dev/iir/iir_pci.c  Sat Apr 18 02:53:04 2020(r360061)
+++ head/sys/dev/iir/iir_pci.c  Sat Apr 18 02:53:09 2020(r360062)
@@ -336,6 +336,7 @@ iir_pci_attach(device_t dev)
 }
 
 gdt_pci_enable_intr(gdt);
+gone_in_dev(dev, 13, "iir(4) removed");
 return (0);
 
 err:
___
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: r360063 - in head: share/man/man4 sys/dev/twa

2020-04-17 Thread Warner Losh
Author: imp
Date: Sat Apr 18 02:53:14 2020
New Revision: 360063
URL: https://svnweb.freebsd.org/changeset/base/360063

Log:
  twa(4) deprecation notice

Modified:
  head/share/man/man4/twa.4
  head/sys/dev/twa/tw_osl_freebsd.c

Modified: head/share/man/man4/twa.4
==
--- head/share/man/man4/twa.4   Sat Apr 18 02:53:09 2020(r360062)
+++ head/share/man/man4/twa.4   Sat Apr 18 02:53:14 2020(r360063)
@@ -31,6 +31,11 @@
 .Sh NAME
 .Nm twa
 .Nd 3ware 9000/9500/9550/9650 series SATA RAID controllers driver
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0 .
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your

Modified: head/sys/dev/twa/tw_osl_freebsd.c
==
--- head/sys/dev/twa/tw_osl_freebsd.c   Sat Apr 18 02:53:09 2020
(r360062)
+++ head/sys/dev/twa/tw_osl_freebsd.c   Sat Apr 18 02:53:14 2020
(r360063)
@@ -428,6 +428,7 @@ twa_attach(device_t dev)
callout_init(&(sc->watchdog_callout[0]), 1);
callout_init(&(sc->watchdog_callout[1]), 1);
callout_reset(&(sc->watchdog_callout[0]), 5*hz, twa_watchdog, 
>ctlr_handle);
+   gone_in_dev(dev, 13, "twa(4) removed");
 
return(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: r360061 - in head: share/man/man4 sys/dev/mly

2020-04-17 Thread Warner Losh
Author: imp
Date: Sat Apr 18 02:53:04 2020
New Revision: 360061
URL: https://svnweb.freebsd.org/changeset/base/360061

Log:
  Add deprecation notice to mly

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

Modified: head/share/man/man4/mly.4
==
--- head/share/man/man4/mly.4   Sat Apr 18 02:52:59 2020(r360060)
+++ head/share/man/man4/mly.4   Sat Apr 18 02:53:04 2020(r360061)
@@ -47,6 +47,11 @@ module at boot time, place the following line in
 .Bd -literal -offset indent
 mly_load="YES"
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/sys/dev/mly/mly.c
==
--- head/sys/dev/mly/mly.c  Sat Apr 18 02:52:59 2020(r360060)
+++ head/sys/dev/mly/mly.c  Sat Apr 18 02:53:04 2020(r360061)
@@ -336,6 +336,8 @@ mly_attach(device_t dev)
  out:
 if (error != 0)
mly_free(sc);
+else
+   gone_in_dev(dev, 13, "mly(4) removed");
 return(error);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360060 - in head: share/man/man4 sys/dev/esp

2020-04-17 Thread Warner Losh
Author: imp
Date: Sat Apr 18 02:52:59 2020
New Revision: 360060
URL: https://svnweb.freebsd.org/changeset/base/360060

Log:
  Add deprecation notice for esp(4).

Modified:
  head/share/man/man4/esp.4
  head/sys/dev/esp/ncr53c9x.c

Modified: head/share/man/man4/esp.4
==
--- head/share/man/man4/esp.4   Sat Apr 18 01:22:41 2020(r360059)
+++ head/share/man/man4/esp.4   Sat Apr 18 02:52:59 2020(r360060)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 1, 2011
+.Dd March 10, 2020
 .Dt ESP 4
 .Os
 .Sh NAME
@@ -45,6 +45,11 @@ following line in
 .Bd -literal -offset indent
 if_esp_load="YES"
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 13.0 .
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/sys/dev/esp/ncr53c9x.c
==
--- head/sys/dev/esp/ncr53c9x.c Sat Apr 18 01:22:41 2020(r360059)
+++ head/sys/dev/esp/ncr53c9x.c Sat Apr 18 02:52:59 2020(r360060)
@@ -402,6 +402,7 @@ ncr53c9x_attach(struct ncr53c9x_softc *sc)
 
NCR_UNLOCK(sc);
 
+   gone_in_dev(sc->sc_dev, 13, "esp(4) driver");
return (0);
 
 fail_async:
___
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: r360025 - head/sys/dev/acpica

2020-04-17 Thread Alexey Dokuchaev
On Fri, Apr 17, 2020 at 08:54:52AM -0700, Colin Percival wrote:
> On 2020-04-16 23:26, Alexey Dokuchaev wrote:
> > On Thu, Apr 16, 2020 at 03:12:15PM -0700, Colin Percival wrote:
> >> ...
> >> I considered that, but so far I don't have any evidence that other
> >> systems exist with the same half-working ACPI.  Unless you're aware of
> >> people who are seeing the same "hw.apci.video.lcd0.brightness changes
> >> but thebacklight doesn't" syndrome?
> > 
> > So this is more like a work-around for the problem which lies elsewhere:
> > something is missing in acpi_video(4) or perhaps we need a (nonexistent)
> > acpi_dell(4)?  In this case, shouldn't it be disabled by default, or at
> > least be toggable since as you say, evidently just a minority of systems
> > exist with the same half-working ACPI?
> 
> Having occasional extra messages coming through devctl(4) is harmless; by
> default devd will just drop them on the floor since there isn't anything
> configured to do with them.
> 
> In an upcoming change to the graphics/intel-backlight port (if/when someone
> merges my patch into their github repo...) I'll be providing a configuration
> file which can be copied into /usr/local/etc/devd/ in order to hook these
> messages up to the intel-backlight utility.
> 
> So... yes, for practical purposes this is disabled by default.

Understood, thanks Colin!

./danfe
___
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: r360059 - head/sys/sys

2020-04-17 Thread Simon J. Gerraty
Author: sjg
Date: Sat Apr 18 01:22:41 2020
New Revision: 360059
URL: https://svnweb.freebsd.org/changeset/base/360059

Log:
  Define enum for so_qstate outside of struct.
  
  LLVM-9.0 clang++ throws an error for enum defined within
  an anonymous struct.
  
  Reviewed by:  jtl, rpokala
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org//D24477

Modified:
  head/sys/sys/socketvar.h

Modified: head/sys/sys/socketvar.h
==
--- head/sys/sys/socketvar.hSat Apr 18 01:16:30 2020(r360058)
+++ head/sys/sys/socketvar.hSat Apr 18 01:22:41 2020(r360059)
@@ -67,6 +67,12 @@ typedef  void so_dtor_t(struct socket *);
 
 struct socket;
 
+enum socket_qstate {
+   SQ_NONE = 0,
+   SQ_INCOMP = 0x0800, /* on sol_incomp */
+   SQ_COMP = 0x1000,   /* on sol_comp */
+};
+
 /*-
  * Locking key to struct socket:
  * (a) constant after allocation, no locking required.
@@ -122,12 +128,7 @@ struct socket {
/* (e) Our place on accept queue. */
TAILQ_ENTRY(socket) so_list;
struct socket   *so_listen; /* (b) */
-   enum {
-   SQ_NONE = 0,
-   SQ_INCOMP = 0x0800, /* on sol_incomp */
-   SQ_COMP = 0x1000,   /* on sol_comp */
-   }   so_qstate;  /* (b) */
-
+   enum socket_qstate so_qstate;   /* (b) */
/* (b) cached MAC label for peer */
struct  label   *so_peerlabel;
u_long  so_oobmark; /* chars to oob mark */
___
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: r360058 - head/sys/dev/sound/pci/hda

2020-04-17 Thread Ed Maste
Author: emaste
Date: Sat Apr 18 01:16:30 2020
New Revision: 360058
URL: https://svnweb.freebsd.org/changeset/base/360058

Log:
  hdac: replace printf for unowned lock with a lock assertion
  
  Reviewed by:  markj, mav
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D24479

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Fri Apr 17 23:14:51 2020
(r360057)
+++ head/sys/dev/sound/pci/hda/hdac.c   Sat Apr 18 01:16:30 2020
(r360058)
@@ -975,8 +975,7 @@ hdac_send_command(struct hdac_softc *sc, nid_t cad, ui
int timeout;
uint32_t *corb;
 
-   if (!hdac_lockowned(sc))
-   device_printf(sc->dev, "WARNING mtx not owned\n");
+   hdac_lockassert(sc);
verb &= ~HDA_CMD_CAD_MASK;
verb |= ((uint32_t)cad) << HDA_CMD_CAD_SHIFT;
sc->codecs[cad].response = HDA_INVALID;
___
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: r360057 - head/usr.bin/calendar/calendars

2020-04-17 Thread Greg Lehey
Author: grog
Date: Fri Apr 17 23:14:51 2020
New Revision: 360057
URL: https://svnweb.freebsd.org/changeset/base/360057

Log:
  Tidy up syntax and punctuation of some entries.

Modified:
  head/usr.bin/calendar/calendars/calendar.history

Modified: head/usr.bin/calendar/calendars/calendar.history
==
--- head/usr.bin/calendar/calendars/calendar.historyFri Apr 17 21:33:45 
2020(r360056)
+++ head/usr.bin/calendar/calendars/calendar.historyFri Apr 17 23:14:51 
2020(r360057)
@@ -202,7 +202,7 @@
 04/15  Ray Kroc opens first McDonalds in Des Plaines, IL, 1955
 04/16  Syria becomes an independent Republic, 1946
 04/17  Bay of Pigs invasion crushed by Castro forces, 1961
-04/18  Einstein's Death, 1955
+04/18  Albert Einstein dies, 1955
 04/18  First Laundromat opens, Fort Worth Texas, 1934
 04/18  San Francisco earthquake, 1906
 04/18  The League of Nations is dissolved after 27 years, 1946
@@ -211,7 +211,7 @@
 04/20  In Bulgaria, the April Uprising takes place, 1876
 04/20  Supreme Court unanimously rules in favor of busing, 1971
 04/21  Lyrid meteor shower
-04/21  Rome is founded by Romulus and Remus, 753BC
+04/21  Rome is founded by Romulus and Remus, 753 BC
 04/22  Portuguese navigator Pedro Alvares Cabral becomes the first European to
sight Brazil, 1500
 04/22  The first Earth Day is celebrated, 1970
@@ -339,7 +339,7 @@
 06/28  World War I ended with the signing of the Treaty of Versailles, 1919
 06/29  The Seychelles gains independence from the United Kingdom, 1976
 06/30  "That" explosion in Siberia at 7:17 local time, 1908
-06/30  Albert Einstein published his theory of special relativity, 1905
+06/30  Albert Einstein publishes his theory of special relativity, 1905
 06/30  China and Soviet Union announce split over ideology, 1960
 07/01  Battle of Gettysburg begins, 1863
 07/01  Hong Kong becomes a special administrative region of the People'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: r360055 - in head/sys/fs: nfs nfsserver

2020-04-17 Thread Rick Macklem
Author: rmacklem
Date: Fri Apr 17 21:17:51 2020
New Revision: 360055
URL: https://svnweb.freebsd.org/changeset/base/360055

Log:
  Replace all instances of the typedef mbuf_t with "struct mbuf *".
  
  The typedef mbuf_t was used for the Mac OS/X port of the code long ago.
  Since this port is no longer used and the use of mbuf_t obscures what
  the code does (and is not consistent with style(9)), it is no longer needed.
  This patch replaces all instances of mbuf_t with "struct mbuf *", so that
  it is no longer used.
  
  This patch should not result in any semantic change.

Modified:
  head/sys/fs/nfs/nfs.h
  head/sys/fs/nfs/nfs_commonsubs.c
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfs/nfsrvcache.h
  head/sys/fs/nfsserver/nfs_nfsdcache.c
  head/sys/fs/nfsserver/nfs_nfsdserv.c
  head/sys/fs/nfsserver/nfs_nfsdstate.c
  head/sys/fs/nfsserver/nfs_nfsdsubs.c

Modified: head/sys/fs/nfs/nfs.h
==
--- head/sys/fs/nfs/nfs.h   Fri Apr 17 20:20:03 2020(r360054)
+++ head/sys/fs/nfs/nfs.h   Fri Apr 17 21:17:51 2020(r360055)
@@ -638,10 +638,10 @@ struct nfsgss_mechlist {
  * This structure is used by the server for describing each request.
  */
 struct nfsrv_descript {
-   mbuf_t  nd_mrep;/* Request mbuf list */
-   mbuf_t  nd_md;  /* Current dissect mbuf */
-   mbuf_t  nd_mreq;/* Reply mbuf list */
-   mbuf_t  nd_mb;  /* Current build mbuf */
+   struct mbuf *nd_mrep;   /* Request mbuf list */
+   struct mbuf *nd_md; /* Current dissect mbuf */
+   struct mbuf *nd_mreq;   /* Reply mbuf list */
+   struct mbuf *nd_mb; /* Current build mbuf */
NFSSOCKADDR_T   nd_nam; /* and socket addr */
NFSSOCKADDR_T   nd_nam2;/* return socket addr */
caddr_t nd_dpos;/* Current dissect pos */

Modified: head/sys/fs/nfs/nfs_commonsubs.c
==
--- head/sys/fs/nfs/nfs_commonsubs.cFri Apr 17 20:20:03 2020
(r360054)
+++ head/sys/fs/nfs/nfs_commonsubs.cFri Apr 17 21:17:51 2020
(r360055)
@@ -611,7 +611,7 @@ nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *ui
 {
char *mbufcp, *uiocp;
int xfer, left, len;
-   mbuf_t mp;
+   struct mbuf *mp;
long uiosiz, rem;
int error = 0;
 
@@ -694,7 +694,7 @@ out:
 APPLESTATIC void *
 nfsm_dissct(struct nfsrv_descript *nd, int siz, int how)
 {
-   mbuf_t mp2;
+   struct mbuf *mp2;
int siz2, xfer;
caddr_t p;
int left;
@@ -808,9 +808,9 @@ out:
 APPLESTATIC int
 nfsm_strtom(struct nfsrv_descript *nd, const char *cp, int siz)
 {
-   mbuf_t m2;
+   struct mbuf *m2;
int xfer, left;
-   mbuf_t m1;
+   struct mbuf *m1;
int rem, bytesize;
u_int32_t *tl;
char *cp2;
@@ -1014,7 +1014,7 @@ APPLESTATIC void
 newnfs_trimleading(nd)
struct nfsrv_descript *nd;
 {
-   mbuf_t m, n;
+   struct mbuf *m, *n;
int offs;
 
/*
@@ -1059,7 +1059,7 @@ newnfs_trimleading(nd)
 APPLESTATIC void
 newnfs_trimtrailing(nd, mb, bpos)
struct nfsrv_descript *nd;
-   mbuf_t mb;
+   struct mbuf *mb;
caddr_t bpos;
 {
 
@@ -2423,7 +2423,7 @@ nfsrv_mtostr(struct nfsrv_descript *nd, char *str, int
 {
char *cp;
int xfer, len;
-   mbuf_t mp;
+   struct mbuf *mp;
int rem, error = 0;
 
mp = nd->nd_md;
@@ -4437,7 +4437,7 @@ nfsrv_refstrbigenough(int siz, u_char **cpp, u_char **
 APPLESTATIC void
 nfsrvd_rephead(struct nfsrv_descript *nd)
 {
-   mbuf_t mreq;
+   struct mbuf *mreq;
 
/*
 * If this is a big reply, use a cluster.

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Fri Apr 17 20:20:03 2020(r360054)
+++ head/sys/fs/nfs/nfs_var.h   Fri Apr 17 21:17:51 2020(r360055)
@@ -325,7 +325,7 @@ int nfsm_fhtom(struct nfsrv_descript *, u_int8_t *, in
 int nfsm_advance(struct nfsrv_descript *, int, int);
 void *nfsm_dissct(struct nfsrv_descript *, int, int);
 void newnfs_trimleading(struct nfsrv_descript *);
-void newnfs_trimtrailing(struct nfsrv_descript *, mbuf_t,
+void newnfs_trimtrailing(struct nfsrv_descript *, struct mbuf *,
 caddr_t);
 void newnfs_copycred(struct nfscred *, struct ucred *);
 void newnfs_copyincred(struct ucred *, struct nfscred *);
@@ -390,7 +390,7 @@ int nfsv4_fillattr(struct nfsrv_descript *, struct mou
 struct vattr *, fhandle_t *, int, nfsattrbit_t *,
 struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t, struct statfs 
*);
 void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *);
-void 

svn commit: r360054 - head/sys/conf

2020-04-17 Thread Conrad Meyer
Author: cem
Date: Fri Apr 17 20:20:03 2020
New Revision: 360054
URL: https://svnweb.freebsd.org/changeset/base/360054

Log:
  xen-locore: Silence DWARF2 section warning
  
  Silence the "DWARF2 can only represent one section per compilation unit"
  warning in amd64 GENERIC builds by disabling Clang's debuginfo generation for
  this assembler file (-g0).  The message is replaced by a warning from
  ctfconvert that there is no debuginfo to convert (future work).
  
  The file contains some metadata (several ELF notes) and some code.  The code
  does not appear to have anything that debuginfo would aid.
  
  I looked at the generated debuginfo (readelf -w xen-locore.o) prior to this
  change, and the metadata that would be disabled are things like associated
  between binary offset and code line number (not especially useful with a
  disassembler), and label metadata for the entry points (not especially useful
  as this is already in the symbol table).
  
  Reviewed by:  royger
  Differential Revision:https://reviews.freebsd.org/D24384

Modified:
  head/sys/conf/files.amd64

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Fri Apr 17 19:14:05 2020(r360053)
+++ head/sys/conf/files.amd64   Fri Apr 17 20:20:03 2020(r360054)
@@ -112,7 +112,8 @@ amd64/amd64/in_cksum.c  optionalinet | 
inet6
 amd64/amd64/initcpu.c  standard
 amd64/amd64/io.c   optionalio
 amd64/amd64/locore.S   standardno-obj
-amd64/amd64/xen-locore.S   optionalxenhvm
+amd64/amd64/xen-locore.S   optionalxenhvm \
+   compile-with "${NORMAL_S} -g0"
 amd64/amd64/machdep.c  standard
 amd64/amd64/mem.c  optionalmem
 amd64/amd64/minidump_machdep.c standard
___
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: r360053 - head/sys/dev/sound/pci/hda

2020-04-17 Thread Ed Maste
Author: emaste
Date: Fri Apr 17 19:14:05 2020
New Revision: 360053
URL: https://svnweb.freebsd.org/changeset/base/360053

Log:
  hdac: update comment to match function name
  
  snd_hda was rewritten in r230130; one function retained a comment
  referencing the previous name.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Fri Apr 17 19:12:52 2020
(r360052)
+++ head/sys/dev/sound/pci/hda/hdac.c   Fri Apr 17 19:14:05 2020
(r360053)
@@ -965,7 +965,7 @@ hdac_unsolq_flush(struct hdac_softc *sc)
 }
 
 /
- * uint32_t hdac_command_sendone_internal
+ * uint32_t hdac_send_command
  *
  * Wrapper function that sends only one command to a given codec
  /
___
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: r360052 - head/sys/compat/linuxkpi/common/src

2020-04-17 Thread Mark Johnston
Author: markj
Date: Fri Apr 17 19:12:52 2020
New Revision: 360052
URL: https://svnweb.freebsd.org/changeset/base/360052

Log:
  Remove a vestigal reference to kmem_object.
  
  kmem_object has been an alias of kernel_object for a while.
  
  MFC after:1 week

Modified:
  head/sys/compat/linuxkpi/common/src/linux_page.c

Modified: head/sys/compat/linuxkpi/common/src/linux_page.c
==
--- head/sys/compat/linuxkpi/common/src/linux_page.cFri Apr 17 18:34:49 
2020(r360051)
+++ head/sys/compat/linuxkpi/common/src/linux_page.cFri Apr 17 19:12:52 
2020(r360052)
@@ -76,7 +76,7 @@ void *
 linux_page_address(struct page *page)
 {
 
-   if (page->object != kmem_object && page->object != kernel_object) {
+   if (page->object != kernel_object) {
return (PMAP_HAS_DMAP ?
((void *)(uintptr_t)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(page))) :
NULL);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360051 - in head/sys: dev/altera/jtag_uart dev/bvm dev/cfe dev/ofw dev/rp dev/xen/console kern netgraph sys

2020-04-17 Thread Kyle Evans
Author: kevans
Date: Fri Apr 17 18:34:49 2020
New Revision: 360051
URL: https://svnweb.freebsd.org/changeset/base/360051

Log:
  tty: convert tty_lock_assert to tty_assert_locked to hide lock type
  
  A later change, currently being iterated on in D24459, will in-fact change
  the lock type to an sx so that TTY drivers can sleep on it if they need to.
  Committing this ahead of time to make the review in question a little more
  palatable.
  
  tty_lock_assert() is unfortunately still needed for now in two places to
  make sure that the tty lock has not been recursed upon, for those scenarios
  where it's supplied by the TTY driver and possibly a mutex that is allowed
  to recurse.
  
  Suggested by: markj

Modified:
  head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
  head/sys/dev/bvm/bvm_console.c
  head/sys/dev/cfe/cfe_console.c
  head/sys/dev/ofw/ofw_console.c
  head/sys/dev/rp/rp.c
  head/sys/dev/xen/console/xen_console.c
  head/sys/kern/tty.c
  head/sys/kern/tty_info.c
  head/sys/kern/tty_ttydisc.c
  head/sys/netgraph/ng_tty.c
  head/sys/sys/tty.h
  head/sys/sys/ttydevsw.h
  head/sys/sys/ttydisc.h
  head/sys/sys/ttyhook.h

Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c
==
--- head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.cFri Apr 17 
18:24:47 2020(r360050)
+++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.cFri Apr 17 
18:34:49 2020(r360051)
@@ -266,7 +266,7 @@ aju_handle_input(struct altera_jtag_uart_softc *sc, st
 {
int c;
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
AJU_LOCK_ASSERT(sc);
 
while (aju_readable(sc)) {
@@ -298,7 +298,7 @@ aju_handle_output(struct altera_jtag_uart_softc *sc, s
uint32_t v;
uint8_t ch;
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
AJU_LOCK_ASSERT(sc);
 
AJU_UNLOCK(sc);
@@ -364,7 +364,7 @@ aju_outwakeup(struct tty *tp)
 {
struct altera_jtag_uart_softc *sc = tty_softc(tp);
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
 
AJU_LOCK(sc);
aju_handle_output(sc, tp);

Modified: head/sys/dev/bvm/bvm_console.c
==
--- head/sys/dev/bvm/bvm_console.c  Fri Apr 17 18:24:47 2020
(r360050)
+++ head/sys/dev/bvm/bvm_console.c  Fri Apr 17 18:34:49 2020
(r360051)
@@ -130,7 +130,7 @@ static void
 bvm_tty_close(struct tty *tp)
 {
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
callout_stop(_timer);
 }
 
@@ -159,7 +159,7 @@ bvm_timeout(void *v)
 
tp = (struct tty *)v;
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
while ((c = bvm_cngetc(NULL)) != -1)
ttydisc_rint(tp, c, 0);
ttydisc_rint_done(tp);

Modified: head/sys/dev/cfe/cfe_console.c
==
--- head/sys/dev/cfe/cfe_console.c  Fri Apr 17 18:24:47 2020
(r360050)
+++ head/sys/dev/cfe/cfe_console.c  Fri Apr 17 18:34:49 2020
(r360051)
@@ -142,7 +142,7 @@ cfe_timeout(void *v)
 
tp = (struct tty *)v;
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
while ((c = cfe_cngetc(NULL)) != -1)
ttydisc_rint(tp, c, 0);
ttydisc_rint_done(tp);

Modified: head/sys/dev/ofw/ofw_console.c
==
--- head/sys/dev/ofw/ofw_console.c  Fri Apr 17 18:24:47 2020
(r360050)
+++ head/sys/dev/ofw/ofw_console.c  Fri Apr 17 18:34:49 2020
(r360051)
@@ -152,7 +152,7 @@ ofw_timeout(void *v)
 
tp = (struct tty *)v;
 
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
while ((c = ofw_cngetc(NULL)) != -1)
ttydisc_rint(tp, c, 0);
ttydisc_rint_done(tp);

Modified: head/sys/dev/rp/rp.c
==
--- head/sys/dev/rp/rp.cFri Apr 17 18:24:47 2020(r360050)
+++ head/sys/dev/rp/rp.cFri Apr 17 18:34:49 2020(r360051)
@@ -674,7 +674,7 @@ static void rp_do_poll(void *arg)
 
rp = arg;
tp = rp->rp_tty;
-   tty_lock_assert(tp, MA_OWNED);
+   tty_assert_locked(tp);
ctl = rp->rp_ctlp;
CtlMask = ctl->ctlmask(ctl);
if (CtlMask & (1 << rp->rp_aiop)) {

Modified: head/sys/dev/xen/console/xen_console.c
==
--- head/sys/dev/xen/console/xen_console.c  Fri Apr 17 18:24:47 2020
(r360050)
+++ head/sys/dev/xen/console/xen_console.c  Fri Apr 17 18:34:49 2020
(r360051)
@@ -515,7 +515,7 @@ xencons_tx(struct tty *tp)
 
cons = tty_softc(tp);
 
-   tty_lock_assert(tp, 

svn commit: r360050 - head/sys/mips/include

2020-04-17 Thread John Baldwin
Author: jhb
Date: Fri Apr 17 18:24:47 2020
New Revision: 360050
URL: https://svnweb.freebsd.org/changeset/base/360050

Log:
  Use the right type for 64-bit coprocessor registers.
  
  The use of "int" here caused the compiler to believe that it needs to
  insert a "sll $n, $n, 0" to sign extend as part of the implicit cast
  to uint64_t.
  
  Submitted by: Nathaniel Filardo 
  Reviewed by:  brooks, arichardson
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D24457

Modified:
  head/sys/mips/include/cpufunc.h

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Fri Apr 17 18:22:37 2020
(r360049)
+++ head/sys/mips/include/cpufunc.h Fri Apr 17 18:24:47 2020
(r360050)
@@ -125,7 +125,7 @@ breakpoint(void)
 static __inline uint64_t   \
 mips_rd_ ## n (void)   \
 {  \
-   int v0; \
+   uint64_t v0;\
__asm __volatile ("dmfc0 %[v0], $"__XSTRING(r)";"   \
  : [v0] "="(v0));\
mips_barrier(); \
@@ -147,7 +147,7 @@ mips_wr_ ## n (uint64_t a0) 
\
 static __inline uint64_t   \
 mips_rd_ ## n(void)\
 {  \
-   int v0; \
+   uint64_t v0;\
__asm __volatile ("dmfc0 %[v0], $"__XSTRING(r)", "__XSTRING(s)";"   
\
  : [v0] "="(v0));\
mips_barrier(); \
@@ -190,7 +190,7 @@ MIPS_RW64_COP0(xcontext, MIPS_COP_0_TLB_XCONTEXT);
 static __inline uint32_t   \
 mips_rd_ ## n (void)   \
 {  \
-   int v0; \
+   uint32_t v0;\
__asm __volatile ("mfc0 %[v0], $"__XSTRING(r)";"\
  : [v0] "="(v0));\
mips_barrier(); \
@@ -212,7 +212,7 @@ mips_wr_ ## n (uint32_t a0) 
\
 static __inline uint32_t   \
 mips_rd_ ## n(void)\
 {  \
-   int v0; \
+   uint32_t v0;\
__asm __volatile ("mfc0 %[v0], $"__XSTRING(r)", "__XSTRING(s)";"
\
  : [v0] "="(v0));\
mips_barrier(); \
___
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: r360049 - head/sys/net

2020-04-17 Thread Alexander V. Chernikov
Author: melifaro
Date: Fri Apr 17 18:22:37 2020
New Revision: 360049
URL: https://svnweb.freebsd.org/changeset/base/360049

Log:
  Unbreak build by reverting if_bridge part of r360047.
  
  Pointy hat to: melifaro

Modified:
  head/sys/net/if_bridge.c

Modified: head/sys/net/if_bridge.c
==
--- head/sys/net/if_bridge.cFri Apr 17 18:19:13 2020(r360048)
+++ head/sys/net/if_bridge.cFri Apr 17 18:22:37 2020(r360049)
@@ -302,7 +302,7 @@ static int  bridge_transmit(struct ifnet *, struct mbuf
 static voidbridge_qflush(struct ifnet *);
 static struct mbuf *bridge_input(struct ifnet *, struct mbuf *);
 static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *,
-   struct route *);
+   struct rtentry *);
 static int bridge_enqueue(struct bridge_softc *, struct ifnet *,
struct mbuf *);
 static voidbridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int);
@@ -2061,7 +2061,7 @@ bridge_dummynet(struct mbuf *m, struct ifnet *ifp)
  */
 static int
 bridge_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa,
-struct route *ro __unused)
+struct rtentry *rt)
 {
struct ether_header *eh;
struct ifnet *bifp, *dst_if;
___
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: r360048 - head/sys/cam/scsi

2020-04-17 Thread John Baldwin
Author: jhb
Date: Fri Apr 17 18:19:13 2020
New Revision: 360048
URL: https://svnweb.freebsd.org/changeset/base/360048

Log:
  Don't try to copyout() to a kernel buffer.
  
  The handle_string callback for the ENCIOC_GET_ENCNAME and
  ENCIOC_GETENCID ioctls tries to copy the size of the generated string
  out to userland.  However, the callback only has access to the kernel
  copy of the structure populated by copyin().  The copyout() call
  simply overwrites the value in the kernel's copy preventing the
  subsequent overflow prevention logic from working.
  
  Fix this by instead doing a copyout() of the updated length in the
  caller after the callback returns.
  
  Reviewed by:  kib
  Obtained from:CheriBSD
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D24456

Modified:
  head/sys/cam/scsi/scsi_enc.c
  head/sys/cam/scsi/scsi_enc_ses.c

Modified: head/sys/cam/scsi/scsi_enc.c
==
--- head/sys/cam/scsi/scsi_enc.cFri Apr 17 17:05:58 2020
(r360047)
+++ head/sys/cam/scsi/scsi_enc.cFri Apr 17 18:19:13 2020
(r360048)
@@ -489,6 +489,10 @@ enc_ioctl(struct cdev *dev, u_long cmd, caddr_t arg_ad
cam_periph_lock(periph);
error = enc->enc_vec.handle_string(enc, , cmd);
cam_periph_unlock(periph);
+   if (error == 0 || error == ENOMEM)
+   (void)copyout(,
+   &((encioc_string_t *)addr)->bufsiz,
+   sizeof(sstr.bufsiz));
break;
 
case ENCIOC_GETELMSTAT:

Modified: head/sys/cam/scsi/scsi_enc_ses.c
==
--- head/sys/cam/scsi/scsi_enc_ses.cFri Apr 17 17:05:58 2020
(r360047)
+++ head/sys/cam/scsi/scsi_enc_ses.cFri Apr 17 18:19:13 2020
(r360048)
@@ -2926,11 +2926,11 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s
vendor, product, rev) + 1;
if (rsize > sizeof(str))
rsize = sizeof(str);
-   copyout(, >bufsiz, sizeof(rsize));
size = rsize;
if (size > sstr->bufsiz)
size = sstr->bufsiz;
copyout(str, sstr->buf, size);
+   sstr->bufsiz = rsize;
return (size == rsize ? 0 : ENOMEM);
case ENCIOC_GETENCID:
if (ses_cache->ses_nsubencs < 1)
@@ -2940,11 +2940,11 @@ ses_handle_string(enc_softc_t *enc, encioc_string_t *s
scsi_8btou64(enc_desc->logical_id)) + 1;
if (rsize > sizeof(str))
rsize = sizeof(str);
-   copyout(, >bufsiz, sizeof(rsize));
size = rsize;
if (size > sstr->bufsiz)
size = sstr->bufsiz;
copyout(str, sstr->buf, size);
+   sstr->bufsiz = rsize;
return (size == rsize ? 0 : ENOMEM);
default:
return (EINVAL);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360047 - head/sys/net

2020-04-17 Thread Alexander V. Chernikov
Author: melifaro
Date: Fri Apr 17 17:05:58 2020
New Revision: 360047
URL: https://svnweb.freebsd.org/changeset/base/360047

Log:
  Finish r191148: replace rtentry with route in if_bridge if_output() callback.
  
  Generic if_output() callback signature was modified to use struct route
   instead of struct rtentry in r191148, back in 2009.
  
  Quoting commit message:
  
   Change if_output to take a struct route as its fourth argument in order
   to allow passing a cached struct llentry * down to L2
  
  Fix bridge_output() to match this signature and update the remaining
   comment in if_var.h.
  
  Reviewed by:  kp
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D24394

Modified:
  head/sys/net/if_bridge.c
  head/sys/net/if_var.h

Modified: head/sys/net/if_bridge.c
==
--- head/sys/net/if_bridge.cFri Apr 17 16:55:14 2020(r360046)
+++ head/sys/net/if_bridge.cFri Apr 17 17:05:58 2020(r360047)
@@ -302,7 +302,7 @@ static int  bridge_transmit(struct ifnet *, struct mbuf
 static voidbridge_qflush(struct ifnet *);
 static struct mbuf *bridge_input(struct ifnet *, struct mbuf *);
 static int bridge_output(struct ifnet *, struct mbuf *, struct sockaddr *,
-   struct rtentry *);
+   struct route *);
 static int bridge_enqueue(struct bridge_softc *, struct ifnet *,
struct mbuf *);
 static voidbridge_rtdelete(struct bridge_softc *, struct ifnet *ifp, int);
@@ -2061,7 +2061,7 @@ bridge_dummynet(struct mbuf *m, struct ifnet *ifp)
  */
 static int
 bridge_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa,
-struct rtentry *rt)
+struct route *ro __unused)
 {
struct ether_header *eh;
struct ifnet *bifp, *dst_if;

Modified: head/sys/net/if_var.h
==
--- head/sys/net/if_var.h   Fri Apr 17 16:55:14 2020(r360046)
+++ head/sys/net/if_var.h   Fri Apr 17 17:05:58 2020(r360047)
@@ -44,7 +44,7 @@
  * received from its medium.
  *
  * Output occurs when the routine if_output is called, with three parameters:
- * (*ifp->if_output)(ifp, m, dst, rt)
+ * (*ifp->if_output)(ifp, m, dst, ro)
  * Here m is the mbuf chain to be sent and dst is the destination address.
  * The output routine encapsulates the supplied datagram if necessary,
  * and then transmits it on its medium.
___
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: r360046 - head/sys/conf

2020-04-17 Thread Mark Johnston
Author: markj
Date: Fri Apr 17 16:55:14 2020
New Revision: 360046
URL: https://svnweb.freebsd.org/changeset/base/360046

Log:
  Always compile minidump_machdep.c on arm.
  
  It is not logically dependent on "device mem", and an arm kernel
  compiled without that device fails to link since the minidumpsys()
  symbol is referenced by kern_dump.c.
  
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/files.arm

Modified: head/sys/conf/files.arm
==
--- head/sys/conf/files.arm Fri Apr 17 16:31:07 2020(r360045)
+++ head/sys/conf/files.arm Fri Apr 17 16:55:14 2020(r360046)
@@ -53,7 +53,7 @@ arm/arm/machdep_kdb.c standard
 arm/arm/machdep_intr.c standard
 arm/arm/machdep_ptrace.c   standard
 arm/arm/mem.c  optionalmem
-arm/arm/minidump_machdep.c optionalmem
+arm/arm/minidump_machdep.c standard
 arm/arm/mp_machdep.c   optionalsmp
 arm/arm/mpcore_timer.c optionalmpcore_timer
 arm/arm/nexus.cstandard
___
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: r360045 - head/tests/sys/net/routing

2020-04-17 Thread Olivier Cochard
Author: olivier (ports committer)
Date: Fri Apr 17 16:31:07 2020
New Revision: 360045
URL: https://svnweb.freebsd.org/changeset/base/360045

Log:
  Skip routing regression tests depending on if_epair if this module isn't 
installed.
  
  Approved by:  melifaro
  Sponsored by: Netflix
  Differential Revision:https://reviews.freebsd.org/D24468

Modified:
  head/tests/sys/net/routing/Makefile
  head/tests/sys/net/routing/rtsock_common.h
  head/tests/sys/net/routing/rtsock_config.h

Modified: head/tests/sys/net/routing/Makefile
==
--- head/tests/sys/net/routing/Makefile Fri Apr 17 15:19:42 2020
(r360044)
+++ head/tests/sys/net/routing/Makefile Fri Apr 17 16:31:07 2020
(r360045)
@@ -14,4 +14,6 @@ ${PACKAGE}FILESMODE_generic_cleanup.sh=0555
 # so running them in parallel will lead to weird results.
 TEST_METADATA+=is_exclusive=true
 
+CFLAGS+=   -I${.CURDIR:H:H:H}
+
 .include 

Modified: head/tests/sys/net/routing/rtsock_common.h
==
--- head/tests/sys/net/routing/rtsock_common.h  Fri Apr 17 15:19:42 2020
(r360044)
+++ head/tests/sys/net/routing/rtsock_common.h  Fri Apr 17 16:31:07 2020
(r360045)
@@ -45,6 +45,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,6 +64,7 @@
 #include 
 
 #include 
+#include "freebsd_test_suite/macros.h"
 
 #include "rtsock_print.h"
 #include "params.h"
@@ -126,33 +128,6 @@ _check_cloner(char *name)
return (found);
 }
 
-/*
- * Tries to ensure if_tap is loaded.
- * Checks list of interface cloners first, then tries
- * to load the module.
- *
- * return nonzero on success.
- */
-static int
-_enforce_cloner_loaded(char *cloner_name)
-{
-   if (_check_cloner(cloner_name))
-   return (1);
-   /* need to load */
-   RLOG("trying to load %s driver", cloner_name);
-
-   char cmd[64];
-
-   snprintf(cmd, sizeof(cmd), "/sbin/kldload if_%s", cloner_name);
-   int ret = system(cmd);
-   if (ret != 0) {
-   RLOG("'%s' failed, error %d", cmd, ret);
-   return (0);
-   }
-
-   return (1);
-}
-
 static char *
 iface_create(char *ifname_orig)
 {
@@ -164,9 +139,6 @@ iface_create(char *ifname_orig)
for (src = ifname_orig, dst = prefix; *src && isalpha(*src); src++)
*dst++ = *src;
*dst = '\0';
-
-   if (_enforce_cloner_loaded(prefix) == 0)
-   return (NULL);
 
memset(, 0, sizeof(struct ifreq));
 

Modified: head/tests/sys/net/routing/rtsock_config.h
==
--- head/tests/sys/net/routing/rtsock_config.h  Fri Apr 17 15:19:42 2020
(r360044)
+++ head/tests/sys/net/routing/rtsock_config.h  Fri Apr 17 16:31:07 2020
(r360045)
@@ -127,6 +127,9 @@ config_setup(const atf_tc_t *tc, struct rtsock_config_
inet_ntop(AF_INET6, >addr6.sin6_addr, c->addr6_str, 
INET6_ADDRSTRLEN);
 
if (co->num_interfaces > 0) {
+   kldload("if_epair");
+   ATF_REQUIRE_KERNEL_MODULE("if_epair");
+
c->ifnames = calloc(co->num_interfaces, sizeof(char *));
for (int i = 0; i < co->num_interfaces; i++)
c->ifnames[i] = iface_create("epair");
___
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: r360025 - head/sys/dev/acpica

2020-04-17 Thread Warner Losh
On Fri, Apr 17, 2020 at 9:54 AM Colin Percival  wrote:

> On 2020-04-16 23:26, Alexey Dokuchaev wrote:
> > On Thu, Apr 16, 2020 at 03:12:15PM -0700, Colin Percival wrote:
> >> On 2020-04-16 15:05, Oliver Pinter wrote:
> >>> On Thursday, April 16, 2020, Colin Percival  >>> > wrote:
> >>> Log:
> >>>   Alert devd when acpi_video brightness changes
> >>>
> >>> Please add this to release notes!
> >>
> >> I considered that, but so far I don't have any evidence that other
> >> systems exist with the same half-working ACPI.  Unless you're aware of
> >> people who are seeing the same "hw.apci.video.lcd0.brightness changes
> >> but thebacklight doesn't" syndrome?
> >
> > So this is more like a work-around for the problem which lies elsewhere:
> > something is missing in acpi_video(4) or perhaps we need a (nonexistent)
> > acpi_dell(4)?  In this case, shouldn't it be disabled by default, or at
> > least be toggable since as you say, evidently just a minority of systems
> > exist with the same half-working ACPI?
>
> Having occasional extra messages coming through devctl(4) is harmless; by
> default devd will just drop them on the floor since there isn't anything
> configured to do with them.
>
> In an upcoming change to the graphics/intel-backlight port (if/when someone
> merges my patch into their github repo...) I'll be providing a
> configuration
> file which can be copied into /usr/local/etc/devd/ in order to hook these
> messages up to the intel-backlight utility.
>
> So... yes, for practical purposes this is disabled by default.
>

There's no harm to these, so I agree... there may also be some novel uses :)

Warner


> --
> Colin Percival
> Security Officer Emeritus, FreeBSD | The power to serve
> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
>
___
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: r360025 - head/sys/dev/acpica

2020-04-17 Thread Colin Percival
On 2020-04-16 23:26, Alexey Dokuchaev wrote:
> On Thu, Apr 16, 2020 at 03:12:15PM -0700, Colin Percival wrote:
>> On 2020-04-16 15:05, Oliver Pinter wrote:
>>> On Thursday, April 16, 2020, Colin Percival >> > wrote:
>>> Log:
>>>   Alert devd when acpi_video brightness changes
>>>
>>> Please add this to release notes!
>>
>> I considered that, but so far I don't have any evidence that other
>> systems exist with the same half-working ACPI.  Unless you're aware of
>> people who are seeing the same "hw.apci.video.lcd0.brightness changes
>> but thebacklight doesn't" syndrome?
> 
> So this is more like a work-around for the problem which lies elsewhere:
> something is missing in acpi_video(4) or perhaps we need a (nonexistent)
> acpi_dell(4)?  In this case, shouldn't it be disabled by default, or at
> least be toggable since as you say, evidently just a minority of systems
> exist with the same half-working ACPI?

Having occasional extra messages coming through devctl(4) is harmless; by
default devd will just drop them on the floor since there isn't anything
configured to do with them.

In an upcoming change to the graphics/intel-backlight port (if/when someone
merges my patch into their github repo...) I'll be providing a configuration
file which can be copied into /usr/local/etc/devd/ in order to hook these
messages up to the intel-backlight utility.

So... yes, for practical purposes this is disabled by default.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
___
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: r360044 - head/sys/amd64/include

2020-04-17 Thread Conrad Meyer
Author: cem
Date: Fri Apr 17 15:19:42 2020
New Revision: 360044
URL: https://svnweb.freebsd.org/changeset/base/360044

Log:
  vmm.h: Add ABI assertions and mark implicit holes
  
  The static assertions were added (with size and offsets from gdb) and verified
  with a build prior to marking the holes explicitly.
  
  This is in preparation for a subsequent revision, pending in phabricator, that
  makes use of some of these unused bits without impacting the ABI.
  
  Reviewed by:  grehan
  Differential Revision:https://reviews.freebsd.org/D24461

Modified:
  head/sys/amd64/include/vmm.h

Modified: head/sys/amd64/include/vmm.h
==
--- head/sys/amd64/include/vmm.hFri Apr 17 14:57:15 2020
(r360043)
+++ head/sys/amd64/include/vmm.hFri Apr 17 15:19:42 2020
(r360044)
@@ -515,6 +515,8 @@ struct vie_op {
uint8_t op_type;/* type of operation (e.g. MOV) */
uint16_top_flags;
 };
+_Static_assert(sizeof(struct vie_op) == 4, "ABI");
+_Static_assert(_Alignof(struct vie_op) == 2, "ABI");
 
 #defineVIE_INST_SIZE   15
 struct vie {
@@ -539,13 +541,17 @@ struct vie {
rm:4;
 
uint8_t ss:2,   /* SIB byte */
-   index:4,
-   base:4;
+   _sparebits:2,
+   index:4,/* SIB byte */
+   base:4; /* SIB byte */
 
uint8_t disp_bytes;
uint8_t imm_bytes;
 
uint8_t scale;
+
+   uint8_t _sparebytes[3];
+
int base_register;  /* VM_REG_GUEST_xyz */
int index_register; /* VM_REG_GUEST_xyz */
int segment_register;   /* VM_REG_GUEST_xyz */
@@ -555,8 +561,14 @@ struct vie {
 
uint8_t decoded;/* set to 1 if successfully decoded */
 
+   uint8_t _sparebyte;
+
struct vie_op   op; /* opcode description */
 };
+_Static_assert(sizeof(struct vie) == 64, "ABI");
+_Static_assert(__offsetof(struct vie, disp_bytes) == 22, "ABI");
+_Static_assert(__offsetof(struct vie, scale) == 24, "ABI");
+_Static_assert(__offsetof(struct vie, base_register) == 28, "ABI");
 
 enum vm_exitcode {
VM_EXITCODE_INOUT,
___
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: r360043 - head/tests/sys/net

2020-04-17 Thread Kristof Provost
Author: kp
Date: Fri Apr 17 14:57:15 2020
New Revision: 360043
URL: https://svnweb.freebsd.org/changeset/base/360043

Log:
  bridge tests: Test deleting a bridge with members
  
  Reviewed by:  philip, emaste
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D24337

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.shFri Apr 17 14:35:11 2020
(r360042)
+++ head/tests/sys/net/if_bridge_test.shFri Apr 17 14:57:15 2020
(r360043)
@@ -245,10 +245,37 @@ span_cleanup()
vnet_cleanup
 }
 
+atf_test_case "delete_with_members" "cleanup"
+delete_with_members_head()
+{
+   atf_set descr 'Delete a bridge which still has member interfaces'
+   atf_set require.user root
+}
+
+delete_with_members_body()
+{
+   vnet_init
+
+   bridge=$(vnet_mkbridge)
+   epair=$(vnet_mkepair)
+
+   ifconfig ${bridge} 192.0.2.1/24 up
+   ifconfig ${epair}a up
+   ifconfig ${bridge} addm ${epair}a
+
+   ifconfig ${bridge} destroy
+}
+
+delete_with_members_cleanup()
+{
+   vnet_cleanup
+}
+
 atf_init_test_cases()
 {
atf_add_test_case "bridge_transmit_ipv4_unicast"
atf_add_test_case "stp"
atf_add_test_case "static"
atf_add_test_case "span"
+   atf_add_test_case "delete_with_members"
 }
___
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: r360042 - head/sys/netpfil/pf

2020-04-17 Thread Kristof Provost
Author: kp
Date: Fri Apr 17 14:35:11 2020
New Revision: 360042
URL: https://svnweb.freebsd.org/changeset/base/360042

Log:
  pf: Do not allow negative ps_len in DIOCGETSTATES
  
  Userspace may pass a negative ps_len value to us, which causes an
  assertion failure in malloc().
  Treat negative values as zero, i.e. return the required size.
  
  Reported-by:  syzbot+53370d9d0358ee2a0...@syzkaller.appspotmail.com
  Reviewed by:  lutz at donnerhacke.de
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D24447

Modified:
  head/sys/netpfil/pf/pf_ioctl.c

Modified: head/sys/netpfil/pf/pf_ioctl.c
==
--- head/sys/netpfil/pf/pf_ioctl.c  Fri Apr 17 13:50:26 2020
(r360041)
+++ head/sys/netpfil/pf/pf_ioctl.c  Fri Apr 17 14:35:11 2020
(r360042)
@@ -2163,7 +2163,7 @@ relock_DIOCKILLSTATES:
struct pfsync_state *pstore, *p;
int i, nr;
 
-   if (ps->ps_len == 0) {
+   if (ps->ps_len <= 0) {
nr = uma_zone_get_cur(V_pf_state_z);
ps->ps_len = sizeof(struct pfsync_state) * nr;
break;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360041 - stable/12/sys/kern

2020-04-17 Thread Mark Johnston
Author: markj
Date: Fri Apr 17 13:50:26 2020
New Revision: 360041
URL: https://svnweb.freebsd.org/changeset/base/360041

Log:
  MFC r359778:
  Properly handle disconnected sockets in uipc_ready().

Modified:
  stable/12/sys/kern/uipc_usrreq.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/uipc_usrreq.c
==
--- stable/12/sys/kern/uipc_usrreq.cFri Apr 17 10:12:11 2020
(r360040)
+++ stable/12/sys/kern/uipc_usrreq.cFri Apr 17 13:50:26 2020
(r360041)
@@ -773,6 +773,18 @@ uipc_detach(struct socket *so)
vplock = NULL;
local_unp_rights = 0;
 
+   SOCK_LOCK(so);
+   if (!SOLISTENING(so)) {
+   /*
+* Once the socket is removed from the global lists,
+* uipc_ready() will not be able to locate its socket buffer, so
+* clear the buffer now.  At this point internalized rights have
+* already been disposed of.
+*/
+   sbrelease(>so_rcv, so);
+   }
+   SOCK_UNLOCK(so);
+
UNP_LINK_WLOCK();
LIST_REMOVE(unp, unp_link);
unp->unp_gencnt = ++unp_gencnt;
@@ -1241,19 +1253,54 @@ release:
return (error);
 }
 
+static bool
+uipc_ready_scan(struct socket *so, struct mbuf *m, int count, int *errorp)
+{
+   struct mbuf *mb, *n;
+   struct sockbuf *sb;
+
+   SOCK_LOCK(so);
+   if (SOLISTENING(so)) {
+   SOCK_UNLOCK(so);
+   return (false);
+   }
+   mb = NULL;
+   sb = >so_rcv;
+   SOCKBUF_LOCK(sb);
+   if (sb->sb_fnrdy != NULL) {
+   for (mb = sb->sb_mb, n = mb->m_nextpkt; mb != NULL;) {
+   if (mb == m) {
+   *errorp = sbready(sb, m, count);
+   break;
+   }
+   mb = mb->m_next;
+   if (mb == NULL) {
+   mb = n;
+   n = mb->m_nextpkt;
+   }
+   }
+   }
+   SOCKBUF_UNLOCK(sb);
+   SOCK_UNLOCK(so);
+   return (mb != NULL);
+}
+
 static int
 uipc_ready(struct socket *so, struct mbuf *m, int count)
 {
struct unpcb *unp, *unp2;
struct socket *so2;
-   int error;
+   int error, i;
 
unp = sotounpcb(so);
 
+   KASSERT(so->so_type == SOCK_STREAM,
+   ("%s: unexpected socket type for %p", __func__, so));
+
UNP_PCB_LOCK(unp);
if ((unp2 = unp->unp_conn) == NULL) {
UNP_PCB_UNLOCK(unp);
-   goto error;
+   goto search;
}
if (unp != unp2) {
if (UNP_PCB_TRYLOCK(unp2) == 0) {
@@ -1261,25 +1308,39 @@ uipc_ready(struct socket *so, struct mbuf *m, int coun
UNP_PCB_UNLOCK(unp);
UNP_PCB_LOCK(unp2);
if (unp_pcb_rele(unp2))
-   goto error;
+   goto search;
} else
UNP_PCB_UNLOCK(unp);
}
so2 = unp2->unp_socket;
-
SOCKBUF_LOCK(>so_rcv);
if ((error = sbready(>so_rcv, m, count)) == 0)
sorwakeup_locked(so2);
else
SOCKBUF_UNLOCK(>so_rcv);
-
UNP_PCB_UNLOCK(unp2);
+   return (error);
 
+search:
+   /*
+* The receiving socket has been disconnected, but may still be valid.
+* In this case, the now-ready mbufs are still present in its socket
+* buffer, so perform an exhaustive search before giving up and freeing
+* the mbufs.
+*/
+   UNP_LINK_RLOCK();
+   LIST_FOREACH(unp, _shead, unp_link) {
+   if (uipc_ready_scan(unp->unp_socket, m, count, ))
+   break;
+   }
+   UNP_LINK_RUNLOCK();
+
+   if (unp == NULL) {
+   for (i = 0; i < count; i++)
+   m = m_free(m);
+   error = ECONNRESET;
+   }
return (error);
- error:
-   for (int i = 0; i < count; i++)
-   m = m_free(m);
-   return (ECONNRESET);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360040 - head/usr.sbin/jail

2020-04-17 Thread Eugene Grosbein
Author: eugen
Date: Fri Apr 17 10:12:11 2020
New Revision: 360040
URL: https://svnweb.freebsd.org/changeset/base/360040

Log:
  jail(8): improve manual and usage information with more clear
  description for "jail -e" mode to show that it does not take
  additional jail name argument.
  
  Reported by:  David Marec 
  MFC after:3 days

Modified:
  head/usr.sbin/jail/jail.8
  head/usr.sbin/jail/jail.c

Modified: head/usr.sbin/jail/jail.8
==
--- head/usr.sbin/jail/jail.8   Fri Apr 17 07:41:27 2020(r360039)
+++ head/usr.sbin/jail/jail.8   Fri Apr 17 10:12:11 2020(r360040)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 6, 2019
+.Dd April 17, 2020
 .Dt JAIL 8
 .Os
 .Sh NAME
@@ -49,7 +49,6 @@
 .Nm
 .Op Fl qv
 .Op Fl f Ar conf_file
-.Op Fl e Ar separator
 .Op Fl rR
 .Op Cm * | Ar jail ...
 .Nm
@@ -60,6 +59,10 @@
 .Op Fl n Ar jailname
 .Op Fl s Ar securelevel
 .Op Ar path hostname [ Ar ip Ns [ Ns Ar ,... Ns ]] Ar command ...
+.Nm
+.Op Fl f Ar conf_file
+.Fl e
+.Ar separator
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/usr.sbin/jail/jail.c
==
--- head/usr.sbin/jail/jail.c   Fri Apr 17 07:41:27 2020(r360039)
+++ head/usr.sbin/jail/jail.c   Fri Apr 17 10:12:11 2020(r360040)
@@ -1040,10 +1040,11 @@ usage(void)
(void)fprintf(stderr,
"usage: jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n"
"-[cmr] param=value ... [command=command ...]\n"
-   "   jail [-dqv] [-f file] [-e separator] -[cmr] [jail]\n"
+   "   jail [-dqv] [-f file] -[cmr] [jail]\n"
"   jail [-qv] [-f file] -[rR] ['*' | jail ...]\n"
"   jail [-dhilqv] [-J jid_file] [-u username] [-U username]\n"
"[-n jailname] [-s securelevel]\n"
-   "path hostname [ip[,...]] command ...\n");
+   "path hostname [ip[,...]] command ...\n"
+   "   jail [-f file] -e separator\n");
exit(1);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360039 - stable/11/sbin/umount

2020-04-17 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Fri Apr 17 07:41:27 2020
New Revision: 360039
URL: https://svnweb.freebsd.org/changeset/base/360039

Log:
  MFC 359916:
  
  Improve manual page formatting
  
  - Use appropriate macros for command arguments.
  - Increase option list indentation for better readability.

Modified:
  stable/11/sbin/umount/umount.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/umount/umount.8
==
--- stable/11/sbin/umount/umount.8  Fri Apr 17 07:40:56 2020
(r360038)
+++ stable/11/sbin/umount/umount.8  Fri Apr 17 07:41:27 2020
(r360039)
@@ -28,7 +28,7 @@
 .\" @(#)umount.8   8.2 (Berkeley) 5/8/95
 .\" $FreeBSD$
 .\"
-.Dd July 25, 2017
+.Dd April 14, 2020
 .Dt UMOUNT 8
 .Os
 .Sh NAME
@@ -52,7 +52,9 @@ utility calls the
 system call to remove a file system from the file system tree.
 The file system can be specified by its
 .Ar special
-device or remote node (rhost:path), the path to the mount point
+device or remote node
+.Pq Ar rhost Ns Cm \& : Ns Ar path ,
+the path to the mount point
 .Ar node
 or by the file system ID
 .Ar fsid
@@ -61,7 +63,7 @@ as reported by
 when run by root.
 .Pp
 The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width "-F fstab"
 .It Fl a
 All the file systems described in
 .Xr fstab 5
___
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: r360038 - stable/12/sbin/umount

2020-04-17 Thread Mateusz Piotrowski
Author: 0mp (doc,ports committer)
Date: Fri Apr 17 07:40:56 2020
New Revision: 360038
URL: https://svnweb.freebsd.org/changeset/base/360038

Log:
  MFC 359916:
  
  Improve manual page formatting
  
  - Use appropriate macros for command arguments.
  - Increase option list indentation for better readability.

Modified:
  stable/12/sbin/umount/umount.8
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/umount/umount.8
==
--- stable/12/sbin/umount/umount.8  Fri Apr 17 06:05:08 2020
(r360037)
+++ stable/12/sbin/umount/umount.8  Fri Apr 17 07:40:56 2020
(r360038)
@@ -28,7 +28,7 @@
 .\" @(#)umount.8   8.2 (Berkeley) 5/8/95
 .\" $FreeBSD$
 .\"
-.Dd July 25, 2017
+.Dd April 14, 2020
 .Dt UMOUNT 8
 .Os
 .Sh NAME
@@ -52,7 +52,9 @@ utility calls the
 system call to remove a file system from the file system tree.
 The file system can be specified by its
 .Ar special
-device or remote node (rhost:path), the path to the mount point
+device or remote node
+.Pq Ar rhost Ns Cm \& : Ns Ar path ,
+the path to the mount point
 .Ar node
 or by the file system ID
 .Ar fsid
@@ -61,7 +63,7 @@ as reported by
 when run by root.
 .Pp
 The options are as follows:
-.Bl -tag -width indent
+.Bl -tag -width "-F fstab"
 .It Fl a
 All the file systems described in
 .Xr fstab 5
___
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: r360025 - head/sys/dev/acpica

2020-04-17 Thread Alexey Dokuchaev
On Thu, Apr 16, 2020 at 03:12:15PM -0700, Colin Percival wrote:
> On 2020-04-16 15:05, Oliver Pinter wrote:
> > On Thursday, April 16, 2020, Colin Percival  > > wrote:
> > Log:
> >   Alert devd when acpi_video brightness changes
> > 
> > Please add this to release notes!
> 
> I considered that, but so far I don't have any evidence that other
> systems exist with the same half-working ACPI.  Unless you're aware of
> people who are seeing the same "hw.apci.video.lcd0.brightness changes
> but thebacklight doesn't" syndrome?

So this is more like a work-around for the problem which lies elsewhere:
something is missing in acpi_video(4) or perhaps we need a (nonexistent)
acpi_dell(4)?  In this case, shouldn't it be disabled by default, or at
least be toggable since as you say, evidently just a minority of systems
exist with the same half-working ACPI?

./danfe
___
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: r360036 - in head/sys: conf modules modules/krpc modules/xdr rpc xdr

2020-04-17 Thread Gleb Smirnoff
Author: glebius
Date: Fri Apr 17 06:04:20 2020
New Revision: 360036
URL: https://svnweb.freebsd.org/changeset/base/360036

Log:
  Split XDR into separate kernel module.  Make krpc depend on xdr.
  
  Reviewed by:  rmacklem
  Differential Revision:https://reviews.freebsd.org/D24408

Added:
  head/sys/modules/xdr/
  head/sys/modules/xdr/Makefile   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/conf/options
  head/sys/modules/Makefile
  head/sys/modules/krpc/Makefile
  head/sys/rpc/rpc_generic.c
  head/sys/xdr/xdr.c

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Apr 17 06:02:13 2020(r360035)
+++ head/sys/conf/files Fri Apr 17 06:04:20 2020(r360036)
@@ -4983,9 +4983,9 @@ xen/xenbus/xenbusb.c  optional xenhvm
 xen/xenbus/xenbusb_front.c optional xenhvm
 xen/xenbus/xenbusb_back.c  optional xenhvm
 xen/xenmem/xenmem_if.m optional xenhvm
-xdr/xdr.c  optional krpc | nfslockd | nfscl | nfsd
-xdr/xdr_array.coptional krpc | nfslockd | nfscl | nfsd
-xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd
-xdr/xdr_mem.c  optional krpc | nfslockd | nfscl | nfsd
-xdr/xdr_reference.coptional krpc | nfslockd | nfscl | nfsd
-xdr/xdr_sizeof.c   optional krpc | nfslockd | nfscl | nfsd
+xdr/xdr.c  optional xdr | krpc | nfslockd | nfscl | nfsd
+xdr/xdr_array.coptional xdr | krpc | nfslockd | nfscl 
| nfsd
+xdr/xdr_mbuf.c optional xdr | krpc | nfslockd | nfscl | nfsd
+xdr/xdr_mem.c  optional xdr | krpc | nfslockd | nfscl | nfsd
+xdr/xdr_reference.coptional xdr | krpc | nfslockd | nfscl | nfsd
+xdr/xdr_sizeof.c   optional xdr | krpc | nfslockd | nfscl | nfsd

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Fri Apr 17 06:02:13 2020(r360035)
+++ head/sys/conf/options   Fri Apr 17 06:04:20 2020(r360036)
@@ -469,6 +469,7 @@ TCP_RFC7413_MAX_KEYSopt_inet.h
 TCP_RFC7413_MAX_PSKS   opt_inet.h
 TCP_SIGNATURE  opt_ipsec.h
 VLAN_ARRAY opt_vlan.h
+XDR
 XBONEHACK
 
 #

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Fri Apr 17 06:02:13 2020(r360035)
+++ head/sys/modules/Makefile   Fri Apr 17 06:04:20 2020(r360036)
@@ -385,6 +385,7 @@ SUBDIR= \
${_wpi} \
${_wpifw} \
${_x86bios} \
+   xdr \
xl \
xz \
zlib

Modified: head/sys/modules/krpc/Makefile
==
--- head/sys/modules/krpc/Makefile  Fri Apr 17 06:02:13 2020
(r360035)
+++ head/sys/modules/krpc/Makefile  Fri Apr 17 06:04:20 2020
(r360036)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${SRCTOP}/sys/rpc ${SRCTOP}/sys/xdr
+.PATH: ${SRCTOP}/sys/rpc
 KMOD=  krpc
 SRCS=  auth_none.c \
auth_unix.c \
@@ -22,13 +22,6 @@ SRCS=auth_none.c \
svc_dg.c \
svc_generic.c \
svc_vc.c \
-
-SRCS+= xdr.c \
-   xdr_array.c \
-   xdr_mbuf.c \
-   xdr_mem.c \
-   xdr_reference.c \
-   xdr_sizeof.c
 
 SRCS+= opt_inet6.h
 

Added: head/sys/modules/xdr/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/modules/xdr/Makefile   Fri Apr 17 06:04:20 2020
(r360036)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+.PATH: ${SRCTOP}/sys/xdr
+KMOD=  xdr
+SRCS=  xdr.c \
+   xdr_array.c \
+   xdr_mbuf.c \
+   xdr_mem.c \
+   xdr_reference.c \
+   xdr_sizeof.c
+
+.include 

Modified: head/sys/rpc/rpc_generic.c
==
--- head/sys/rpc/rpc_generic.c  Fri Apr 17 06:02:13 2020(r360035)
+++ head/sys/rpc/rpc_generic.c  Fri Apr 17 06:04:20 2020(r360036)
@@ -882,3 +882,4 @@ DECLARE_MODULE(krpc, krpc_mod, SI_SUB_VFS, SI_ORDER_AN
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
 MODULE_VERSION(krpc, 1);
+MODULE_DEPEND(krpc, xdr, 1, 1, 1);

Modified: head/sys/xdr/xdr.c
==
--- head/sys/xdr/xdr.c  Fri Apr 17 06:02:13 2020(r360035)
+++ head/sys/xdr/xdr.c  Fri Apr 17 06:04:20 2020(r360036)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -836,3 +837,20 @@ xdr_u_longlong_t(XDR *xdrs, u_longlong_t *ullp)
 */
return (xdr_uint64_t(xdrs, (uint64_t *)ullp));
 }
+
+/*
+ * Kernel module glue
+ */
+static int
+xdr_modevent(module_t mod, 

svn commit: r360037 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2020-04-17 Thread Gleb Smirnoff
Author: glebius
Date: Fri Apr 17 06:05:08 2020
New Revision: 360037
URL: https://svnweb.freebsd.org/changeset/base/360037

Log:
  Make ZFS depend on xdr.ko only.  It doesn't need kernel RPC.
  
  Differential Revision:https://reviews.freebsd.org/D24408

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Apr 
17 06:04:20 2020(r360036)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Apr 
17 06:05:08 2020(r360037)
@@ -7333,6 +7333,6 @@ static moduledata_t zfs_mod = {
 DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY);
 MODULE_VERSION(zfsctrl, 1);
 MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1);
-MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1);
+MODULE_DEPEND(zfsctrl, xdr, 1, 1, 1);
 MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1);
 MODULE_DEPEND(zfsctrl, zlib, 1, 1, 1);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r360035 - in head/sys: rpc xdr

2020-04-17 Thread Gleb Smirnoff
Author: glebius
Date: Fri Apr 17 06:02:13 2020
New Revision: 360035
URL: https://svnweb.freebsd.org/changeset/base/360035

Log:
  Move M_RPC malloc type into XDR.  Both RPC and XDR libraries use
  this type, but since RPC depends on XDR (not vice versa) we need
  it defined in XDR to make the module loadable without RPC.
  
  Reviewed by:  rmacklem
  Differential Revision:https://reviews.freebsd.org/D24408

Modified:
  head/sys/rpc/rpc_prot.c
  head/sys/xdr/xdr.c

Modified: head/sys/rpc/rpc_prot.c
==
--- head/sys/rpc/rpc_prot.c Fri Apr 17 05:59:38 2020(r360034)
+++ head/sys/rpc/rpc_prot.c Fri Apr 17 06:02:13 2020(r360035)
@@ -61,8 +61,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call");
-
 #define assert(exp)KASSERT(exp, ("bad arguments"))
 
 static enum clnt_stat accepted(enum accept_stat, struct rpc_err *);

Modified: head/sys/xdr/xdr.c
==
--- head/sys/xdr/xdr.c  Fri Apr 17 05:59:38 2020(r360034)
+++ head/sys/xdr/xdr.c  Fri Apr 17 06:02:13 2020(r360035)
@@ -65,6 +65,8 @@ typedef u_quad_tu_longlong_t;   /* ANSI unsign
 #define XDR_FALSE  ((long) 0)
 #define XDR_TRUE   ((long) 1)
 
+MALLOC_DEFINE(M_RPC, "rpc", "Remote Procedure Call");
+
 /*
  * for unit alignment
  */
___
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: r360034 - head/sys/netgraph

2020-04-17 Thread Gleb Smirnoff
Author: glebius
Date: Fri Apr 17 05:59:38 2020
New Revision: 360034
URL: https://svnweb.freebsd.org/changeset/base/360034

Log:
  Don't initialize m->m_data to m->m_pktdat, this is already done by the
  mbuf allocator.  That was the last remnant of such code in the kernel.

Modified:
  head/sys/netgraph/ng_tty.c

Modified: head/sys/netgraph/ng_tty.c
==
--- head/sys/netgraph/ng_tty.c  Fri Apr 17 02:22:15 2020(r360033)
+++ head/sys/netgraph/ng_tty.c  Fri Apr 17 05:59:38 2020(r360034)
@@ -439,7 +439,6 @@ ngt_rint_bypass(struct tty *tp, const void *buf, size_
 * Odd, we have changed from non-bypass to bypass. It is
 * unlikely but not impossible, flush the data first.
 */
-   sc->m->m_data = sc->m->m_pktdat;
NG_SEND_DATA_ONLY(error, sc->hook, sc->m);
sc->m = NULL;
}
@@ -495,7 +494,6 @@ ngt_rint(struct tty *tp, char c, int flags)
 
/* Ship off mbuf if it's time */
if (sc->hotchar == -1 || c == sc->hotchar || m->m_len >= MHLEN) {
-   m->m_data = m->m_pktdat;
sc->m = NULL;
NG_SEND_DATA_ONLY(error, sc->hook, m);  /* Will queue */
}
___
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"