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
F103260445: D22401.diff
Fri, Nov 22, 6:27 PM
Unknown Object (File)
Sep 21 2024, 12:38 AM
Unknown Object (File)
Sep 21 2024, 12:38 AM
Unknown Object (File)
Sep 21 2024, 12:38 AM
Unknown Object (File)
Sep 21 2024, 12:37 AM
Unknown Object (File)
Sep 21 2024, 12:29 AM
Unknown Object (File)
Sep 16 2024, 11:03 PM
Unknown Object (File)
Sep 5 2024, 10:42 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.