Commit Graph

9560 Commits

Author SHA1 Message Date
Ed Maste
692b19255c dma: use OpenSSL 1.1 init API
> The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were
> deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl().

and

> The ERR_load_crypto_strings(), SSL_load_error_strings(), and
> ERR_free_strings() functions were deprecated in OpenSSL 1.1.0 by
> OPENSSL_init_crypto() and OPENSSL_init_ssl() and should not be used.

Reviewed by:	ngie
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40065
2023-05-11 19:03:34 -04:00
Ed Maste
3e696dfb70 libfido2: update to 1.10.0
Some highlights from NEWS:

 ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*();
    gh#480.
 ** New API calls:
  - fido_dev_info_set;
  - fido_dev_io_handle;
  - fido_dev_new_with_info;
  - fido_dev_open_with_info.
 ** Documentation and reliability fixes.
 ** Support for TPM 2.0 attestation of COSE_ES256 credentials.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:57:34 -04:00
Ed Maste
f540a43052 libfido2: update to 1.9.0
Some highlights from NEWS:

 ** Added OpenSSL 3.0 compatibility.
 ** Removed OpenSSL 1.0 compatibility.
 ** Support for FIDO 2.1 "minPinLength" extension.
 ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation.
 ** Support for TPM 2.0 attestation.
 ** Support for device timeouts; see fido_dev_set_timeout().
 ** New API calls:
  - es256_pk_from_EVP_PKEY;
  - fido_cred_attstmt_len;
  - fido_cred_attstmt_ptr;
  - fido_cred_pin_minlen;
  - fido_cred_set_attstmt;
  - fido_cred_set_pin_minlen;
  - fido_dev_set_pin_minlen_rpid;
  - fido_dev_set_timeout;
  - rs256_pk_from_EVP_PKEY.
 ** Reliability and portability fixes.
 ** Better handling of HID devices without identification strings; gh#381.

Relnotes:       Yes
Sponsored by:   The FreeBSD Foundation
2023-05-05 19:11:52 -04:00
Dimitry Andric
2df58f1907 Apply libc++ fix for compiling <type_traits> with gcc 13
Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath):

  [libc++] Use __is_convertible built-in when available

  https://github.com/llvm/llvm-project/issues/62396 reports that
  GCC 13 barfs on parsing <type_traits> because of the declarations
  of `struct __is_convertible`.  In GCC 13, `__is_convertible` is a
  built-in, but `__is_convertible_to` is not.  Clang has both, so
  using either should be fine.

  Reviewed By: #libc, philnik

  Differential Revision: https://reviews.llvm.org/D149313

Reported by:	Mark Millard <marklmi@yahoo.com>
MFC after:	3 days
2023-05-05 18:19:40 +02:00
Joseph Mingrone
dd744a896b libpcap: Update to 1.10.4
Changelog:	https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES
Reviewed by:	emaste
Obtained from:	https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz
Sponsored by:	The FreeBSD Foundation
2023-05-05 10:56:10 -03:00
Ed Maste
0d66206fff Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb'
git-subtree-dir: contrib/spleen
git-subtree-mainline: 3582acbad3
git-subtree-split: 5eab6333fa

Reviewed by:	imp [earlier]
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20653
2023-05-04 11:46:40 -04:00
Ed Maste
81f964e2ff authpf: do not sprintf to a null pointer
The fgetln loop will terminate with buf = NULL at EOF.

Reported by:	GCC
Reviewed by:	kp
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39947
2023-05-03 10:03:27 -04:00
Xin LI
d713e0891f MFV: less v632.
MFC after:	2 weeks
2023-05-01 20:43:57 -07:00
Hans Petter Selasky
a554ff4670 libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table.
To allow userspace utilities to use these devices.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-05-01 13:48:20 +02:00
Mina Galić
d502d3fc72 opensm: Fix build with -Werror and -Wdate-time.
This fixes builds WITH_OFED_EXTRA=YES .

PR:		270776
Pull Request:	https://github.com/freebsd/freebsd-src/pull/715
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2023-05-01 13:46:24 +02:00
Stefan Eßer
8c48f4c537 contrib/bc: import version 6.5.0
This release that fixes an infinite loop bug in the (non-standard)
extended math library functions root() and cbrt(), fixes a bug with
BC_LINE_LENGTH=0, and adds the fib() function to the extended math
library to calculate Fibonacci numbers.

(cherry picked from commit 438a1101dc1f687928cdbe02cd7817a88a24f42f)

MFC after:      3 days
2023-04-30 20:28:21 +02:00
Dimitry Andric
56f2446575 Apply clang fix for assertion building emulators/rpcs3
Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva):

  [clang] Fix crash when handling nested immediate invocations

  Before this patch it was expected that if there was several immediate
  invocations they all belong to the same expression evaluation context.
  During parsing of non local variable initializer a new evaluation context is
  pushed, so code like this
  ```
  namespace scope {
  struct channel {
      consteval channel(const char* name) noexcept { }
  };
  consteval const char* make_channel_name(const char* name) { return name;}

  channel rsx_log(make_channel_name("rsx_log"));
  }
  ```
  produced a nested immediate invocation whose subexpressions are attached
  to different expression evaluation contexts. The constructor call
  belongs to TU context and `make_channel_name` call to context of
  variable initializer.

  This patch removes this assumption and adds tracking of previously
  failed immediate invocations, so it is possible when handling an
  immediate invocation th check that its subexpressions from possibly another
  evaluation context contains errors and not produce duplicate
  diagnostics.

  Fixes https://github.com/llvm/llvm-project/issues/58207

  Reviewed By: aaron.ballman, shafik

  Differential Revision: https://reviews.llvm.org/D146234

PR:		269489
MFC after:	3 days
2023-04-28 16:09:45 +02:00
Dag-Erling Smørgrav
75411d1572 Update tzcode to 2023c.
MFC after:      3 weeks
Sponsored by:   Klara, Inc.
Reviewed by:    philip
Differential Revision:  https://reviews.freebsd.org/D39712
2023-04-26 11:46:21 +02:00
Simon J. Gerraty
8c973ee23d Merge bmake-20230414
Merge commit '51d8a8b4ac1dd7265e891149e470a803906de2a7'
2023-04-24 16:50:16 -07:00
Ed Maste
5d3e7166f6 libcbor: update to 0.10.2
Sponsored by:	The FreeBSD Foundation
2023-04-21 16:10:03 -04:00
John Baldwin
9d8537e3de ee: Remove two set but unused variables.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39671
2023-04-18 12:53:32 -07:00
John Baldwin
91517e3b81 ee: Use C89 function definitions.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39670
2023-04-18 12:53:20 -07:00
John Baldwin
215927f535 ee: Remove function prototype for main. 2023-04-18 12:53:05 -07:00
John Baldwin
87cc8c6be0 ee: Drop P_() macro used for pre-C89 compatibility.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39669
2023-04-18 12:52:44 -07:00
John Baldwin
274c18c2bd pnpinfo: Use C89 function definitions.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39534
2023-04-18 11:31:13 -07:00
John Baldwin
6b06255fbe traceroute: Use C89 function definition for one straggler.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39531
2023-04-18 11:28:41 -07:00
John Baldwin
11af9d2477 telnet: Use C89 function definitions for two stragglers.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39528
2023-04-18 11:27:47 -07:00
John Baldwin
f6fd5356b3 smbfs: Use C89 function definition for cf_getopt.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D39519
2023-04-18 11:20:43 -07:00
Kajetan Staszkiewicz
56cd7716b6 tcpdump: add missing pf reasons and actions
Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39586
2023-04-18 09:33:33 +02:00
Dimitry Andric
67ecab6f50 libarchive: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by various declarations in libarchive:

    contrib/libarchive/libarchive/archive_write_set_format_7zip.c:1541:13: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    file->dir = 1;
                              ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5127:15: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    isoent->dir = 1;
                                ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5213:14: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->dir = 1;
                        ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:5214:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->virtual = 1;
                            ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7149:18: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            isoent->virtual = 1;
                            ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7435:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    iso9660->zisofs.detect_magic = 1;
                                                 ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7495:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            iso9660->zisofs.making = 1;
                                   ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7496:26: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            iso9660->zisofs.allzero = 1;
                                    ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7702:28: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                            iso9660->zisofs.allzero = 1;
                                                    ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7871:25: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                    zisofs->header_passed = 1;
                                          ^ ~
    contrib/libarchive/libarchive/archive_write_set_format_iso9660.c:7894:24: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
                            zisofs->initialized = 1;
                                                ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the fields as booleans, so make them unsigned.

This has also been sent upstream.

MFC after:	3 days
2023-04-17 18:26:20 +02:00
Dimitry Andric
b740e02500 bsnmp: make single bit bitfields unsigned to avoid clang 16 warning
Clang 16 introduced a warning about single bit bitfields in structs,
which is triggered by a declaration in bsnmp's snmpd.h:

    contrib/bsnmp/snmpd/trans_lsock.c:271:21: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
            peer->input.stream = 1;
                               ^ ~

Signed one-bit bitfields can only have values -1 and 0, but the intent
here is to use the field as a boolean, so make it unsigned.

MFC after:	3 days
2023-04-17 18:26:03 +02:00
Cy Schubert
e7e621f94d sqlite3: Vendor import of sqlite3 3.41.2
Release notes at https://www.sqlite.org/releaselog/3_41_2.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz
MFC after:      2 weeks

Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1'
2023-04-17 09:02:41 -07:00
Ed Maste
5dbd073b04 awk: errror on printf format strings lacking conversion specifier
Reported by:	phk
Reviewed by:	imp, markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39573
2023-04-14 13:31:02 -04:00
Hartmut Brandt
9088779e3c SNMP: Update the fokus MIB with a new contact info.
Bring the contact info in sync with the contact info at IANA.
2023-04-14 08:28:56 +00:00
Gordon Bergling
d2e0204ec0 telnet.1: Fix a typo in the manual page
- s/addreess/address/

MFC after:	3 days
2023-04-11 10:42:37 +02:00
Cy Schubert
953efa5b20 wpa_supplicant/hostapd: Fix uninitialized packet pointer on error
The packet pointer (called packet) will remain uninitialized when
pcap_next_ex() returns an error. This occurs when the wlan
interface is shut down using ifconfig destroy. Adding a NULL
assignment to packet duplicates what pcap_next() does.

The reason we use pcap_next_ex() in this instance is because with
pacp_next() when we receive a null pointer if there was an error
or if no packets were read. With pcap_next_ex() we can differentiate
between an error and legitimately no packets were received.

PR:		270649
Reported by:	Robert Morris <rtm@lcs.mit.edu>
Fixes:		6e5d01124f
MFC after:	3 days
2023-04-06 07:27:24 -07:00
Mateusz Guzik
04bab189b8 llvm/lld: damage control threading
See the comment inside.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D39389
2023-04-03 16:05:42 +00:00
Joseph Mingrone
6f9cba8f8b
libpcap: Update to 1.10.3
Local changes:

- In contrib/libpcap/pcap/bpf.h, do not include pcap/dlt.h.  Our system
  net/dlt.h is pulled in from net/bpf.h.
- sys/net/dlt.h: Incorporate changes from libpcap 1.10.3.
- lib/libpcap/Makefile: Update for libpcap 1.10.3.

Changelog:	https://git.tcpdump.org/libpcap/blob/95691ebe7564afa3faa5c6ba0dbd17e351be455a:/CHANGES
Reviewed by:	emaste
Obtained from:	https://www.tcpdump.org/release/libpcap-1.10.3.tar.gz
Sponsored by:	The FreeBSD Foundation
2023-03-31 16:02:22 -03:00
Joseph Mingrone
512c553671
tcpdump: Backport a fix required for upcoming libpcap update
See also:	51f9c3b947
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2023-03-30 19:52:10 -03:00
Joseph Mingrone
0c59e0b4e5
pflogd: Do not access obsolete structure member pcap.tzoff
This change is in preparation for a libpcap update.

See also:	d4d65e7c4c
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2023-03-30 15:58:45 -03:00
Philip Paeps
9fbeeb6e38 contrib/tzdata: import tzdata 2023c
Changes: https://github.com/eggert/tz/blob/2023c/NEWS

The tzdata 2023c release reverts all changes made in 2023b other than
commentary, as that appears to be the best of a bad set of short-notice
choices for modeling this week's daylight saving chaos in Lebanon.

MFC after:      insta-MFC
2023-03-29 09:09:54 +08:00
Bartosz Sobczak
35105900c6
irdma(4): Upgrade the driver to 1.1.11-k
Summary of changes:
- postpone mtu size assignment during load to avoid race condition
- refactor some of the debug prints
- add request reset handler
- refactor flush scheduler to increase efficiency and avoid racing
- put correct vlan_tag for UD traffic with PFC
- suspend QP before going to ERROR state to avoid CQP timout
- fix arithmetic error on irdma_debug_bugf
- allow debug flag to be settable during driver load
- introduce meaningful default values for DCQCN algorithm
- interrupt naming convention improvements
- skip unsignaled completions in poll_cmpl

Signed-off-by: Bartosz Sobczak bartosz.sobczak@intel.com
Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Reviewed by:	hselasky@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D39173
2023-03-28 14:29:07 -07:00
Ruslan Bukin
46e6e29097 Import OpenCSD v.1.4.0.
Sponsored by:	UKRI
2023-03-27 17:03:16 +01:00
Philip Paeps
2084f6a496 contrib/tzdata: import tzdata 2023b
Changes: https://github.com/eggert/tz/blob/2023b/NEWS

MFC after:      1 day
2023-03-24 12:45:24 +08:00
Bjoern A. Zeeb
bfb202c455 WPA: driver_bsd.c: backout upstream IFF_ change and add logging
This reverts the state to our old supplicant logic setting or clearing
IFF_UP if needed.  In addition this adds logging for the cases in which
we do (not) change the interface state.

Depending on testing this seems to help bringing WiFi up or not log
any needed changes (which would be the expected wpa_supplicant logic
now).  People should look out for ``(changed)`` log entries (at least
if debugging the issue; this way we will at least have data points).

There is a hypothesis still pondered that the entire IFF_UP toggling
only exploits a race in net80211 (see further discssussions for more
debugging and alternative solutions see D38508 and D38753).
That may also explain why the changes to the rc startup script [1]
only helped partially for some people to no longer see the
continuous CTRL-EVENT-SCAN-FAILED.

It is highly likely that we will want further changes and until
we know for sure that people are seeing ''(changed)'' events
this should stay local.  Should we need to upstream this we'll
likely need #ifdef __FreeBSD__ around this code.

[1] 5fcdc19a81 and
    d06d7eb091

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
Reviewed by:	cy, enweiwu (earlier)
Differential Revision: https://reviews.freebsd.org/D38807
2023-03-23 23:51:24 +00:00
Philip Paeps
259e2ad76d contrib/tzdata: import tzdata 2023a
Changes: https://github.com/eggert/tz/blob/2023a/NEWS

MFC after:	1 day
2023-03-23 09:33:45 +08:00
Ed Maste
899becbfcb tcp_wrappers: Use ANSI (c89) definitions for one more function
Fixes: 14f102eacc ("tcp_wrappers: Use ANSI (c89) function definit...")
Sponsored by: The FreeBSD Foundation
2023-03-21 16:09:13 -04:00
Ed Maste
14f102eacc tcp_wrappers: Use ANSI (c89) function definitions
Although this code is in contrib/ there is no active upstream.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36047
2023-03-21 10:09:34 -04:00
Xin LI
c917796c04 MFV: xz 5.4.2.
MFC after:	2 weeks
2023-03-19 19:30:08 -07:00
Mark Johnston
478de7f8e2 netbsd-tests: Remove some pointless sleeps from message queue tests
- In the msgctl tests, there is no point in sleeping after a fork().
  Just block immediately in wait().
- In non-blocking send/recv tests, just wait for the child to exit once
  it's reached a message limit.  If a bug prevents the child from
  exiting promptly, the test will time out.

MFC after:	1 week
2023-03-10 17:06:46 -05:00
Stefan Eßer
175a4d1042 contrib/bc: update to version 6.4.0
This version contains a fix for an issue that can affect complex
bc scripts that use multiple read() functions that receive input from
an interactive user. The same value could be returned multiple times.

MFC after:	2 weeks
2023-03-10 11:33:33 +01:00
Brooks Davis
af0cc0b223 NgATM: Remove netgraph ATM support
Most ATM support was removed prior to FreeBSD 12.  The netgraph support
was kept as it was less intrusive, but it is presumed to be unused.

Reviewed by:	manu
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38879
2023-03-09 18:04:02 +00:00
Christos Margiolis
cec2d0b1c7 readelf: fix -wR option, memory leaks, and -wf minor bug
Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38419
2023-03-06 12:51:23 -05:00
Xin LI
c237c10a23 xz: Improve compatibility with systems without capability mode support
When the kernel is built without capability mode support, or when
using an emulator like qemu-user-static that does not translate
system calls, these calls will return a negative number and set
the errno to ENOSYS. However, this error does not indicate a
real programming or runtime error and is generally ignored by
base system applications built with capability mode sandboxing.

Match this behavior by making xz(1) to ignore ENOSYS errors
when calling capability mode system calls too.

PR:		269185
Reported by:	Dan Kotowski
MFC after:	2 days
2023-03-05 01:40:13 -08:00
Ed Maste
4530e0c3e7 bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00