aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* cache: don't ignore size passed to nchinittblMateusz Guzik2020-08-051-1/+1
| | | | Notes: svn path=/head/; revision=363895
* Bump __FreeBSD_version after vaccess() changeMateusz Guzik2020-08-051-1/+1
| | | | Notes: svn path=/head/; revision=363894
* vfs: remove the obsolete privused argument from vaccessMateusz Guzik2020-08-0519-64/+36
| | | | | | | | This brings argument count down to 6, which is passable without the stack on amd64. Notes: svn path=/head/; revision=363893
* cache: convert the hash from LIST to SLISTMateusz Guzik2020-08-051-21/+54
| | | | | | | | | | | | | This reduces struct namecache by sizeof(void *). Negative side is that we have to find the previous element (if any) when removing an entry, but since we normally don't expect collisions it should be fine. Note this adds cache_get_hash calls which can be eliminated. Notes: svn path=/head/; revision=363892
* cache: reduce zone alignment to 8 bytesMateusz Guzik2020-08-051-5/+15
| | | | | | | | | | | | It used to be sizeof of the given struct to accomodate for 32 bit mips doing 64 bit loads, but the same can be achieved with requireing just 64 bit alignment. While here reorder struct namecache so that most commonly used fields are closer. Notes: svn path=/head/; revision=363891
* cache: convert ncnegnash into a macroMateusz Guzik2020-08-051-3/+2
| | | | | | | It is a read-only var with value known at compilation time. Notes: svn path=/head/; revision=363890
* bsnmptools: make it print protocol errors to stderr instead of stdoutEugene Grosbein2020-08-051-4/+4
| | | | | | | | | Reviewed by: syrinx, bz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25911 Notes: svn path=/head/; revision=363889
* Handle delayed checksums if needed in NAT64.Andrey V. Elsukov2020-08-051-0/+12
| | | | | | | | | | | | | | | | | | | | | | Upper level protocols defer checksums calculation in hope we have checksums offloading in a network card. CSUM_DELAY_DATA flag is used to determine that checksum calculation was deferred. And IP output routine checks for this flag before pass mbuf to lower layer. Forwarded packets have not this flag. NAT64 uses checksums adjustment when it translates IP headers. In most cases NAT64 is used for forwarded packets, but in case when it handles locally originated packets we need to finish checksum calculation that was deferred to correctly adjust it. Add check for presence of CSUM_DELAY_DATA flag and finish checksum calculation before adjustment. Reported and tested by: Evgeniy Khramtsov <evgeniy at khramtsov org> MFC after: 1 week Notes: svn path=/head/; revision=363888
* allwinner: clk: Fix nm clock calculationEmmanuel Vadot2020-08-051-2/+2
| | | | | | | | | | | Use the right factor when finding the best frequency and compare the absolute value of the result. Submitted by: kibab MFC after: 3 days Notes: svn path=/head/; revision=363887
* vfs: add a cheaper entry for mac_vnode_check_accessMateusz Guzik2020-08-053-2/+17
| | | | Notes: svn path=/head/; revision=363886
* vfs: tidy up namei entry pointMateusz Guzik2020-08-051-11/+11
| | | | | | | | - predict for string copy errors - reshuffle inititalistion of vars which are not needed Notes: svn path=/head/; revision=363885
* cache: cleanup lockless entry pointMateusz Guzik2020-08-051-4/+9
| | | | | | | | - remove spurious bzero - assert ni_lcf, it has to be set by namei by this point Notes: svn path=/head/; revision=363884
* cache: stop messing with cn_lkflagsMateusz Guzik2020-08-051-5/+5
| | | | | | | See r363882. Notes: svn path=/head/; revision=363883
* cache: stop messing with cn_flagsMateusz Guzik2020-08-051-17/+39
| | | | | | | | | | This removes flag setting/unsetting carried over from regular lookup. Flags still get for compatibility when falling back. Note .. and . handling can get partially folded together. Notes: svn path=/head/; revision=363882
* vfs: prefill nameidata with garbage on debug kernelsMateusz Guzik2020-08-051-0/+10
| | | | Notes: svn path=/head/; revision=363881
* Appease gcc's -Wparentheses (and -Werror)Li-Wen Hsu2020-08-051-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363880
* ufs: only pass LK_ADAPTIVE if LK_NODDLKTREAT is setMateusz Guzik2020-08-041-2/+12
| | | | | | | | | | This restores the pre-adaptive spinning state for SU which livelocks otherwise. Note this is a bug in SU. Reported by: pho Notes: svn path=/head/; revision=363875
* vfs: support lockless dotdot lookupMateusz Guzik2020-08-043-19/+132
| | | | | | | Tested by: pho Notes: svn path=/head/; revision=363874
* cache: add NCF_WIP flagMateusz Guzik2020-08-041-11/+18
| | | | | | | | | | | This allows making half-constructed entries visible to the lockless lookup, which now can check for either "not yet fully constructed" and "no longer valid" state. This will be used for .. lookup. Notes: svn path=/head/; revision=363873
* cache: add cache_purge_vgoneMateusz Guzik2020-08-043-9/+52
| | | | | | | | | | | | | | | | | | cache_purge locklessly checks whether the vnode at hand has any namecache entries. This can race with a concurrent purge which managed to remove the last entry, but may not be done touching the vnode. Make sure we observe the relevant vnode lock as not taken before proceeding with vgone. Paired with the fact that doomed vnodes cannnot receive entries this restores the invariant that there are no namecache-related writing users past cache_purge in vgone. Reported by: pho Notes: svn path=/head/; revision=363872
* mtx: add mtx_wait_unlockedMateusz Guzik2020-08-042-0/+30
| | | | Notes: svn path=/head/; revision=363871
* Minor cleanups in mmc_xpt.cIlya Bakulin2020-08-041-23/+24
| | | | | | | | | | | | | | | | | * Downgrade some CAM debug messages from _INFO to _DEBUG level; * Add KASSERT for the case when we suspect incorrect CAM SIM initialization (using cam_sim_alloc() instead of cam_sim_alloc_dev()); * Use waiting version of xpt_alloc_ccb(), we are not in hurry; * With the waiting version we cannot get NULL return, so remove the NULL check; * In some csses, the name of mmcprobe_done has been written as mmc_probedone(); * Send AC_LOST_DEVICE if we, well, lost the device; * Misc style(9) fixes. Reviewed by: manu Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D25843 Notes: svn path=/head/; revision=363870
* makesyscalls.lua: improve syscall ordering validationKyle Evans2020-08-041-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two separate issues here: 1.) #if/#else wasn't taken into account at all for maxsyscall figures, but 2.) We didn't validate contiguous syscall numbers anyways... This kind of inconsistency is bad as we don't currently ensure explicit indexing of, e.g., the sysent array if one syscall is unimplemented/missing. This could be fixed and might be more robust, but it's also good to have the "documentation" that comes from being explicit as to what the missing syscalls are. The new version looks much like the awk version; stash off the current 'last highest syscall seen' if we hit an #if, restore to that if we hit an #else, and make sure that we're explicitly always defining the next syscall. The logic at the tail end of process_syscall_def that moves maxsyscall has been 'cleaned up' a little since we're now ensuring that it's monotonically increasing earlier in the function. At the moment I think it's unlikely we'd see range-definitions that are not UNIMPL, but there's no reason to specifically handle that case for bumping maxsyscall there. This change was provoked by reading the commit message for r363832 and realizing that this validation hadn't been included in the initial rewrite to lua. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D25945 Notes: svn path=/head/; revision=363869
* Skip sbin/route tests if jail not installed (WITHOUT_JAIL).Olivier Cochard2020-08-041-2/+2
| | | | | | | | | Approved by: kp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25935 Notes: svn path=/head/; revision=363868
* devinfo: add man page linksEric van Gyzen2020-08-041-0/+10
| | | | | | | | | | | Add man page links for all functions in devinfo(3). Reported by: vim MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=363867
* devinfo: fix memory leak on error pathsEric van Gyzen2020-08-041-9/+23
| | | | | | | | | | | | Refactor to create devinfo_free_dev(). Call it to plug a memory leak on two error paths in devinfo_init_devices(). Reported by: Coverity MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=363866
* Remove unneeded cast to struct iommu_domain *.Ruslan Bukin2020-08-041-2/+2
| | | | | | | Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=363865
* Add a few macroses for conversion between DMAR unit, domain, ctxRuslan Bukin2020-08-045-45/+56
| | | | | | | | | | | and IOMMU unit, domain, ctx. Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D25926 Notes: svn path=/head/; revision=363864
* rms: fix typo: bitmamp -> bitmapMateusz Guzik2020-08-041-1/+1
| | | | | | | Reported by: kib Notes: svn path=/head/; revision=363863
* mmccam: Hold the periph during initEmmanuel Vadot2020-08-041-0/+2
| | | | | | | | | | We need to sleep during this routine so acquire the cam hold too. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D25946 Notes: svn path=/head/; revision=363862
* mmcam: Use a static length sbuf bufferEmmanuel Vadot2020-08-042-7/+11
| | | | | | | | | | | We cannot sleep during cam proto_announce and sbuf sleeps so use a static length buffer like nvme(4) Reviewed by: kibab Differential Revision: https://reviews.freebsd.org/D25949 Notes: svn path=/head/; revision=363861
* mmccam: mmc_xpt: We're only interested about losing the deviceEmmanuel Vadot2020-08-041-23/+5
| | | | | | | | | | Remove all the uneeded printfs Reviewed by: imp, kibab Differential Revision: https://reviews.freebsd.org/D25948 Notes: svn path=/head/; revision=363860
* cache: factor away failed vexec handlingMateusz Guzik2020-08-041-17/+28
| | | | Notes: svn path=/head/; revision=363859
* cache: assorted tidy upsMateusz Guzik2020-08-041-7/+9
| | | | Notes: svn path=/head/; revision=363858
* cache: factor away lockless dot lookup and add missing stat + sdt probeMateusz Guzik2020-08-041-6/+20
| | | | Notes: svn path=/head/; revision=363857
* vfs: add vfs_op_thread_enter/exit _crit variantsMateusz Guzik2020-08-042-14/+27
| | | | | | | and employ them in the namecache. Eliminates all spurious checks for preemption. Notes: svn path=/head/; revision=363856
* cache: add missing numcache detrement on insertion failureMateusz Guzik2020-08-041-0/+1
| | | | Notes: svn path=/head/; revision=363855
* rms: add a comment explaining performance deficiencies of write lockingMateusz Guzik2020-08-041-0/+4
| | | | Notes: svn path=/head/; revision=363854
* Import DTS files for arm, arm64, riscv from Linux 5.8Emmanuel Vadot2020-08-04570-5889/+28245
|\ | | | | | | | | | | | | MFC after: 2 months Notes: svn path=/head/; revision=363853
| * Import DTS from Linux 5.8vendor/device-tree/5.8Emmanuel Vadot2020-08-041396-18786/+55804
| | | | | | | | | | Notes: svn path=/vendor/device-tree/dist/; revision=363850 svn path=/vendor/device-tree/5.8/; revision=363851; tag=vendor/device-tree/5.8
* | Remove extra memset() left after r342388.Alexander Motin2020-08-042-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This memset() wiped MPI2_FUNCTION_SCSI_TASK_MGMT set by mprsas_alloc_tm(), that broke target reset on device removal, making later re-insertion into the same slot impossible, since firmware was still waiting for the driver to finish with the removed device. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=363852
* | Disable errors for -Wsystem-headers for GCC on aarch64.John Baldwin2020-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | GCC's own arm_neon.h triggers multiple warnings on both GCC 6 and GCC 9. Differential Revision: https://reviews.freebsd.org/D25729 Notes: svn path=/head/; revision=363849
* | ld.bfd requires an explicit emulation for MIPS for ld -r.John Baldwin2020-08-041-0/+21
| | | | | | | | | | | | | | | | | | | | Unlike lld, ld.bfd doesn't infer the emulation from the first object file, but assumes its compiled in default for ld -r. Differential Revision: https://reviews.freebsd.org/D25728 Notes: svn path=/head/; revision=363848
* | Disable errors for -Wredundant-decls for GCC 6+.John Baldwin2020-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | GCC triggers warnings for this that clang does not for duplicate declarations of yylex(). Differential Revision: https://reviews.freebsd.org/D25727 Notes: svn path=/head/; revision=363847
* | Turn off errors for -Wmaybe-uninitialized in GCC 6+.John Baldwin2020-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | Recent changes to <sys/tree.h> trigger this warning and seem like a false positive. Differential Revision: https://reviews.freebsd.org/D25726 Notes: svn path=/head/; revision=363846
* | linuxkpi: Add time_after32 and time_before32Emmanuel Vadot2020-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This compare two 32 bits times Sponsored by: The FreeBSD Foundation Reviewed by: kib, hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25700 Notes: svn path=/head/; revision=363843
* | linuxkpi: Add clear_bit_unlockEmmanuel Vadot2020-08-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This calls clear_bit and adds a memory barrier. Sponsored by: The FreeBSD Foundation Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25943 Notes: svn path=/head/; revision=363842
* | Remove an incorrect assertion from in6p_lookup_mcast_ifp().Mark Johnston2020-08-041-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The socket may be bound to an IPv4-mapped IPv6 address. However, the inp address is not relevant to the JOIN_GROUP or LEAVE_GROUP operations. While here remove an unnecessary check for inp == NULL. Reported by: syzbot+d01ab3d5e6c1516a393c@syzkaller.appspotmail.com Reviewed by: hselasky MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25888 Notes: svn path=/head/; revision=363841
* | Remove most lingering references to the page lock in comments.Mark Johnston2020-08-044-38/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Finish updating comments to reflect new locking protocols introduced over the past year. In particular, vm_page_lock is now effectively unused. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25868 Notes: svn path=/head/; revision=363840
* | Re-apply r363564.Emmanuel Vadot2020-08-041-0/+1
| | | | | | | | | | | | | | We now have linux/sizes.h in the tree. Notes: svn path=/head/; revision=363839