Page MenuHomeFreeBSD

Don't panic on opening a GEOM node with O_EXEC.
ClosedPublic

Authored by trasz on Jul 11 2015, 11:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 18, 10:38 AM
Unknown Object (File)
Sat, Apr 18, 8:39 AM
Unknown Object (File)
Fri, Apr 17, 10:13 PM
Unknown Object (File)
Wed, Apr 15, 2:10 AM
Unknown Object (File)
Tue, Apr 14, 5:56 AM
Unknown Object (File)
Tue, Apr 7, 7:45 AM
Unknown Object (File)
Sat, Apr 4, 11:34 PM
Unknown Object (File)
Tue, Mar 31, 9:35 PM
Subscribers

Details

Summary

Fix panic triggered by code like this:

open("/dev/md0", O_EXEC);

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz retitled this revision from to Don't panic on opening a GEOM node with O_EXEC..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)

Same as for close, I am not sure it is proper place to check it here. May be we are incorrectly handling some POSIX flags semantics when handling open syscall.

You mean, move the check up a layer, eg into devfs?

Konstantin, what do you think? Leave it here, or move to eg devfs?

If we are sure that no devfs nodes should be opened with O_EXEC, then devfs would be reasonable place for the check. Otherwise, geom, which cannot handle the request, should plug the case.

I cannot provide an easy example for the O_EXEC open of the devfs node. Might be, in-place execution from ROM is the suitable use case. If so, your patch is fine.

This revision was automatically updated to reflect the committed changes.