Skip to content

Commit

Permalink
remove user accessability from kernel code segment
Browse files Browse the repository at this point in the history
  • Loading branch information
mewmew committed Apr 27, 2024
1 parent 9652d43 commit 331f6cf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/boot/paging_32.zig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export fn map_kernel_code_segment() void {
var page_table_flags = page_table_entry.getFlags();
page_table_flags.present = true;
page_table_flags.writeable = true; // TODO: unset writeable and set no_execute for kernel code segment?
page_table_flags.user_accessible = true;
page_table_flags.huge = true; // entry maps to a 2 MB frame (rather than a page table).
// Make only the range 0x000000-0x200000 (2MiB) executable.
//page_table_flags.no_execute = true;
Expand Down

0 comments on commit 331f6cf

Please sign in to comment.