Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
25 hoursMerge branch 'SLE12-SP3' into SLE12-SP3-AZURESLE12-SP3-AZUREKernel Build Daemon
suse-commit: eceea0548f275da75ff7d52ebdf3770abeb18226
46 hoursIB/rxe: replace kvfree with vfree (FATE#322149).SLE12-SP3Denis Kirjanov
suse-commit: bd8264a92268bb2d070427f37ae5727997298810
3 daysMerge branch 'SLE12-SP3' into SLE12-SP3-AZUREKernel Build Daemon
suse-commit: 9f8ae667bc80eaffbc324872befd5aeaeedc6c20
4 dayssd: disable logical block provisioning if 'lbpme' is not setJean Delvare
(bsc#1086095 bsc#1078355). suse-commit: 96370bd87299c7a6883b3e2bf13818f60c8ba611
4 daysMerge branch 'SLE12-SP3' into SLE12-SP3-AZUREKernel Build Daemon
suse-commit: 692c0439272cc98e39e95ab72161a5d9498754f6
5 daysFix the merge error from cve/linux-4.4 branchTakashi Iwai
Corrected the patch patches.arch/kvm-fix-kvm_ioctl_create_device-reference-counting-cve-2019-6974 that had a superfluous list_add() line by the merge error. suse-commit: 5fdcc9222f58490e8e5a46fb1c56807e90a8cc6f
5 daysRe-sort patches, fix the wrongly inserted patchTakashi Iwai
suse-commit: c30ab27e14f383efd36bebae888576fb2bb94a7e
5 daysRDMA/bnxt_re: Fix a couple off by one bugs (bsc#1020413,Denis Kirjanov
FATE#321905). suse-commit: 0ce2b4fa5681f932e6c60e29b68c31794fc0c7b4
5 daysMerge branch 'SLE12-SP3' into SLE12-SP3-AZUREKernel Build Daemon
suse-commit: 491ef95c18af1461051106fe8b80326e02ee986e
6 daysIB/core: type promotion bug in rdma_rw_init_one_mr()Denis Kirjanov
(FATE#321732). suse-commit: 6debd5c99d25df245d32afe899dc4e8d24ce277e
6 daysMerge branch 'SLE12-SP3' into SLE12-SP3-AZUREKernel Build Daemon
suse-commit: d21c6f20057812ea77b30c331127024a76d37edf
7 days- nfit: fix unchecked dereference in acpi_nfit_ctl (bsc#1125014).Johannes Thumshirn
- Refresh patches.fixes/acpi-nfit-fix-command-supported-detection.patch. suse-commit: cf38b6f60d5c4bce31745ace072cb87c6494d55a
7 daysacpi, nfit: Fix ARS overflow continuation (bsc#1125000).Johannes Thumshirn
suse-commit: 56b47a0c581719d3fd8f1cf14621957ac2ede52e
7 daysblacklist.conf: acc93d30d7d4 Revert "block: enable dax for raw block devices"Johannes Thumshirn
suse-commit: 1e17bb6408bf2dcf2333c6c3e22abbba860700d0
7 daysMerge branch 'users/jack/SLE12-SP3/for-next' into SLE12-SP3Takashi Iwai
Pull fs fix from Jan Kara (bsc#1117744) suse-commit: 03c0894d4d019648803cf5a0539b7ae0c7048406
7 daysdrm/vmwgfx: Fix setting of dma masks (bsc#1106929)Thomas Zimmermann
suse-commit: 58b1ddc60dee047edbc3a926cf43ee468302d665
7 daysdrm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user (bsc#1106929)Thomas Zimmermann
suse-commit: 27301b586c738029c3fb98b5da0290e2cd1b0718
7 daysMerge branch 'cve/linux-4.4' into SLE12-SP3Takashi Iwai
suse-commit: 1b5f84c879ad2fd83a02058be222233c72f9b52d
7 daysblacklist.conf: add few moreJiri Slaby
suse-commit: 95f2c58ebdd8c1162671cdedf41c2db4b285801e
7 days- Linux 4.4.174 (bnc#1012382).Jiri Slaby
- Revert most of 4.4.174 (kabi). - inet: frags: change inet_frags_init_net() return value (bnc#1012382). - inet: frags: add a pointer to struct netns_frags (bnc#1012382). - inet: frags: refactor ipfrag_init() (bnc#1012382). - inet: frags: refactor ipv6_frag_init() (bnc#1012382). - inet: frags: refactor lowpan_net_frag_init() (bnc#1012382). - rhashtable: add rhashtable_lookup_get_insert_key() (bnc#1012382 bsc#1042286). - rhashtable: Add rhashtable_lookup() (bnc#1012382). - rhashtable: add schedule points (bnc#1012382). - inet: frags: use rhashtables for reassembly units (bnc#1012382). - net: ieee802154: 6lowpan: fix frag reassembly (bnc#1012382). - ipfrag: really prevent allocation on netns exit (bnc#1012382). - inet: frags: remove some helpers (bnc#1012382). - inet: frags: get rif of inet_frag_evicting() (bnc#1012382). - inet: frags: remove inet_frag_maybe_warn_overflow() (bnc#1012382). - inet: frags: break the 2GB limit for frags storage (bnc#1012382). - inet: frags: do not clone skb in ip_expire() (bnc#1012382). - ipv6: frags: rewrite ip6_expire_frag_queue() (bnc#1012382). - rhashtable: reorganize struct rhashtable layout (bnc#1012382). - inet: frags: reorganize struct netns_frags (bnc#1012382). - inet: frags: get rid of ipfrag_skb_cb/FRAG_CB (bnc#1012382). - inet: frags: fix ip6frag_low_thresh boundary (bnc#1012382). - ip: discard IPv4 datagrams with overlapping segments (CVE-2018-5391 bnc#1012382 bsc#1103097). - net: modify skb_rbtree_purge to return the truesize of all purged skbs (bnc#1012382). - ipv6: defrag: drop non-last frags smaller than min mtu (CVE-2018-5391 bnc#1012382 bsc#1103097). - net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends (bnc#1012382). - ip: use rb trees for IP frag queue (bnc#1012382). - ip: add helpers to process in-order fragments faster (bnc#1012382). - ip: process in-order fragments efficiently (bnc#1012382). - ip: frags: fix crash in ip_do_fragment() (bnc#1012382). - ipv4: frags: precedence bug in ip_expire() (bnc#1012382). - inet: frags: better deal with smp races (bnc#1012382). - net: fix pskb_trim_rcsum_slow() with odd trim offset (bnc#1012382). - net: ipv4: do not handle duplicate fragments as overlapping (bnc#1012382 bsc#1116345). - rcu: Force boolean subscript for expedited stall warnings (bnc#1012382). - Refresh patches.suse/0002-rcu-Add-more-diagnostics-to-expedited-stall-warning-.patch. suse-commit: 933cc351ff11816307a89ba4aec7d1a16c11e738
7 daysUpdateCho, Yu-Chen
patches.fixes/Bluetooth-Verify-that-l2cap_get_conf_opt-provides-la.patch (bsc#1120758 CVE-2019-3459 CVE-2019-3460). suse-commit: 4b13ce91a7b21fbdf2269dd67611db1766250cdb
9 daysMerge branch 'SLE12-SP3' into SLE12-SP3-AZUREKernel Build Daemon
suse-commit: d27c5c184d1594f413935ce20bf509f5751133bc
10 daysplatform/x86: thinkpad_acpi: Proper model/release matchingTakashi Iwai
(bsc#1099810). suse-commit: e08685b53959d53acf60d1c3343b67626df079e3
10 daysMerge branch 'users/ggherdovich/SLE12-SP3/for-next' into SLE12-SP3Takashi Iwai
Pull cpufreq fix from Giovanni Gherdovich (bsc#1120017) suse-commit: b887a16a7a94b67a9b262c7d71209c95319cd277
10 dayscpufreq: intel_pstate: Fix HWP on boot CPU after system resumeGiovanni Gherdovich
(bsc#1120017). suse-commit: 13924db2f586a330b04cdfb9be8d441e92194695
10 daysintel_pstate: Update frequencies of policy->cpus only fromGiovanni Gherdovich
->set_policy() (bsc#1120017). suse-commit: 83356eedd2ac9638b6b07f53918d3010ebff2641
10 daysMerge branch 'users/jthumshirn/SLE12-SP3/for-next' into SLE12-SP3Kernel Build Daemon
suse-commit: 973f7283f320a6cfc95e234a28b7004e72c373e7
10 dayslibnvdimm, pfn: Pad pfn namespaces relative to other regionsJohannes Thumshirn
(bsc#1124811). suse-commit: 330419507d540a53e366f048d80ced9d2678442c
10 dayslibnvdimm: Use max contiguous area for namespace sizeJohannes Thumshirn
(bsc#1124780). suse-commit: 5f5c69fd530449a65fc94cf3e64528aeed72dcf7
10 dayslibnvdimm: fix ars_status output length calculationJohannes Thumshirn
(bsc#1124777). suse-commit: ddabcc61bea0fe1635ec3f53a5a4e114ec3ae4ec
10 days- acpi/nfit: fix cmd_rc for acpi_nfit_ctl to always return a valueJohannes Thumshirn
(bsc#1124775). - Refresh patches.fixes/acpi-nfit-fix-command-supported-detection.patch. suse-commit: 94d8ac5676bd1b972fe9999939027d1868e07ec7
10 daysLinux 4.4.174v4.4.174Greg Kroah-Hartman
10 daysrcu: Force boolean subscript for expedited stall warningsPaul E. McKenney
commit ec3833ed02ae6ef2a933ece9de7cbab0c64c699e upstream. The cpu_online() function can return values other than 0 and 1, which can result in subscript overflow when applied to a two-element array. This commit allows for this behavior by using "!!" on the return value from cpu_online() when used as a subscript. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: "Rantala, Tommi" <tommi.t.rantala@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysnet: ipv4: do not handle duplicate fragments as overlappingMichal Kubecek
commit ade446403bfb79d3528d56071a84b15351a139ad upstream. Since commit 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") IPv4 reassembly code drops the whole queue whenever an overlapping fragment is received. However, the test is written in a way which detects duplicate fragments as overlapping so that in environments with many duplicate packets, fragmented packets may be undeliverable. Add an extra test and for (potentially) duplicate fragment, only drop the new fragment rather than the whole queue. Only starting offset and length are checked, not the contents of the fragments as that would be too expensive. For similar reason, linear list ("run") of a rbtree node is not iterated, we only check if the new fragment is a subset of the interval covered by existing consecutive fragments. v2: instead of an exact check iterating through linear list of an rbtree node, only check if the new fragment is subset of the "run" (suggested by Eric Dumazet) Fixes: 7969e5c40dfd ("ip: discard IPv4 datagrams with overlapping segments.") Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> [bwh: Backported to 4.4: - goto discard_qp, not err, in case of overlap - Set err earlier variable, as done upstream in commit 0ff89efb5246 "ip: fail fast on IP defrag errors"] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysnet: fix pskb_trim_rcsum_slow() with odd trim offsetDimitris Michailidis
commit d55bef5059dd057bd077155375c581b49d25be7e upstream. We've been getting checksum errors involving small UDP packets, usually 59B packets with 1 extra non-zero padding byte. netdev_rx_csum_fault() has been complaining that HW is providing bad checksums. Turns out the problem is in pskb_trim_rcsum_slow(), introduced in commit 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends"). The source of the problem is that when the bytes we are trimming start at an odd address, as in the case of the 1 padding byte above, skb_checksum() returns a byte-swapped value. We cannot just combine this with skb->csum using csum_sub(). We need to use csum_block_sub() here that takes into account the parity of the start address and handles the swapping. Matches existing code in __skb_postpull_rcsum() and esp_remove_trailer(). Fixes: 88078d98d1bb ("net: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friends") Signed-off-by: Dimitris Michailidis <dmichail@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysinet: frags: better deal with smp racesEric Dumazet
commit 0d5b9311baf27bb545f187f12ecfd558220c607d upstream. Multiple cpus might attempt to insert a new fragment in rhashtable, if for example RPS is buggy, as reported by 배석진 in https://patchwork.ozlabs.org/patch/994601/ We use rhashtable_lookup_get_insert_key() instead of rhashtable_insert_fast() to let cpus losing the race free their own inet_frag_queue and use the one that was inserted by another cpu. Fixes: 648700f76b03 ("inet: frags: use rhashtables for reassembly units") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: 배석진 <soukjin.bae@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysipv4: frags: precedence bug in ip_expire()Dan Carpenter
commit 70837ffe3085c9a91488b52ca13ac84424da1042 upstream. We accidentally removed the parentheses here, but they are required because '!' has higher precedence than '&'. Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysip: frags: fix crash in ip_do_fragment()Taehee Yoo
commit 5d407b071dc369c26a38398326ee2be53651cfe4 upstream. A kernel crash occurrs when defragmented packet is fragmented in ip_do_fragment(). In defragment routine, skb_orphan() is called and skb->ip_defrag_offset is set. but skb->sk and skb->ip_defrag_offset are same union member. so that frag->sk is not NULL. Hence crash occurrs in skb->sk check routine in ip_do_fragment() when defragmented packet is fragmented. test commands: %iptables -t nat -I POSTROUTING -j MASQUERADE %hping3 192.168.4.2 -s 1000 -p 2000 -d 60000 splat looks like: [ 261.069429] kernel BUG at net/ipv4/ip_output.c:636! [ 261.075753] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 261.083854] CPU: 1 PID: 1349 Comm: hping3 Not tainted 4.19.0-rc2+ #3 [ 261.100977] RIP: 0010:ip_do_fragment+0x1613/0x2600 [ 261.106945] Code: e8 e2 38 e3 fe 4c 8b 44 24 18 48 8b 74 24 08 e9 92 f6 ff ff 80 3c 02 00 0f 85 da 07 00 00 48 8b b5 d0 00 00 00 e9 25 f6 ff ff <0f> 0b 0f 0b 44 8b 54 24 58 4c 8b 4c 24 18 4c 8b 5c 24 60 4c 8b 6c [ 261.127015] RSP: 0018:ffff8801031cf2c0 EFLAGS: 00010202 [ 261.134156] RAX: 1ffff1002297537b RBX: ffffed0020639e6e RCX: 0000000000000004 [ 261.142156] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880114ba9bd8 [ 261.150157] RBP: ffff880114ba8a40 R08: ffffed0022975395 R09: ffffed0022975395 [ 261.158157] R10: 0000000000000001 R11: ffffed0022975394 R12: ffff880114ba9ca4 [ 261.166159] R13: 0000000000000010 R14: ffff880114ba9bc0 R15: dffffc0000000000 [ 261.174169] FS: 00007fbae2199700(0000) GS:ffff88011b400000(0000) knlGS:0000000000000000 [ 261.183012] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 261.189013] CR2: 00005579244fe000 CR3: 0000000119bf4000 CR4: 00000000001006e0 [ 261.198158] Call Trace: [ 261.199018] ? dst_output+0x180/0x180 [ 261.205011] ? save_trace+0x300/0x300 [ 261.209018] ? ip_copy_metadata+0xb00/0xb00 [ 261.213034] ? sched_clock_local+0xd4/0x140 [ 261.218158] ? kill_l4proto+0x120/0x120 [nf_conntrack] [ 261.223014] ? rt_cpu_seq_stop+0x10/0x10 [ 261.227014] ? find_held_lock+0x39/0x1c0 [ 261.233008] ip_finish_output+0x51d/0xb50 [ 261.237006] ? ip_fragment.constprop.56+0x220/0x220 [ 261.243011] ? nf_ct_l4proto_register_one+0x5b0/0x5b0 [nf_conntrack] [ 261.250152] ? rcu_is_watching+0x77/0x120 [ 261.255010] ? nf_nat_ipv4_out+0x1e/0x2b0 [nf_nat_ipv4] [ 261.261033] ? nf_hook_slow+0xb1/0x160 [ 261.265007] ip_output+0x1c7/0x710 [ 261.269005] ? ip_mc_output+0x13f0/0x13f0 [ 261.273002] ? __local_bh_enable_ip+0xe9/0x1b0 [ 261.278152] ? ip_fragment.constprop.56+0x220/0x220 [ 261.282996] ? nf_hook_slow+0xb1/0x160 [ 261.287007] raw_sendmsg+0x21f9/0x4420 [ 261.291008] ? dst_output+0x180/0x180 [ 261.297003] ? sched_clock_cpu+0x126/0x170 [ 261.301003] ? find_held_lock+0x39/0x1c0 [ 261.306155] ? stop_critical_timings+0x420/0x420 [ 261.311004] ? check_flags.part.36+0x450/0x450 [ 261.315005] ? _raw_spin_unlock_irq+0x29/0x40 [ 261.320995] ? _raw_spin_unlock_irq+0x29/0x40 [ 261.326142] ? cyc2ns_read_end+0x10/0x10 [ 261.330139] ? raw_bind+0x280/0x280 [ 261.334138] ? sched_clock_cpu+0x126/0x170 [ 261.338995] ? check_flags.part.36+0x450/0x450 [ 261.342991] ? __lock_acquire+0x4500/0x4500 [ 261.348994] ? inet_sendmsg+0x11c/0x500 [ 261.352989] ? dst_output+0x180/0x180 [ 261.357012] inet_sendmsg+0x11c/0x500 [ ... ] v2: - clear skb->sk at reassembly routine.(Eric Dumarzet) Fixes: fa0f527358bd ("ip: use rb trees for IP frag queue.") Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Taehee Yoo <ap420073@gmail.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysip: process in-order fragments efficientlyPeter Oskolkov
commit a4fd284a1f8fd4b6c59aa59db2185b1e17c5c11c upstream. This patch changes the runtime behavior of IP defrag queue: incoming in-order fragments are added to the end of the current list/"run" of in-order fragments at the tail. On some workloads, UDP stream performance is substantially improved: RX: ./udp_stream -F 10 -T 2 -l 60 TX: ./udp_stream -c -H <host> -F 10 -T 5 -l 60 with this patchset applied on a 10Gbps receiver: throughput=9524.18 throughput_units=Mbit/s upstream (net-next): throughput=4608.93 throughput_units=Mbit/s Reported-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Peter Oskolkov <posk@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysip: add helpers to process in-order fragments faster.Peter Oskolkov
commit 353c9cb360874e737fb000545f783df756c06f9a upstream. This patch introduces several helper functions/macros that will be used in the follow-up patch. No runtime changes yet. The new logic (fully implemented in the second patch) is as follows: * Nodes in the rb-tree will now contain not single fragments, but lists of consecutive fragments ("runs"). * At each point in time, the current "active" run at the tail is maintained/tracked. Fragments that arrive in-order, adjacent to the previous tail fragment, are added to this tail run without triggering the re-balancing of the rb-tree. * If a fragment arrives out of order with the offset _before_ the tail run, it is inserted into the rb-tree as a single fragment. * If a fragment arrives after the current tail fragment (with a gap), it starts a new "tail" run, as is inserted into the rb-tree at the end as the head of the new run. skb->cb is used to store additional information needed here (suggested by Eric Dumazet). Reported-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Peter Oskolkov <posk@google.com> Cc: Eric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysip: use rb trees for IP frag queue.Peter Oskolkov
commit fa0f527358bd900ef92f925878ed6bfbd51305cc upstream. Similar to TCP OOO RX queue, it makes sense to use rb trees to store IP fragments, so that OOO fragments are inserted faster. Tested: - a follow-up patch contains a rather comprehensive ip defrag self-test (functional) - ran neper `udp_stream -c -H <host> -F 100 -l 300 -T 20`: netstat --statistics Ip: 282078937 total packets received 0 forwarded 0 incoming packets discarded 946760 incoming packets delivered 18743456 requests sent out 101 fragments dropped after timeout 282077129 reassemblies required 944952 packets reassembled ok 262734239 packet reassembles failed (The numbers/stats above are somewhat better re: reassemblies vs a kernel without this patchset. More comprehensive performance testing TBD). Reported-by: Jann Horn <jannh@google.com> Reported-by: Juha-Matti Tilli <juha-matti.tilli@iki.fi> Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Peter Oskolkov <posk@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> [bwh: Backported to 4.4: - Keep using frag_kfree_skb() in inet_frag_destroy() - Adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysnet: pskb_trim_rcsum() and CHECKSUM_COMPLETE are friendsEric Dumazet
commit 88078d98d1bb085d72af8437707279e203524fa5 upstream. After working on IP defragmentation lately, I found that some large packets defeat CHECKSUM_COMPLETE optimization because of NIC adding zero paddings on the last (small) fragment. While removing the padding with pskb_trim_rcsum(), we set skb->ip_summed to CHECKSUM_NONE, forcing a full csum validation, even if all prior fragments had CHECKSUM_COMPLETE set. We can instead compute the checksum of the part we are trimming, usually smaller than the part we keep. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysipv6: defrag: drop non-last frags smaller than min mtuFlorian Westphal
commit 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 upstream. don't bother with pathological cases, they only waste cycles. IPv6 requires a minimum MTU of 1280 so we should never see fragments smaller than this (except last frag). v3: don't use awkward "-offset + len" v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68). There were concerns that there could be even smaller frags generated by intermediate nodes, e.g. on radio networks. Cc: Peter Oskolkov <posk@google.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> [bwh: Backported to 4.4: In nf_ct_frag6_gather() use clone instead of skb, and goto ret_orig in case of error] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysnet: modify skb_rbtree_purge to return the truesize of all purged skbs.Peter Oskolkov
commit 385114dec8a49b5e5945e77ba7de6356106713f4 upstream. Tested: see the next patch is the series. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Peter Oskolkov <posk@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysip: discard IPv4 datagrams with overlapping segments.Peter Oskolkov
commit 7969e5c40dfd04799d4341f1b7cd266b6e47f227 upstream. This behavior is required in IPv6, and there is little need to tolerate overlapping fragments in IPv4. This change simplifies the code and eliminates potential DDoS attack vectors. Tested: ran ip_defrag selftest (not yet available uptream). Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Peter Oskolkov <posk@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mao Wenan <maowenan@huawei.com> [bwh: Backported to 4.4: - s/__IP_INC_STATS/IP_INC_STATS_BH/ - Deleted code is slightly different] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysinet: frags: fix ip6frag_low_thresh boundaryEric Dumazet
commit 3d23401283e80ceb03f765842787e0e79ff598b7 upstream. Giving an integer to proc_doulongvec_minmax() is dangerous on 64bit arches, since linker might place next to it a non zero value preventing a change to ip6frag_low_thresh. ip6frag_low_thresh is not used anymore in the kernel, but we do not want to prematuraly break user scripts wanting to change it. Since specifying a minimal value of 0 for proc_doulongvec_minmax() is moot, let's remove these zero values in all defrag units. Fixes: 6e00f7dd5e4e ("ipv6: frags: fix /proc/sys/net/ipv6/ip6frag_low_thresh") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysinet: frags: get rid of ipfrag_skb_cb/FRAG_CBEric Dumazet
commit bf66337140c64c27fa37222b7abca7e49d63fb57 upstream. ip_defrag uses skb->cb[] to store the fragment offset, and unfortunately this integer is currently in a different cache line than skb->next, meaning that we use two cache lines per skb when finding the insertion point. By aliasing skb->ip_defrag_offset and skb->dev, we pack all the fields in a single cache line and save precious memory bandwidth. Note that after the fast path added by Changli Gao in commit d6bebca92c66 ("fragment: add fast path for in-order fragments") this change wont help the fast path, since we still need to access prev->len (2nd cache line), but will show great benefits when slow path is entered, since we perform a linear scan of a potentially long list. Also, note that this potential long list is an attack vector, we might consider also using an rb-tree there eventually. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysinet: frags: reorganize struct netns_fragsEric Dumazet
commit c2615cf5a761b32bf74e85bddc223dfff3d9b9f0 upstream. Put the read-mostly fields in a separate cache line at the beginning of struct netns_frags, to reduce false sharing noticed in inet_frag_kill() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 4.4: adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysrhashtable: reorganize struct rhashtable layoutEric Dumazet
commit e5d672a0780d9e7118caad4c171ec88b8299398d upstream. While under frags DDOS I noticed unfortunate false sharing between @nelems and @params.automatic_shrinking Move @nelems at the end of struct rhashtable so that first cache line is shared between all cpus, because almost never dirtied. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 daysipv6: frags: rewrite ip6_expire_frag_queue()Eric Dumazet
commit 05c0b86b9696802fd0ce5676a92a63f1b455bdf3 upstream. Make it similar to IPv4 ip_expire(), and release the lock before calling icmp functions. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 4.4: adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>