1. 28 Oct, 2016 22 commits
  2. 27 Oct, 2016 16 commits
    • Linus Torvalds's avatar
      Allow KASAN and HOTPLUG_MEMORY to co-exist when doing build testing · 67463e54
      Linus Torvalds authored
      No, KASAN may not be able to co-exist with HOTPLUG_MEMORY at runtime,
      but for build testing there is no reason not to allow them together.
      
      This hopefully means better build coverage and fewer embarrasing silly
      problems like the one fixed by commit 9db4f36e ("mm: remove unused
      variable in memory hotplug") in the future.
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Alexander Potapenko <glider@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      67463e54
    • Linus Torvalds's avatar
      mm: remove unused variable in memory hotplug · 9db4f36e
      Linus Torvalds authored
      When I removed the per-zone bitlock hashed waitqueues in commit
      9dcb8b68 ("mm: remove per-zone hashtable of bitlock waitqueues"), I
      removed all the magic hotplug memory initialization of said waitqueues
      too.
      
      But when I actually _tested_ the resulting build, I stupidly assumed
      that "allmodconfig" would enable memory hotplug.  And it doesn't,
      because it enables KASAN instead, which then disables hotplug memory
      support.
      
      As a result, my build test of the per-zone waitqueues was totally
      broken, and I didn't notice that the compiler warns about the now unused
      iterator variable 'i'.
      
      I guess I should be happy that that seems to be the worst breakage from
      my clearly horribly failed test coverage.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9db4f36e
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 4e68af0b
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "I2C has some driver bugfixes, module autoload fixes, and driver
        enablement on some architectures"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: imx: defer probe if bus recovery GPIOs are not ready
        i2c: designware: Avoid aborted transfers with fast reacting I2C slaves
        i2c: i801: Fix I2C Block Read on 8-Series/C220 and later
        i2c: xgene: Avoid dma_buffer overrun
        i2c: digicolor: Fix module autoload
        i2c: xlr: Fix module autoload for OF registration
        i2c: xlp9xx: Fix module autoload
        i2c: jz4780: Fix module autoload
        i2c: allow configuration of imx driver for ColdFire architecture
        i2c: mark device nodes only in case of successful instantiation
        i2c: rk3x: Give the tuning value 0 during rk3x_i2c_v0_calc_timings
        i2c: hix5hd2: allow build with ARCH_HISI
      4e68af0b
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · 7f2145b0
      Linus Torvalds authored
      Pull thermal updates from Zhang Rui:
       "The latest Thermal Management updates for v4.9-rc3:
      
         - Fix a regression introduced by commit
           b721ca0d(thermal/powerclamp: remove cpu whitelist), that
           powerclamp driver checks cpu support in a wrong way. From: Eric
           Ernst.
      
         - Fix a problem that intel_pch_thermal driver misses passive trip
           point when the PCH thermal device has an ACPI companion device
           associated. From: Srinivas Pandruvada.
      
         - Add missing support for Haswell PCH thermal sensor. From: Srinivas
           Pandruvada"
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal/powerclamp: correct cpu support check
        thermal: intel_pch_thermal: Enable Haswell PCH
        thermal: intel_pch_thermal: Add an ACPI passive trip
      7f2145b0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 55bea71e
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "A few more s390 patches for 4.9:
         - a fix for an overflow in the dasd driver reported by UBSAN
         - fix a regression and add hotplug memory to the zone movable again
         - add ignore defines for the pkey system calls
         - fix the ouput of the merged stack tracer
         - replace printk with pr_cont in arch/s390 where appropriate
         - remove the arch specific return_address function again
         - ignore reserved channel paths at boot time
         - add a missing hugetlb_bad_size call to the arch backend"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/mm: fix zone calculation in arch_add_memory()
        s390/dumpstack: use pr_cont within show_stack and die
        s390/dumpstack: get rid of return_address again
        s390/disassambler: use pr_cont where appropriate
        s390/dumpstack: use pr_cont where appropriate
        s390/dumpstack: restore reliable indicator for call traces
        s390/mm: use hugetlb_bad_size()
        s390/cio: don't register chpids in reserved state
        s390: ignore pkey system calls
        s390/dasd: avoid undefined behaviour
      55bea71e
    • Linus Torvalds's avatar
      Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · 7618c6a1
      Linus Torvalds authored
      Pull module maintainership updates from Rusty Russell:
       "(Quoting from the MAINTAINERS commit:)
      
        Being a Linux kernel maintainer has been my proudest professional
        accomplishment, spanning the last 19 years. But now we have a surfeit
        of excellent hackers, and I can hand this over without regret.
      
        I'll still be around as co-maintainer for another cycle, but Jessica
        is now the one to convince if you want your patches applied. She
        rocks, and is far more timely than me too!"
      
      * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
        MAINTAINERS: Begin module maintainer transition
      7618c6a1
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · e3300ffe
      Linus Torvalds authored
      Pull oreangefs updates from Mike Marshall:
       "A couple of orangefs cleanups sent in by other developers:
      
         - use d_fsdata instead of d_time (Miklos Szeredi)
      
         - use file_inode(file) instead of file->f_path.dentry->d_inode (Amir
           Goldstein)"
      
      * tag 'for-linus-4.9-rc2-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        orangefs: don't use d_time
        orangefs: user file_inode() where it is due
      e3300ffe
    • Linus Torvalds's avatar
      Merge tag 'xfs-fixes-for-linus-4.9-rc3' of... · e890038e
      Linus Torvalds authored
      Merge tag 'xfs-fixes-for-linus-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs
      
      Pull xfs fixes from Dave Chinner:
       "This update contains fixes for most of the outstanding regressions
        introduced with the 4.9-rc1 XFS merge. There is also a fix for an
        iomap bug, too.
      
        This is a quite a bit larger than I'd prefer for a -rc3, but most of
        the change comes from cleaning up the new reflink copy on write code;
        it's much simpler and easier to understand now. These changes fixed
        several bugs in the new code, and it wasn't clear that there was an
        easier/simpler way to fix them. The rest of the fixes are the usual
        size you'd expect at this stage.
      
        I've left the commits to soak in linux-next for a some extra time
        because of the size before asking you to pull, no new problems with
        them have been reported so I think it's all OK.
      
        Summary:
         - iomap page offset masking fix for page faults
         - add IOMAP_REPORT to distinguish between read and fiemap map
           requests
         - cleanups to new shared data extent code
         - fix mount active status on failed log recovery
         - fix broken dquots in a buffer calculation
         - fix locking order issues and merge xfs_reflink_remap_range and
           xfs_file_share_range
         - rework unmapping of CoW extents and remove now unused functions
         - clean state when CoW is done"
      
      * tag 'xfs-fixes-for-linus-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (25 commits)
        xfs: clear cowblocks tag when cow fork is emptied
        xfs: fix up inode cowblocks tracking tracepoints
        fs: Do to trim high file position bits in iomap_page_mkwrite_actor
        xfs: remove xfs_bunmapi_cow
        xfs: optimize xfs_reflink_end_cow
        xfs: optimize xfs_reflink_cancel_cow_blocks
        xfs: refactor xfs_bunmapi_cow
        xfs: optimize writes to reflink files
        xfs: don't bother looking at the refcount tree for reads
        xfs: handle "raw" delayed extents xfs_reflink_trim_around_shared
        xfs: add xfs_trim_extent
        iomap: add IOMAP_REPORT
        xfs: merge xfs_reflink_remap_range and xfs_file_share_range
        xfs: remove xfs_file_wait_for_io
        xfs: move inode locking from xfs_reflink_remap_range to xfs_file_share_range
        xfs: fix the same_inode check in xfs_file_share_range
        xfs: remove the same fs check from xfs_file_share_range
        libxfs: v3 inodes are only valid on crc-enabled filesystems
        libxfs: clean up _calc_dquots_per_chunk
        xfs: unset MS_ACTIVE if mount fails
        ...
      e890038e
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 18c2152d
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two small fixes: one is a fatal section mismatch (reference to init
        after it's discarded) and the other two are iscsi locking fixes"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: NCR5380: no longer mark irq probing as __init
        scsi: be2iscsi: Replace _bh with _irqsave/irqrestore
        scsi: libiscsi: Fix locking in __iscsi_conn_send_pdu
      18c2152d
    • Linus Torvalds's avatar
      Merge branch 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata · 4a3c390c
      Linus Torvalds authored
      Pull libata fixes from Tejun Heo:
       "The AHCI MSI handling change in rc1 was a bit broken and caused disk
        probing failures on some machines.  These three patches should fix the
        issues"
      
      David Howells comments:
       "My test machine fell foul of this using a PCIe M.2-attached SSD card.
        The patches fix it for me"
      
      * 'for-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
        ahci: fix the single MSI-X case in ahci_init_one
        ahci: fix nvec check
        ahci: only try to use multi-MSI mode if there is more than 1 port
      4a3c390c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 9c953d63
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A set of fixes for this series, most notably the fix for the blk-mq
        software queue regression in from this merge window.
      
        Apart from that, a fix for an unlikely hang if a queue is flooded with
        FUA requests from Ming, and a few small fixes for nbd and badblocks.
        Lastly, a rename update for the proc softirq output, since the block
        polling code was made generic"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: update hardware and software queues for sleeping alloc
        block: flush: fix IO hang in case of flood fua req
        nbd: fix incorrect unlock of nbd->sock_lock in sock_shutdown
        badblocks: badblocks_set/clear update unacked_exist
        softirq: Display IRQ_POLL for irq-poll statistics
      9c953d63
    • Linus Torvalds's avatar
      mm: remove per-zone hashtable of bitlock waitqueues · 9dcb8b68
      Linus Torvalds authored
      The per-zone waitqueues exist because of a scalability issue with the
      page waitqueues on some NUMA machines, but it turns out that they hurt
      normal loads, and now with the vmalloced stacks they also end up
      breaking gfs2 that uses a bit_wait on a stack object:
      
           wait_on_bit(&gh->gh_iflags, HIF_WAIT, TASK_UNINTERRUPTIBLE)
      
      where 'gh' can be a reference to the local variable 'mount_gh' on the
      stack of fill_super().
      
      The reason the per-zone hash table breaks for this case is that there is
      no "zone" for virtual allocations, and trying to look up the physical
      page to get at it will fail (with a BUG_ON()).
      
      It turns out that I actually complained to the mm people about the
      per-zone hash table for another reason just a month ago: the zone lookup
      also hurts the regular use of "unlock_page()" a lot, because the zone
      lookup ends up forcing several unnecessary cache misses and generates
      horrible code.
      
      As part of that earlier discussion, we had a much better solution for
      the NUMA scalability issue - by just making the page lock have a
      separate contention bit, the waitqueue doesn't even have to be looked at
      for the normal case.
      
      Peter Zijlstra already has a patch for that, but let's see if anybody
      even notices.  In the meantime, let's fix the actual gfs2 breakage by
      simplifying the bitlock waitqueues and removing the per-zone issue.
      Reported-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Tested-by: default avatarBob Peterson <rpeterso@redhat.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9dcb8b68
    • Jens Axboe's avatar
      blk-mq: update hardware and software queues for sleeping alloc · 7fe31130
      Jens Axboe authored
      If we end up sleeping due to running out of requests, we should
      update the hardware and software queues in the map ctx structure.
      Otherwise we could end up having rq->mq_ctx point to the pre-sleep
      context, and risk corrupting ctx->rq_list since we'll be
      grabbing the wrong lock when inserting the request.
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Reported-by: default avatarChris Mason <clm@fb.com>
      Tested-by: default avatarChris Mason <clm@fb.com>
      Fixes: 63581af3 ("blk-mq: remove non-blocking pass in blk_mq_map_request")
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      7fe31130
    • Artem Savkov's avatar
      security/keys: make BIG_KEYS dependent on stdrng. · 31e6ec45
      Artem Savkov authored
      Since BIG_KEYS can't be compiled as module it requires one of the "stdrng"
      providers to be compiled into kernel. Otherwise big_key_crypto_init() fails
      on crypto_alloc_rng step and next dereference of big_key_skcipher (e.g. in
      big_key_preparse()) results in a NULL pointer dereference.
      
      Fixes: 13100a72 ('Security: Keys: Big keys stored encrypted')
      Signed-off-by: default avatarArtem Savkov <asavkov@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Stephan Mueller <smueller@chronox.de>
      cc: Kirill Marinushkin <k.marinushkin@gmail.com>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      31e6ec45
    • David Howells's avatar
      KEYS: Sort out big_key initialisation · 7df3e59c
      David Howells authored
      big_key has two separate initialisation functions, one that registers the
      key type and one that registers the crypto.  If the key type fails to
      register, there's no problem if the crypto registers successfully because
      there's no way to reach the crypto except through the key type.
      
      However, if the key type registers successfully but the crypto does not,
      big_key_rng and big_key_blkcipher may end up set to NULL - but the code
      neither checks for this nor unregisters the big key key type.
      
      Furthermore, since the key type is registered before the crypto, it is
      theoretically possible for the kernel to try adding a big_key before the
      crypto is set up, leading to the same effect.
      
      Fix this by merging big_key_crypto_init() and big_key_init() and calling
      the resulting function late.  If they're going to be encrypted, we
      shouldn't be creating big_keys before we have the facilities to do the
      encryption available.  The key type registration is also moved after the
      crypto initialisation.
      
      The fix also includes message printing on failure.
      
      If the big_key type isn't correctly set up, simply doing:
      
      	dd if=/dev/zero bs=4096 count=1 | keyctl padd big_key a @s
      
      ought to cause an oops.
      
      Fixes: 13100a72 ('Security: Keys: Big keys stored encrypted')
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Peter Hlavaty <zer0mem@yahoo.com>
      cc: Kirill Marinushkin <k.marinushkin@gmail.com>
      cc: Artem Savkov <asavkov@redhat.com>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      7df3e59c
    • David Howells's avatar
      KEYS: Fix short sprintf buffer in /proc/keys show function · 03dab869
      David Howells authored
      This fixes CVE-2016-7042.
      
      Fix a short sprintf buffer in proc_keys_show().  If the gcc stack protector
      is turned on, this can cause a panic due to stack corruption.
      
      The problem is that xbuf[] is not big enough to hold a 64-bit timeout
      rendered as weeks:
      
      	(gdb) p 0xffffffffffffffffULL/(60*60*24*7)
      	$2 = 30500568904943
      
      That's 14 chars plus NUL, not 11 chars plus NUL.
      
      Expand the buffer to 16 chars.
      
      I think the unpatched code apparently works if the stack-protector is not
      enabled because on a 32-bit machine the buffer won't be overflowed and on a
      64-bit machine there's a 64-bit aligned pointer at one side and an int that
      isn't checked again on the other side.
      
      The panic incurred looks something like:
      
      Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81352ebe
      CPU: 0 PID: 1692 Comm: reproducer Not tainted 4.7.2-201.fc24.x86_64 #1
      Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
       0000000000000086 00000000fbbd2679 ffff8800a044bc00 ffffffff813d941f
       ffffffff81a28d58 ffff8800a044bc98 ffff8800a044bc88 ffffffff811b2cb6
       ffff880000000010 ffff8800a044bc98 ffff8800a044bc30 00000000fbbd2679
      Call Trace:
       [<ffffffff813d941f>] dump_stack+0x63/0x84
       [<ffffffff811b2cb6>] panic+0xde/0x22a
       [<ffffffff81352ebe>] ? proc_keys_show+0x3ce/0x3d0
       [<ffffffff8109f7f9>] __stack_chk_fail+0x19/0x30
       [<ffffffff81352ebe>] proc_keys_show+0x3ce/0x3d0
       [<ffffffff81350410>] ? key_validate+0x50/0x50
       [<ffffffff8134db30>] ? key_default_cmp+0x20/0x20
       [<ffffffff8126b31c>] seq_read+0x2cc/0x390
       [<ffffffff812b6b12>] proc_reg_read+0x42/0x70
       [<ffffffff81244fc7>] __vfs_read+0x37/0x150
       [<ffffffff81357020>] ? security_file_permission+0xa0/0xc0
       [<ffffffff81246156>] vfs_read+0x96/0x130
       [<ffffffff81247635>] SyS_read+0x55/0xc0
       [<ffffffff817eb872>] entry_SYSCALL_64_fastpath+0x1a/0xa4
      Reported-by: default avatarOndrej Kozina <okozina@redhat.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarOndrej Kozina <okozina@redhat.com>
      cc: stable@vger.kernel.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      03dab869
  3. 26 Oct, 2016 1 commit
  4. 25 Oct, 2016 1 commit