Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1493693 > unrolled thread

Re: linux-next: Tree for Jul 21

Started bySegher Boessenkool <segher@kernel.crashing.org>
First post2016-09-29 21:40 +0200
Last post2016-09-30 12:50 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: linux-next: Tree for Jul 21 Segher Boessenkool <segher@kernel.crashing.org> - 2016-09-29 21:40 +0200
    Re: linux-next: Tree for Jul 21 Stephen Rothwell <sfr@canb.auug.org.au> - 2016-09-30 01:20 +0200
      Re: linux-next: Tree for Jul 21 Andy Lutomirski <luto@amacapital.net> - 2016-09-30 01:30 +0200
    [tip:x86/urgent] x86/vdso: Fix building on big endian host tip-bot for Segher Boessenkool <tipbot@zytor.com> - 2016-09-30 12:50 +0200

#1493693 — Re: linux-next: Tree for Jul 21

FromSegher Boessenkool <segher@kernel.crashing.org>
Date2016-09-29 21:40 +0200
SubjectRe: linux-next: Tree for Jul 21
Message-ID<smPlv-8iw-19@gated-at.bofh.it>
On Thu, Jul 21, 2016 at 07:52:43PM -0400, Paul Gortmaker wrote:
> A new i386-allmodconfig fail showed up relating to VDSO:
> 
> I tried to reproduce it locally with x86-64 build host and could
> not, so I wonder if it is a missing HOSTCC vs. CC since next
> coverage is power host...
> 
>   VDSO2C  arch/x86/entry/vdso/vdso-image-32.c
> Error: input is not a shared object
> make[4]: *** [arch/x86/entry/vdso/vdso-image-32.c] Error 1
> make[3]: *** [arch/x86/entry/vdso] Error 2
> make[2]: *** [arch/x86/entry] Error 2

This is caused by building on a BE (better-endian) host.  See patch.


Segher


===
From 7f098efa4d184ab1216c6cf8214c44a3abe50a14 Mon Sep 17 00:00:00 2001
Message-Id: <7f098efa4d184ab1216c6cf8214c44a3abe50a14.1475177310.git.segher@kernel.crashing.org>
From: Segher Boessenkool <segher@kernel.crashing.org>
Date: Thu, 29 Sep 2016 11:51:00 +0000
Subject: [PATCH] x86: Fix building on BE

We need to call GET_LE to read hdr->e_type.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>

---
 arch/x86/entry/vdso/vdso2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index 4f74119..3dab75f 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/entry/vdso/vdso2c.h
@@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
 
 	ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
 
-	if (hdr->e_type != ET_DYN)
+	if (GET_LE(&hdr->e_type) != ET_DYN)
 		fail("input is not a shared object\n");
 
 	/* Walk the segment table. */
-- 
1.9.3

[toc] | [next] | [standalone]


#1493780

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2016-09-30 01:20 +0200
Message-ID<smSMp-2hN-3@gated-at.bofh.it>
In reply to#1493693
Hi Segher,

[Adding more cc's]

On Thu, 29 Sep 2016 14:34:42 -0500 Segher Boessenkool <segher@kernel.crashing.org> wrote:
>
> On Thu, Jul 21, 2016 at 07:52:43PM -0400, Paul Gortmaker wrote:
> > A new i386-allmodconfig fail showed up relating to VDSO:
> > 
> > I tried to reproduce it locally with x86-64 build host and could
> > not, so I wonder if it is a missing HOSTCC vs. CC since next
> > coverage is power host...
> > 
> >   VDSO2C  arch/x86/entry/vdso/vdso-image-32.c
> > Error: input is not a shared object
> > make[4]: *** [arch/x86/entry/vdso/vdso-image-32.c] Error 1
> > make[3]: *** [arch/x86/entry/vdso] Error 2
> > make[2]: *** [arch/x86/entry] Error 2  
> 
> This is caused by building on a BE (better-endian) host.  See patch.
> 
> 
> Segher
> 
> 
> ===
> From 7f098efa4d184ab1216c6cf8214c44a3abe50a14 Mon Sep 17 00:00:00 2001
> Message-Id: <7f098efa4d184ab1216c6cf8214c44a3abe50a14.1475177310.git.segher@kernel.crashing.org>
> From: Segher Boessenkool <segher@kernel.crashing.org>
> Date: Thu, 29 Sep 2016 11:51:00 +0000
> Subject: [PATCH] x86: Fix building on BE
> 
> We need to call GET_LE to read hdr->e_type.
> 

Fixes: 57f90c3dfc75 ("x86/vdso: Error out if the vDSO isn't a valid DSO")

> Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>

57f90c3dfc75 was merged as part of the last merge window, so this is a
fix for Linus' tree.

> ---
>  arch/x86/entry/vdso/vdso2c.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
> index 4f74119..3dab75f 100644
> --- a/arch/x86/entry/vdso/vdso2c.h
> +++ b/arch/x86/entry/vdso/vdso2c.h
> @@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
>  
>  	ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
>  
> -	if (hdr->e_type != ET_DYN)
> +	if (GET_LE(&hdr->e_type) != ET_DYN)
>  		fail("input is not a shared object\n");
>  
>  	/* Walk the segment table. */
> -- 
> 1.9.3

-- 
Cheers,
Stephen Rothwell

[toc] | [prev] | [next] | [standalone]


#1493782

FromAndy Lutomirski <luto@amacapital.net>
Date2016-09-30 01:30 +0200
Message-ID<smSW5-2lb-1@gated-at.bofh.it>
In reply to#1493780
On Thu, Sep 29, 2016 at 4:14 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Segher,
>
> [Adding more cc's]
>
> On Thu, 29 Sep 2016 14:34:42 -0500 Segher Boessenkool <segher@kernel.crashing.org> wrote:
>>
>> On Thu, Jul 21, 2016 at 07:52:43PM -0400, Paul Gortmaker wrote:
>> > A new i386-allmodconfig fail showed up relating to VDSO:
>> >
>> > I tried to reproduce it locally with x86-64 build host and could
>> > not, so I wonder if it is a missing HOSTCC vs. CC since next
>> > coverage is power host...
>> >
>> >   VDSO2C  arch/x86/entry/vdso/vdso-image-32.c
>> > Error: input is not a shared object
>> > make[4]: *** [arch/x86/entry/vdso/vdso-image-32.c] Error 1
>> > make[3]: *** [arch/x86/entry/vdso] Error 2
>> > make[2]: *** [arch/x86/entry] Error 2
>>
>> This is caused by building on a BE (better-endian) host.  See patch.
>>
>>
>> Segher
>>
>>
>> ===
>> From 7f098efa4d184ab1216c6cf8214c44a3abe50a14 Mon Sep 17 00:00:00 2001
>> Message-Id: <7f098efa4d184ab1216c6cf8214c44a3abe50a14.1475177310.git.segher@kernel.crashing.org>
>> From: Segher Boessenkool <segher@kernel.crashing.org>
>> Date: Thu, 29 Sep 2016 11:51:00 +0000
>> Subject: [PATCH] x86: Fix building on BE
>>
>> We need to call GET_LE to read hdr->e_type.
>>
>
> Fixes: 57f90c3dfc75 ("x86/vdso: Error out if the vDSO isn't a valid DSO")
>
>> Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
>
> 57f90c3dfc75 was merged as part of the last merge window, so this is a
> fix for Linus' tree.
>
>> ---
>>  arch/x86/entry/vdso/vdso2c.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
>> index 4f74119..3dab75f 100644
>> --- a/arch/x86/entry/vdso/vdso2c.h
>> +++ b/arch/x86/entry/vdso/vdso2c.h
>> @@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
>>
>>       ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
>>
>> -     if (hdr->e_type != ET_DYN)
>> +     if (GET_LE(&hdr->e_type) != ET_DYN)
>>               fail("input is not a shared object\n");

Whoops!

Acked-by: Andy Lutomirski <luto@kernel.org>

>>
>>       /* Walk the segment table. */
>> --
>> 1.9.3
>
> --
> Cheers,
> Stephen Rothwell



-- 
Andy Lutomirski
AMA Capital Management, LLC

[toc] | [prev] | [next] | [standalone]


#1494023 — [tip:x86/urgent] x86/vdso: Fix building on big endian host

Fromtip-bot for Segher Boessenkool <tipbot@zytor.com>
Date2016-09-30 12:50 +0200
Subject[tip:x86/urgent] x86/vdso: Fix building on big endian host
Message-ID<sn3ya-FI-21@gated-at.bofh.it>
In reply to#1493693
Commit-ID:  e4aad64597d7a2455a541f904365b48d607916db
Gitweb:     http://git.kernel.org/tip/e4aad64597d7a2455a541f904365b48d607916db
Author:     Segher Boessenkool <segher@kernel.crashing.org>
AuthorDate: Thu, 29 Sep 2016 11:51:00 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 30 Sep 2016 12:37:40 +0200

x86/vdso: Fix building on big endian host

We need to call GET_LE to read hdr->e_type.

Fixes: 57f90c3dfc75 ("x86/vdso: Error out if the vDSO isn't a valid DSO")
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org
Link: http://lkml.kernel.org/r/20160929193442.GA16617@gate.crashing.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/entry/vdso/vdso2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
index 4f74119..3dab75f 100644
--- a/arch/x86/entry/vdso/vdso2c.h
+++ b/arch/x86/entry/vdso/vdso2c.h
@@ -22,7 +22,7 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
 
 	ELF(Phdr) *pt = (ELF(Phdr) *)(raw_addr + GET_LE(&hdr->e_phoff));
 
-	if (hdr->e_type != ET_DYN)
+	if (GET_LE(&hdr->e_type) != ET_DYN)
 		fail("input is not a shared object\n");
 
 	/* Walk the segment table. */

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web