Page MenuHomeFreeBSD

Check for errors from copyout() and suword*() in sv_copyout_args/strings.

Authored by jhb on Nov 16 2019, 12:47 AM.



Tested on: amd64 (amd64, i386, linux64), i386 (i386, linux)

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Nov 16 2019, 1:02 AM
kib added inline comments.
323 ↗(On Diff #64418)

if (error != 0) for all places

363 ↗(On Diff #64418)

stack_base almost cries to become uintptr_t, and you are touching almost all places which need explicit type for it. Then at least some casts could be removed, like sv_setregs calls.

But I do not insist.

  • Use 'if (error != 0)'
This revision now requires review to proceed.Nov 18 2019, 7:15 PM
jhb marked an inline comment as done.Nov 18 2019, 7:15 PM
jhb added inline comments.
363 ↗(On Diff #64418)

Or a char *, but uintptr_t is probably fine. I actually planned to make this change as a followup as part of some other cleanup I am doing. I will do that as a followup change.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 18 2019, 8:08 PM
This revision was automatically updated to reflect the committed changes.