Page MenuHomeFreeBSD

Prevent users from building obviously defective Linuxulator modules.
ClosedPublic

Authored by dchagin on May 7 2019, 8:58 AM.

Details

Summary

Linuxulator depends on a fundamental kernel settings such as SMP. Many
of them listed in opt_global.h which is not generated while building
modules outside of a kernel and such modules never match real cofigured
kernel.

So, we should prevent our users from building obviously defective modules.

Therefore, I propose to remove the root cause of the building of modules
outside of a kernel - the possibility of building modules with DEBUG or KTR
flags. And remove all of DEBUG printfs as it is incomplete and in threaded
programms not informative, also a half of system call does not have DEBUG
printf. For debuging Linux programms we have dtrace, ktr and ktrace ability.

PR: 222861

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dchagin created this revision.May 7 2019, 8:58 AM
dchagin edited the summary of this revision. (Show Details)May 7 2019, 9:38 AM
trasz added a subscriber: trasz.May 7 2019, 10:08 AM

Have you considered splitting it into two: one for getting rid of DEBUG, and one for preventing out of tree builds? The former looks fine, but I don’t understand the build system well enough wrt the latter.

dchagin updated this revision to Diff 57121.May 7 2019, 10:33 AM

split to get rid of DEBUG and warn

dchagin edited the summary of this revision. (Show Details)May 7 2019, 10:34 AM
dchagin updated this revision to Diff 57124.May 7 2019, 10:42 AM

wrong phab diff, sorry

trasz accepted this revision.May 7 2019, 4:46 PM

The title and description don't match the patch, but apart from that - looks good!

This revision is now accepted and ready to land.May 7 2019, 4:46 PM
This revision was automatically updated to reflect the committed changes.