]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mpr: fix copying of event_mask
authorMariusz Zaborski <oshogbo@FreeBSD.org>
Fri, 21 Apr 2023 07:50:16 +0000 (09:50 +0200)
committerGordon Tetlow <gordon@FreeBSD.org>
Wed, 21 Jun 2023 05:07:50 +0000 (22:07 -0700)
commitbc61a15ededc1b49ea183b1d23b8bcdbee64d99f
tree2f6dc30791b74bfe9e6c6e9a23c6b3f922e25900
parent5d2bbb9db2d2c61629dcaee17cb269593e75d267
mpr: fix copying of event_mask

Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the
field event_mask was fully copied to the EventMasks field.
After this commit the event_mask (uint8_t) is 4 times casted to
EventMask (uint32_t). Because of that 24 bits of each event_mask array
is lost.

This commits brings back simple copying of field, and after words
converting 32 bits field to the requested endian.

I don't think we need more sophisticated method,
as the array is of size 4 (for 32 bits version).

Reviewed by: imp
MFC after: 1 week
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D39562

(cherry picked from commit ea6597c38c77c7bfaae71259d8636cbb89add6a3)
(cherry picked from commit e7a3a08febd01c95b74185bb971ec29cca64b8e1)

Approved by: so
Security: FreeBSD-EN-23:07.mpr
sys/dev/mpr/mpr.c