summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | accept_filter(9): Fix a mandoc related errorGordon Bergling2020-12-191-1/+1
| | | | | | | | | | | | | | - no blank before trailing delimiter Notes: svn path=/head/; revision=368790
* | rtld-elf: link udivmoddi4 from compiler_rtRyan Libby2020-12-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the gcc9 build of rtld-elf32 on amd64, which needed an implementation of udivmoddi4. rtld-elf uses certain functions normally found in libc, and so it includes certain files from libc in its own build. It has two mechanisms to include files from libc: one that rebuilds source files in the rtld-elf environment, and one that extracts object files from a purpose-built no-SSP PIC archive. In addition to libc functions, rtld-elf may need to link functions normally found in libcompiler_rt (formerly libgcc). Now, add an ability to rebuild libcompiler_rt source files in the rtld-elf environment. We don't yet have a need for an object file extraction mechanism. libcompiler_rt could also supply udivdi3 and umoddi3, but leave them alone for now. Reviewed by: arichardson, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27665 Notes: svn path=/head/; revision=368789
* | rtld-libc: fix incremental buildRyan Libby2020-12-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ar cr is an update of an archive, not a creation of a new one. During incremental builds (e.g. with meta mode) the archive was not getting cleaned, and so could retain now-deleted objects from previous builds. Now, delete the archive before creating/updating it. Reviewed by: arichardson, bdrewery, kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27663 Notes: svn path=/head/; revision=368788
* | kern: cpuset: allow jails to modify child jails' rootsKyle Evans2020-12-191-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially lifts a restriction imposed by r191639 ("Prevent a superuser inside a jail from modifying the dedicated root cpuset of that jail") that's perhaps beneficial after r192895 ("Add hierarchical jails."). Jails still cannot modify their own cpuset, but they can modify child jails' roots to further restrict them or widen them back to the modifying jails' own mask. As a side effect of this, the system root may once again widen the mask of jails as long as they're still using a subset of the parent jails' mask. This was previously prevented by the fact that cpuset_getroot of a root set will return that root, rather than the root's parent -- cpuset_modify uses cpuset_getroot since it was introduced in r327895, previously it was just validating against set->cs_parent which allowed the system root to widen jail masks. Reviewed by: jamie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27352 Notes: svn path=/head/; revision=368779
* | login(1): when exporting variables check the result of setenv(3)Pedro F. Giffuni2020-12-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. (This change redoes r368776 due to a silly mistake) Notes: svn path=/head/; revision=368778
* | Revert r368776:Pedro F. Giffuni2020-12-191-4/+1
| | | | | | | | | | | | | | | | | | | | login(1): when exporting variables check the result of setenv(3) mismatch: the return value upon error is -1, so the code was not doing nothing. Notes: svn path=/head/; revision=368777
* | login(1): when exporting variables check the result of setenv(3)Pedro F. Giffuni2020-12-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When exporting a variable we correctly check all the preconditions that could make setenv(3) fail. Checking the setenv(3) return value seems redundant, but given that login(1) is critical, it doesn't hurt to have a post-check. This change is based on the "Principles of Secure Coding" course by Matthew Bishop, PhD., which specifically discusses this code in FreeBSD. Differential Revision: https://reviews.freebsd.org/D26966 Notes: svn path=/head/; revision=368776
* | Remove redundand redefinion, fixing build.Konstantin Belousov2020-12-191-2/+0
| | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=368775
* | usb: Replace ITUNERNET vendor with MICROCHIP and improve product namesJessica Clarke2020-12-182-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These Mini-Box LCDs are using Microchip components and sub-licensed product IDs. Whilst here, update the constant names and descriptions for the products to use the names listed on the manufacturer's website rather than vague ones. The picoLCD 4x20 is named that on the manufacturer's website so prefer that name, even though linux-usb.org lists it with the numbers reversed as one might expect. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D27670 Notes: svn path=/head/; revision=368774
* | Rename pass4check() to freeblock() and move from pass4.c to inode.c.Kirk McKusick2020-12-185-47/+41
| | | | | | | | | | | | | | | | | | | | | | | | The new name more accurately describes what it does and the file move puts it with other similar functions. Done in preparation for future cleanups. No functional differences intended. Sponsored by: Netflix Historic Footnote: my last FreeBSD svn commit Notes: svn path=/head/; revision=368773
* | Add ELF flag to disable ASLR stack gap.Konstantin Belousov2020-12-186-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | Also centralize and unify checks to enable ASLR stack gap in a new helper exec_stackgap(). PR: 239873 Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=368772
* | proc.h: Reformat P_ and P2_ definitions.Konstantin Belousov2020-12-181-45/+66
| | | | | | | | | | | | | | | | | | | | | | | | Use traditional explicit leading zero format for hex numbers. Align P2_ hex values. Wrap long lines by splitting comments. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=368771
* | strerror.3: Fix whitespace issue introduced in r368714Jessica Clarke2020-12-181-1/+1
| | | | | | | | | | | | | | MFC with: 368714 Notes: svn path=/head/; revision=368770
* | Switch direct rt fields access in rtsock.c to newly-create field acessors.Alexander V. Chernikov2020-12-181-38/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rtsock code was build around the assumption that each rtentry record in the system radix tree is a ready-to-use sockaddr. This assumptions turned out to be not quite true: * masks have their length tweaked, so we have rtsock_fix_netmask() hack * IPv6 addresses have their scope embedded, so we have another explicit deembedding hack. Change the code to decouple rtentry internals from rtsock code using newly-created rtentry accessors. This will allow to eventually eliminate both of the hacks and change rtentry dst/mask format. Differential Revision: https://reviews.freebsd.org/D27451 Notes: svn path=/head/; revision=368769
* | Skip the vm.pmap.kernel_maps sysctl by default.John Baldwin2020-12-184-4/+4
| | | | | | | | | | | | | | | | | | | | | | This sysctl node can generate very verbose output, so don't trigger it for sysctl -a or sysctl vm.pmap. Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D27504 Notes: svn path=/head/; revision=368768
* | riscv: report additional known SBI implementationsMitchell Horne2020-12-182-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | These implementation IDs are defined in the SBI spec, so we should print their name if detected. Submitted by: Danjel Qyteza <danq1222@gmail.com> Reviewed by: jhb, kp Differential Revision: https://reviews.freebsd.org/D27660 Notes: svn path=/head/; revision=368767
* | arm64: rk3399: Export the watchdog clockEmmanuel Vadot2020-12-181-0/+5
| | | | | | | | | | | | | | | | This clock is used by the watchdog IP and can be controlled only in the secure world. Notes: svn path=/head/; revision=368766
* | amd64: use register macros for gdb_cpu_getreg()Mitchell Horne2020-12-182-22/+25
| | | | | | | | | | | | | | | | | | | | | | Prefer these newly-added definitions to bare values. MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Notes: svn path=/head/; revision=368765
* | amd64: allow gdb(4) to write to most registersMitchell Horne2020-12-182-4/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the recent patch to arm's gdb stub in r368414, allow GDB to update the contents of most general purpose registers. Reviewed by: cem, jhb, markj MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. NetApp PR: 44 Differential Revision: https://reviews.freebsd.org/D27642 Notes: svn path=/head/; revision=368764
* | acpi: Ensure that adjacent memory affinity table entries are coalescedMark Johnston2020-12-181-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SRAT may contain multiple distinct entries that together describe a contiguous region of physical memory. In this case we were not coalescing the corresponding entries in the memory affinity table, which led to fragmented phys_avail[] entries. Since r338431 the vm_phys_segs[] entries derived from phys_avail[] will be coalesced, resulting in a situation where vm_phys_segs[] entries do not have a covering phys_avail[] entry. vm_page_startup() will not add such segments to the physical memory allocator, leaving them unused. Reported by: Don Morris <dgmorris@earthlink.net> Reviewed by: kib, vangyzen MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27620 Notes: svn path=/head/; revision=368763
* | Fix the ipfw service status output when ipfw.ko isn't loadedMark Johnston2020-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | Reported by: lme Reviewed by: lme MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27657 Notes: svn path=/head/; revision=368762
* | virtio_mmio: Fix feature negotiation copy-paste issue in r361943Jessica Clarke2020-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused us to write to the low half of the feature word twice, once with the high bits and once with the low bits. Common legacy device implementations seem to be fairly lenient about being able to write to the feature bits multiple times, but Arm's models use a stricter implementation that will ignore the second write. This fixes using vtnet(4) on those models. Reported by: Jean-Philippe Brucker <jean-philippe@linaro.org> Pointy hat: jrtc27 Notes: svn path=/head/; revision=368761
* | Fix abort in jemalloc extent coalescing.Marcin Wojtas2020-12-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error in extent_try_coalesce_impl(), which could cause abort to happen when trying to coalesce extents backwards. The error could happen because of how extent_before_get() function works. This function gets address of previous extent, by subtracting page size from current extent address. If current extent is located at PAGE_SIZE offset, this address resolved to 0x0000. An assertion in rtree_leaf_elm_lookup then caused the running program to abort. This problem was discovered when trying to build world on 32-bit machines with ASLR and PIE enabled. The problem was encountered on armv7 and i386 machines, but most likely other 32-bit architectures are affected as well. While this patch fixes one problem with buildworld on 32-bit platforms with ASLR, the build still fails, however it happens much later and due to lack of memory. The change is aligned with accepted fix in the upstream Jemalloc repository (https://github.com/jemalloc/jemalloc/pull/1973). As it doesn't apply on top of Jemalloc tree, its updated version was eventually merged: https://github.com/jemalloc/jemalloc/pull/2003 PR: 249937 Submitted by: Dawid Gorecki <dgr@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D27025 Notes: svn path=/head/; revision=368756
* | tools/tools/locale: fix static-colldefYuri Pankov2020-12-181-2/+1
| | | | | | | | Notes: svn path=/head/; revision=368754
* | MFV r368746:Xin LI2020-12-184-23/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply upstream fix 08968baec1122a58bb90d8f97ad948a75f8a5d69: Fix error cases when udp-connect is set and send() returns an error Obtained from: unbound git MFC after: 3 days Notes: svn path=/head/; revision=368751
| * | Apply upstream fix 08968baec1122a58bb90d8f97ad948a75f8a5d69:vendor/unboundXin LI2020-12-175-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix error cases when udp-connect is set and send() returns an error Approved by: git-admin (uqs) Notes: svn path=/vendor/unbound/dist/; revision=368746
* | | tools/tools/locale: install generated files in current src checkoutYuri Pankov2020-12-181-1/+1
| | | | | | | | | | | | Notes: svn path=/head/; revision=368750
* | | pci_iov: When pci_iov_detach(9) is called, destroy VF childrenKonstantin Belousov2020-12-181-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of bailing out with EBUSY if there are any. If driver module is unloaded, or just device is forcibly detached from the driver, there is no way for driver to correctly unload otherwise. Esp. if there are resources dedicated to the VFs which prevent turning down other resources. Reviewed by: jhb Sponsored by: Mellanox Technologies / NVidia Networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27615 Notes: svn path=/head/; revision=368749
* | | Fix issues with various VNC clients.Peter Grehan2020-12-181-104/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - support VNC version 3.3 (macos "Screen Sharing" builtin client) - wait until client has requested an update prior to sending framebuffer data - don't send an update if no framebuffer updates detected - increase framebuffer poll frequency to 30Hz, and double that when kbd/mouse input detected - zero uninitialized array elements in rfb_send_server_init_msg() - fix overly large allocation in rfb_init() - use atomics for flags shared between input and output threads - use #defines for constants This work was contributed by Marko Kiiskila, with reuse of some earlier work by Henrik Gulbrandsen. Clients tested : FreeBSD-current - tightvnc - tigervnc - krdc - vinagre Linux (Ubuntu) - krdc - vinagre - tigervnc - xtightvncviewer - remmina MacOS - VNC Viewer - TigerVNC - Screen Sharing (builtin client) Windows 10 - Tiger VNC - VNC Viewer (cursor lag) - UltraVNC (cursor lag) o/s independent - noVNC (browser) using websockify relay PR: 250795 Submitted by: Marko Kiiskila <marko@apache.org> Reviewed by: jhb (bhyve) MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27605 Notes: svn path=/head/; revision=368747
* | | ice: quiet -Wredundant-declsRyan Libby2020-12-171-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reapply r364240 after driver update in r365617. Reviewed by: lwhsu Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D27561 Notes: svn path=/head/; revision=368745
* | | VFS_QUOTACTL: Remove needless casts of argBrooks Davis2020-12-172-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The argument is a void * so there's no need to cast it to caddr_t. Update documentation to match function decleration. Reviewed by: freqlabs Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27093 Notes: svn path=/head/; revision=368744
* | | net tests: Re-enable most if_clone testsKristof Provost2020-12-171-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | All but one of these (tap_ipv6_up_stress) currently pass, so we should enable them so we don't regress. Notes: svn path=/head/; revision=368743
* | | Fix f_pkt_into_t typo.Alexander Motin2020-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368742
* | | Use __containerof() instead of home-rolled versions.John Baldwin2020-12-175-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: imp, hselasky Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27582 Notes: svn path=/head/; revision=368741
* | | Describe the commit message template our git hook script producesEd Maste2020-12-171-1/+10
| | | | | | | | | | | | | | | | | | | | | Reported by: rpokala Notes: svn path=/head/; revision=368740
* | | Use a template assembly file for firmware object files.John Baldwin2020-12-174-16/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to r366897, this uses the .incbin directive to pull in a firmware file's contents into a .fwo file. The same scheme for computing symbol names from the filename is used as before to maximize compatiblity and not require rebuilding existing .fwo files for NO_CLEAN builds. Using ld -o binary requires extra hacks in linkers to either specify ABI options (e.g. soft- vs hard-float) or to ignore ABI incompatiblities when linking certain objects (e.g. object files with only data). Using the compiler driver avoids the need for these hacks as the compiler driver is able to set all the appropriate ABI options. Reviewed by: imp, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27579 Notes: svn path=/head/; revision=368739
* | | Cleanups to *ERR* compat shims.John Baldwin2020-12-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use [u]intptr_t casts to convert pointers to integers. - Change IS_ERR* to return bool instead of long. Reviewed by: manu Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27577 Notes: svn path=/head/; revision=368738
* | | chmod +x the git commit message prep hookEd Maste2020-12-171-0/+0
| | | | | | | | | | | | Notes: svn path=/head/; revision=368737
* | | Add initial version of git commit message preparation hookEd Maste2020-12-171-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start with a slightly modified version of the SVN commit template, to allow developers to experiment. This will be updated in the future as our process and techniques evolve. This can be installed by copying or symlinking into the .git/hooks/ directory. Feedback from: cem, jhb Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27633 Notes: svn path=/head/; revision=368736
* | | Fix a race in tty_signal_sessleader() with unlocked read of s_leader.Konstantin Belousov2020-12-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we do not own the session lock, a parallel killjobc() might reset s_leader to NULL after we checked it. Read s_leader only once and ensure that compiler is not allowed to reload. While there, make access to t_session somewhat more pretty by using local variable. PR: 251915 Submitted by: Jakub Piecuch <j.piecuch96@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=368735
* | | Update the unbound version number from r368478.Cy Schubert2020-12-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updating the version number is an extra manual step. Pointy hat to: cy Reported by: Herbert J. Skuhra <herbert _ gojira.at> MFC after: 3 days Notes: svn path=/head/; revision=368734
* | | fd: reimplement close_range to avoid spurious relockingMateusz Guzik2020-12-171-25/+30
| | | | | | | | | | | | Notes: svn path=/head/; revision=368732
* | | audit: rework AUDIT_SYSCLOSEMateusz Guzik2020-12-173-20/+19
| | | | | | | | | | | | | | | | | | | | | This in particular avoids spurious lookups on close. Notes: svn path=/head/; revision=368731
* | | fd: refactor closefp in preparation for close_range reworkMateusz Guzik2020-12-171-21/+43
| | | | | | | | | | | | Notes: svn path=/head/; revision=368730
* | | lualoader: fix lua-lint runKyle Evans2020-12-172-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | luacheck rightfully complains that i is unused in the show-module-options loop at the end (it was used for some debugging in the process). We've added a new pager module that's compiled in, so declare that as an acceptable global. Notes: svn path=/head/; revision=368729
* | | lualoader: cli: provide a show-module-options loader commandKyle Evans2020-12-174-2/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This effectively dumps everything lualoader knows about to the console using the libsa pager; that particular lua interface was added in r368591. A pager stub implementation has been added that just dumps the output as-is as a compat shim for older loader binaries that do not have lpager. This stub should be moved into a more appropriate .lua file if we add anything else that needs the pager. Notes: svn path=/head/; revision=368728
* | | [ng_socket] Don't take the SOCKBUF_LOCK() twice in the RX data path.Aleksandr Fedorov2020-12-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just a minor optimization, but it's sensitive. This gives an improvement of 30-50 kpps. Reviewed by: kp, markj, glebius, lutz_donnerhacke.de Approved by: vmaffione (mentor) Sponsored by: vstack.com Differential Revision: https://reviews.freebsd.org/D27382 Notes: svn path=/head/; revision=368727
* | | Add IRQ resource to SPIBUSEmmanuel Vadot2020-12-173-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add capability to SPIBUS to have child device with IRQ. For example many ADC chip have a dedicated pin to signal "data ready" and the host can just wait for a interrupt to go out and read the result. It is the same code as in R282674 and R282702 for IICBUS by Michal Meloun Submitted by: Oskar Holmund <oskar.holmlund@ohdata.se> Differential Revision: https://reviews.freebsd.org/D27396 Notes: svn path=/head/; revision=368725
* | | arm: Remove samsung exnynos portEmmanuel Vadot2020-12-1727-6236/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the exynos SoC support, this haven't been updated in a while, isn't present in GENERIC and nobody is motivated to resurect it. Differential Revision: https://reviews.freebsd.org/D24444 Notes: svn path=/head/; revision=368724
* | | Change POSIX compliance level for visibility of strerror_l(3).Konstantin Belousov2020-12-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Third-party code tests for strerror_l(3) without specifying _POSIX_SOURCE, and then expects that the function is prototyped with _POSIX_SOURCE set to 200112. Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 13 days Notes: svn path=/head/; revision=368723