Commit Graph

270371 Commits

Author SHA1 Message Date
ae
da739173a5 Synchronize definitions in mbuf.d with values from mbuf.h
Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2020-08-05 11:54:02 +00:00
gbe
48b716640c environ(7): Update the description and include some more environment variables
- Add a better introduction to the DESCRIPTION section
- Add a description for MANPATH and POSIXLY_CORRECT
- Asorted improvements for the usage of some macros

PR:		43823
Submitted by:	Lyndon Nerenberg <lyndon at orthanc dot ab dot ca>
Reviewed by:	0mp, bcr
Approved by:	0mp, bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25912
2020-08-05 11:41:41 +00:00
ae
6a53528ee9 Add m__getjcl SDT probe.
Obtained from:	Yandex LLC
MFC after:	1 week
Sponsored by:	Yandex LLC
2020-08-05 11:39:09 +00:00
avg
3fe2fc7afb gpiokeys: add a basic manual page
Reviewed by:	manu, bjk, 0mp
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D25939
2020-08-05 11:38:33 +00:00
ae
a94cc3f2aa Fix SIGSEGV in ipfw(8) when NAT64 prefix length is omitted.
Submitted by:	Evgeniy Khramtsov <evgeniy at khramtsov org>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25734
2020-08-05 11:26:49 +00:00
0mp
cce5319503 Do not describe portsnap(8) as a way to manage /usr/ports 2020-08-05 11:26:14 +00:00
ae
ba7518d479 Fix typo.
Submitted by:	Evgeniy Khramtsov <evgeniy at khramtsov org>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25932
2020-08-05 10:27:11 +00:00
mjg
e672994de6 cache: don't ignore size passed to nchinittbl 2020-08-05 09:38:02 +00:00
mjg
6da63d396d Bump __FreeBSD_version after vaccess() change 2020-08-05 09:27:53 +00:00
mjg
21dc57fee7 vfs: remove the obsolete privused argument from vaccess
This brings argument count down to 6, which is passable without the
stack on amd64.
2020-08-05 09:27:03 +00:00
mjg
5e72be8592 cache: convert the hash from LIST to SLIST
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.
2020-08-05 09:25:59 +00:00
mjg
7a0bce1fdb cache: reduce zone alignment to 8 bytes
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.
2020-08-05 09:24:38 +00:00
mjg
34bd11e693 cache: convert ncnegnash into a macro
It is a read-only var with value known at compilation time.
2020-08-05 09:24:00 +00:00
eugen
05122cf00a bsnmptools: make it print protocol errors to stderr instead of stdout
Reviewed by:		syrinx, bz
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D25911
2020-08-05 09:19:41 +00:00
ae
7c203d6b09 Handle delayed checksums if needed in NAT64.
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
2020-08-05 09:16:35 +00:00
manu
f34e7a3d7f allwinner: clk: Fix nm clock calculation
Use the right factor when finding the best frequency and compare the
absolute value of the result.

Submitted by:	kibab
MFC after:	3 days
2020-08-05 08:31:26 +00:00
mjg
3b5abfd5ec vfs: add a cheaper entry for mac_vnode_check_access 2020-08-05 07:34:45 +00:00
mjg
135abd407a vfs: tidy up namei entry point
- predict for string copy errors
- reshuffle inititalistion of vars which are not needed
2020-08-05 07:33:39 +00:00
mjg
831cd00fa9 cache: cleanup lockless entry point
- remove spurious bzero
- assert ni_lcf, it has to be set by namei by this point
2020-08-05 07:32:26 +00:00
mjg
0b4f14a0ce cache: stop messing with cn_lkflags
See r363882.
2020-08-05 07:30:57 +00:00
mjg
5fad52765c cache: stop messing with cn_flags
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.
2020-08-05 07:30:17 +00:00
mjg
86d2b8d83c vfs: prefill nameidata with garbage on debug kernels 2020-08-05 07:28:51 +00:00
lwhsu
f00fc62651 Appease gcc's -Wparentheses (and -Werror)
Sponsored by:	The FreeBSD Foundation
2020-08-05 05:58:25 +00:00
mjg
57cfba0a88 ufs: only pass LK_ADAPTIVE if LK_NODDLKTREAT is set
This restores the pre-adaptive spinning state for SU which livelocks
otherwise. Note this is a bug in SU.

Reported by:	pho
2020-08-04 23:09:15 +00:00
mjg
dcd9b4021a vfs: support lockless dotdot lookup
Tested by:	pho
2020-08-04 23:07:42 +00:00
mjg
c7f4ee1e0d cache: add NCF_WIP flag
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.
2020-08-04 23:07:00 +00:00
mjg
dcf686cabf cache: add cache_purge_vgone
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
2020-08-04 23:04:29 +00:00
mjg
a83b4ff63f mtx: add mtx_wait_unlocked 2020-08-04 23:00:00 +00:00
kibab
3cf4e11179 Minor cleanups in mmc_xpt.c
* 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
2020-08-04 21:58:43 +00:00
kevans
7d3feaaa81 makesyscalls.lua: improve syscall ordering validation
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
2020-08-04 21:49:13 +00:00
olivier
8e71b01ec3 Skip sbin/route tests if jail not installed (WITHOUT_JAIL).
Approved by:	kp
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D25935
2020-08-04 21:34:13 +00:00
vangyzen
32905e24c8 devinfo: add man page links
Add man page links for all functions in devinfo(3).

Reported by:	vim
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2020-08-04 21:09:36 +00:00
vangyzen
28f547a7f1 devinfo: fix memory leak on error paths
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
2020-08-04 21:05:53 +00:00
br
82492c6744 Remove unneeded cast to struct iommu_domain *.
Sponsored by:	DARPA, AFRL
2020-08-04 20:54:12 +00:00
br
75d2a31559 Add a few macroses for conversion between DMAR unit, domain, ctx
and IOMMU unit, domain, ctx.

Reviewed by:	kib
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D25926
2020-08-04 20:51:05 +00:00
mjg
ea2cfe4d88 rms: fix typo: bitmamp -> bitmap
Reported by:	kib
2020-08-04 20:31:03 +00:00
manu
ae4d86eca1 mmccam: Hold the periph during init
We need to sleep during this routine so acquire the cam hold too.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D25946
2020-08-04 20:04:00 +00:00
manu
23a0dac829 mmcam: Use a static length sbuf buffer
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
2020-08-04 20:02:23 +00:00
manu
767252ea45 mmccam: mmc_xpt: We're only interested about losing the device
Remove all the uneeded printfs

Reviewed by:	imp, kibab
Differential Revision:	https://reviews.freebsd.org/D25948
2020-08-04 20:00:21 +00:00
mjg
8dd5d580a6 cache: factor away failed vexec handling 2020-08-04 19:55:26 +00:00
mjg
eb53058a89 cache: assorted tidy ups 2020-08-04 19:55:00 +00:00
mjg
1e78724de9 cache: factor away lockless dot lookup and add missing stat + sdt probe 2020-08-04 19:54:37 +00:00
mjg
290c2c61a5 vfs: add vfs_op_thread_enter/exit _crit variants
and employ them in the namecache. Eliminates all spurious checks for preemption.
2020-08-04 19:54:10 +00:00
mjg
6b8080efcb cache: add missing numcache detrement on insertion failure 2020-08-04 19:52:52 +00:00
mjg
07249f6844 rms: add a comment explaining performance deficiencies of write locking 2020-08-04 19:52:16 +00:00
manu
817d89563e Import DTS files for arm, arm64, riscv from Linux 5.8
MFC after:	2 months
2020-08-04 19:44:43 +00:00
mav
fb7f4849a1 Remove extra memset() left after r342388.
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.
2020-08-04 19:27:03 +00:00
manu
e1519c915e Import DTS from Linux 5.8 2020-08-04 19:05:45 +00:00
jhb
d36abc37b1 Disable errors for -Wsystem-headers for GCC on aarch64.
GCC's own arm_neon.h triggers multiple warnings on both GCC 6 and
GCC 9.

Differential Revision:	https://reviews.freebsd.org/D25729
2020-08-04 18:24:46 +00:00
jhb
ab9c383d27 ld.bfd requires an explicit emulation for MIPS for ld -r.
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
2020-08-04 18:23:32 +00:00