Commit Graph

281207 Commits

Author SHA1 Message Date
Justin Hibbits
3486b83504 Mechanically convert if_vte(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37796
2023-02-06 12:32:07 -05:00
Justin Hibbits
6712df3ab0 Mechanically convert if_ste(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37794
2023-02-06 12:32:07 -05:00
Justin Hibbits
c0e5e270a5 Mechanically convert if_bfe(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37791
2023-02-06 12:32:06 -05:00
Justin Hibbits
de17d6f9a6 Mechanically convert if_ti(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37806
2023-02-06 12:32:06 -05:00
Justin Hibbits
2568cd2ae9 Mechanically convert if_plip(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37854
2023-02-06 12:32:06 -05:00
Justin Hibbits
76614fdc8c Mechanically convert iwi(4) and iwn(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37849
2023-02-06 12:32:05 -05:00
Justin Hibbits
3f14814f05 Mechanically convert ae(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37786
2023-02-06 12:32:05 -05:00
Justin Hibbits
47842ecfe0 Mechanically convert if_tsec(4) to IfAPI
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37805
2023-02-06 12:32:05 -05:00
Justin Hibbits
a6c0f09aa3 ath(4) IfAPI fixups
Use the if_getcounter() IfAPI instead of accessing the ifnet directly.

Sponsored by:	Juniper Networks, Inc.
2023-02-06 12:32:05 -05:00
Justin Hibbits
6472761966 IfAPI: use IfAPI in mbuf
Sponsored by:	Juniper Networks, Inc.
2023-02-06 12:32:04 -05:00
Justin Hibbits
1e6131bad6 IfAPI: Add needed APIs for mbuf support
Summary:
Add 2 new APIs for supporting recent mbuf changes:
* 36e0a362ac added the m_snd_tag_alloc() wrapper around
  if_snd_tag_alloc().  Push this down to the ifnet level.
* 4d7a1361ef adds the m_rcvif_serialize()/m_rcvif_restore() KPIs to
  serialize and restore an ifnet pointer.  Add the necessary wrapper to
  get the index generation for this.

Reviewed By:	jhb
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38340
2023-02-06 12:32:04 -05:00
Doug Ambrisko
c079c82646 enic: Cleanup module Makefile
Remove debug flags, old FreeBSD tag info and old include info.
2023-02-06 09:26:53 -08:00
Ed Maste
2e82822057 ssh: Be more paranoid with host/domain names coming from the
never write a name with bad characters to a known_hosts file.

replace recently-added valid_domain() check for hostnames going to
known_hosts with a more relaxed check for bad characters.

Obtained from:	OpenSSH-portable commit 445363433ba2
Obtained from:	OpenSSH-portable commit 3cae9f92a318
Sponsored by:	The FreeBSD Foundation
2023-02-06 12:06:26 -05:00
Dag-Erling Smørgrav
2768d70567 libmd / md5: Add SHA-512/224.
While there, remove .Tn from man pages.

Also remove an obsolete comment about the 80386.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans, allanjude
Differential Revision:	https://reviews.freebsd.org/D38373
2023-02-06 18:03:04 +01:00
Sebastian Huber
6680cfe8e0 sha512_224: Fix SHA512_224_Final() on little-endian machines.
PR:		266863
MFC after:	1 week
Reviewed by:	allanjude, cperciva, des
Differential Revision:	https://reviews.freebsd.org/D38372
2023-02-06 18:02:49 +01:00
Doug Ambrisko
9c067b844f enic: Cisco VIC driver
This driver is based of the enic (Cisco VIC) DPDK driver.  It provides
basic ethernet functionality.  Has been run with various VIC cards to
do UEFI PXE boot with NFS root.
2023-02-06 08:46:02 -08:00
Ed Maste
94e21add45 ssh: fix bug in PermitRemoteOpen which caused it to ignore...
its first argument unless it was one of the special keywords "any" or
"none".

Obtained from:	OpenSSH-portable commit b3daa8dc5823
Sponsored by:	The FreeBSD Foundation
2023-02-06 11:33:38 -05:00
Ed Maste
fe1371e8f3 ssh: fix double-free caused by compat_kex_proposal()
Security:	CVE-2023-25136
Obtained from:	OpenSSH-portable commit 12da78233364
Sponsored by:	The FreeBSD Foundation
2023-02-06 11:31:18 -05:00
Dag-Erling Smørgrav
a8fc2fe3af tarfs: Remove unnecessary code.
Reported by:	kib
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D38401
2023-02-06 17:24:32 +01:00
Dag-Erling Smørgrav
c9ff56ce2d tarfs: Terminate dirents before copying them out.
Reported by:	markj
Sponsored by:	Juniper Networks, Inc.
Sponsored bu:	Klara, Inc.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D38400
2023-02-06 17:24:27 +01:00
Dag-Erling Smørgrav
cc6e8949da tarfs: Fix typo in man page.
Reported by:	ceri
Sponsored by:	Junpier Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	pstef
Differential Revision:	https://reviews.freebsd.org/D38399
2023-02-06 17:24:17 +01:00
Dmitry Chagin
07db1f3684 linux(4): Attach netlink on i386.
Discussed with:		melifaro
MFC after:		3 days
2023-02-06 17:00:44 +03:00
Baptiste Daroussin
baff81958c libedit: update to snapshot 2023-01-06
MFC atfer:	1 week
2023-02-06 14:25:06 +01:00
Baptiste Daroussin
5a36c82614 libedit: import version 2023-02-06 2023-02-06 12:46:20 +01:00
Peter Holm
0126bd3e6c stress2: Return error on exit. Run test for longer 2023-02-06 11:09:52 +01:00
Simon J. Gerraty
3cc3c1eb79 Skip EFI framebuffer information if there is none
Avoid several lines of useless info if there is no EFI framebuffer

Reviewed by:	stevek, imp
Differential Revision:	https://reviews.freebsd.org/D38393
2023-02-05 17:23:09 -08:00
Simon J. Gerraty
e9d6b699d8 kern.post.mk we need .MAKE.DEPENDFILE for DIRDEPS_BUILD
When MK_DIRDEPS_BUILD is yes, we need .MAKE.DEPENDFILE left
alone

Reviewed by:	stevek
2023-02-05 14:50:31 -08:00
Bjoern A. Zeeb
b15491b477 LinuxKPI: PCI: implement support for more than 1 MSI vector
Following e9715b1c44 and
4b56afaf7b, implement support
for up-to 32 MSI vectors.  This is used by wireless drivers.
This also switches msi_desc to an array in order to store
per-vector information.

Sponsored by:	The FreeBSD Foundation
Discussed with:	grehan (in Dec)
MFC after:	3 days
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D38222
2023-02-05 20:49:06 +00:00
Bjoern A. Zeeb
4c72d075a5 LinuxKPI: const argument to irq_set_affinity_hint()
irq_set_affinity_hint() takes a const mask argument and some drivers
pass it in as such where earlier implementations were more lenient.
Deal with it and __DECONST() the argument when passed to intr_setaffinity().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38242
2023-02-05 20:46:59 +00:00
Bjoern A. Zeeb
bc81a2b788 LinuxKPI: interrupt.h: add disable_irq_nosync(), irq_set_status_flags()
Add a dummy irq_set_status_flags() along with #defines passed by the driver.
Add disable_irq_nosync() as another wrapper to lkpi_disable_irq().
Those are used by wireless drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38241
2023-02-05 20:45:28 +00:00
Bjoern A. Zeeb
934cb7a331 LinuxKPI: pm.h: add dummy pm_wakeup_event()
Add a dummy implementation of pm_wakeup_event() which is used to notify
the power management system about a wakeup (which we currently do not
implement yet).

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38239
2023-02-05 20:43:46 +00:00
Bjoern A. Zeeb
ffdf10fb9c LinuxKPI: device: add device_set_wakeup_enable()
Add a dummy device_set_wakeup_enable() which is used for WoWLAN which we
do not (yet) support and device_wakeup_enable() which is a wrapper to the
former with the enable argument being true.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38238
2023-02-05 20:36:54 +00:00
Bjoern A. Zeeb
52c28b9903 LinuxKPI: add more dummy header files
Add more empty header files wireless drivers try to include but
we do not (yet) need for any implementation.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38271
2023-02-05 20:34:57 +00:00
Bjoern A. Zeeb
78cab57ac6 LinuxKPI: dummy: remove files which have implementation
Remove former dummy/ files which now have an actual implementation
in common/ .

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D38269
2023-02-05 20:33:30 +00:00
Bjoern A. Zeeb
fd1a2f3dfc LinuxKPI: pci: add more functions
Add a dummy pci_assign_resource() and an implementation of
pci_irq_vector() returning the irq for MSI-X, MSI, and legacy interrupt.
Both are needed by wirless drivers.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D38237
2023-02-05 20:31:40 +00:00
Bjoern A. Zeeb
70b97048a0 LinuxKPI: mm.h: implement virt_to_head_page()
Implement virt_to_head_page().

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D38240
2023-02-05 20:29:56 +00:00
Ed Maste
c755a7cc1e ssh: remove old reference from update instructions
ssh_config and ssh_config.5 no longer contain the VersionAddendum,
so remove instructions to update these files.

Fixes:		bffe60ead0 ("ssh: retire client VersionAddendum")
Sponsored By:	The FreeBSD Foundation
2023-02-05 13:17:46 -05:00
Ed Maste
7ee81174ca Vendor import of OpenSSH 9.2p1 2023-02-05 13:04:12 -05:00
Elliott Mitchell
dcb4b13816 xen/timer: rename "timer.c" to "xen_timer.c"
The better to avoid conflicting with other files given how "timer.c"
isn't a very unique name.  ARM and RISC-V both have timer.c files.

Reviewed by: royger, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/609
Differential Revision: https://reviews.freebsd.org/D36258
2023-02-05 10:50:50 -07:00
Aymeric Wibo
8d5fef85f0 ietp(4): Load dummy HID report descriptor if mangled
Some Elantech trackpads have a mangled HID report descriptor, which
reads as having an incorrect input size (i.e. < IETP_REPORT_LEN_LO).
If the input size is incorrect, load a dummy report descriptor.

Reviewed by:	wulf
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D38387
2023-02-05 18:32:08 +03:00
Yuri
e4d3f1e40a hv_hid: Hyper-V HID driver
Hyper-V HID driver using hidbus/hms.

Reviewed by:	wulf
MFC after:	1 week
PR:		221074
Differential revision:	https://reviews.freebsd.org/D38140
2023-02-05 18:32:08 +03:00
Dmitry Chagin
edfc7d6e5b linux(4): Add the forgotten in the 6f8439db opt_compat include.
MFC after:		1 week
2023-02-05 18:25:10 +03:00
sadaszewski
8362905cb6 coretemp: Only log critical temperature events
According to the Intel manual
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3b-part-2-manual.pdf
the Thermal Status (0) and Thermal Status Log (1) bits report only a
high temperature on the CPU, not a critical temperature as suggested in
the coretemp driver. Check the Critical Temperature Log (5) instead.
The critical temperature waives guarantees of correct function,
therefore the CPU could have for example written some wrong values into
memory at that point and the OS should be stopped ASAP as the state is
no longer reliable.

Reviewed by: imp (confirmed descriptions of bits, linux ignores these bits)
Pull Request: https://github.com/freebsd/freebsd-src/pull/562
2023-02-04 22:05:48 -07:00
Alfonso
70164d957e Fix truncation when ssize_t is larger than MAX_INT
Casting to int truncates size on some platforms, resulting swab not
copying all the data. Cast len to size_t to avoid right shifting a
signed value: we know here it's > 0, so we can safely cast it w/o losing
precision.

In addition, be more careful with signedness of char pointers and
temporaries. Downgrade tmp from unsigned long to unsigned char since
we're only reading and writing characters.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/516
2023-02-04 21:14:14 -07:00
ev
0cec5b99b3 usb/u3g: Add support for QUECTEL EP06-E 4G modem
Add QUECTEL EP06-E modem support via USB for FreeBSD.
Tested and works like a ppp on FreeBSD-13.

Reviewed by: imp
PR: 269326
2023-02-04 20:48:41 -07:00
Rick Macklem
db5655124c vfs_mount.c: Free exports structures in vfs_destroy_mount()
During testing of exporting file systems in jails, I
noticed that the export structures on a mount
were not being free'd when the mount is dismounted.

This bug appears to have been in the system for a
very long time.  It would have resulted in a slow memory
leak when exported file systems were dismounted.

Prior to r362158, freeing the structures during dismount
would not have been safe, since VFS_CHECKEXP() returned
a pointer into an export structure, which might still have been
used by the NFS server for an in-progress RPC when the file system
is dismounted.  r362158 fixed this, so it should now be safe
to free the structures in vfs_mount_destroy(), which is what
this patch does.

Reviewed by:	kib
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D38385
2023-02-04 14:45:23 -08:00
Rick Macklem
d94e0bdc14 Revert "vfs_export: Add checks for correct prison when updating exports"
This reverts commit 7926a01ed7.

A new patch in D38371 is being considered for doing this.
2023-02-04 14:38:32 -08:00
Michael Paepcke
75d41cb696 u3g: Add new 4G Huawei devices
New 4G devices. Longer description of new modes to follow.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:31:41 -07:00
Michael Paepcke
848ac8451b usb: Remove obsolete Huawei 3G from usbdevs
- remove Huawei 3G E3131 (E3131_INIT):
	- frees up 0x1505/0x14fe shared IDs => product is EOL (since...)
	- 3G networks are shutdown/scheduled
	- E3131 devices will still work the same via scsi_huawei_eject2
	- new 4G devices will switch & report correctly now

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:09 -07:00
Michael Paepcke
e66352013a usb: add support for Huawei E5573Cs322
Switch the now added E5573Cs322_ECM (0x14db) as well per default to NCM.
With this patch we default all devices to simple NCM mode to avoid the
problem and get a consistent reliable behavior. No matter what firmware
version and provider mix are involved.

Rationale:
Even the bigger SOC shows under complex load in ECM (double-nat) mode
the same performance drop from 25Mbit to 2Mbit Line Speed, similar to E3372h.
Reason: Thermal problems (reported via serial debug interface in ACM Mode)
after 2-3 minutes load.

Fix the root cause and bundle a working firmware is out of reach because
Huawei sells the same hardware, different (crippled) firmware versions
at different price points in different markets as strategy.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/633
2023-02-04 14:27:09 -07:00