Skip to content

想请教关于 Segmentation 的问题(gdt.c) #18

@aesophor

Description

@aesophor

大佬您好,我想请问下为什么 gdt.c 里面 kernel/user 的 code/data segment 都是 0~0xfffff 呢?
https://github.com/SilverRainZ/OS67/blob/master/kern/gdt.c#L56

这样的话 code 和 data segement 重叠了,是不是就没办法防止code段被其他程序写入?

如果想明确的把他们分开,有没有什么比较好的办法呢?还是大佬觉得初学时先别在意这问题?

谢谢大佬

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions