mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] machine_kexec.c: Fix the description of segment handling.
@ 2006-07-15  3:59 Eric W. Biederman
  2006-07-17 16:45 ` [PATCH] machine_kexec.c: Fix the description of segment?handling Horms
  0 siblings, 1 reply; 2+ messages in thread
From: Eric W. Biederman @ 2006-07-15  3:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, fastboot


One of my original comments in machine_kexec was unclear
and this should fix it.  

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---

Be very careful with this patch.  It seems to be surrounded
by a somebody else's problem field.

I wrote it months ago, and then forgot it.  I started writing this
email message several days ago and then forgot it.

Hopefully including this patch won't cause this effect to spread
and cause the entire kernel to be universally treated as somebody
else's problem. :) 

 arch/i386/kernel/machine_kexec.c   |   13 +++++--------
 arch/x86_64/kernel/machine_kexec.c |   13 +++++--------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
index 511abe5..a696f93 100644
--- a/arch/i386/kernel/machine_kexec.c
+++ b/arch/i386/kernel/machine_kexec.c
@@ -189,14 +189,11 @@ NORET_TYPE void machine_kexec(struct kim
 	memcpy((void *)reboot_code_buffer, relocate_new_kernel,
 						relocate_new_kernel_size);
 
-	/* The segment registers are funny things, they are
-	 * automatically loaded from a table, in memory wherever you
-	 * set them to a specific selector, but this table is never
-	 * accessed again you set the segment to a different selector.
-	 *
-	 * The more common model is are caches where the behide
-	 * the scenes work is done, but is also dropped at arbitrary
-	 * times.
+	/* The segment registers are funny things, they have both a
+	 * visible and an invisible part.  Whenever the visible part is
+	 * set to a specific selector, the invisible part is loaded
+	 * with from a table in memory.  At no other time is the
+	 * descriptor table in memory accessed. 
 	 *
 	 * I take advantage of this here by force loading the
 	 * segments, before I zap the gdt with an invalid value.
diff --git a/arch/x86_64/kernel/machine_kexec.c b/arch/x86_64/kernel/machine_kexec.c
index 83fb24a..ba9b571 100644
--- a/arch/x86_64/kernel/machine_kexec.c
+++ b/arch/x86_64/kernel/machine_kexec.c
@@ -207,14 +207,11 @@ NORET_TYPE void machine_kexec(struct kim
 	__flush_tlb();
 
 
-	/* The segment registers are funny things, they are
-	 * automatically loaded from a table, in memory wherever you
-	 * set them to a specific selector, but this table is never
-	 * accessed again unless you set the segment to a different selector.
-	 *
-	 * The more common model are caches where the behide
-	 * the scenes work is done, but is also dropped at arbitrary
-	 * times.
+	/* The segment registers are funny things, they have both a
+	 * visible and an invisible part.  Whenever the visible part is
+	 * set to a specific selector, the invisible part is loaded
+	 * with from a table in memory.  At no other time is the
+	 * descriptor table in memory accessed. 
 	 *
 	 * I take advantage of this here by force loading the
 	 * segments, before I zap the gdt with an invalid value.
-- 
1.4.1.gac83a


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] machine_kexec.c: Fix the description of segment?handling.
  2006-07-15  3:59 [PATCH] machine_kexec.c: Fix the description of segment handling Eric W. Biederman
@ 2006-07-17 16:45 ` Horms
  0 siblings, 0 replies; 2+ messages in thread
From: Horms @ 2006-07-17 16:45 UTC (permalink / raw)
  To: Eric W. Biederman; +Cc: fastboot, linux-kernel, Andrew Morton

On Fri, 14 Jul 2006 21:59:19 -0600, Eric W. Biederman wrote:
> 
> One of my original comments in machine_kexec was unclear
> and this should fix it.  =
> 
> 
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>

Thanks, that looks a lot clearer to me.

Acked: Horms <horms@verge.net.au>

-- 
Horms                                           
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-17 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-15  3:59 [PATCH] machine_kexec.c: Fix the description of segment handling Eric W. Biederman
2006-07-17 16:45 ` [PATCH] machine_kexec.c: Fix the description of segment?handling Horms

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®