Page MenuHomeFreeBSD

Add exec_sysvec_init_abi() to setup non native sysentvecs.
ClosedPublic

Authored by dchagin on Jun 25 2021, 3:45 PM.
Tags
None
Referenced Files
F82017179: D30898.id91358.diff
Wed, Apr 24, 2:37 PM
F82017178: D30898.id92455.diff
Wed, Apr 24, 2:37 PM
F82017176: D30898.id91390.diff
Wed, Apr 24, 2:37 PM
F82017174: D30898.id91350.diff
Wed, Apr 24, 2:37 PM
F82017170: D30898.id.diff
Wed, Apr 24, 2:37 PM
F82017168: D30898.id91367.diff
Wed, Apr 24, 2:37 PM
F82017165: D30898.id91386.diff
Wed, Apr 24, 2:37 PM
Unknown Object (File)
Sun, Apr 21, 8:18 PM
Subscribers

Details

Summary

For future use in the Linux emulation layer add a new
exec_sysvec_init_abi() method which will fill timekeep_base and
sharedpage_obj for non native abi.

Diff Detail

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

Event Timeline

Can you de-duplicate this with exec_sysvec_init()? For instance, could you make exec_sysvec_init() call into your new function?

Perhaps your function would need to take some flags. Or better, parametrize exec_sysinit_abi() so that you can use it instead of make practically a copy.

sys/kern/kern_sharedpage.c
327–335

Why do you need to check this condition? The assert on the previous line verified that the condition is true.

here was a mistake, now it's ok, runtime tested.

sys/kern/kern_sharedpage.c
321–325

Add {} around then statement, it is multi-line.

355–356

This one should be conditional on ABI_FREEBSD as well, perhaps?

401

Should sv->sv_shared_page_obj == 0 (NULL BTW?) and sv->sv_shared_page_base != 0 asserts moved to exec_sysvec_init() ?

405

Now, with the changes to exec_sysvec_init(), what is the reason to have exec_sysvec_init_abi()? It only asserts some state.

sys/kern/kern_sharedpage.c
315

I think that this assert (sv_shared_page_base != 0) should be only done if SV_SHP flag is set.

indeed, fixed, now its good.

kib added inline comments.
sys/kern/kern_sharedpage.c
356

This can be written as a single check

((flags  & (SV_ABI_MASK | SV_RNG_SEED_VER) ) ==  (SV_ABI_FREEBSD | SV_RNG_SEED_VER))

but it is up to you.

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