1. 19 Nov, 2014 2 commits
  2. 18 Nov, 2014 6 commits
  3. 13 Oct, 2014 5 commits
    • Roberto Sassu's avatar
      ima: added support for new kernel cmdline parameter ima_template_fmt · c2426d2a
      Roberto Sassu authored
      This patch allows users to provide a custom template format through the
      new kernel command line parameter 'ima_template_fmt'. If the supplied
      format is not valid, IMA uses the default template descriptor.
      
      Changelog:
       - v3:
         - added check for 'fields' and 'num_fields' in
           template_desc_init_fields() (suggested by Mimi Zohar)
      
       - v2:
         - using template_desc_init_fields() to validate a format string
           (Roberto Sassu)
         - updated documentation by stating that only the chosen template
           descriptor is initialized (Roberto Sassu)
      
       - v1:
         - simplified code of ima_template_fmt_setup()
           (Roberto Sassu, suggested by Mimi Zohar)
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      c2426d2a
    • Roberto Sassu's avatar
      ima: allocate field pointers array on demand in template_desc_init_fields() · 1bd7face
      Roberto Sassu authored
      The allocation of a field pointers array is moved at the end of
      template_desc_init_fields() and done only if the value of the 'fields'
      and 'num_fields' parameters is not NULL. For just validating a template
      format string, retrieved template field pointers are placed in a temporary
      array.
      
      Changelog:
       - v3:
         - do not check in this patch if 'fields' and 'num_fields' are NULL
           (suggested by Mimi Zohar)
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      1bd7face
    • Roberto Sassu's avatar
      ima: don't allocate a copy of template_fmt in template_desc_init_fields() · 9f3166b8
      Roberto Sassu authored
      This patch removes the allocation of a copy of 'template_fmt', needed for
      iterating over all fields in the passed template format string. The removal
      was possible by replacing strcspn(), which modifies the passed string,
      with strchrnul(). The currently processed template field is copied in
      a temporary variable.
      
      The purpose of this change is use template_desc_init_fields() in two ways:
      for just validating a template format string (the function should work
      if called by a setup function, when memory cannot be allocated), and for
      actually initializing a template descriptor. The implementation of this
      feature will be complete with the next patch.
      
      Changelog:
       - v3:
         - added 'goto out' in template_desc_init_fields() to free allocated
           memory if a template field length is not valid (suggested by
           Mimi Zohar)
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      9f3166b8
    • Roberto Sassu's avatar
      ima: display template format in meas. list if template name length is zero · 7dbdb420
      Roberto Sassu authored
      With the introduction of the 'ima_template_fmt' kernel cmdline parameter,
      a user can define a new template descriptor with custom format. However,
      in this case, userspace tools will be unable to parse the measurements
      list because the new template is unknown. For this reason, this patch
      modifies the current IMA behavior to display in the list the template
      format instead of the name (only if the length of the latter is zero)
      so that a tool can extract needed information if it can handle listed
      fields.
      
      This patch also correctly displays the error log message in
      ima_init_template() if the selected template cannot be initialized.
      
      Changelog:
       - v3:
         - check the first byte of 'e->template_desc->name' instead of using
           strlen() in ima_fs.c (suggested by Mimi Zohar)
      
       - v2:
         - print the template format in ima_init_template(), if the selected
           template is custom (Roberto Sassu)
      
       - v1:
         - fixed patch description (Roberto Sassu, suggested by Mimi Zohar)
         - set 'template_name' variable in ima_fs.c only once
           (Roberto Sassu, suggested by Mimi Zohar)
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      7dbdb420
    • Roberto Sassu's avatar
      ima: added error messages to template-related functions · 71fed2ee
      Roberto Sassu authored
      This patch adds some error messages to inform users about the following
      events: template descriptor not found, invalid template descriptor,
      template field not found and template initialization failed.
      
      Changelog:
       - v2:
         - display an error message if the format string contains too many
           fields (Roberto Sassu)
      Signed-off-by: default avatarRoberto Sassu <roberto.sassu@polito.it>
      Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
      71fed2ee
  4. 12 Oct, 2014 4 commits
  5. 07 Oct, 2014 4 commits
  6. 06 Oct, 2014 5 commits
  7. 05 Oct, 2014 2 commits
  8. 04 Oct, 2014 1 commit
  9. 03 Oct, 2014 11 commits
    • Josh Triplett's avatar
      init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menu · 62b4d204
      Josh Triplett authored
      commit 03b8c7b6 ("futex: Allow
      architectures to skip futex_atomic_cmpxchg_inatomic() test") added the
      HAVE_FUTEX_CMPXCHG symbol right below FUTEX.  This placed it right in
      the middle of the options for the EXPERT menu.  However,
      HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops
      placing items in the EXPERT menu, and displays the remaining several
      EXPERT items (starting with EPOLL) directly in the General Setup menu.
      
      Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make
      HAVE_FUTEX_CMPXCHG itself depend on FUTEX.  With this change, the
      subsequent items display as part of the EXPERT menu again; the EMBEDDED
      menu now appears as the next top-level item in the General Setup menu,
      which makes General Setup much shorter and more usable.
      Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: stable <stable@vger.kernel.org>
      62b4d204
    • Josh Triplett's avatar
      init/Kconfig: Hide printk log config if CONFIG_PRINTK=n · 361e9dfb
      Josh Triplett authored
      The buffers sized by CONFIG_LOG_BUF_SHIFT and
      CONFIG_LOG_CPU_MAX_BUF_SHIFT do not exist if CONFIG_PRINTK=n, so don't
      ask about their size at all.
      Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: stable <stable@vger.kernel.org>
      361e9dfb
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 126d4576
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two i2c driver bugfixes"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: qup: Fix order of runtime pm initialization
        i2c: rk3x: fix 0 length write transfers
      126d4576
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.17-rc7' of... · 03900197
      Linus Torvalds authored
      Merge tag 'trace-fixes-v3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull trace ring buffer iterator fix from Steven Rostedt:
       "While testing some new changes for 3.18, I kept hitting a bug every so
        often in the ring buffer.  At first I thought it had to do with some
        of the changes I was working on, but then testing something else I
        realized that the bug was in 3.17 itself.  I ran several bisects as
        the bug was not very reproducible, and finally came up with the commit
        that I could reproduce easily within a few minutes, and without the
        change I could run the tests over an hour without issue.  The change
        fit the bug and I figured out a fix.  That bad commit was:
      
          Commit 651e22f2 "ring-buffer: Always reset iterator to reader page"
      
        This commit fixed a bug, but in the process created another one.  It
        used the wrong value as the cached value that is used to see if things
        changed while an iterator was in use.  This made it look like a change
        always happened, and could cause the iterator to go into an infinite
        loop"
      
      * tag 'trace-fixes-v3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ring-buffer: Fix infinite spin in reading buffer
      03900197
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.samba.org/sfrench/cifs-2.6 · 7d1419f3
      Linus Torvalds authored
      Pull cifs/smb3 fixes from Steve French:
       "Fix for CIFS/SMB3 oops on reconnect during readpages (3.17 regression)
        and for incorrectly closing file handle in symlink error cases"
      
      * 'for-linus' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Fix readpages retrying on reconnects
        Fix problem recognizing symlinks
      7d1419f3
    • Linus Torvalds's avatar
      Merge tag 'md/3.17-final-fix' of git://neil.brown.name/md · ee042ec8
      Linus Torvalds authored
      Pull raid5 discard fix from Neil Brown:
       "One fix for raid5 discard issue"
      
      * tag 'md/3.17-final-fix' of git://neil.brown.name/md:
        md/raid5: disable 'DISCARD' by default due to safety concerns.
      ee042ec8
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 80ad99da
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too major or scary.
      
        One i915 regression fix, nouveau has a tmds regression fix, along with
        a regression fix for the runtime pm code for optimus laptops not
        restoring the display hw correctly"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau: make sure display hardware is reinitialised on runtime resume
        drm/nouveau: punt fbcon resume out to a workqueue
        drm/nouveau: fix regression on original nv50 board
        drm/nv50/disp: fix dpms regression on certain boards
        drm/i915: Flush the PTEs after updating them before suspend
      80ad99da
    • David Howells's avatar
      X.509: If available, use the raw subjKeyId to form the key description · dd2f6c44
      David Howells authored
      Module signing matches keys by comparing against the key description exactly.
      However, the way the key description gets constructed got changed to be
      composed of the subject name plus the certificate serial number instead of the
      subject name and the subjectKeyId.  I changed this to avoid problems with
      certificates that don't *have* a subjectKeyId.
      
      Instead, if available, use the raw subjectKeyId to form the key description
      and only use the serial number if the subjectKeyId doesn't exist.
      Reported-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      dd2f6c44
    • Dmitry Kasatkin's avatar
      KEYS: handle error code encoded in pointer · 40b50e80
      Dmitry Kasatkin authored
      If hexlen is odd then function returns an error.
      Use IS_ERR to check for error, otherwise invalid pointer
      is used and kernel gives oops:
      
      [  132.816522] BUG: unable to handle kernel paging request at
      ffffffffffffffea
      [  132.819902] IP: [<ffffffff812bfc20>] asymmetric_key_id_same+0x14/0x36
      [  132.820302] PGD 1a12067 PUD 1a14067 PMD 0
      [  132.820302] Oops: 0000 [#1] SMP
      [  132.820302] Modules linked in: bridge(E) stp(E) llc(E) evdev(E)
      serio_raw(E) i2c_piix4(E) button(E) fuse(E)
      [  132.820302] CPU: 0 PID: 2993 Comm: cat Tainted: G            E
      3.16.0-kds+ #2847
      [  132.820302] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      [  132.820302] task: ffff88004249a430 ti: ffff880056640000 task.ti:
      ffff880056640000
      [  132.820302] RIP: 0010:[<ffffffff812bfc20>]  [<ffffffff812bfc20>]
      asymmetric_key_id_same+0x14/0x36
      [  132.820302] RSP: 0018:ffff880056643930  EFLAGS: 00010246
      [  132.820302] RAX: 0000000000000000 RBX: ffffffffffffffea RCX:
      ffff880056643ae0
      [  132.820302] RDX: 000000000000005e RSI: ffffffffffffffea RDI:
      ffff88005bac9300
      [  132.820302] RBP: ffff880056643948 R08: 0000000000000003 R09:
      00000007504aa01a
      [  132.820302] R10: 0000000000000000 R11: 0000000000000000 R12:
      ffff88005d68ca40
      [  132.820302] R13: 0000000000000101 R14: 0000000000000000 R15:
      ffff88005bac5280
      [  132.820302] FS:  00007f67a153c740(0000) GS:ffff88005da00000(0000)
      knlGS:0000000000000000
      [  132.820302] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [  132.820302] CR2: ffffffffffffffea CR3: 000000002e663000 CR4:
      00000000000006f0
      [  132.820302] Stack:
      [  132.820302]  ffffffff812bfc66 ffff880056643ae0 ffff88005bac5280
      ffff880056643958
      [  132.820302]  ffffffff812bfc9d ffff880056643980 ffffffff812971d9
      ffff88005ce930c1
      [  132.820302]  ffff88005ce930c0 0000000000000000 ffff8800566439c8
      ffffffff812fb753
      [  132.820302] Call Trace:
      [  132.820302]  [<ffffffff812bfc66>] ? asymmetric_match_key_ids+0x24/0x42
      [  132.820302]  [<ffffffff812bfc9d>] asymmetric_key_cmp+0x19/0x1b
      [  132.820302]  [<ffffffff812971d9>] keyring_search_iterator+0x74/0xd7
      [  132.820302]  [<ffffffff812fb753>] assoc_array_subtree_iterate+0x67/0xd2
      [  132.820302]  [<ffffffff81297165>] ? key_default_cmp+0x20/0x20
      [  132.820302]  [<ffffffff812fbaa1>] assoc_array_iterate+0x19/0x1e
      [  132.820302]  [<ffffffff81297332>] search_nested_keyrings+0xf6/0x2b6
      [  132.820302]  [<ffffffff810728da>] ? sched_clock_cpu+0x91/0xa2
      [  132.820302]  [<ffffffff810860d2>] ? mark_held_locks+0x58/0x6e
      [  132.820302]  [<ffffffff810a137d>] ? current_kernel_time+0x77/0xb8
      [  132.820302]  [<ffffffff81297871>] keyring_search_aux+0xe1/0x14c
      [  132.820302]  [<ffffffff812977fc>] ? keyring_search_aux+0x6c/0x14c
      [  132.820302]  [<ffffffff8129796b>] keyring_search+0x8f/0xb6
      [  132.820302]  [<ffffffff812bfc84>] ? asymmetric_match_key_ids+0x42/0x42
      [  132.820302]  [<ffffffff81297165>] ? key_default_cmp+0x20/0x20
      [  132.820302]  [<ffffffff812ab9e3>] asymmetric_verify+0xa4/0x214
      [  132.820302]  [<ffffffff812ab90e>] integrity_digsig_verify+0xb1/0xe2
      [  132.820302]  [<ffffffff812abe41>] ? evm_verifyxattr+0x6a/0x7a
      [  132.820302]  [<ffffffff812b0390>] ima_appraise_measurement+0x160/0x370
      [  132.820302]  [<ffffffff81161db2>] ? d_absolute_path+0x5b/0x7a
      [  132.820302]  [<ffffffff812ada30>] process_measurement+0x322/0x404
      Reported-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      40b50e80
    • Christoph Hellwig's avatar
      [SCSI] uas: disable use of blk-mq I/O path · 2c2d831c
      Christoph Hellwig authored
      The uas driver uses the block layer tag for USB3 stream IDs.  With
      blk-mq we can get larger tag numbers that the queue depth, which breaks
      this assumption.  A fix is under way for 3.18, but sits on top of
      large changes so can't easily be backported.   Set the disable_blk_mq
      path so that a uas device can't easily crash the system when using
      blk-mq for SCSI.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      2c2d831c
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 58586869
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are three regression fixes (cpufreq core, pcc-cpufreq, i915 /
        ACPI) and one trivial fix for a callback return value mismatch in the
        cpufreq integrator driver.
      
        Specifics:
      
         - A recent cpufreq core fix went too far and introduced a regression
           in the system suspend code path.  Fix from Viresh Kumar.
      
         - An ACPI-related commit in the i915 driver that fixed backlight
           problems for some Thinkpads inadvertently broke a Dell machine (in
           3.16).  Fix from Aaron Lu.
      
         - The pcc-cpufreq driver was broken during the 3.15 cycle by a commit
           that put wait_event() under a spinlock by mistake.  Fix that
           (Rafael J Wysocki).
      
         - The return value type of integrator_cpufreq_remove() is void, but
           should be int.  Fix from Arnd Bergmann"
      
      * tag 'pm+acpi-3.17-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: update 'cpufreq_suspended' after stopping governors
        ACPI / i915: Update the condition to ignore firmware backlight change request
        cpufreq: integrator: fix integrator_cpufreq_remove return type
        cpufreq: pcc-cpufreq: Fix wait_event() under spinlock
      58586869