1. 12 Apr, 2016 37 commits
  2. 16 Mar, 2016 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.14.65 · dfbed80c
      Greg Kroah-Hartman authored
      dfbed80c
    • Greg Kroah-Hartman's avatar
      Revert: "crypto: af_alg - Disallow bind/setkey/... after accept(2)" · c4eb62da
      Greg Kroah-Hartman authored
      This reverts commit 06b41945 which is
      commit c840ac6a upstream.
      
      It's been widely reported that this patch breaks existing userspace
      applications when backported to the stable kernel releases.  As no fix
      seems to be forthcoming, just revert it to let systems work again.
      Reported-by: default avatar"J. Paul Reed" <preed@sigkill.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      c4eb62da
    • Rusty Russell's avatar
      modules: fix longstanding /proc/kallsyms vs module insertion race. · 952b0e42
      Rusty Russell authored
      commit 8244062e upstream.
      
      For CONFIG_KALLSYMS, we keep two symbol tables and two string tables.
      There's one full copy, marked SHF_ALLOC and laid out at the end of the
      module's init section.  There's also a cut-down version that only
      contains core symbols and strings, and lives in the module's core
      section.
      
      After module init (and before we free the module memory), we switch
      the mod->symtab, mod->num_symtab and mod->strtab to point to the core
      versions.  We do this under the module_mutex.
      
      However, kallsyms doesn't take the module_mutex: it uses
      preempt_disable() and rcu tricks to walk through the modules, because
      it's used in the oops path.  It's also used in /proc/kallsyms.
      There's nothing atomic about the change of these variables, so we can
      get the old (larger!) num_symtab and the new symtab pointer; in fact
      this is what I saw when trying to reproduce.
      
      By grouping these variables together, we can use a
      carefully-dereferenced pointer to ensure we always get one or the
      other (the free of the module init section is already done in an RCU
      callback, so that's safe).  We allocate the init one at the end of the
      module init section, and keep the core one inside the struct module
      itself (it could also have been allocated at the end of the module
      core, but that's probably overkill).
      
      [ Rebased for 4.4-stable and older, because the following changes aren't
        in the older trees:
        - e0224418: adds arg to is_core_symbol
        - 7523e4dc: module_init/module_core/init_size/core_size
          become init_layout.base/core_layout.base/init_layout.size/core_layout.size.
      
        Original commit: 8244062e
      ]
      Reported-by: default avatarWeilong Chen <chenweilong@huawei.com>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111541Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      952b0e42