Skip to content

Commit 2a8a3d5

Browse files
ebiedermLinus Torvalds
authored andcommitted
[PATCH] machine_kexec.c: Fix the description of segment handling
One of my original comments in machine_kexec was unclear and this should fix it. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Andi Kleen <ak@muc.de> Acked-by: Horms <horms@verge.net.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent c35a726 commit 2a8a3d5

2 files changed

Lines changed: 10 additions & 16 deletions

File tree

‎arch/i386/kernel/machine_kexec.c‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,11 @@ NORET_TYPE void machine_kexec(struct kimage *image)
189189
memcpy((void *)reboot_code_buffer, relocate_new_kernel,
190190
relocate_new_kernel_size);
191191

192-
/* The segment registers are funny things, they are
193-
* automatically loaded from a table, in memory wherever you
194-
* set them to a specific selector, but this table is never
195-
* accessed again you set the segment to a different selector.
196-
*
197-
* The more common model is are caches where the behide
198-
* the scenes work is done, but is also dropped at arbitrary
199-
* times.
192+
/* The segment registers are funny things, they have both a
193+
* visible and an invisible part. Whenever the visible part is
194+
* set to a specific selector, the invisible part is loaded
195+
* with from a table in memory. At no other time is the
196+
* descriptor table in memory accessed.
200197
*
201198
* I take advantage of this here by force loading the
202199
* segments, before I zap the gdt with an invalid value.

‎arch/x86_64/kernel/machine_kexec.c‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,11 @@ NORET_TYPE void machine_kexec(struct kimage *image)
207207
__flush_tlb();
208208

209209

210-
/* The segment registers are funny things, they are
211-
* automatically loaded from a table, in memory wherever you
212-
* set them to a specific selector, but this table is never
213-
* accessed again unless you set the segment to a different selector.
214-
*
215-
* The more common model are caches where the behide
216-
* the scenes work is done, but is also dropped at arbitrary
217-
* times.
210+
/* The segment registers are funny things, they have both a
211+
* visible and an invisible part. Whenever the visible part is
212+
* set to a specific selector, the invisible part is loaded
213+
* with from a table in memory. At no other time is the
214+
* descriptor table in memory accessed.
218215
*
219216
* I take advantage of this here by force loading the
220217
* segments, before I zap the gdt with an invalid value.

0 commit comments

Comments
 (0)