Commit Graph

274194 Commits

Author SHA1 Message Date
Andrew Turner
df696a2fb6 Have the coredump_phnum test ask for the page size
The page size may be dynamically selected on boot. Have the
coredump_phnum test helper ask the kernel for the correct value.

Sponsored by:	The FreeBSD Foundation
2022-04-07 15:59:32 +01:00
Kristof Provost
be461cdfb3 pf syncookies: fix memory leak
We forgot to free the nvlist (and packed nvlist) on success.
While here start using the ERROUT macro to clean up error handling, and
to add SDTs for better debugging.

Reported by:	Coverity
CID:		1473150
2022-04-07 14:51:52 +02:00
Kristof Provost
0bd468ea3f pf: fix memory leak
The nvlist is allocated in pf_keth_rule_to_nveth_rule(). There's no need
to allocate one in the calling function. Especially not as we overwrite
the pointer to the new nvlist with the one allocated by
pf_keth_rule_to_nveth_rule(), leaking memory.

Reported by:	Coverity
CID:		1476128
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-04-07 14:51:52 +02:00
Andrew Turner
e85eaa9308 Have rtld query the page size from the kernel
To allow for a dynamic page size on arm64 have the runtime linker
query the kernel for the currentl page size.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34765
2022-04-07 15:37:37 +01:00
Andrew Turner
1b7d882f00 Enable the kcov tests on supported architectures
i386 and 32-bit powerpc lack support for the needed atomic operations
in userspace.

Sponsored by:	The FreeBSD Foundation
2022-04-07 14:31:51 +01:00
Andrew Turner
41e6d2091c Enable subr_physmem_test on supported architectures
Only build where it's supported.

While here add support for amd64 to help with testing.

Sponsored by:	The FreeBSD Foundation
2022-04-07 14:31:51 +01:00
Christian Weisgerber
81d1214e8a man pages: Fix typo
s/the the/the/

Approved by:	ygy (doc)
2022-04-07 14:58:13 +02:00
Tom Jones
1241e8e7ae siftr: expose t_flags2 in siftr output
Replace the old snd_bwnd field which was kept for compatibility with the
t_flags2 field from the tcpcb. This exposes in siftr logs interesting
things such as ECN, PLPMTUD, Accurate ECN and if first bytes are
complete.

Reviewed by:	rscheff (transport), chengc_netapp.com,  debdrup (manpages)
Sponsored by:   NetApp, Inc.
Sponsored by:   Klara, Inc.
X-NetApp-PR:    #73
Differential Revision:	https://reviews.freebsd.org/D34672
2022-04-07 10:17:09 +01:00
Ed Maste
c71ae91f19 vidcontrol: disable p, P, and H when vt(4) is in use
These options use the CONS_SCRSHOT ioctl to capture the contents of the
current console, which is not yet supported by vt(4).  Disable the
options when vt(4) is in use rather than emitting a possibly confusing
error message.

This change should be reverted if CONS_SCRSHOT is implemented for vt(4).

PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 20:26:43 -04:00
John Baldwin
8af2421956 lio: Quiet set but unused warnings.
- Remove unused variables.

- Mark a value only used in debug traces as unused.

- Remove variables only used for device register reads with
  side-effects with void casts on the read.
2022-04-06 16:45:29 -07:00
John Baldwin
6454d0c8cb libalias: Remove unused variables. 2022-04-06 16:45:29 -07:00
John Baldwin
3f6d3f0285 alias_nbt: Move debug-only variable under #ifdef LIBALIAS_DEBUG. 2022-04-06 16:45:29 -07:00
John Baldwin
89293939de kgssapi krb5: Remove unused variables. 2022-04-06 16:45:29 -07:00
John Baldwin
c1710eaf32 ix: Mark variables only used in debug traces as unused. 2022-04-06 16:45:29 -07:00
John Baldwin
bf73b06771 ip6_mroute: Mark a variable only used in a debug trace as unused. 2022-04-06 16:45:29 -07:00
John Baldwin
db3603ff09 ibcore: Disable set but unused warnings. 2022-04-06 16:45:29 -07:00
John Baldwin
4dab99b936 ena: Remove unused variable. 2022-04-06 16:45:28 -07:00
John Baldwin
551feba18c sc vga: Remove unused variables.
Cast the return value of intentional dummy reads to void.
2022-04-06 16:45:28 -07:00
John Baldwin
c0a1391aa6 ixl: Remove unused variables. 2022-04-06 16:45:28 -07:00
John Baldwin
ee28ad11b7 iavf: Quite set but not used warnings.
Move declaration of dev in iavf_if_attach_post under #ifdef IXL_DEBUG.

Remove unused ifp in iavf_stop.
2022-04-06 16:45:28 -07:00
John Baldwin
46adc7fad3 axgbe: Remove unused variable in axgbe_msix_que.
Keep the register read just in case though it seems possible it is not
needed as the function later clears specific interrupts via a write to
the same register.
2022-04-06 16:45:28 -07:00
John Baldwin
354ef278e9 powernow(4): Fix unused variable warnings by using the variables. 2022-04-06 16:45:28 -07:00
John Baldwin
d68cc5a839 isci: Disable set but unused warnings. 2022-04-06 16:45:28 -07:00
John Baldwin
bbfec32d15 isci: Propagate error from bus_dma_tag_create.
Return error from isci_controller_allocate_memory if bus_dma_tag_create
fails instead of ignoring the error.
2022-04-06 16:45:28 -07:00
John Baldwin
b024faffa0 hyperv storvsc: Remove unused variables. 2022-04-06 16:45:28 -07:00
John Baldwin
583df2db5c bxe: Quiet set but not used warnings.
Comment out other references to more_tx since the only use is commented out.

Remove unused is_parity variable.
2022-04-06 16:45:28 -07:00
John Baldwin
9b0eb55048 psm: Remove write-only variables. 2022-04-06 16:45:28 -07:00
John Baldwin
6301649e0e mlx5: Remove write-only variables. 2022-04-06 16:45:28 -07:00
John Baldwin
8b6ccfb6c7 multicast code: Quiet unused warnings for variables used for KTR traces.
For nallow and nblock, move the variables under #ifdef KTR.

For return values from functions logged in KTR traces, mark the
variables as __unused rather than having to #ifdef the assignment of
the function return value.
2022-04-06 16:45:28 -07:00
John Baldwin
f7236dd068 change_mpath_route: Remove write-only nh variable.
While here, cleanup the style of the function prologue by moving an
assignment out of the middle of two variable declaration blocks.
2022-04-06 16:45:28 -07:00
John Baldwin
371c917b0b unlink_nhgrp: Remove write-only variable.
Possibly one could assert that ret should always be 0 here (that is,
that there was always an index found in the bitmask).  That should be
true since a bitmask index is allocated before the nhgrp is inserted
in the ctl->gr_head list in link_nhgrp.
2022-04-06 16:45:27 -07:00
John Baldwin
7650d4b67e xen netback: Remove write-only variables. 2022-04-06 16:45:27 -07:00
John Baldwin
92ca0e81b8 pvscsi_adapter_reset: Mark val as unused.
This variable is unsed in a debug trace conditional on a private
debugging macro (so not eligible for __diagused).
2022-04-06 16:45:27 -07:00
John Baldwin
8c3923ae2f uhci: Remove write-only variable. 2022-04-06 16:45:27 -07:00
John Baldwin
4afc92cd6e ac97_initmixer: Remove write-only variables. 2022-04-06 16:45:27 -07:00
John Baldwin
546629073d cmi: Mark rsp as unused.
If the DEB macro is manually enabled to enable tracing then this
variable is used.  This doesn't use __diagused since it is dependent
on a non-standard debugging macro.
2022-04-06 16:45:27 -07:00
John Baldwin
30cac8e3bb ppc: Fix set but not used warnings on !i386.
Move fetch of SYS_RES_IOPORT resource and associated variables under
existing #ifdef __i386__.
2022-04-06 16:45:27 -07:00
John Baldwin
d31850654e iwn: Remove write-only extra variable.
extra is used in a commented-out expression to compute
scan_service_time.  Use #if 0 instead of a comment for the disabled
scan_service_time expression and move the unused computation of extra
under the same #if.
2022-04-06 16:45:27 -07:00
John Baldwin
99f65e9198 iwi: Remove write-only status variable.
Skip over unused field from asresp frame header.
2022-04-06 16:45:27 -07:00
John Baldwin
89abc0fbbd x86 bounce_bus_dma_tag_destroy: Silence set but unused warning. 2022-04-06 16:45:27 -07:00
Ed Maste
1f4442f71f vidcontrol: be explicit that -p and -P are sc(4) only
PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 19:39:19 -04:00
Alan Somers
3227325366 fusefs: fix two bugs regarding VOP_RECLAIM of the root inode
* We never send FUSE_LOOKUP for the root inode, since its inode number
  is hard-coded to 1.  Therefore, we should not send FUSE_FORGET for it,
  lest the server see its lookup count fall below 0.

* During VOP_RECLAIM, if we are reclaiming the root inode, we must clear
  the file system's vroot pointer.  Otherwise it will be left pointing
  at a reclaimed vnode, which will cause future VOP_LOOKUP operations to
  fail.  Previously we only cleared that pointer during VFS_UMOUNT.  I
  don't know of any real-world way to trigger this bug.

MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D34753
2022-04-06 16:16:52 -06:00
Kirk McKusick
4710aa248b Avoid dereferencing a possibly null pointer.
Reported by: Coverity
CID:         1475868
2022-04-06 14:25:55 -07:00
Navdeep Parhar
c5a7885c80 cxgbe(4): Display the number of free PM pages and p-structs in meminfo.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-04-06 13:15:26 -07:00
Navdeep Parhar
f88b31885c cxgbe(4): meminfo should get the TLS region's limits from the hardware.
meminfo is meant for debugging and it should read hardware configuration
directly when possible instead of relying on values queried from the
firmware.  Rename the region to "TLSKey region" to match other drivers
while here.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-04-06 13:15:25 -07:00
Navdeep Parhar
9983e5cce6 cxgbe(4): Fix the sorting order of the regions listed in meminfo.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2022-04-06 13:15:25 -07:00
Ed Maste
7c140ef034 smbfs: caution against use in the manpage
It supports only the obsolete SMBv1 protocol, is known to be buggy, and
likely has security vulnerabilities.  It will either be updated or
removed in the future, but for now at least describe the current state
in the man page.

PR:		263043
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2022-04-06 14:32:09 -04:00
Kristof Provost
bef7104571 pf: use ERROUT_IOCTL()
Use ERROUT_IOCTL() rather than hand-rolling the macro. This adds DTrace
SDTs in the error path, making debugging ioctl errors easier.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-04-06 16:51:31 +02:00
Gordon Bergling
3dcfd6c266 pass(4): Fix a typo in the manual page
- s/modfied/modified/

MFC after:	3 days
2022-04-06 18:46:26 +02:00
Gordon Bergling
656d68a711 mt(3): Fix a typo in the manual page
- s/mulitple/multiple/

MFC after:	3 days
2022-04-06 18:41:08 +02:00