Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminating the device / fdconfig.sys process crashes the system #142

Open
ecm-pushbx opened this issue Feb 21, 2024 · 0 comments
Open

Terminating the device / fdconfig.sys process crashes the system #142

ecm-pushbx opened this issue Feb 21, 2024 · 0 comments

Comments

@ecm-pushbx
Copy link
Contributor

By loading lDebug as a device driver I inspected the system state during device init. It turns out that the kernel sets up an init PSP at segment 60h. This process is self-owned, but its Parent Return Address / int 22h vector appears to be uninitialised:

 &; Welcome to dev mode lDebug
 -r psp .
 PSP 0060
 -r parent .
 PARENT 0060
 -r pra .
 PRA 00D91289
 -u ptr pra l 1
 00D9:1289 CF                iret
 -

The same iret is used as the handler for eg int 2Dh. When the kernel returns from a termination, it will branch to the PRA with the parent's last int 21h stack, which generally will not contain a valid far return address for this iret to use.

I fixed my application to not try to terminate the init process in https://hg.pushbx.org/ecm/ldebug/rev/5740dcb40620 However, I think the kernel should handle its init process being terminated. Control-C and Critical Error Abort could possibly terminate the init process, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant