FreeBSD Development Report Q2020 XNUMX

Published report on the development of the FreeBSD project from January to March 2020. Changes include:

  • General and system questions
    • Removed the GCC compiler suite from the FreeBSD-CURRENT source tree, as well as the unused utilities gperf, gcov, and gtc (devicetree compiler). All platforms that do not support Clang have been switched to using external build tools installed from ports. The base system shipped an outdated 4.2.1 release of GCC, and integration of newer versions was not possible due to 4.2.2's switch to the GPLv3 license, which was deemed unacceptable for FreeBSD core components. Current releases of GCC, including GCC 9, can still be installed from packages and ports.
    • Support for the sendfile system call, TCP_CORK mode (required for nginx), MAP_32BIT flag (solves the problem with running packages with Mono from Ubuntu Bionic) has been added to the Linux environment emulation infrastructure (Linuxulator). Fixed issues with DNS resolution when using glibc newer than 2.30 (e.g. from CentOS 8).
      The Continuous Integration Framework provides running jobs to run an LTP (Linux Testing Project) under the Linuxulator to test improvements to the code to support Linux. About 400 tests fail and need to be fixed (some bugs are due to false positives, some require trivial fixes, but there are others that require new system call support to be fixed). Work has been done to clean up the Linuxulator code and simplify debugging. Prepared, but not yet reviewed, patches with support for extended attributes and the fexecve system call.

    • The meetings of the working group created to carry out the migration of source codes from the centralized source code management system Subversion to the decentralized Git system continue. A report with proposals for migration is in the process of being prepared.
    • В rtld (runtime linker) improved direct execution mode ("/libexec/ld-elf.so.1 {path} {arguments}").
    • A project to fuzz test the FreeBSD kernel using the syzkaller system continues to develop. During the reporting period, problems were fixed in the network stack and code for working with file descriptor tables, identified using syzkaller. In the wake of error diagnostics, changes have been added to the SCTP stack to make debugging easier. Added rules to the stress2 set to detect possible regressions. Added support for fuzzing testing new system calls, including copy_file_range(), __realpathat() and calls to the Capsicum subsystem. Work continues to cover the Linux emulation layer with fuzzing testing. Analyzed and eliminated the errors noted in the latest Coverity Scan reports.
    • In the continuous integration system, a transition was made to executing all tests of the head branch only using clang/lld. When testing for RISC-V, the formation of a complete disk image is provided for running tests in QEMU using OpenSBI. Added new tasks for testing powerpc64 images and virtual machines (FreeBSD-head-powerpc64-images, FreeBSD-head-powerpc64-testvm).
    • Work is underway to port the Kyua test suite from the ports (devel/kyua) to the base system to address issues (packages are very slow) that arise when using Kyua on new architectures that are being developed using an emulator or FPGA. Integration into the base system will greatly simplify the testing of embedded platforms and interfacing with continuous integration systems.
    • Started a project to optimize the performance of the network bridge driver if_bridge, which uses one mutex to block internal data, which does not allow to achieve the desired performance on systems with a large number of jailed environments or virtual machines connected to the same network. At this stage, tests have been added to the code to prevent regressions in the process of modernizing work with locks. The possibility of using ConcurrencyKit to parallelize data transfer handlers (bridge_input(), bridge_output(), bridge_forward(), ...) is being considered.
    • A new sigfastblock system call has been added to allow a thread to specify a block of memory for a fast signal handler to improve the performance of exception handlers.
    • The kernel adds support for LSE (Large System Extension) atomic instructions supported by ARMv8.1 systems. These instructions are required to improve performance when running on Cavium ThunderX2 and AWS Graviton 2 boards. The added changes detect the presence of LSE support and dynamically enable the atomic implementation based on them. During testing, the use of LSE made it possible to reduce the CPU time spent on assembling the kernel by 15%.
    • Performance has been optimized and the functionality of the toolkit for executable files in the ELF format has been expanded.
      Added support for caching DWARF debug information, solved problems in elfcopy/objcopy utilities, added DW_AT_ranges processing,
      readelf implements the ability to decode the PROTMAX_DISABLE, STKGAP_DISABLE and WXNEEDED flags, as well as Xen and GNU Build-ID.

  • Security
    • To improve the performance of FreeBSD in Azure cloud environments, work is underway to provide support for the HyperV Socket mechanism, which allows using the socket interface to interact with the guest system with the host environment without setting up a network.
    • Work is underway to provide repeatable builds of FreeBSD to make sure that the executable files of the system components are built exactly from the declared sources and do not contain extraneous changes.
    • The ability to control the inclusion of additional protection mechanisms (ASLR, PROT_MAX, stack gap, W + X mapping) at the level of individual processes has been added to the elfctl utility
  • Storage and file systems
    • Work is underway to implement the ability to work NFS over an encrypted communication channel based on TLS 1.3, instead of using Kerberos (sec=krb5p mode), which is limited to encrypting only RPC messages and is implemented only in software. The new implementation uses the kernel-provided TLS stack to enable hardware acceleration. The NFS over TLS code is almost ready for testing, but still requires work to support signed client certificates and adapt the kernel TLS stack to send NFS data (patches for receiving are already ready).
  • Hardware Support
    • Work is underway to add support for Chinese x86 CPU Hygon based on AMD technologies;
    • Within CheriBSD, a fork of FreeBSD for research processor architecture CHERI (Capability Hardware Enhanced RISC Instructions), the implementation of support for the ARM Morello processor continues, which will support the CHERI memory access control system based on the Capsicum security model. Morello chip plan release in 2021. Work is currently focused on adding support for the Arm Neoverse N1 platform that underpins Morello. An initial port of CheriBSD for the RISC-V architecture has been introduced. Development of CheriBSD for the CHERI reference prototype based on the MIPS64 architecture continues.
    • Porting of FreeBSD to NXP LS64A 1046-bit SoC based on ARMv8 Cortex-A72 processor with integrated network packet processing acceleration engine, 10 Gb Ethernet, PCIe 3.0, SATA 3.0 and USB 3.0 continued. QorIQ and LS1046A, GPIO, QorIQ LS10xx AHCI, VF610 I2C, Epson RX-8803 RTC, QorIQ LS10xx SDHCI drivers are currently being prepared for transfer to the main FreeBSD team.
    • The ena driver has been updated to version 2.1.1 to support the second generation of ENAv2 (Elastic Network Adapter) network adapters used in the Elastic Compute Cloud (EC2) infrastructure to organize communication between EC2 nodes at speeds up to 25 Gb/s. An upgrade to ENA 2.2.0 is in preparation.
    • The FreeBSD port for the powerpc64 platform continues to be improved. The focus is on ensuring quality performance on systems with IBM POWER8 and POWER9 processors. During the reporting period, FreeBSD-CURRENT was switched to use the LLVM/Clang 10.0 compiler and the lld linker instead of GCC. The ELFv64 ABI is enabled by default for powerpc2 systems and the ELFv1 ABI has been deprecated. FreeBSD-STABLE still has gcc 4.2.1. Fixed issues with virtio, aacraid and ixl drivers. On powerpc64 systems, it is possible to run QEMU without Huge Pages support.
    • Work continued on implementing support for the RISC-V architecture. In its current form, FreeBSD is already booting successfully on the SiFive Hifive Unleashed board, for which drivers have been prepared
      UART, SPI and PRCI, supports OpenSBI and SBI 0.2 firmware. During the reporting period, the work was focused on migrating from GCC to clang and lld.

  • Applications and ports system
    • The FreeBSD Ports Collection has passed the milestone of 39 ports, the number of open PRs is slightly over 2400, of which 640 PRs are still outstanding. During the reporting period, 8146 changes were made by 173 developers. Four new members (Loïc Bartoletti, Mikael Urankar, Kyle Evans, Lorenzo Salvadore) received committer rights. Added USES=qca flag and removed USES=zope flag (due to incompatibility with Python 3). Work is underway to remove Python 2.7 from the ports tree - all ports tied to Python 2 must be ported to Python 3 or will be removed. The pkg package manager has been updated to release 1.13.2.
    • Updated graphics stack components and ports related to xorg.
      The X.org server has been updated to version 1.20.8 (previously a 1.18 branch was shipped), allowing FreeBSD to default to using the udev/evdev backend for handling input devices. The Mesa package has been translated by default to use the DRI3 extension instead of DRI2. Work is underway to keep the graphics drivers, input device stack, and drm-kmod components up to date (a port that provides amdgpu, i915, and radeon DRM modules, using the linuxkpi framework for compatibility with the Direct Rendering Manager of the Linux kernel).

    • The KDE Plasma desktop, KDE Frameworks, KDE Applications and Qt are kept up to date and updated to the latest releases. A new application kstars (star atlas) has been added to the ports.
    • Work has been done to eliminate regressive changes in the xfwm4 window manager that emerged after updating Xfce to version 4.14 (for example, artifacts appeared when decorating windows).
    • The port with Wine has been updated to the release of Wine 5.0 (previously 4.0.3 was offered).
    • Starting with version 1.14, the Go compiler added official support for the ARM64 architecture for FreeBSD 12.0.
    • OpenSSH on the base system has been updated to release 7.9p1.
    • Implemented and placed in ports (devel/libsysctlmibinfo2) is the sysctlmibinfo2 library, which provides an API for accessing the sysctl MIB and translating sysctl names into object identifiers (OIDs).
    • Distribution update generated NomadBSD 1.3.1, which is a FreeBSD edition adapted for use as a portable desktop bootable from a USB drive. The graphical environment is based on a window manager open box. Used to mount drives DSBMD (mounting CD9660, FAT, HFS+, NTFS, Ext2/3/4 is supported), to set up a wireless network — wifimgr, and to control the volume - DSBMixer.
    • Started work on writing full-fledged documentation for the jail-environment manager can. Pot 0.11.0 is being prepared for release, which will introduce network stack management tools.

Source: opennet.ru

Add a comment