1. 22 Aug, 2016 10 commits
  2. 09 Aug, 2016 1 commit
  3. 08 Aug, 2016 23 commits
  4. 03 Aug, 2016 1 commit
    • Florian Westphal's avatar
      netfilter: x_tables: speed up jump target validation · f5bba514
      Florian Westphal authored
      [ Upstream commit f4dc7771 ]
      
      The dummy ruleset I used to test the original validation change was broken,
      most rules were unreachable and were not tested by mark_source_chains().
      
      In some cases rulesets that used to load in a few seconds now require
      several minutes.
      
      sample ruleset that shows the behaviour:
      
      echo "*filter"
      for i in $(seq 0 100000);do
              printf ":chain_%06x - [0:0]\n" $i
      done
      for i in $(seq 0 100000);do
         printf -- "-A INPUT -j chain_%06x\n" $i
         printf -- "-A INPUT -j chain_%06x\n" $i
         printf -- "-A INPUT -j chain_%06x\n" $i
      done
      echo COMMIT
      
      [ pipe result into iptables-restore ]
      
      This ruleset will be about 74mbyte in size, with ~500k searches
      though all 500k[1] rule entries. iptables-restore will take forever
      (gave up after 10 minutes)
      
      Instead of always searching the entire blob for a match, fill an
      array with the start offsets of every single ipt_entry struct,
      then do a binary search to check if the jump target is present or not.
      
      After this change ruleset restore times get again close to what one
      gets when reverting 36472341 (~3 seconds on my workstation).
      
      [1] every user-defined rule gets an implicit RETURN, so we get
      300k jumps + 100k userchains + 100k returns -> 500k rule entries
      
      Fixes: 36472341 ("netfilter: x_tables: validate targets of jumps")
      Reported-by: default avatarJeff Wu <wujiafu@gmail.com>
      Tested-by: default avatarJeff Wu <wujiafu@gmail.com>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      f5bba514
  5. 01 Aug, 2016 2 commits
  6. 30 Jul, 2016 1 commit
  7. 20 Jul, 2016 2 commits
    • Steven Rostedt's avatar
      4.1.28 Fix bad backport of 8f182270 "mm/swap.c: flush lru pvecs on compound page arrival" · 52c84a95
      Steven Rostedt authored
      When I pulled in 4.1.28 into my stable 4.1-rt tree and ran the tests,
      it crashed with a severe OOM killing everything. I then tested 4.1.28
      without -rt and it had the same issue. I did a bisect between 4.1.27
      and 4.1.28 and found that the bug started at:
      
      commit 8f182270 "mm/swap.c: flush lru pvecs on compound page
      arrival"
      
      Looking at that patch and what's in mainline, I see that there's a
      mismatch in one of the hunks:
      
      Mainline:
      
      @@ -391,9 +391,8 @@ static void __lru_cache_add(struct page *page)
              struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
      
              get_page(page);
      -       if (!pagevec_space(pvec))
      +       if (!pagevec_add(pvec, page) || PageCompound(page))
                      __pagevec_lru_add(pvec);
      -       pagevec_add(pvec, page);
              put_cpu_var(lru_add_pvec);
       }
      
      Stable 4.1.28:
      
      @@ -631,9 +631,8 @@ static void __lru_cache_add(struct page *page)
              struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
      
              page_cache_get(page);
      -       if (!pagevec_space(pvec))
      +       if (!pagevec_space(pvec) || PageCompound(page))
                      __pagevec_lru_add(pvec);
      -       pagevec_add(pvec, page);
              put_cpu_var(lru_add_pvec);
       }
      
      Where mainline replace pagevec_space() with pagevec_add, and stable did
      not.
      
      Fixing this makes the OOM go away.
      
      Note, 3.18 has the same bug.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      52c84a95
    • Michael Ellerman's avatar
      powerpc: Fix build break due to missing PPC_FEATURE2_HTM_NOSC · da3e7add
      Michael Ellerman authored
      The backport of 4705e024 ("powerpc: Update TM user feature bits in
      scan_features()") (f49eb503), missed the fact that 4.1 doesn't
      include the commit that added PPC_FEATURE2_HTM_NOSC.
      
      The correct fix is simply to omit PPC_FEATURE2_HTM_NOSC.
      
      Fixes: f49eb503 ("powerpc: Update TM user feature bits in scan_features()")
      Reported-by: default avatarChristian Zigotzky <chzigotzky@bayern-mail.de>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
      da3e7add