Commit Graph

278770 Commits

Author SHA1 Message Date
Kyle Evans
0701dbda94 loader: fix elf lookup_symbol type filtering
The existing logic doesn't seem to make much sense, as we won't filter
on the type if st_shndx != SHN_UNDEF.  In practice, this breaks booting
12.3 kernels on newer loaders, as they do have a `kernphys` symbol of
the wrong type (NOTYPE, rather than OBJECT) -- we end up deriving the
wrong value for copy_staging.

It's unclear if this version makes any more sense, but it seems to match
what rtld's matched_symbol() does.  Loader doesn't need to care about
STT_FUNC w/ UND shndx, because we won't encounter those; in kmods,
undefined (kernel) functions are NOTYPE.

Reported by:	Christian McDonald <cmcdonald netgate com>
Reviewed by:	imp, kib, tsoome
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36975
2022-10-13 22:07:52 -05:00
Kyle Evans
ed7910fbac Revert "Avoid using TARGET_ARCH in llvm.build.mk"
This reverts commit 8534e6be81, and adds
a cautionary note that there are dragons about that should be considered
when changing it.

PR:		267026
Reviewed by:	dim, imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36981
2022-10-13 22:04:47 -05:00
Gleb Smirnoff
2e0e273927 netinet6: trim overly long lines in GET_PKTOPT_VAR(), fit into 80 chars 2022-10-13 09:03:38 -07:00
Gleb Smirnoff
3ba34b07a4 inpcb: provide in_pcbremhash() to reduce copy-paste 2022-10-13 09:03:38 -07:00
Olivier Cochard
07b1ea961a renice: Force /bin/sh usage on su calls for the regression tests.
If the root account is configured to use a different shell than sh,
it fails to retreive the pid of the background process.

Approved by:	des
Obtained from:	chs
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D36930
2022-10-13 17:32:47 +02:00
Jose Luis Duran
63f6075fcf blacklistd: Whitespace police
These were missed in the previous whitespace reduction.

Fixes:		631bdcf304 ("blacklistd: whitespace cleanup")
Obtained from:	https://github.com/zoulasc/blocklist
2022-10-13 08:47:56 -04:00
Jose Luis Duran
1c14656dad blacklistd: Reduce diff with upstream
No functional change intended.
2022-10-13 08:25:32 -04:00
Baptiste Daroussin
226e41467e sort: deindent file_reader_free and cleanup its usage 2022-10-13 10:51:17 +02:00
Baptiste Daroussin
ffd41d39c6 sort: simplify file_reader_clean
Deindent the function, remove useless tests:
 - free already test if argument is NULL
 - closefile already test if the input is stdin or null
2022-10-13 10:42:23 +02:00
Baptiste Daroussin
f9d9a7cc4f sort: deindent closefile 2022-10-13 10:38:12 +02:00
Baptiste Daroussin
48a53cc484 sort: use asprintf(3) instead of malloc + snprintf(3) 2022-10-13 10:34:57 +02:00
Baptiste Daroussin
958b0d4642 sort: deindent openfile 2022-10-13 10:31:34 +02:00
Baptiste Daroussin
f079ef8aa4 sort: simplify the code to handle -z flag 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
4d4fcf619e sort: cleanup now unused structutre and prototypes 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
8b9071360a sort: unify the code to read from FILE *
Previously the code to read from a local file or stdin was sperarated
After the change to remove the home made line reader used for stdin
(replaced by getdelim) it apprears that the rest of the code which is
used to read from any FILE * but stdin can benefit from the exact same
change.
2022-10-13 10:24:11 +02:00
Baptiste Daroussin
e8815fb30b sort: remove unused function 2022-10-13 10:24:11 +02:00
Baptiste Daroussin
f02c783757 sort: use memset to initialize structure when possible 2022-10-13 10:24:11 +02:00
Pedro F. Giffuni
c59871e922 vinum/geom_vinum_var.h: Fix missing linefeed in license.
The license is still standard BSD-4-clause and the text is unmodified
but add a missing linefeed for readability.

No functional change.
2022-10-12 22:46:03 -05:00
Michael Tuexen
dd36606b1b sctp: improve sending of ABORT packets in response to INIT-ACKs
Ensure that the initiate tag of the INIT-ACK chunk is used as the
verification tag of the packet containing the ABORT chunk.

Reported by:	Suganya Dharma
MFC after:	1 week
2022-10-13 01:05:44 +02:00
Mark Johnston
53a31c87df libdtrace: Fix some CPU register number definitions to match the kernel
MFC after:	1 week
2022-10-12 16:06:37 -04:00
Mark Johnston
b34a6e0fed dtrace: Drop illumos ifdefs for CPU register definitions
These are fixed, so having upstream's version is not especially useful,
and the duplicated definitions make for confusing reading.  No
functional change intended.

MFC after:	1 week
2022-10-12 16:06:33 -04:00
Pau Amma
f428cd0ebf Copyedit git-arc(1)
Bump .Dd again as requested.

Reviewed by:	gjb, imp, jhb

Approved by:	gjb (mentor, src), imp (src), jhb (src)

Differential Revision:	https://reviews.freebsd.org/D36705
2022-10-12 21:50:42 +02:00
Jose Luis Duran
16d39eadf7 blacklistd: Don't remove a ruleset if we have already added it
The noted argument is wrong - if it's already been deleted then the id we
have for it is invalid.
Because we don't track deletions to the ruleset, working it out is
problematic at best.

Instead, if we have already added the rule treat it as a non-op.

This is a valid use case because we might receive a burst of messages
in the downstream application for the same address and process them
one by one. It's not the job of the downstream application to track
blacklistd state.

Obtained from:	959b18a604
2022-10-12 15:47:44 -04:00
Ed Maste
b290769b98 blacklistd: silence sign-conversion warning from Clang
Obtained from:	NetBSD 518a28b2e752
2022-10-12 14:10:21 -04:00
Ed Maste
fca7ac55f8 ssh: remove pre- and post-merge update steps
We no longer use the pre- and post-merge scripts to strip/add RCS tags.
The tags have been removed from main, but persist on older branches.

While here renumber the steps in the update documentation using a more
conventional scheme.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36904
2022-10-12 13:54:08 -04:00
Ka Ho Ng
87fa64c569 refcount.9: Update refcount_acquire(9) description after a67d540832
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D36943
2022-10-12 13:47:59 -04:00
Ed Maste
631bdcf304 blacklistd: whitespace cleanup
Diff reduction against NetBSD external/bsd/blacklist (at commit
03c74c04f277).

Sponsored by:	The FreeBSD Foundation
2022-10-12 13:41:44 -04:00
Mitchell Horne
30c6a66864 malloc(9): update names and hardlinks
Give all documented functions a .Nm entry in the man page, following the
order they are listed in the synopsis. Create MLINKs for each of the
functions as well.

While here, add a missing include directive to the synopsis, and appease
mandoc by wrapping a long line.

Reviewed by:	markj, imp (previous version), jhb (previous version)
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36940
2022-10-12 13:46:12 -03:00
Mitchell Horne
ed02be352d swi(9): remove BUGS section
Most of these globals have been removed, save for clk_intr_event. This
one is appropriate to keep in sys/interrupt.h, despite the fact that it
has only one consumer.

Bump .Dd for this and previous changes.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36939
2022-10-12 13:46:12 -03:00
Mitchell Horne
05b727fee5 Downgrade tty_intr_event from a global
It can be static within uart_tty.c. It is an open question whether there
remains any real benefit to having uart instances share a swi thread.

Reviewed by:	imp, markj, jhb
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36938
2022-10-12 13:46:12 -03:00
Mitchell Horne
96b76a6a1e swi(9): clean up description of clk_intr_event
From what I can tell, setdelayed() was removed so long ago that its
mention is more likely to be confusing than helpful. We now have a
manpage for hardclock(9), so reference that.

Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36937
2022-10-12 13:46:12 -03:00
Mitchell Horne
e23c3445f6 Remove last references of vm_ih
The only remaining user was busdma, and so it was simplified.

Reviewed by:	markj, jhb
MFC after:	1 week
Fixes:		254e4e5b77 ("Simplify swi for bus_dma")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36936
2022-10-12 13:45:45 -03:00
Baptiste Daroussin
3f9e5e59bd sort: use mkstemp(3) instead of reinventing it
MFC After:	1 week
2022-10-12 18:01:57 +02:00
Ed Maste
1694872231 dma: restore addition of newline when missing from input
If input mail does not have a newline on the last line dma must add
one.  This was broken by the addition of long-line splitting, with the
switch from strlen(line) to linelen returned by getline().

PR:		266629
Reviewed by:	bapt, Mikko Lehto
Tested by:	Mikko Lehto
MFC after:	1 week
Fixes:		b0b2d05fd0 ("Split body of mails not respecting...")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36763
2022-10-12 11:59:01 -04:00
Baptiste Daroussin
b58094c0d9 sort: replace home made line reader by getdelim(3)
The previous code had bug when reading lines with an unexpected
encoding, returning without the full line being captured.
This result in sort complaining with "sort: Illegal byte sequence"

Using getdelim(3) instead of the home made code, fixes the situation.

PR:		241679
Reported by:	Ronald F. Guilmette <rfg-freebsd@tristatelogic.com>
MFC After:	1 week
Reviewed by:	markj, imp
Differential Revision:	https://reviews.freebsd.org/D36948
2022-10-12 17:37:33 +02:00
Jose Luis Duran
45c11d5401 blacklistd: Fix usage for blacklistd/blacklistctl
If getopt(3) encounters a character not found in optstring or if it
detects a missing option argument, it returns ? (question mark).

Obtained from:	 https://github.com/zoulasc/blocklist
Differential Revision:	https://reviews.freebsd.org/D36087
2022-10-12 10:30:12 -04:00
Baptiste Daroussin
00ffd6b5e8 OptionalObsoleteFiles: grep nls files have been removed 4 years ago 2022-10-12 16:28:36 +02:00
Baptiste Daroussin
ed990a7a2f sort: remove NLS support
NLS support for sort(1) is:
1/ incomplete: many error string are not using nls
2/ only covers hu_HU.ISO8859-2
2022-10-12 16:24:29 +02:00
Baptiste Daroussin
ecc3c29167 sort: replace malloc+memset with calloc 2022-10-12 16:12:04 +02:00
Baptiste Daroussin
a312f3e742 sort: add wrapper around calloc 2022-10-12 16:12:04 +02:00
Jose Luis Duran
aa05c93cb7 blacklistd: Update documentation changes
Cherry-pick upstream documentation changes.

Obtained from:	 https://github.com/zoulasc/blocklist
Differential Revision:	https://reviews.freebsd.org/D36086
2022-10-12 09:27:08 -04:00
Kevin Bowling
66dad2db0a Revert "e1000: Try auto-negotiation for fixed 100 or 10 configuration"
This reverts commit 9ab4dfce8f.

OPNsense users have reported a regression with fixed configs.

The e1000 api is not ready for this change.
2022-10-12 05:01:12 -07:00
Baptiste Daroussin
88e6c9a674 pw: remove the inaccurate anymore information from the README 2022-10-12 12:11:32 +02:00
Baptiste Daroussin
c0358afd5b pw: exit with an error in case of using an illegal option
PR:		263188
Reported by:	Dennis Clarke <dclarke@blastwave.org>
MFC After:	1 week
2022-10-12 12:06:32 +02:00
Baptiste Daroussin
0b4886f454 pci_vendors: update to 2022.09.09 2022-10-12 11:31:15 +02:00
Michael Tuexen
bc0d407676 Revert "listen(): improve POSIX compliance"
This reverts commit 76e6e4d72f.

Several programs in the tree use -1 instead of INT_MAX to use
the maximum value. Thanks to Eugene Grosbein for pointing this
out.
2022-10-12 04:33:00 +02:00
Philip Paeps
5d56371c70 contrib/tzdata: import tzdata 2022e
Changes: https://github.com/eggert/tz/blob/2022e/NEWS

MFC after:	3 days
2022-10-12 09:50:03 +08:00
Philip Paeps
d479ab9945 Import tzdata 2022e 2022-10-12 09:46:54 +08:00
Mark Johnston
19a847e5f2 kinst: Add a rudimentary regression test case
The test instruments a number of large, frequently called kernel
functions while generating load in the background.

MFC after:	3 months
2022-10-11 18:19:55 -04:00
Mark Johnston
bf7022dee6 dtraceall: Automatically load kinst.ko on amd64
MFC after:	3 months
2022-10-11 18:19:55 -04:00