This is the more typical style used in compat syscalls. Modern
compilers are smart enough to coalesce multiple member assignments
into a bulk copy.
Obtained from: CheriBSD
Differential D53757
freebsd32_setcred: Copy all of the setcred fields individually Authored by jhb on Fri, Nov 14, 2:55 PM. Tags None Referenced Files
Details
Diff Detail
Event TimelineComment Actions This is the important fix. The two prior changes are cleanups, but are pretty small. If you wanted to do an EN for 15.0, you could fix the size in the existing memcpy() to use __rangeof(), but this particular sort of bug is why we generally don't use memcpy() for this sort of thing. Comment Actions Hadn't noticed this new revision (Phabricator mail sending seems to be delayed), so reposting the relevant part of the comment I added on D47878 in the meantime:
Thanks for noticing and the fix! Testing it now.
| ||||||||||||||||||||||||||||||||||||||||||||||||||