Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Introduce a new mitigation #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions osfmk/kern/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ kernel_bootstrap(void)
thread_t thread;
char namep[16];

panic("code execution prevented");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to below console_setup and replace "code execution prevented" with "legacy execution system has been deprecated." After that I think this should be good to merge.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that "legacy execution system has been deprecated." is a better, more descriptive line, and I will update the PR later. However, because this panic call is not the only offender that prints before console_setup, I believe the cleaner and more correct thing to do is to eliminate the problem altogether in a dedicated pull request and commit set rather than shoving a single-instance fix inside an unrelated feature.


printf("%s\n", version); /* log kernel version */

scale_setup();
Expand Down