From: Greg Kroah-Hartman Date: Thu, 12 Jun 2014 17:50:02 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.94~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9429e6448376875a56949b4ae171565d5bd5fa6f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: netfilter-ipv4-defrag-set-local_df-flag-on-defragmented-skb.patch powerpc-fix-64-bit-builds-with-binutils-2.24.patch --- diff --git a/queue-3.4/netfilter-ipv4-defrag-set-local_df-flag-on-defragmented-skb.patch b/queue-3.4/netfilter-ipv4-defrag-set-local_df-flag-on-defragmented-skb.patch new file mode 100644 index 00000000000..c53cdc18a0b --- /dev/null +++ b/queue-3.4/netfilter-ipv4-defrag-set-local_df-flag-on-defragmented-skb.patch @@ -0,0 +1,58 @@ +From 895162b1101b3ea5db08ca6822ae9672717efec0 Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Fri, 2 May 2014 15:32:16 +0200 +Subject: netfilter: ipv4: defrag: set local_df flag on defragmented skb + +From: Florian Westphal + +commit 895162b1101b3ea5db08ca6822ae9672717efec0 upstream. + +else we may fail to forward skb even if original fragments do fit +outgoing link mtu: + +1. remote sends 2k packets in two 1000 byte frags, DF set +2. we want to forward but only see '2k > mtu and DF set' +3. we then send icmp error saying that outgoing link is 1500 + +But original sender never sent a packet that would not fit +the outgoing link. + +Setting local_df makes outgoing path test size vs. +IPCB(skb)->frag_max_size, so we will still send the correct +error in case the largest original size did not fit +outgoing link mtu. + +Reported-by: Maxime Bizon +Suggested-by: Maxime Bizon +Fixes: 5f2d04f1f9 (ipv4: fix path MTU discovery with connection tracking) +Signed-off-by: Florian Westphal +Signed-off-by: Pablo Neira Ayuso +Cc: Jiri Slaby +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/netfilter/nf_defrag_ipv4.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/ipv4/netfilter/nf_defrag_ipv4.c ++++ b/net/ipv4/netfilter/nf_defrag_ipv4.c +@@ -22,7 +22,6 @@ + #endif + #include + +-/* Returns new sk_buff, or NULL */ + static int nf_ct_ipv4_gather_frags(struct sk_buff *skb, u_int32_t user) + { + int err; +@@ -33,8 +32,10 @@ static int nf_ct_ipv4_gather_frags(struc + err = ip_defrag(skb, user); + local_bh_enable(); + +- if (!err) ++ if (!err) { + ip_send_check(ip_hdr(skb)); ++ skb->local_df = 1; ++ } + + return err; + } diff --git a/queue-3.4/powerpc-fix-64-bit-builds-with-binutils-2.24.patch b/queue-3.4/powerpc-fix-64-bit-builds-with-binutils-2.24.patch new file mode 100644 index 00000000000..8a6fa3566e4 --- /dev/null +++ b/queue-3.4/powerpc-fix-64-bit-builds-with-binutils-2.24.patch @@ -0,0 +1,82 @@ +From 7998eb3dc700aaf499f93f50b3d77da834ef9e1d Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Thu, 15 May 2014 09:33:42 -0700 +Subject: powerpc: Fix 64 bit builds with binutils 2.24 + +From: Guenter Roeck + +commit 7998eb3dc700aaf499f93f50b3d77da834ef9e1d upstream. + +With binutils 2.24, various 64 bit builds fail with relocation errors +such as + +arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': + (.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI + against symbol `interrupt_base_book3e' defined in .text section + in arch/powerpc/kernel/built-in.o +arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e': + (.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI + against symbol `interrupt_end_book3e' defined in .text section + in arch/powerpc/kernel/built-in.o + +The assembler maintainer says: + + I changed the ABI, something that had to be done but unfortunately + happens to break the booke kernel code. When building up a 64-bit + value with lis, ori, shl, oris, ori or similar sequences, you now + should use @high and @higha in place of @h and @ha. @h and @ha + (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA) + now report overflow if the value is out of 32-bit signed range. + ie. @h and @ha assume you're building a 32-bit value. This is needed + to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h + and @toc@ha expressions, and for consistency I did the same for all + other @h and @ha relocs. + +Replacing @h with @high in one strategic location fixes the relocation +errors. This has to be done conditionally since the assembler either +supports @h or @high but not both. + +Signed-off-by: Guenter Roeck +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/Makefile | 4 +++- + arch/powerpc/include/asm/ppc_asm.h | 7 ++++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +--- a/arch/powerpc/Makefile ++++ b/arch/powerpc/Makefile +@@ -67,9 +67,11 @@ LDFLAGS_vmlinux-y := -Bstatic + LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie + LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) + ++asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) ++ + CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=no -mcall-aixdesc + CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple +-KBUILD_CPPFLAGS += -Iarch/$(ARCH) ++KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) + KBUILD_AFLAGS += -Iarch/$(ARCH) + KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) + CPP = $(CC) -E $(KBUILD_CFLAGS) +--- a/arch/powerpc/include/asm/ppc_asm.h ++++ b/arch/powerpc/include/asm/ppc_asm.h +@@ -294,11 +294,16 @@ n: + * ld rY,ADDROFF(name)(rX) + */ + #ifdef __powerpc64__ ++#ifdef HAVE_AS_ATHIGH ++#define __AS_ATHIGH high ++#else ++#define __AS_ATHIGH h ++#endif + #define LOAD_REG_IMMEDIATE(reg,expr) \ + lis (reg),(expr)@highest; \ + ori (reg),(reg),(expr)@higher; \ + rldicr (reg),(reg),32,31; \ +- oris (reg),(reg),(expr)@h; \ ++ oris (reg),(reg),(expr)@__AS_ATHIGH; \ + ori (reg),(reg),(expr)@l; + + #define LOAD_REG_ADDR(reg,name) \ diff --git a/queue-3.4/series b/queue-3.4/series index db181bf1d12..f4f1adef1f5 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -1 +1,3 @@ mlx4_en-don-t-use-napi_synchronize-inside-mlx4_en_netpoll.patch +netfilter-ipv4-defrag-set-local_df-flag-on-defragmented-skb.patch +powerpc-fix-64-bit-builds-with-binutils-2.24.patch