Page MenuHomeFreeBSD

Modify sv_onexec hook to return error.
ClosedPublic

Authored by dchagin on Jun 26 2021, 10:19 AM.
Tags
None
Referenced Files
F114480818: D30911.id91388.diff
Sun, Apr 13, 12:22 AM
Unknown Object (File)
Sun, Mar 16, 5:28 AM
Unknown Object (File)
Mar 11 2025, 12:34 PM
Unknown Object (File)
Feb 21 2025, 3:54 PM
Unknown Object (File)
Jan 15 2025, 3:47 AM
Unknown Object (File)
Jan 12 2025, 1:44 AM
Unknown Object (File)
Jan 10 2025, 1:06 PM
Unknown Object (File)
Jan 5 2025, 11:17 PM
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