aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bsdinstall: Fix typo (Instalation -> Installation).Navdeep Parhar2021-06-031-1/+1
|
* mmc-fdt: fix mmc_fdt_gpio_get_{present,readonly}Priit Trees2021-06-031-2/+2
| | | | | | | | | | | Currently, mmc_fdt_gpio_get_{present,readonly} return all time true. true ^ 100b = true false ^ 100b = true since that's done after promotion to integers. Use !! to convert the bit to a bool before xor. Reviewed by: imp@ (converted to (bool) to !! for portability) Pull Request: https://github.com/freebsd/freebsd-src/pull/461
* Correcting comment about "sched_interact_score".wiklam2021-06-031-4/+4
| | | | | | | Reviewed by: jrtc@, imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/431 Sponsored by: Netflix
* Cirrus-CI: retry pkg installation on failureEd Maste2021-06-032-1/+16
| | | | | | | | | | | | | | | Pkg installation failed somewhat frequently, always at: [62/104] Fetching jpeg-turbo-2.0.6.txz: .......... done pkg: http://pkgmir.geo.freebsd.org/FreeBSD:13:amd64/quarterly/All/jbigkit-2.1_1.txz: No route to host Move pkg installation to a script and retry once upon failure as a (hopefully temporary) workaround. Reviewed by: imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30613
* fsck_ufs: fix segfault with gjournalRobert Wing2021-06-031-0/+1
| | | | | | | | | | | | | The segfault was being hit in ckfini() (sbin/fsck_ffs/fsutil.c) while attempting to traverse the buffer cache. The tail queue used for the buffer cache was not initialized before dropping into gjournal_check(). Initialize the buffer cache before calling gjournal_check(). PR: 245907 Reviewed by: jhb, mckusick MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30537
* mmc: ignore CRC errors from CMD13 (status) when changing ratesAustin Shafer2021-06-031-2/+14
| | | | | | | | | | | | | Update mmc_switch_status to ignore a few CRC errrors when asking for the card status after setting the new rate with CMD6. Since the card may take a little while to make the switch, it's possible we'll get a communications error if we sent the command at the wrong time. Several low end laptops needs this workaround as they have a window that seems longer than other systems. This is known to fix at least the Acer Aspire A114-32-P7E5. Reviewed by: imp@, manu@ Differential Revision: https://reviews.freebsd.org/D24740
* wpa: Fix a SIGBUS error in wpa_sm_set_rekey_offloadCy Schubert2021-06-0322-85/+191
| | | | | | | | | | | | | | Incorrectly linked built-in wpa functions resulted in overwriting sm->ctx->set_rekey_offload with garbage. It was initialized correctly however it changed after wpa_supplicant became a daemon. No SIGBUS violations reported by dhw@ were experienced during testing of the original commit by msyelf or philip@. Reported by: dhw Tested by: dhw MFC after: 2 months X-MFC with: 25ecdc7d52770caf1c9b44b5ec11f468f6b636f3
* libradius: fix no SSL buildCy Schubert2021-06-031-1/+3
| | | | int alen is only used with SSL.
* Cirrus-CI: Add descriptive task nameEd Maste2021-06-021-0/+1
| | | | | | | | Previously it appeared only as "main" in places like GitHub's list of checks run as part of a pull request. MFC after: 1 week Sponsored by: The FreeBSD Foundation
* hptrr: use BLOB_OBJS for pre-built .o'sJung-uk Kim2021-06-021-1/+1
|
* rtld: Rename -t option to -u (ignore LD_ vars)Konstantin Belousov2021-06-022-5/+5
| | | | | | Requested by: arichardson Sponsored by: The FreeBSD Foundation MFC after: 3 days
* nfsd: Fix the failure return for non-fh NFSv4 operationsRick Macklem2021-06-023-36/+25
| | | | | | | | | | | | | | | | | | | | | | Without this patch, nfsd_checkrootexp() returns failure and then the NFSv4 operation would reply NFSERR_WRONGSEC. RFC5661 Sec. 2.6 only allows a few NFSv4 operations, none of which call nfsv4_checktootexp(), to return NFSERR_WRONGSEC. This patch modifies nfsd_checkrootexp() to return the error instead of a boolean and sets the returned error to an RPC layer AUTH_ERR, as discussed on nfsv4@ietf.org. The patch also fixes nfsd_errmap() so that the pseudo error NFSERR_AUTHERR is handled correctly such that an RPC layer AUTH_ERR is replied to the NFSv4 client. The two new "enum auth_stat" values have not yet been assigned by IANA, but are the expected next two values. The effect on extant NFSv4 clients of this change appears limited to reporting a different failure error when a mount that does not use adequate security is attempted. MFC after: 2 weeks
* gconcat: Add new lock to allow modifications to the disk list in preparation ↵Noah Bergbauer2021-06-022-14/+52
| | | | | | | | | | for online append In addition, rename existing sc_lock to sc_append_lock Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/447 Sponsored by: Netflix
* gconcat: Switch array to TAILQ to prepare for online appendNoah Bergbauer2021-06-022-33/+40
| | | | | | Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/447 Sponsored by: Netflix
* sbin/veriexec: fixed parameter parsing of option -xsebastien.bini2021-06-021-1/+1
| | | | | | | | | The -x parameter doesn't take any arguments. It says that all further arguments are paths to check. Reviewed by: imp@ Sponsored by: Netflix Pull Request: https://github.com/freebsd/freebsd-src/pull/443/files
* powerpc: fix boot on pseries without hugepagesLeandro Lupori2021-06-021-41/+42
| | | | | | | | | | Commit 49c894ddced5 introduced an issue that prevented pseries boot, when hugepages were not available to the guest. Now large page info must be available before moea64_install is called, so this change moves the code that scans large page sizes before the call. Reviewed by: jhibbits (IRC) Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
* regen after tweaks to getgroups and setgroupsWarner Losh2021-06-022-6/+6
| | | | Sponsored by: Netflix
* t_getgroups: No longer expected to failWarner Losh2021-06-021-3/+0
| | | | Sponsored by: Netflix
* kern: fail getgroup and setgroup with negative intMoritz Buhl2021-06-022-9/+7
| | | | | | | | | | | | | | | | Found using https://github.com/NetBSD/src/blob/trunk/tests/lib/libc/sys/t_getgroups.c getgroups/setgroups want an int and therefore casting it to u_int resulted in `getgroups(-1, ...)` not returning -1 / errno = EINVAL. imp@ updated syscall.master and made changes markj@ suggested PR: 189941 Tested by: imp@ Reviewed by: markj@ Pull Request: https://github.com/freebsd/freebsd-src/pull/407 Differential Revision: https://reviews.freebsd.org/D30617
* Add bcm2710-rpi-cm3.dtb to the list of DTBs being added.Max Stucchi2021-06-021-1/+1
| | | | | | | | | | | This allows to boot out of the box on the RPI COmpute Module 3 with 32G of eMMC. Tested by: imp confirmed .dtb is in the rpi-firmware pkg Reviewed by: gjb@, imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/452 Sponsored by: Netflix
* Allows user to specify an optional ZFSBOOT_POOL_SIZE for their zrootJohn Ko2021-06-021-8/+38
| | | | | | | | | | | | | | The default is to create a zroot that consumes the whole disk because if used with geli(8) this makes sense. Without geli(8), I like to keep my data pool separate from my system pool. This is different than ZFSBOOT_BOOT_POOL_SIZE which is named bootpool. Reviewed by: allenjude Pull Request: https://github.com/freebsd/freebsd-src/pull/53 Differential Revision: https://reviews.freebsd.org/D30588
* hptnr: use BLOB_OBJS for pre-built .o'sWarner Losh2021-06-021-1/+1
| | | | Sponsored by: Netflix
* hptmv: use BLOB_OBJS for pre-built .o'sWarner Losh2021-06-021-1/+1
| | | | Sponsored by: Netflix
* hpt27xx: Use EXTRA_OBJS instead of OBJSWarner Losh2021-06-021-1/+1
| | | | | | Sponsored by: Netflix Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D30616
* kmod.mk: Allow extra objects to be specified in modulesWarner Losh2021-06-021-6/+8
| | | | | | | | | | | OBJS are automatically added to CLEANFILES. For pre-built objects, this is not desirable since it will delete the object from the source tree. Introduce EXTRA_OBJS which list these object files, but aren't added to clean files. Sponsored by: Netflix Reviewed by: emaste@ Differential Revision: https://reviews.freebsd.org/D30615
* periodic: add support for .xz and .zcat compressed logsCeri Davies2021-06-026-9/+34
| | | | | | | | | | | | Also improve temporary file usage in 200.accounting, add an xref to zstd(1) to newsyslog.conf.5, and clarify in periodic.conf that "daily accounting" means process accounting and "monthly accounting" is login accounting. PR: 253868 Reviewed by: allanjude Approved by: blackend (mentor) Differential Revision: https://reviews.freebsd.org/D29267
* kqueue: replace kq_ncallouts loop with atomic_fetchaddMateusz Guzik2021-06-021-7/+5
|
* vfs: fix MNT_SYNCHRONOUS check in vn_writeRich Ercolani2021-06-021-5/+6
| | | | | | | | | ca1ce50b2b5ef11d ("vfs: add more safety against concurrent forced unmount to vn_write") has a side effect of only checking MNT_SYNCHRONOUS if O_FSYNC is set. Reviewed By: mjg Differential Revision: https://reviews.freebsd.org/D30610
* Fix the KCSAN_ENABLED check when building modulesAndrew Turner2021-06-021-1/+1
| | | | | | | | | | | | | | | | | The KCSAN_ENABLED variable is non-empty when the kernel is being built with KCSAN. This allows us to disable modules that are known to be broken. There was a bug where we would check if it was defined. As this is always the case the KCSAN_ENABLED variable would be set when building modules so we would never build such a module. Fix this by checking if the value is empty before passing it on to the module stage. This doesn't affect how modules are built as the CFLAGS passed to modules has the correct check. Reported by: rstone Sponsored by: Innovate UK
* Use the arm virtual counter in the arm64 loaderAndrew Turner2021-06-022-2/+75
| | | | | | | | It exist on all ARMv8+ CPUs, and other boot loaders rely on it being present. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D30410
* arm: allwinner: Add clock driver for Display Engine to the buildEmmanuel Vadot2021-06-021-0/+1
| | | | This is needed for drm
* sdhci_xenon: add UHS supportMarcin Wojtas2021-06-022-0/+44
| | | | | | | | | | | | | | | This patch adds the necessary methods resolution to the sdhci_xenon driver which are required to configure UHS modes for SD/MMC devices. Apart from the two generic routines, the custom sdhci_xenon_set_uhs_timing function is responsible for setting the SDHCI_HOST_CONTROL2 register with appropriate mode select values - in case of HS200 and HS400 they are non-standard. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30565 MFC after: 2 weeks
* sdhci_xenon: improve the VCCQ voltage switch sequenceMarcin Wojtas2021-06-021-16/+68
| | | | | | | | | | | | Improve the VCCQ voltage switch, so that to properly handle the SDHCI_HOST_CONTROL2 register signaling flags and along with manipulating the regulator. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30564 MFC after: 2 weeks
* sdhci_xenon: allow to properly disable the UHS signalingMarcin Wojtas2021-06-021-6/+8
| | | | | | | | | | | | | | | Until now the "no-1-8-v" DT flag wrongly disabled the SDHCI_CAN_VDD_180 - slot 1.8V power supply capability, whereas it refers to the signaling voltage. Fix the sdhci_xenon_read_4 and allow to disable the UHS modes depending on the DT property or PHY slow mode. While at it - make sure the unsupported 1.2V signaling is always disabled and not reported in the bootverbose log. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30563 MFC after: 2 weeks
* sdhci_xenon: enable MMC FDT parsingMarcin Wojtas2021-06-021-16/+17
| | | | | | | | | | | | | The mmc_fdt_parse allows to parse more MMC-related FDT properties. Start using it. "wp-inverted" property, VQMMC and newly added VMMC power supply parsing is now done in a generic code. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30562 MFC after: 2 weeks
* sdhci: allow setting MMC capabilities before sdhci_init_slotMarcin Wojtas2021-06-021-1/+2
| | | | | | | | | | | | | With this change the host controller drivers can set the MMC capabilities (e.g. using mmc_fdt_parse() helper) before calling sdhci_init_slot(). This way the configuration dump (eg. in bootverbose) can include the possible additional information. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30561 MFC after: 2 weeks
* sdhci: extend bus_dma_tag boundary to 64-bit spaceMarcin Wojtas2021-06-021-4/+5
| | | | | | | | | | | | This patch adds support for the SDHCI_CAN_DO_64BIT capability, so that to allow 64-bit DMA operation for the controllers which support this feature. Reviewed by: manu Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D30560 MFC after: 2 weeks
* uart_dev_ns8250: Switch ACPI UART subtype for Marvell SoCsMarcin Wojtas2021-06-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | DBG2 ACPI table description [1] specifies three subtypes related to 16550 UART: 0x0 - 16550 compatible 0x1 - 16550 subset 0x12 - 16550 compatible with parameters defined in Generic Address Structure (GAS) It turned out however, that the Windows OS treats 0x0 subtype as legacy x86 UART with 8-bit access. ARM SoCs can use types 0x1 (16550 with fixed mmio32 access) or 0x12 (16550 with fully respected GAS contents). Switch Marvell SoCs ACPI UART subtype to 0x1 - thanks to that the same firmware can run properly with UART output in FreeBSD, Windows 10, Linux and ESXI hypervisor. Tests showed the older firmware versions that use 0x0 UART subtype in SPCR table continue to display output properly. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table Obtained from: Semihalf Sponsored by: ARM Differential revision: https://reviews.freebsd.org/D30386 MFC after: 2 weeks
* Fix test case header function nameMath Ieu2021-06-021-1/+1
| | | | | | | This restores the expected behavior (skip) when running with non-root user MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30584
* kern: ether_gen_addr: randomize on default hostuuid, tooKyle Evans2021-06-024-6/+18
| | | | | | | | | | | | | | | Currently, this will still hash the default (all zero) hostuuid and potentially arrive at a MAC address that has a high chance of collision if another interface of the same name appears in the same broadcast domain on another host without a hostuuid, e.g., some virtual machine setups. Instead of using the default hostuuid, just treat it as a failure and generate a random LA unicast MAC address. Reviewed by: bz, gbe, imp, kbowling, kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29788
* man: document ether_gen_addr(9)Kyle Evans2021-06-022-0/+80
| | | | | | | | | This KPI is used to assign a MAC address to an interface that doesn't already have one assigned. Reviewed by: bcr, gnn, imp, kbowling, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29787
* amd64: Clear the local TSS when creating a new threadMark Johnston2021-06-011-0/+2
| | | | | | | | | | | | Otherwise it is copied from the creating thread. Then, if either thread exits, the other is left with a dangling pointer, typically resulting in a page fault upon the next context switch. Reported by: syzkaller Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30607
* amd64: Relax the assertion added in commit 4a59cbc12Mark Johnston2021-06-011-25/+45
| | | | | | | | | | | | | We only need to ensure that interrupts are disabled when handling a fault from iret. Otherwise it's possible to trigger the assertion legitimately, e.g., by copying in from an invalid address. Fixes: 4a59cbc12 Reported by: pho Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30594
* pf: Avoid leaking pad bytes in struct pfr_astats when copying outMark Johnston2021-06-011-0/+1
| | | | | | | | | | | There is padding between pfr_astats.pfras_a and pfras_packets that was not getting initialized. Reported by: KMSAN Reviewed by: kp, imp MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30585
* i386: Make setidt_disp a size_t instead of uintptr_tMark Johnston2021-06-013-6/+2
| | | | | | | | | | | | | | setidt_disp is the offset of the ISR trampoline relative to the address of the routines in exception.s, so uintptr_t is not quite right. Also remove a bogus declaration I added in commit 18f55c67f7, it is not required after all. Reported by: jrtc27 Reviewed by: jrtc27, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30590
* cxgbe/iw_cxgbe: Support for 512 SGL entries in one memory registration.Navdeep Parhar2021-06-015-10/+13
| | | | | | | | | Use the correct SGL limit within iw_cxgbe, firmwares >= 1.25.6.0 support upto 512 entries per MR. Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications
* cxgbe(4): Check if the firmware supports 512 SGL per FR MR.Navdeep Parhar2021-06-012-0/+9
| | | | | | | | | Firmwares >= 1.25.6.0 support 512 SGL entries in a single memory registration request. Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications
* fread: improve performance for unbuffered readsPedro F. Giffuni2021-06-011-0/+29
| | | | | | | | | | | | | We can use the buffer passed to fread(3) directly in the FILE *. The buffer needs to be reset before each call to __srefill(). This preserves the expected behavior in all cases. The change was found originally in OpenBSD and later adopted by NetBSD. MFC after: 2 weeks Obtained from: OpenBSD (CVS 1.18) Differential Revision: https://reviews.freebsd.org/D30548
* pf: Fix more ioctl memory leaksKristof Provost2021-06-012-13/+15
| | | | | | | | | | | | | | | We must also remember to free nvlists added to a parent nvlist with nvlist_append_nvlist_array(). More importantly, when nvlist_pack() allocates memory for us it does so in the M_NVLIST zone, so we must free it with free(.., M_NVLIST). Using free(.., M_TEMP) as we did silently failed to free the memory. MFC after: 3 days Reported by: kib@ Tested by: kib@ Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30595
* libsa: Fix infinite loop in bzipfs & gzipfsDavid Bright2021-06-012-0/+6
| | | | | | | | | | | | | | | | A bug in the loader's bzipfs & gzipfs filesystems caused compressed kernel and modules not to work on EFI systems with a veriexec-enabled loader. Since the size of files in these filesystems are not known _a priori_ `stat` would initialize the size to -1 and the loader would then hang in an infinite loop while trying to seek (read) to the end of file since the loop termination condition compares the current offset to that negative target position. Reviewers: vangyzen, imp, Bret Ketchum (Bret.Ketchum@dell.com) Differential Revision: https://reviews.freebsd.org/D30414 Sponsored by: Dell EMC Isilon MFC to: stable/12, stable/13 MFC after: 1 week