FreeBSD/src 2469f84lib/libc/gen exterr_cat_filenames.h, sys/kern tty.c

kern/tty.c: Exterrorize returns

(cherry picked from commit 62ccaec3dba6272590d97cc0aa0df28fd3d08d1c)
DeltaFile
+27-22sys/kern/tty.c
+1-0sys/sys/exterr_cat.h
+1-0lib/libc/gen/exterr_cat_filenames.h
+29-223 files

FreeBSD/src c41e308sys/kern tty_pts.c tty.c, sys/sys tty.h

tty: gracefully handle proctree_lock locking

(cherry picked from commit 420428718da769ea72d3f18ed8eba7c3d998b1c8)
DeltaFile
+209-172sys/kern/tty.c
+3-0sys/sys/tty.h
+3-0sys/kern/tty_pts.c
+215-1723 files

FreeBSD/src 5362192sys/kern tty_ttydisc.c tty.c, sys/sys tty.h

tty: make tty_wait_background() aware of proctree_lock ownership

(cherry picked from commit 824f934bf9d5fcb34dd6c97d650a26823158abf1)
DeltaFile
+11-5sys/kern/tty.c
+8-4sys/kern/tty_ttydisc.c
+2-1sys/sys/tty.h
+21-103 files

FreeBSD/src a585570sys/kern tty.c

tty: add tty_wait_proctree(9)

(cherry picked from commit 9bd3fe5712217ef8ae4cebba8be82c45be0c72e6)
DeltaFile
+39-0sys/kern/tty.c
+39-01 files

FreeBSD/src 124ccedshare/man/man9 condvar.9

condvar.9: document cv_wait_sig_unblock(9)

(cherry picked from commit a15c71254afa25ce008334d63fb6feecd68605f8)
DeltaFile
+10-1share/man/man9/condvar.9
+10-11 files

FreeBSD/src 3867241sys/kern kern_condvar.c, sys/sys condvar.h

condvars(9): add cv_wait_sig_unlock()

(cherry picked from commit 0cc6c442964d6294b796537522d9e462656bf16f)
DeltaFile
+55-0sys/kern/kern_condvar.c
+3-0sys/sys/condvar.h
+58-02 files

FreeBSD/src 5b10e1ctests/sys/kern procdesc.c

tests/sys/kern/procdesc.c: mark grandchild var in pdopenpid_capmode() as volatile

(cherry picked from commit b3734c1386dd2b0ade1a7f20d9ebf5f62c01819e)
DeltaFile
+2-1tests/sys/kern/procdesc.c
+2-11 files

FreeBSD/src 2fbb853tests/sys/kern procdesc.c

sys/tests/kern/pdopenpid: pdopenpid(2) is allowed in cap mode

(cherry picked from commit ddf62c83fc0aca39a1bfd8346ad6e925bfb2290e)
DeltaFile
+34-4tests/sys/kern/procdesc.c
+34-41 files

FreeBSD/src fe56ee2sys/kern sys_process.c

ptrace(2): allow ptrace(PT_TRACE_ME) in cap mode

(cherry picked from commit c8f8d00c2422bf7eca71b7b41e9d586ca25c4b8a)
DeltaFile
+2-0sys/kern/sys_process.c
+2-01 files

FreeBSD/src 665a5f0sys/compat/freebsd32 freebsd32_sysent.c, sys/kern init_sysent.c

Regen
DeltaFile
+3-3sys/kern/init_sysent.c
+3-3sys/compat/freebsd32/freebsd32_sysent.c
+6-62 files

FreeBSD/src 201fd5blib/libsys ptrace.2 pdfork.2

pdfork.2: document cap mode, namely pdopenpid(2) and pdptrace(2) errors

(cherry picked from commit 1ac08a43cf657564ebc2e036434e89552a6d3829)
DeltaFile
+33-0lib/libsys/pdfork.2
+10-0lib/libsys/ptrace.2
+43-02 files

FreeBSD/src 74145b2sys/kern syscalls.master sys_procdesc.c

pdopenpid(2): allow in capability mode with restrictions

(cherry picked from commit 73c92a978ccef5e1683914510ea35e6e338646d1)
DeltaFile
+6-0sys/kern/sys_procdesc.c
+1-1sys/kern/syscalls.master
+7-12 files

FreeBSD/src c09ee2fsys/kern sys_procdesc.c

pdopenpid(2): in cap mode, translate all errors from pdopenpid1() to ECAPMODE

(cherry picked from commit 326ab530dcabe70ab48728cad0465f35b30dbf60)
DeltaFile
+3-0sys/kern/sys_procdesc.c
+3-01 files

FreeBSD/src 5e9d42fsys/kern sys_process.c kern_prot.c, sys/sys ptrace.h proc.h

kern: add p_canopen()

(cherry picked from commit 68d4b311270ecca80bbb887a5e502e2caacebc98)
DeltaFile
+26-2sys/kern/kern_prot.c
+5-0sys/kern/sys_process.c
+1-0sys/sys/ptrace.h
+1-0sys/sys/proc.h
+33-24 files

FreeBSD/src 1cab7e2sys/compat/freebsd32 freebsd32_misc.c, sys/kern syscalls.master sys_process.c

pdptrace(2): allow debugging in capability mode

(cherry picked from commit 7006cb7bd22d07d2ce30b0fb7ebfe58771b2a32f)
DeltaFile
+22-4sys/kern/sys_process.c
+2-2sys/kern/syscalls.master
+0-3sys/compat/freebsd32/freebsd32_misc.c
+24-93 files

FreeBSD/src 547bce6lib/libsys ptrace.2

ptrace.2: document PT_GET_ABI_NAME

(cherry picked from commit 3dfd63b58463e8982af2e45fc6dc1d5b03a88535)
DeltaFile
+11-0lib/libsys/ptrace.2
+11-01 files

FreeBSD/src 39321b7sys/compat/freebsd32 freebsd32_misc.c, sys/kern sys_process.c

ptrace(2): add PT_GET_ABI_NAME request

(cherry picked from commit 6b9ef5dfc903c29e1d23bb6369b762251f2608f7)
DeltaFile
+19-1sys/kern/sys_process.c
+12-0sys/compat/freebsd32/freebsd32_misc.c
+1-0sys/sys/ptrace.h
+32-13 files

FreeBSD/src bba959ftests/sys/kern pdwait.c

tests/sys/kern/pdwait: adjust test for the addition of CAP_PTRACE

(cherry picked from commit 5f5910ba3826435391d3e5b9ba9155376ec0b39d)
DeltaFile
+1-1tests/sys/kern/pdwait.c
+1-11 files

FreeBSD/src 48e709blib/libsys ptrace.2 pdfork.2, share/man/man4 rights.4

pdfork.2, rights.4: document pdptrace(2), CAP_PTRACE, and pdfork(PD_PTRACE_CAP)

(cherry picked from commit 45633600acade39cccc3b8daace7b3aeeb1f5b07)
DeltaFile
+48-3lib/libsys/pdfork.2
+3-0share/man/man4/rights.4
+1-0lib/libsys/ptrace.2
+52-33 files

FreeBSD/src c3d0110sys/compat/freebsd32 freebsd32_proto.h freebsd32_systrace_args.c, sys/kern systrace_args.c

Regen
DeltaFile
+38-0sys/kern/systrace_args.c
+38-0sys/compat/freebsd32/freebsd32_systrace_args.c
+9-0sys/sys/sysproto.h
+9-0sys/compat/freebsd32/freebsd32_proto.h
+2-1sys/sys/syscall.mk
+2-1sys/sys/syscall.h
+98-27 files not shown
+108-313 files

FreeBSD/src fbf7d16lib/libsys Symbol.sys.map, sys/sys procdesc.h

lib/libsys: export pdptrace(2)

(cherry picked from commit 6d17a04fc61c63182809dd41515e6a2c4aa0de63)
DeltaFile
+1-0sys/sys/procdesc.h
+1-0lib/libsys/Symbol.sys.map
+2-02 files

FreeBSD/src 73e3e21sys/kern sys_procdesc.c kern_fork.c, sys/sys procdesc.h

pdfork(2): add PD_PTRACE_CAP flag

(cherry picked from commit e8c313204887e7ba47b5c349acbe37d64a3162a1)
DeltaFile
+14-0sys/kern/kern_fork.c
+6-1sys/kern/sys_procdesc.c
+4-2sys/sys/procdesc.h
+24-33 files

FreeBSD/src 74883c2sys/compat/freebsd32 freebsd32_misc.c, sys/kern syscalls.master sys_process.c

Add pdptrace(2)

(cherry picked from commit f8c0616052e2befaf7271fa82b212ff34a7913af)
DeltaFile
+61-22sys/kern/sys_process.c
+19-5sys/compat/freebsd32/freebsd32_misc.c
+9-0sys/kern/syscalls.master
+2-2sys/sys/ptrace.h
+91-294 files

FreeBSD/src f83c242sys/compat/freebsd32 freebsd32_misc.c, sys/kern sys_process.c

ptrace: split sys_ptrace()/freebsd32_ptrace()

(cherry picked from commit 9cea869940f197d558f640b6851d44a213be9e8a)
DeltaFile
+65-64sys/compat/freebsd32/freebsd32_misc.c
+62-54sys/kern/sys_process.c
+2-0sys/sys/ptrace.h
+129-1183 files

FreeBSD/src 06259desys/bsm audit_kevents.h

sys/bsm/audit_kevents.h: add AUE_PDPTRACE

(cherry picked from commit b2f300ee8fc03a05376e1c28a625d701f6d3e0ce)
DeltaFile
+1-0sys/bsm/audit_kevents.h
+1-01 files

FreeBSD/src 2eff633sys/kern kern_descrip.c, sys/sys filedesc.h

kern/kern_descrip.c: export filecaps_fill()

(cherry picked from commit 8c911d9a9890128ef8f20ead1748ffcbd9f24577)
DeltaFile
+1-1sys/kern/kern_descrip.c
+1-0sys/sys/filedesc.h
+2-12 files

FreeBSD/src 34bc2dasys/kern subr_capability.c, sys/sys caprights.h capsicum.h

capsicum: add CAP_PTRACE

(cherry picked from commit 5f82dd8e91610ceafe7ddbc702d97ffe7573f53f)
DeltaFile
+5-3sys/sys/capsicum.h
+1-0sys/sys/caprights.h
+1-0sys/kern/subr_capability.c
+7-33 files

FreeBSD/src b88d20esys/dev/pci pci_iov.c pci_private.h

pci: Expose a VF's owning PF to bus subclasses

ofw_pcibus now uses pci_iov_get_pf() to inherit PF locality for
VFs, but the accessor was inadvertently left in an uncommited ACPI
change.  This breaks powerpc builds.

Expose the accessor from the PCI core and provide a stub when PCI_IOV
is omitted.  Record VF ownership before pci_add_child() so child added
callbacks can safely query it, and remove the later redundant
assignment.

Sponsored by:   BBOX.io

(cherry picked from commit 3481a9cdc4dc26ef583bb0f46a04d5d059cde466)
DeltaFile
+25-0sys/dev/pci/pci.c
+0-1sys/dev/pci/pci_iov.c
+1-0sys/dev/pci/pci_private.h
+26-13 files

FreeBSD/src 7e26319sys/dev/e1000 em_txrx.c

e1000: Limit the TSO sentinel to lem(4) controllers

The TSO workaround splits the final DMA segment to create a four byte
sentinel descriptor.  Intel documents the premature descriptor writeback
erratum and this workaround in the 82540EP and 82545GM specification
updates (erratum 3) and the 82546GB specification update (erratum 1).

Limit the workaround and its preceding TSO state to the legacy PCI and
PCI-X controllers so PCIe controllers retain their natural descriptor
layout using one fewer descriptor per TSO packet, no split of the final
segment, and one less four byte DMA.

Sponsored by:   BBOX.io

(cherry picked from commit 2a7af8ebcf90af83f01f9523b25bfc6e58c7b809)
DeltaFile
+6-2sys/dev/e1000/em_txrx.c
+6-21 files

FreeBSD/src ac364c3sys/powerpc/ofw ofw_pcibus.c, sys/powerpc/pseries plpar_pcibus.c

ofw_pcibus: Honor device proximity for DMA tags

BUS_GET_DOMAIN can report a PCI function's firmware locality, including
an SR-IOV VF's inherited PF locality, but ordinary OFW PCI functions
still use the shared bus DMA tag.  Consequently, busdma metadata and
coherent memory can be allocated from the bus's domain instead of the
function's domain.

Create and cache a child tag for each function that requests a DMA tag
and apply its reported domain without modifying the shared parent tag.
Apply the same domain to the private IOMMU tag already created by the
pSeries PCI bus.  Destroy cached tags when PCI children are removed so
VF create and destroy cycles do not leak them.

Reviewed by:    PowerPC (jhibbits)
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59065

(cherry picked from commit df6bbc9b17dcb75e220b9ab44f5a6483b47c562e)
DeltaFile
+31-0sys/powerpc/ofw/ofw_pcibus.c
+3-0sys/powerpc/pseries/plpar_pcibus.c
+34-02 files