From 918f9045d36a0665c9d40ac2faa1b7992326a5ce Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 13 Jun 2017 14:27:24 +0200 Subject: [PATCH] Rename naked exception handling section --- .../01-catching-exceptions/index.md | 2 +- .../normal-vs-interrupt-function-return.svg | 0 .../qemu-divide-error-println.png | Bin .../exception-stack-frame.svg | 0 .../02-better-exception-messages/index.md | 2 +- .../qemu-divide-by-zero-stack-frame.png | Bin .../qemu-page-fault-error-code.png | Bin .../qemu-page-fault-handler.png | Bin .../qemu-print-stack-frame-try.png | Bin .../exception-stack-frame.svg | 0 .../function-stack-frame.svg | 0 .../03-returning-from-exceptions/index.md | 4 ++-- .../qemu-breakpoint-handler.png | Bin .../qemu-breakpoint-return-page-fault.png | Bin .../qemu-breakpoint-return.png | Bin .../qemu-page-fault-return.png | Bin .../red-zone-overwrite.svg | 0 .../03-returning-from-exceptions/red-zone.svg | 0 .../03-returning-from-exceptions/xmm-overwrite.svg | 0 .../_index.md | 0 blog/content/posts/01-multiboot-kernel/index.md | 2 +- blog/content/posts/02-entering-longmode/index.md | 4 ++-- 22 files changed, 7 insertions(+), 7 deletions(-) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/01-catching-exceptions/index.md (99%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/01-catching-exceptions/normal-vs-interrupt-function-return.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/01-catching-exceptions/qemu-divide-error-println.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/exception-stack-frame.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/index.md (99%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/qemu-divide-by-zero-stack-frame.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/qemu-page-fault-error-code.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/qemu-page-fault-handler.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/02-better-exception-messages/qemu-print-stack-frame-try.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/exception-stack-frame.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/function-stack-frame.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/index.md (99%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/qemu-breakpoint-handler.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/qemu-breakpoint-return-page-fault.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/qemu-breakpoint-return.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/qemu-page-fault-return.png (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/red-zone-overwrite.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/red-zone.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/03-returning-from-exceptions/xmm-overwrite.svg (100%) rename blog/content/extra/{handling-exceptions-with-naked-fns => naked-exceptions}/_index.md (100%) diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/index.md b/blog/content/extra/naked-exceptions/01-catching-exceptions/index.md similarity index 99% rename from blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/index.md rename to blog/content/extra/naked-exceptions/01-catching-exceptions/index.md index 02f0f3bf..3ab92597 100644 --- a/blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/index.md +++ b/blog/content/extra/naked-exceptions/01-catching-exceptions/index.md @@ -17,7 +17,7 @@ As always, the complete source code is on [Github]. Please file [issues] for any > **Note**: This post describes how to handle exceptions using naked functions (see [“Handling Exceptions with Naked Functions”] for an overview). Our new way of handling exceptions can be found in the [“Handling Exceptions”] post. -[“Handling Exceptions with Naked Functions”]: ./extra/handling-exceptions-with-naked-fns/_index.md +[“Handling Exceptions with Naked Functions”]: ./extra/naked-exceptions/_index.md [“Handling Exceptions”]: ./posts/09-handling-exceptions/index.md ## Exceptions diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/normal-vs-interrupt-function-return.svg b/blog/content/extra/naked-exceptions/01-catching-exceptions/normal-vs-interrupt-function-return.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/normal-vs-interrupt-function-return.svg rename to blog/content/extra/naked-exceptions/01-catching-exceptions/normal-vs-interrupt-function-return.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/qemu-divide-error-println.png b/blog/content/extra/naked-exceptions/01-catching-exceptions/qemu-divide-error-println.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/01-catching-exceptions/qemu-divide-error-println.png rename to blog/content/extra/naked-exceptions/01-catching-exceptions/qemu-divide-error-println.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/exception-stack-frame.svg b/blog/content/extra/naked-exceptions/02-better-exception-messages/exception-stack-frame.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/exception-stack-frame.svg rename to blog/content/extra/naked-exceptions/02-better-exception-messages/exception-stack-frame.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/index.md b/blog/content/extra/naked-exceptions/02-better-exception-messages/index.md similarity index 99% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/index.md rename to blog/content/extra/naked-exceptions/02-better-exception-messages/index.md index 3635b228..b3727536 100644 --- a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/index.md +++ b/blog/content/extra/naked-exceptions/02-better-exception-messages/index.md @@ -18,7 +18,7 @@ As always, the complete source code is on [Github]. Please file [issues] for any > **Note**: This post describes how to handle exceptions using naked functions (see [“Handling Exceptions with Naked Functions”] for an overview). Our new way of handling exceptions can be found in the [“Handling Exceptions”] post. -[“Handling Exceptions with Naked Functions”]: ./extra/handling-exceptions-with-naked-fns/_index.md +[“Handling Exceptions with Naked Functions”]: ./extra/naked-exceptions/_index.md [“Handling Exceptions”]: ./posts/09-handling-exceptions/index.md ## Exceptions in Detail diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-divide-by-zero-stack-frame.png b/blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-divide-by-zero-stack-frame.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-divide-by-zero-stack-frame.png rename to blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-divide-by-zero-stack-frame.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-page-fault-error-code.png b/blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-page-fault-error-code.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-page-fault-error-code.png rename to blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-page-fault-error-code.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-page-fault-handler.png b/blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-page-fault-handler.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-page-fault-handler.png rename to blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-page-fault-handler.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-print-stack-frame-try.png b/blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-print-stack-frame-try.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/02-better-exception-messages/qemu-print-stack-frame-try.png rename to blog/content/extra/naked-exceptions/02-better-exception-messages/qemu-print-stack-frame-try.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/exception-stack-frame.svg b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/exception-stack-frame.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/exception-stack-frame.svg rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/exception-stack-frame.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/function-stack-frame.svg b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/function-stack-frame.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/function-stack-frame.svg rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/function-stack-frame.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/index.md b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/index.md similarity index 99% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/index.md rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/index.md index 7bb4f4a9..f6840d36 100644 --- a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/index.md +++ b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/index.md @@ -18,7 +18,7 @@ As always, the complete source code is on [Github]. Please file [issues] for any > **Note**: This post describes how to handle exceptions using naked functions (see [“Handling Exceptions with Naked Functions”] for an overview). Our new way of handling exceptions can be found in the [“Handling Exceptions”] post. -[“Handling Exceptions with Naked Functions”]: ./extra/handling-exceptions-with-naked-fns/_index.md +[“Handling Exceptions with Naked Functions”]: ./extra/naked-exceptions/_index.md [“Handling Exceptions”]: ./posts/09-handling-exceptions/index.md ## Introduction @@ -301,7 +301,7 @@ Unfortunately, Rust does not support such a calling convention. It was [proposed [interrupt calling conventions]: https://github.com/rust-lang/rfcs/pull/1275 [Naked functions]: https://github.com/rust-lang/rfcs/blob/master/text/1201-naked-fns.md -[naked fn post]: ./extra/handling-exceptions-with-naked-fns/02-better-exception-messages/index.md#naked-functions +[naked fn post]: ./extra/naked-exceptions/02-better-exception-messages/index.md#naked-functions ### A naked wrapper function diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-handler.png b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-handler.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-handler.png rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-handler.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-return-page-fault.png b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-return-page-fault.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-return-page-fault.png rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-return-page-fault.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-return.png b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-return.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-breakpoint-return.png rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-breakpoint-return.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-page-fault-return.png b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-page-fault-return.png similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/qemu-page-fault-return.png rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/qemu-page-fault-return.png diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/red-zone-overwrite.svg b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/red-zone-overwrite.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/red-zone-overwrite.svg rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/red-zone-overwrite.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/red-zone.svg b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/red-zone.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/red-zone.svg rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/red-zone.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/xmm-overwrite.svg b/blog/content/extra/naked-exceptions/03-returning-from-exceptions/xmm-overwrite.svg similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/xmm-overwrite.svg rename to blog/content/extra/naked-exceptions/03-returning-from-exceptions/xmm-overwrite.svg diff --git a/blog/content/extra/handling-exceptions-with-naked-fns/_index.md b/blog/content/extra/naked-exceptions/_index.md similarity index 100% rename from blog/content/extra/handling-exceptions-with-naked-fns/_index.md rename to blog/content/extra/naked-exceptions/_index.md diff --git a/blog/content/posts/01-multiboot-kernel/index.md b/blog/content/posts/01-multiboot-kernel/index.md index 7cc15aea..64e29232 100644 --- a/blog/content/posts/01-multiboot-kernel/index.md +++ b/blog/content/posts/01-multiboot-kernel/index.md @@ -1,7 +1,7 @@ +++ title = "A minimal x86 kernel" order = 1 -url = "multiboot-kernel" +url = "multiboot-kernel/" date = "2015-08-18" +++ diff --git a/blog/content/posts/02-entering-longmode/index.md b/blog/content/posts/02-entering-longmode/index.md index 546fdbba..47a16f2e 100644 --- a/blog/content/posts/02-entering-longmode/index.md +++ b/blog/content/posts/02-entering-longmode/index.md @@ -490,8 +490,8 @@ _Congratulations_! You have successfully wrestled through this CPU configuration #### One Last Thing Above, we reloaded the code segment register `cs` with the new GDT offset. However, the data segment registers `ss`, `ds`, `es`, `fs`, and `gs` still contain the data segment offsets of the old GDT. This isn't necessarily bad, since they're ignored by almost all instructions in 64-bit mode. However, there are a few instructions that expect a valid data segment descriptor _or the null descriptor_ in those registers. An example is the the [iretq] instruction that we'll need in the [_Returning from Exceptions_] post. -[iretq]: ./extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/index.md#the -[_Returning from Exceptions_]: ./extra/handling-exceptions-with-naked-fns/03-returning-from-exceptions/index.md +[iretq]: ./extra/naked-exceptions/03-returning-from-exceptions/index.md#the +[_Returning from Exceptions_]: ./extra/naked-exceptions/03-returning-from-exceptions/index.md To avoid future problems, we reload all data segment registers with null: