android_kernel_motorola_sm6225/include
Patrick McHardy 46c5ea3c9a [NETFILTER] x_tables: fix compat related crash on non-x86
When iptables userspace adds an ipt_standard_target, it calculates the size
of the entire entry as:

sizeof(struct ipt_entry) + XT_ALIGN(sizeof(struct ipt_standard_target))

ipt_standard_target looks like this:

  struct xt_standard_target
  {
        struct xt_entry_target target;
        int verdict;
  };

xt_entry_target contains a pointer, so when compiled for 64 bit the
structure gets an extra 4 byte of padding at the end. On 32 bit
architectures where iptables aligns to 8 byte it will also have 4
byte padding at the end because it is only 36 bytes large.

The compat_ipt_standard_fn in the kernel adjusts the offsets by

  sizeof(struct ipt_standard_target) - sizeof(struct compat_ipt_standard_target),

which will always result in 4, even if the structure from userspace
was already padded to a multiple of 8. On x86 this works out by
accident because userspace only aligns to 4, on all other
architectures this is broken and causes incorrect adjustments to
the size and following offsets.

Thanks to Linus for lots of debugging help and testing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-01 20:48:32 -07:00
..
acpi [PATCH] s/;;/;/g 2006-03-24 07:33:24 -08:00
asm-alpha [PATCH] Configurable NODES_SHIFT 2006-04-11 06:18:39 -07:00
asm-arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-04-15 16:01:39 -07:00
asm-arm26 [PATCH] unify pfn_to_page: arm26 pfn_to_page 2006-03-27 08:44:44 -08:00
asm-cris [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-frv [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-generic [PATCH] mutex: some cleanups 2006-03-31 12:19:01 -08:00
asm-h8300 [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-i386 [PATCH] i386: fix broken FP exception handling 2006-04-29 14:13:16 -07:00
asm-ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-04-27 17:01:37 -07:00
asm-m32r [PATCH] m32r: update switch_to macro for tuning 2006-04-19 09:13:51 -07:00
asm-m68k [PATCH] m68k: fix undefined reference to generic_find_next_zero_le_bit 2006-03-26 08:57:13 -08:00
asm-m68knommu [PATCH] bitops: m68knommu: use generic bitops 2006-03-26 08:57:13 -08:00
asm-mips [MIPS] 24K LV: Add core card id. 2006-04-27 15:13:50 +01:00
asm-parisc [PARISC] Make ioremap default to _nocache 2006-04-21 22:20:35 +00:00
asm-powerpc [PATCH] powerpc: cell: Add numa id to struct spu 2006-05-01 18:17:46 -07:00
asm-ppc [PATCH] ppc32: odd fixes and improvements in ppc_sys 2006-04-28 21:05:16 +10:00
asm-s390 [PATCH] s390: add read_mostly optimization 2006-04-28 08:33:48 -07:00
asm-sh [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-sh64 [PATCH] sys_kexec_load() naming fixups 2006-04-11 06:18:42 -07:00
asm-sparc [SPARC]: __NR_sys removal 2006-04-24 13:48:51 -07:00
asm-sparc64 [SPARC64]: Kill __flush_tlb_page() prototype. 2006-04-30 21:40:13 -07:00
asm-um [PATCH] uml: fix "extern-vs-static" proto conflict in TLS code 2006-04-11 06:18:36 -07:00
asm-v850 [PATCH] Remove unused prepare_to_switch macro 2006-04-11 06:18:34 -07:00
asm-x86_64 [PATCH] Add support for the sys_vmsplice syscall 2006-04-26 10:59:21 +02:00
asm-xtensa [PATCH] request_irq(): remove warnings from irq probing 2006-04-28 08:33:46 -07:00
keys
linux [NETFILTER] x_tables: fix compat related crash on non-x86 2006-05-01 20:48:32 -07:00
math-emu
media V4L/DVB (3702): Make msp3400 routing defines more consistent 2006-04-02 04:56:11 -03:00
mtd
net [NET]: use hlist_unhashed() 2006-04-29 18:33:15 -07:00
pcmcia [PATCH] pcmcia: declare pccard_iodyn_ops (fix m8xx_pcmcia.c compilation error) 2006-03-31 21:49:51 +02:00
rdma IB: simplify static rate encoding 2006-04-10 09:43:47 -07:00
rxrpc
scsi [SCSI] FC transport: fixes for workq deadlocks 2006-04-13 13:25:16 -05:00
sound [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n 2006-04-27 21:10:42 +02:00
video [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00