Re: [PATCH v3 08/12] x86, boot: Don't check if cmd_line_ptr is accessible in misc/decompressor()

2012-11-21 Thread Yinghai Lu
On Wed, Nov 21, 2012 at 9:21 AM, H. Peter Anvin  wrote:
> On 11/20/2012 11:16 PM, Yinghai Lu wrote:
>>
>> At that stage, it is already in 32bit protected mode or 64bit mode.
>> so we do not need to check if ptr less 1M.
>>
>> When go from other boot loader (kexec) instead of boot/ code path.
>>
>> Move out accessible checking out __cmdline_find_option
>>
>> So misc.c will parse cmdline and have debug print out.
>
>
> Your description doesn't seem to match the code, and is incredibly confusing
> to the reader.
>
> The reason why is because you leave out an essential piece of information:
> cmdline.c is included both in 16-bit code and in the decompressor (32/64-bit
> code), so you want to move the test out of the shared code.

updated change log to:

Subject: [PATCH] x86, boot: move checking of cmd_line_ptr out of common path

cmdline.c::__cmdline_find_option... are shared between
16-bit setup code and 32/64 bit decompressor code.

for 32/64 only path via kexec, we should not check if ptr less 1M.
as those cmdline could be put above 1M even 4G.

Move out accessible checking out of __cmdline_find_option
So decompressor in misc.c can parse cmdline correctly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 08/12] x86, boot: Don't check if cmd_line_ptr is accessible in misc/decompressor()

2012-11-21 Thread H. Peter Anvin

On 11/20/2012 11:16 PM, Yinghai Lu wrote:

At that stage, it is already in 32bit protected mode or 64bit mode.
so we do not need to check if ptr less 1M.

When go from other boot loader (kexec) instead of boot/ code path.

Move out accessible checking out __cmdline_find_option

So misc.c will parse cmdline and have debug print out.


Your description doesn't seem to match the code, and is incredibly 
confusing to the reader.


The reason why is because you leave out an essential piece of 
information: cmdline.c is included both in 16-bit code and in the 
decompressor (32/64-bit code), so you want to move the test out of the 
shared code.


-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 08/12] x86, boot: Don't check if cmd_line_ptr is accessible in misc/decompressor()

2012-11-21 Thread H. Peter Anvin

On 11/20/2012 11:16 PM, Yinghai Lu wrote:

At that stage, it is already in 32bit protected mode or 64bit mode.
so we do not need to check if ptr less 1M.

When go from other boot loader (kexec) instead of boot/ code path.

Move out accessible checking out __cmdline_find_option

So misc.c will parse cmdline and have debug print out.


Your description doesn't seem to match the code, and is incredibly 
confusing to the reader.


The reason why is because you leave out an essential piece of 
information: cmdline.c is included both in 16-bit code and in the 
decompressor (32/64-bit code), so you want to move the test out of the 
shared code.


-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 08/12] x86, boot: Don't check if cmd_line_ptr is accessible in misc/decompressor()

2012-11-21 Thread Yinghai Lu
On Wed, Nov 21, 2012 at 9:21 AM, H. Peter Anvin h...@zytor.com wrote:
 On 11/20/2012 11:16 PM, Yinghai Lu wrote:

 At that stage, it is already in 32bit protected mode or 64bit mode.
 so we do not need to check if ptr less 1M.

 When go from other boot loader (kexec) instead of boot/ code path.

 Move out accessible checking out __cmdline_find_option

 So misc.c will parse cmdline and have debug print out.


 Your description doesn't seem to match the code, and is incredibly confusing
 to the reader.

 The reason why is because you leave out an essential piece of information:
 cmdline.c is included both in 16-bit code and in the decompressor (32/64-bit
 code), so you want to move the test out of the shared code.

updated change log to:

Subject: [PATCH] x86, boot: move checking of cmd_line_ptr out of common path

cmdline.c::__cmdline_find_option... are shared between
16-bit setup code and 32/64 bit decompressor code.

for 32/64 only path via kexec, we should not check if ptr less 1M.
as those cmdline could be put above 1M even 4G.

Move out accessible checking out of __cmdline_find_option
So decompressor in misc.c can parse cmdline correctly.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/