netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kmalloc_node returns unaligned memory
@ 2006-03-13 14:45 Olaf Hering
  2006-03-13 14:49 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2006-03-13 14:45 UTC (permalink / raw)
  To: linux-kernel, Jaroslav Kysela; +Cc: netdev


kmalloc_node returns unaligned pointers on powerpc, when CONFIG_DEBUG_SLAB
is enabled. This makes iptables very unhappy. It checks the alignment in
net/ipv6/netfilter/ip6_tables.c:check_entry_size_and_hooks(). 
__alignof__(struct ip6t_entry) returns 8. But returned pointers from
xt_alloc_table_info() are unaligned:

Linux version 2.6.16-rc6-git1-default-iptables-slab (olaf@pomegranate) (gcc version 4.1.0 (SUSE Linux)) #2 Mon Mar 13 15:19:45 CET 2006
...
 xt_alloc_table_info(250) modprobe(1687):c0,j4294904016 newinfo/size cfc82498/0x278
 xt_alloc_table_info(265) modprobe(1687):c0,j4294904038 entries[0] c449611c
 ip_nat_init: can't setup rules.
 sys_init_module(1960) modprobe(1687):c0,j4294904071 iptable_nat returned -22
...

Any ideas how to fix that?

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

* Re: kmalloc_node returns unaligned memory
  2006-03-13 14:45 kmalloc_node returns unaligned memory Olaf Hering
@ 2006-03-13 14:49 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2006-03-13 14:49 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linux-kernel, Jaroslav Kysela, netdev, Dean Nelson

>>>>> "Olaf" == Olaf Hering <olh@suse.de> writes:

Olaf> kmalloc_node returns unaligned pointers on powerpc, when
Olaf> CONFIG_DEBUG_SLAB is enabled. This makes iptables very
Olaf> unhappy. It checks the alignment in
Olaf> net/ipv6/netfilter/ip6_tables.c:check_entry_size_and_hooks().
Olaf> __alignof__(struct ip6t_entry) returns 8. But returned pointers
Olaf> from xt_alloc_table_info() are unaligned:

Hi Olaf,

I believe this is expected behavior ;-(

We have the same problem with the XPC driver for the SN2 which resulted
in a wrapper macro being created for it.

Some sort of SLAB_HWCACHE_ALIGN flag to Slab that was always respected
for this would be nice.

Cheers,
Jes

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

end of thread, other threads:[~2006-03-13 14:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-13 14:45 kmalloc_node returns unaligned memory Olaf Hering
2006-03-13 14:49 ` Jes Sorensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).