All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
       [not found] <51300267.6000008@gmail.com>
@ 2013-03-01  5:23 ` tip-bot for gmail
  2013-03-01 17:47   ` Yinghai Lu
  2013-03-01 18:33 ` tip-bot for Lans Zhang
  1 sibling, 1 reply; 4+ messages in thread
From: tip-bot for gmail @ 2013-03-01  5:23 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, lans.zhang2008, hpa, mingo, tglx, hpa

Commit-ID:  b317219b322e36e25150d7b64f4532401779959d
Gitweb:     http://git.kernel.org/tip/b317219b322e36e25150d7b64f4532401779959d
Author:     gmail <lans.zhang2008@gmail.com>
AuthorDate: Fri, 1 Mar 2013 09:20:39 +0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 28 Feb 2013 20:19:50 -0800

x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety

In startup_32, the running code still uses the initial GDT
located in setup. Thus, __BOOT_DS is preferred. Currently
__KERNEL_DS is lucky to equal to __BOOT_DS, but this is
not always a safe way.

Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com>
Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/boot/compressed/head_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index c1d383d..16f24e6 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -52,7 +52,7 @@ ENTRY(startup_32)
 	jnz 1f
 
 	cli
-	movl	$(__KERNEL_DS), %eax
+	movl	$(__BOOT_DS), %eax
 	movl	%eax, %ds
 	movl	%eax, %es
 	movl	%eax, %ss

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

* Re: [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
  2013-03-01  5:23 ` [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety tip-bot for gmail
@ 2013-03-01 17:47   ` Yinghai Lu
  2013-03-01 18:17     ` H. Peter Anvin
  0 siblings, 1 reply; 4+ messages in thread
From: Yinghai Lu @ 2013-03-01 17:47 UTC (permalink / raw)
  To: mingo, hpa, lans.zhang2008, linux-kernel, tglx, hpa; +Cc: linux-tip-commits

On Thu, Feb 28, 2013 at 9:23 PM, tip-bot for gmail <tipbot@zytor.com> wrote:
> Commit-ID:  b317219b322e36e25150d7b64f4532401779959d
> Gitweb:     http://git.kernel.org/tip/b317219b322e36e25150d7b64f4532401779959d
> Author:     gmail <lans.zhang2008@gmail.com>

name is messed up.

should be

Lans Zhang <lans.zhang2008@gmail.com>

> AuthorDate: Fri, 1 Mar 2013 09:20:39 +0800
> Committer:  H. Peter Anvin <hpa@linux.intel.com>
> CommitDate: Thu, 28 Feb 2013 20:19:50 -0800
>
> x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
>
> In startup_32, the running code still uses the initial GDT
> located in setup. Thus, __BOOT_DS is preferred. Currently
> __KERNEL_DS is lucky to equal to __BOOT_DS, but this is
> not always a safe way.
>
> Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com>
> Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com
> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
> ---
>  arch/x86/boot/compressed/head_64.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
> index c1d383d..16f24e6 100644
> --- a/arch/x86/boot/compressed/head_64.S
> +++ b/arch/x86/boot/compressed/head_64.S
> @@ -52,7 +52,7 @@ ENTRY(startup_32)
>         jnz 1f
>
>         cli
> -       movl    $(__KERNEL_DS), %eax
> +       movl    $(__BOOT_DS), %eax
>         movl    %eax, %ds
>         movl    %eax, %es
>         movl    %eax, %ss
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
  2013-03-01 17:47   ` Yinghai Lu
@ 2013-03-01 18:17     ` H. Peter Anvin
  0 siblings, 0 replies; 4+ messages in thread
From: H. Peter Anvin @ 2013-03-01 18:17 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: mingo, hpa, lans.zhang2008, linux-kernel, tglx, linux-tip-commits

On 03/01/2013 09:47 AM, Yinghai Lu wrote:
> On Thu, Feb 28, 2013 at 9:23 PM, tip-bot for gmail <tipbot@zytor.com> wrote:
>> Commit-ID:  b317219b322e36e25150d7b64f4532401779959d
>> Gitweb:     http://git.kernel.org/tip/b317219b322e36e25150d7b64f4532401779959d
>> Author:     gmail <lans.zhang2008@gmail.com>
> 
> name is messed up.
> 
> should be
> 
> Lans Zhang <lans.zhang2008@gmail.com>
> 

Indeed.  I'll adjust it.

Lans, please fix your mail setup for next time.

	-hpa



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

* [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety
       [not found] <51300267.6000008@gmail.com>
  2013-03-01  5:23 ` [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety tip-bot for gmail
@ 2013-03-01 18:33 ` tip-bot for Lans Zhang
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Lans Zhang @ 2013-03-01 18:33 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, lans.zhang2008, hpa, mingo, tglx, hpa

Commit-ID:  2dead15fb8f6522b96c913603b5ad0b5c7d01f49
Gitweb:     http://git.kernel.org/tip/2dead15fb8f6522b96c913603b5ad0b5c7d01f49
Author:     Lans Zhang <lans.zhang2008@gmail.com>
AuthorDate: Fri, 1 Mar 2013 09:20:39 +0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 1 Mar 2013 10:18:33 -0800

x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety

In startup_32, the running code still uses the initial GDT
located in setup. Thus, __BOOT_DS is preferred. Currently
__KERNEL_DS is lucky to equal to __BOOT_DS, but this is
not always a safe way.

Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com>
Link: http://lkml.kernel.org/r/51300267.6000008@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/boot/compressed/head_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index c1d383d..16f24e6 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -52,7 +52,7 @@ ENTRY(startup_32)
 	jnz 1f
 
 	cli
-	movl	$(__KERNEL_DS), %eax
+	movl	$(__BOOT_DS), %eax
 	movl	%eax, %ds
 	movl	%eax, %es
 	movl	%eax, %ss

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

end of thread, other threads:[~2013-03-01 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <51300267.6000008@gmail.com>
2013-03-01  5:23 ` [tip:x86/cleanups] x86_64: Use __BOOT_DS instead_of __KERNEL_DS for safety tip-bot for gmail
2013-03-01 17:47   ` Yinghai Lu
2013-03-01 18:17     ` H. Peter Anvin
2013-03-01 18:33 ` tip-bot for Lans Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.