2015-07-28 10:23:41

by fupan

[permalink] [raw]
Subject: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

From: fli <[email protected]>

The commit 35d5134b7d5a55e269c953096224248b9f6f72c2
Author: Matt Fleming <[email protected]>
Date: Tue Apr 8 13:14:00 2014 +0100

x86/efi: Correct EFI boot stub use of code32_start

imported a bug, which should use the label's address instead
of the value stored in the label's address to caculate the
code32_start address.

Signed-off-by: fli <[email protected]>
---
arch/x86/boot/compressed/head_32.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index abb988a..3b28eff 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -54,7 +54,7 @@ ENTRY(efi_pe_entry)
call reloc
reloc:
popl %ecx
- subl reloc, %ecx
+ subl $reloc, %ecx
movl %ecx, BP_code32_start(%eax)

sub $0x4, %esp
--
1.9.1


2015-07-28 15:15:40

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Tue, Jul 28, 2015 at 06:21:19PM +0800, [email protected] wrote:
> From: fli <[email protected]>
>
> The commit 35d5134b7d5a55e269c953096224248b9f6f72c2
> Author: Matt Fleming <[email protected]>
> Date: Tue Apr 8 13:14:00 2014 +0100
>
> x86/efi: Correct EFI boot stub use of code32_start
>
> imported a bug, which should use the label's address instead
> of the value stored in the label's address to caculate the
> code32_start address.
>
> Signed-off-by: fli <[email protected]>
> ---
> arch/x86/boot/compressed/head_32.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>

2015-07-30 15:04:46

by Matt Fleming

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

(Add linux-efi, Luis and Greg)

On Tue, 28 Jul, at 06:21:19PM, [email protected] wrote:
> From: fli <[email protected]>
>
> The commit 35d5134b7d5a55e269c953096224248b9f6f72c2
> Author: Matt Fleming <[email protected]>
> Date: Tue Apr 8 13:14:00 2014 +0100
>
> x86/efi: Correct EFI boot stub use of code32_start
>
> imported a bug, which should use the label's address instead
> of the value stored in the label's address to caculate the
> code32_start address.
>
> Signed-off-by: fli <[email protected]>
> ---
> arch/x86/boot/compressed/head_32.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
> index abb988a..3b28eff 100644
> --- a/arch/x86/boot/compressed/head_32.S
> +++ b/arch/x86/boot/compressed/head_32.S
> @@ -54,7 +54,7 @@ ENTRY(efi_pe_entry)
> call reloc
> reloc:
> popl %ecx
> - subl reloc, %ecx
> + subl $reloc, %ecx
> movl %ecx, BP_code32_start(%eax)
>
> sub $0x4, %esp

Woa, nice catch!

The commit message could do with a little work however. In particular
the usual way to refer to a commit is like this: commit 35d5134b7d5a
("x86/efi: Correct EFI boot stub use of code32_start"). And the
Signed-off-by line should contain your full name.

Luis, Greg, what is the procedure for submitting a patch that is only
required for stable?

--
Matt Fleming, Intel Open Source Technology Center

2015-07-30 16:31:06

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Thu, Jul 30, 2015 at 04:04:28PM +0100, Matt Fleming wrote:
> (Add linux-efi, Luis and Greg)
>
> On Tue, 28 Jul, at 06:21:19PM, [email protected] wrote:
> > From: fli <[email protected]>
> >
> > The commit 35d5134b7d5a55e269c953096224248b9f6f72c2
> > Author: Matt Fleming <[email protected]>
> > Date: Tue Apr 8 13:14:00 2014 +0100
> >
> > x86/efi: Correct EFI boot stub use of code32_start
> >
> > imported a bug, which should use the label's address instead
> > of the value stored in the label's address to caculate the
> > code32_start address.
> >
> > Signed-off-by: fli <[email protected]>
> > ---
> > arch/x86/boot/compressed/head_32.S | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
> > index abb988a..3b28eff 100644
> > --- a/arch/x86/boot/compressed/head_32.S
> > +++ b/arch/x86/boot/compressed/head_32.S
> > @@ -54,7 +54,7 @@ ENTRY(efi_pe_entry)
> > call reloc
> > reloc:
> > popl %ecx
> > - subl reloc, %ecx
> > + subl $reloc, %ecx
> > movl %ecx, BP_code32_start(%eax)
> >
> > sub $0x4, %esp
>
> Woa, nice catch!
>
> The commit message could do with a little work however. In particular
> the usual way to refer to a commit is like this: commit 35d5134b7d5a
> ("x86/efi: Correct EFI boot stub use of code32_start"). And the
> Signed-off-by line should contain your full name.
>
> Luis, Greg, what is the procedure for submitting a patch that is only
> required for stable?

You don't. :)

Why isn't this an issue in newer kernel releases? Did this already get
fixed by some other patch? If so, why can't we just take that patch?
If not, why not?

I _REALLY_ don't like taking patches that are not already in Linus's
tree, as it almost always turns out to be the wrong solution.

thanks,

greg k-h

2015-07-30 16:45:51

by Matt Fleming

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Thu, 30 Jul, at 09:31:02AM, Greg KH wrote:
>
> Why isn't this an issue in newer kernel releases? Did this already get
> fixed by some other patch? If so, why can't we just take that patch?
> If not, why not?

The commit 35d5134b7d5a ("x86/efi: Correct EFI boot stub use of
code32_start") only exists in the stable trees in that form because
there was quite a lot of churn in that area in Linus tree that didn't
get backported.

So the code in Linus' tree never looked like the code in the stable does
right now.

> I _REALLY_ don't like taking patches that are not already in Linus's
> tree, as it almost always turns out to be the wrong solution.

Yeah, I think this issue verifies that.

--
Matt Fleming, Intel Open Source Technology Center

2015-07-30 16:59:46

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Thu, Jul 30, 2015 at 05:45:44PM +0100, Matt Fleming wrote:
> On Thu, 30 Jul, at 09:31:02AM, Greg KH wrote:
> >
> > Why isn't this an issue in newer kernel releases? Did this already get
> > fixed by some other patch? If so, why can't we just take that patch?
> > If not, why not?
>
> The commit 35d5134b7d5a ("x86/efi: Correct EFI boot stub use of
> code32_start") only exists in the stable trees in that form because
> there was quite a lot of churn in that area in Linus tree that didn't
> get backported.
>
> So the code in Linus' tree never looked like the code in the stable does
> right now.
>
> > I _REALLY_ don't like taking patches that are not already in Linus's
> > tree, as it almost always turns out to be the wrong solution.
>
> Yeah, I think this issue verifies that.

Ugh, what a mess. Ok, if you get something that works and is in a
format that I can apply it, please resend it properly so that we can do
so.

thanks,

greg k-h

2015-07-31 01:23:18

by fupan

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On 07/31/2015 12:59 AM, Greg KH wrote:
> On Thu, Jul 30, 2015 at 05:45:44PM +0100, Matt Fleming wrote:
>> On Thu, 30 Jul, at 09:31:02AM, Greg KH wrote:
>>> Why isn't this an issue in newer kernel releases? Did this already get
>>> fixed by some other patch? If so, why can't we just take that patch?
>>> If not, why not?
>>
>> The commit 35d5134b7d5a ("x86/efi: Correct EFI boot stub use of
>> code32_start") only exists in the stable trees in that form because
>> there was quite a lot of churn in that area in Linus tree that didn't
>> get backported.
>>
>> So the code in Linus' tree never looked like the code in the stable does
>> right now.
>>
>>> I _REALLY_ don't like taking patches that are not already in Linus's
>>> tree, as it almost always turns out to be the wrong solution.
>> Yeah, I think this issue verifies that.
> Ugh, what a mess. Ok, if you get something that works and is in a
> format that I can apply it, please resend it properly so that we can do
> so.
Hi, Matt

Will you take care of this patch or I send a V2?

Thanks!

Fupan
>
> thanks,
>
> greg k-h
>
>

2015-07-31 12:05:25

by Matt Fleming

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Fri, 31 Jul, at 09:22:33AM, fupan wrote:
> Hi, Matt
>
> Will you take care of this patch or I send a V2?

Could you please send a V2 with the changes to the commit message that I
suggested previously? Thanks!

--
Matt Fleming, Intel Open Source Technology Center

2015-07-31 12:21:58

by Luis Henriques

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On Fri, Jul 31, 2015 at 01:05:19PM +0100, Matt Fleming wrote:
> On Fri, 31 Jul, at 09:22:33AM, fupan wrote:
> > Hi, Matt
> >
> > Will you take care of this patch or I send a V2?
>
> Could you please send a V2 with the changes to the commit message that I
> suggested previously? Thanks!
>

I'm replying to this thread simply to include Jiri on the CC list as I
believe 3.12 will also require this fix. Please make sure he's in the
list for the v2.

[ It looks like the 3.16 kernel I'm maintaining isn't affected, BTW. ]

Cheers,
--
Lu?s

2015-08-03 01:41:02

by fupan

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On 07/31/2015 08:21 PM, Luis Henriques wrote:
> On Fri, Jul 31, 2015 at 01:05:19PM +0100, Matt Fleming wrote:
>> On Fri, 31 Jul, at 09:22:33AM, fupan wrote:
>>> Hi, Matt
>>>
>>> Will you take care of this patch or I send a V2?
>>
>> Could you please send a V2 with the changes to the commit message that I
>> suggested previously? Thanks!
>>
> I'm replying to this thread simply to include Jiri on the CC list as I
> believe 3.12 will also require this fix. Please make sure he's in the
> list for the v2.
Hi, Lu?s

No problem.

BTW, actually all of the branch from 3.10 to 3.14 will need this fix.

Fupan
>
> [ It looks like the 3.16 kernel I'm maintaining isn't affected, BTW. ]
>
> Cheers,
> --
> Lu?s
>
>

2015-08-03 02:14:49

by fupan

[permalink] [raw]
Subject: Re: [PATCH 3.10 ~ 3.14] efi: fix the efi 32bit boot failed problem

On 07/31/2015 08:05 PM, Matt Fleming wrote:
> On Fri, 31 Jul, at 09:22:33AM, fupan wrote:
>> Hi, Matt
>>
>> Will you take care of this patch or I send a V2?
>
> Could you please send a V2 with the changes to the commit message that I
> suggested previously? Thanks!
>
NP!

Thanks!

Fupan