Page MenuHomeFreeBSD

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

Authored by jhb on Nov 16 2019, 12:47 AM.
Tags
None
Referenced Files
F138678149: D22401.diff
Thu, Dec 4, 2:49 AM
Unknown Object (File)
Mon, Dec 1, 8:55 AM
Unknown Object (File)
Fri, Nov 28, 2:17 PM
Unknown Object (File)
Tue, Nov 25, 1:54 PM
Unknown Object (File)
Tue, Nov 25, 6:56 AM
Unknown Object (File)
Mon, Nov 24, 3:46 PM
Unknown Object (File)
Sun, Nov 23, 12:14 PM
Unknown Object (File)
Sun, Nov 23, 4:57 AM
Subscribers

Details

Summary

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
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.
sys/amd64/linux/linux_sysvec.c
323 ↗(On Diff #64418)

if (error != 0) for all places

sys/kern/kern_exec.c
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.
sys/kern/kern_exec.c
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.