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)
Dec 19 2023, 11:39 PM
Unknown Object (File)
Nov 22 2023, 12:59 PM
Unknown Object (File)
Nov 12 2023, 12:31 PM
Unknown Object (File)
Oct 19 2023, 6:58 AM
Unknown Object (File)
Aug 4 2023, 10:46 PM
Unknown Object (File)
Aug 4 2023, 10:45 PM
Unknown Object (File)
Aug 4 2023, 10:44 PM
Unknown Object (File)
Aug 4 2023, 10:44 AM
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.