HomeFreeBSD

linuxkpi/dmi: don't match exactly on DMI_MATCH

Description

linuxkpi/dmi: don't match exactly on DMI_MATCH

Linux has two defines to check dmi data. DMI_MATCH checks if the dmi
string includes substr. DMI_EXACT_MATCH checks if the dmi string exactly
matches substr. Compat layer should have the same behaviour.

The new definition of dmi_strmatch shouldn't break any driver. A driver
would break if it uses the highest bit of the slot field. Nevertheless,
linux uses the same definition and FreeBSD uses dmi_field values as slot
which are lower than 128.

Sponsored by: Beckhoff Automation GmbH & Co. KG
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35395

(cherry picked from commit 99902b1c52219bae4b9f3684e3ebd83152a1add4)

LinuxKPI: Fix dmi_matches() function

Make sure to check for NULL pointers and also check all search criterias,
not only the first one!

Bump the FreeBSD version.

Reviewed by: manu@
Differential Revision: https://reviews.freebsd.org/D35403
MFC after: 1 week
Sponsored by: NVIDIA Networking

(cherry picked from commit 85d7875d42913c2cb10a007a1be05b210dc6aab2)

Details

Provenance
corvinkAuthored on Jun 3 2022, 2:20 PM
Differential Revision
D35395: linuxkpi/dmi: don't match exactly on DMI_MATCH
Parents
rGa76fa7bb6cb7: killall(1): allow sending signals to processes with control terminal on pts(4)
Branches
Unknown
Tags
Unknown