Page MenuHomeFreeBSD

Modify sv_onexec hook to return error.
ClosedPublic

Authored by dchagin on Jun 26 2021, 10:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 17, 5:54 AM
Unknown Object (File)
Thu, May 7, 11:58 AM
Unknown Object (File)
Mon, Apr 27, 8:35 AM
Unknown Object (File)
Sun, Apr 19, 9:44 AM
Unknown Object (File)
Apr 11 2026, 7:54 AM
Unknown Object (File)
Apr 11 2026, 5:05 AM
Unknown Object (File)
Apr 10 2026, 10:17 PM
Unknown Object (File)
Apr 8 2026, 7:12 AM
Subscribers

Details

Summary

Temporary add stubs to the Linux emulation layer which calls the existing hook.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40118
Build 37007: arc lint + arc unit

Event Timeline

sys/kern/kern_exec.c
1155

At this point, error is KERN_SUCCESS, which is some Mach error code. We never assume that it has zero value. Please replace this fragment by e.g. the following

return (sv->sv_onexec != NULL ? sv->sv_onexec(p, imgp) : 0);

fixed, i missied that KERN_SUCCESS != 0

KERN_SUCCESS is 0, but it is undesirable to depend on that.

This revision is now accepted and ready to land.Jun 26 2021, 1:57 PM