All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix modpost failures in fedora 17
@ 2012-04-12 18:37 David Miller
  2012-04-12 19:13 ` Sam Ravnborg
  2012-04-18 19:31 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: David Miller @ 2012-04-12 18:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: sam


The symbol table on x86-64 starts to have entries that have names
like:

_GLOBAL__sub_I_65535_0___mod_x86cpu_device_table

They are of type STT_FUNCTION and this one had a length of 18.  This
matched the device ID validation logic and it barfed because the
length did not meet the device type's criteria.

--------------------
FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
Fix definition of struct x86cpu_device_id in mod_devicetable.h
--------------------

These are some kind of compiler tool internal stuff being emitted and
not something we want to inspect in modpost's device ID table
validation code.

So skip the symbol if it is not of type STT_OBJECT.

Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 8e730cc..44ddaa5 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1100,6 +1100,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
 	if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections)
 		return;
 
+	/* We're looking for an object */
+	if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
+		return;
+
 	/* All our symbols are of form <prefix>__mod_XXX_device_table. */
 	name = strstr(symname, "__mod_");
 	if (!name)

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-12 18:37 [PATCH] Fix modpost failures in fedora 17 David Miller
@ 2012-04-12 19:13 ` Sam Ravnborg
  2012-04-12 19:23   ` David Miller
  2012-04-18 19:31 ` David Miller
  1 sibling, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-12 19:13 UTC (permalink / raw)
  To: David Miller, Michal Marek; +Cc: linux-kernel

On Thu, Apr 12, 2012 at 02:37:30PM -0400, David Miller wrote:
> 
> The symbol table on x86-64 starts to have entries that have names
> like:
> 
> _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table
> 
> They are of type STT_FUNCTION and this one had a length of 18.  This
> matched the device ID validation logic and it barfed because the
> length did not meet the device type's criteria.
> 
> --------------------
> FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
> Fix definition of struct x86cpu_device_id in mod_devicetable.h
> --------------------
> 
> These are some kind of compiler tool internal stuff being emitted and
> not something we want to inspect in modpost's device ID table
> validation code.
> 
> So skip the symbol if it is not of type STT_OBJECT.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

I assume this is stable material too?
In other words we should add:
Cc: stable@vger.kernel.org

Michal - I assume you take this.

	Sam

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-12 19:13 ` Sam Ravnborg
@ 2012-04-12 19:23   ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2012-04-12 19:23 UTC (permalink / raw)
  To: sam; +Cc: mmarek, linux-kernel

From: Sam Ravnborg <sam@ravnborg.org>
Date: Thu, 12 Apr 2012 21:13:04 +0200

> On Thu, Apr 12, 2012 at 02:37:30PM -0400, David Miller wrote:
>> 
>> The symbol table on x86-64 starts to have entries that have names
>> like:
>> 
>> _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table
>> 
>> They are of type STT_FUNCTION and this one had a length of 18.  This
>> matched the device ID validation logic and it barfed because the
>> length did not meet the device type's criteria.
>> 
>> --------------------
>> FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
>> Fix definition of struct x86cpu_device_id in mod_devicetable.h
>> --------------------
>> 
>> These are some kind of compiler tool internal stuff being emitted and
>> not something we want to inspect in modpost's device ID table
>> validation code.
>> 
>> So skip the symbol if it is not of type STT_OBJECT.
>> 
>> Signed-off-by: David S. Miller <davem@davemloft.net>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> 
> I assume this is stable material too?

Yes.

> In other words we should add:
> Cc: stable@vger.kernel.org

Indeed, we should.

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-12 18:37 [PATCH] Fix modpost failures in fedora 17 David Miller
  2012-04-12 19:13 ` Sam Ravnborg
@ 2012-04-18 19:31 ` David Miller
  2012-04-18 19:51   ` Michal Marek
  2012-04-22  4:18   ` David Miller
  1 sibling, 2 replies; 7+ messages in thread
From: David Miller @ 2012-04-18 19:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: sam

From: David Miller <davem@davemloft.net>
Date: Thu, 12 Apr 2012 14:37:30 -0400 (EDT)

Ping?  Can we get this bug fixed merged some time soon?

> The symbol table on x86-64 starts to have entries that have names
> like:
> 
> _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table
> 
> They are of type STT_FUNCTION and this one had a length of 18.  This
> matched the device ID validation logic and it barfed because the
> length did not meet the device type's criteria.
> 
> --------------------
> FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18.
> Fix definition of struct x86cpu_device_id in mod_devicetable.h
> --------------------
> 
> These are some kind of compiler tool internal stuff being emitted and
> not something we want to inspect in modpost's device ID table
> validation code.
> 
> So skip the symbol if it is not of type STT_OBJECT.
> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> 
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 8e730cc..44ddaa5 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -1100,6 +1100,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
>  	if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections)
>  		return;
>  
> +	/* We're looking for an object */
> +	if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT)
> +		return;
> +
>  	/* All our symbols are of form <prefix>__mod_XXX_device_table. */
>  	name = strstr(symname, "__mod_");
>  	if (!name)

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-18 19:31 ` David Miller
@ 2012-04-18 19:51   ` Michal Marek
  2012-04-22  4:18   ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: Michal Marek @ 2012-04-18 19:51 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, sam

Dne 18.4.2012 21:31, David Miller napsal(a):
> From: David Miller <davem@davemloft.net>
> Date: Thu, 12 Apr 2012 14:37:30 -0400 (EDT)
> 
> Ping?  Can we get this bug fixed merged some time soon?

Applied to kbuild.git#rc-fixes now.

Michal

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-18 19:31 ` David Miller
  2012-04-18 19:51   ` Michal Marek
@ 2012-04-22  4:18   ` David Miller
  2012-04-22  6:03     ` Sam Ravnborg
  1 sibling, 1 reply; 7+ messages in thread
From: David Miller @ 2012-04-22  4:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: sam

From: David Miller <davem@davemloft.net>
Date: Wed, 18 Apr 2012 15:31:32 -0400 (EDT)

> Ping?  Can we get this bug fixed merged some time soon?

Come on guys, this should be in Linus's tree and submitted to
all -stable branches by now.  Yet it hasn't been submitted to
any of those places.

What in the world could you possibly be waiting for?

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

* Re: [PATCH] Fix modpost failures in fedora 17
  2012-04-22  4:18   ` David Miller
@ 2012-04-22  6:03     ` Sam Ravnborg
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2012-04-22  6:03 UTC (permalink / raw)
  To: David Miller, Michal Marek, linux-kbuild; +Cc: linux-kernel

On Sun, Apr 22, 2012 at 12:18:44AM -0400, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 18 Apr 2012 15:31:32 -0400 (EDT)
> 
> > Ping?  Can we get this bug fixed merged some time soon?
> 
> Come on guys, this should be in Linus's tree and submitted to
> all -stable branches by now.  Yet it hasn't been submitted to
> any of those places.
> 
> What in the world could you possibly be waiting for?

Added Michal + kbuild. I do nto handle kbuild patches these days.

	Sam

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

end of thread, other threads:[~2012-04-22  6:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 18:37 [PATCH] Fix modpost failures in fedora 17 David Miller
2012-04-12 19:13 ` Sam Ravnborg
2012-04-12 19:23   ` David Miller
2012-04-18 19:31 ` David Miller
2012-04-18 19:51   ` Michal Marek
2012-04-22  4:18   ` David Miller
2012-04-22  6:03     ` Sam Ravnborg

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.