1. 08 Nov, 2017 3 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes-v4.14-rc8' of... · d6a2cf07
      Linus Torvalds authored
      Merge branch 'fixes-v4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      Pull key handling fix from James Morris:
       "Fix by Eric Biggers for the keys subsystem"
      * 'fixes-v4.14-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2]
    • John Johansen's avatar
      apparmor: fix off-by-one comparison on MAXMAPPED_SIG · f7dc4c9a
      John Johansen authored
      This came in yesterday, and I have verified our regression tests
      were missing this and it can cause an oops. Please apply.
      There is a an off-by-one comparision on sig against MAXMAPPED_SIG
      that can lead to a read outside the sig_map array if sig
      is MAXMAPPED_SIG. Fix this.
      Verified that the check is an out of bounds case that can cause an oops.
      Revised: add comparison fix to second case
      Fixes: cd1dbf76
       ("apparmor: add the ability to mediate signals")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Eric Biggers's avatar
      KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] · 624f5ab8
      Eric Biggers authored
      syzkaller reported a NULL pointer dereference in asn1_ber_decoder().  It
      can be reproduced by the following command, assuming
              keyctl add pkcs7_test desc '' @s
      The bug is that if the data buffer is empty, an integer underflow occurs
      in the following check:
              if (unlikely(dp >= datalen - 1))
                      goto data_overrun_error;
      This results in the NULL data pointer being dereferenced.
      Fix it by checking for 'datalen - dp < 2' instead.
      Also fix the similar check for 'dp >= datalen - n' later in the same
      function.  That one possibly could result in a buffer overread.
      The NULL pointer dereference was reproducible using the "pkcs7_test" key
      type but not the "asymmetric" key type because the "asymmetric" key type
      checks for a 0-length payload before calling into the ASN.1 decoder but
      the "pkcs7_test" key type does not.
      The bug report was:
          BUG: unable to handle kernel NULL pointer dereference at           (null)
          IP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233
          PGD 7b708067 P4D 7b708067 PUD 7b6ee067 PMD 0
          Oops: 0000 [#1] SMP
          Modules linked in:
          CPU: 0 PID: 522 Comm: syz-executor1 Not tainted 4.14.0-rc8 #7
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.3-20171021_125229-anatol 04/01/2014
          task: ffff9b6b3798c040 task.stack: ffff9b6b37970000
          RIP: 0010:asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233
          RSP: 0018:ffff9b6b37973c78 EFLAGS: 00010216
          RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000021c
          RDX: ffffffff814a04ed RSI: ffffb1524066e000 RDI: ffffffff910759e0
          RBP: ffff9b6b37973d60 R08: 0000000000000001 R09: ffff9b6b3caa4180
          R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002
          R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
          FS:  00007f10ed1f2700(0000) GS:ffff9b6b3ea00000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          CR2: 0000000000000000 CR3: 000000007b6f3000 CR4: 00000000000006f0
          Call Trace:
           pkcs7_parse_message+0xee/0x240 crypto/asymmetric_keys/pkcs7_parser.c:139
           verify_pkcs7_signature+0x33/0x180 certs/system_keyring.c:216
           pkcs7_preparse+0x41/0x70 crypto/asymmetric_keys/pkcs7_key_type.c:63
           key_create_or_update+0x180/0x530 security/keys/key.c:855
           SYSC_add_key security/keys/keyctl.c:122 [inline]
           SyS_add_key+0xbf/0x250 security/keys/keyctl.c:62
          RIP: 0033:0x4585c9
          RSP: 002b:00007f10ed1f1bd8 EFLAGS: 00000216 ORIG_RAX: 00000000000000f8
          RAX: ffffffffffffffda RBX: 00007f10ed1f2700 RCX: 00000000004585c9
          RDX: 0000000020000000 RSI: 0000000020008ffb RDI: 0000000020008000
          RBP: 0000000000000000 R08: ffffffffffffffff R09: 0000000000000000
          R10: 0000000000000000 R11: 0000000000000216 R12: 00007fff1b2260ae
          R13: 00007fff1b2260af R14: 00007f10ed1f2700 R15: 0000000000000000
          Code: dd ca ff 48 8b 45 88 48 83 e8 01 4c 39 f0 0f 86 a8 07 00 00 e8 53 dd ca ff 49 8d 46 01 48 89 85 58 ff ff ff 48 8b 85 60 ff ff ff <42> 0f b6 0c 30 89 c8 88 8d 75 ff ff ff 83 e0 1f 89 8d 28 ff ff
          RIP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233 RSP: ffff9b6b37973c78
          CR2: 0000000000000000
      Fixes: 42d5ec27
       ("X.509: Add an ASN.1 decoder")
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Cc: <stable@vger.kernel.org> # v3.7+
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
  2. 07 Nov, 2017 2 commits
    • Borislav Petkov's avatar
      drivers/ide-cd: Handle missing driver data during status check gracefully · fbc3edf7
      Borislav Petkov authored
      The 0day bot reports the below failure which happens occasionally, with
      their randconfig testing (once every ~100 boots).  The Code points at
      the private pointer ->driver_data being NULL, which hints at a race of
      sorts where the private driver_data descriptor has disappeared by the
      time we get to run the workqueue.
      So let's check that pointer before we continue with issuing the command
      to the drive.
      This fix is of the brown paper bag nature but considering that IDE is
      long deprecated, let's do that so that random testing which happens to
      enable CONFIG_IDE during randconfig builds, doesn't fail because of
      Besides, failing the TEST_UNIT_READY command because the drive private
      data is gone is something which we could simply do anyway, to denote
      that there was a problem communicating with the device.
        BUG: unable to handle kernel NULL pointer dereference at 000001c0
        IP: cdrom_check_status
        *pde = 00000000
        Oops: 0000 [#1] SMP
        CPU: 1 PID: 155 Comm: kworker/1:2 Not tainted 4.14.0-rc8 #127
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
        Workqueue: events_freezable_power_ disk_events_workfn
        task: 4fe90980 task.stack: 507ac000
        EIP: cdrom_check_status+0x2c/0x90
        EFLAGS: 00210246 CPU: 1
        EAX: 00000000 EBX: 4fefec00 ECX: 00000000 EDX: 00000000
        ESI: 00000003 EDI: ffffffff EBP: 467a9340 ESP: 507aded0
         DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
        CR0: 80050033 CR2: 000001c0 CR3: 06e0f000 CR4: 00000690
        Call Trace:
         ? ide_cdrom_check_events_real
         ? cdrom_check_events
         ? disk_check_events
         ? process_one_work
         ? process_one_work
         ? worker_thread
         ? kthread
         ? process_one_work
         ? __kthread_create_on_node
         ? ret_from_fork
        Code: 53 83 ec 14 89 c3 89 d1 be 03 00 00 00 65 a1 14 00 00 00 89 44 24 10 31 c0 8b 43 18 c7 44 24 04 00 00 00 00 c7 04 24 00 00 00 00 <8a> 80 c0 01 00 00 c7 44 24 08 00 00 00 00 83 e0 03 c7 44 24 0c
        EIP: cdrom_check_status+0x2c/0x90 SS:ESP: 0068:507aded0
        CR2: 00000000000001c0
        ---[ end trace 2410e586dd8f88b2 ]---
      Reported-and-tested-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Bart Van Assche <bart.vanassche@sandisk.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    • Linus Torvalds's avatar
      Revert "scsi: make 'state' device attribute pollable" · a817e73f
      Linus Torvalds authored
      This reverts commit 8a97712e
      This commit added a call to sysfs_notify() from within
      scsi_device_set_state(), which in turn turns out to make libata very
      unhappy, because ata_eh_detach_dev() does
              spin_lock_irqsave(ap->lock, flags);
              if (ata_scsi_offline_dev(dev)) {
                      dev->flags |= ATA_DFLAG_DETACHED;
                      ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
      and ata_scsi_offline_dev() then does that scsi_device_set_state() to set
      it offline.
      So now we called sysfs_notify() from within a spinlocked region, which
      really doesn't work.  The 0day robot reported this as:
         BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238
      because sysfs_notify() ends up calling kernfs_find_and_get_ns() which
      then does mutex_lock(&kernfs_mutex)..
      The pollability of the device state isn't critical, so revert this all
      for now, and maybe we'll do it differently in the future.
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Acked-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  3. 06 Nov, 2017 3 commits
  4. 05 Nov, 2017 8 commits
  5. 04 Nov, 2017 12 commits
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm · 2d634994
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       - omit EFI memory map sorting, which was recently introduced, but
         caused problems with the decompressor due to additional sections
         being emitted.
       - avoid unaligned load fault-generating instructions in the
         decompressor by switching to a private unaligned implementation.
       - add a symbol into the decompressor to further debug non-boot
         situations (ld's documentation is extremely poor for how "." works,
         ld doesn't seem to follow its own documentation!)
       - parse endian information to sparse
      * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: add debug ".edata_real" symbol
        ARM: 8716/1: pass endianness info to sparse
        efi/libstub: arm: omit sorting of the UEFI memory map
        ARM: 8715/1: add a private asm/unaligned.h
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · f0a32ee4
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "Fixes for interrupt controller emulation in ARM/ARM64 and x86, plus a
        one-liner x86 KVM guest fix"
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Update APICv on APIC reset
        KVM: VMX: Do not fully reset PI descriptor on vCPU reset
        kvm: Return -ENODEV from update_persistent_clock
        KVM: arm/arm64: vgic-its: Check GITS_BASER Valid bit before saving tables
        KVM: arm/arm64: vgic-its: Check CBASER/BASER validity before enabling the ITS
        KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table returned value
        KVM: arm/arm64: vgic-its: Fix return value for device table restore
        arm/arm64: kvm: Disable branch profiling in HYP code
        arm/arm64: kvm: Move initialization completion message
        arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort
        KVM: arm64: its: Fix missing dynamic allocation check in scan_its_table
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · b1878b85
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Only two patches came in over the last two weeks: Uniphier USB support
        needs additional clocks enabled (on both 32-bit and 64-bit ARM), and a
        Marvell MVEBU stability issue has been fixed"
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: dts: mvebu: pl310-cache disable double-linefill
        arm64: dts: uniphier: add STDMAC clock to EHCI nodes
        ARM: dts: uniphier: add STDMAC clock to EHCI nodes
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips · dab30d55
      Linus Torvalds authored
      Pull MIPS fixes from James Hogan:
       "A selection of important MIPS fixes for 4.14, and some MAINTAINERS /
        email address updates:
        Maintainership updates:
         - imgtec.com -> mips.com email addresses (this trivially updates
           comments in quite a few files, as well as MAINTAINERS)
         - Pistachio SoC maintainership update
         - NI 169445 build (new platform in 4.14)
         - EVA regression (4.14)
         - SMP-CPS build & preemption regressions (4.14)
         - SMP/hotplug deadlock & race (deadlock reintroduced 4.13)
         - ebpf_jit error return (4.13)
         - SMP-CMP build regressions (4.11 and 4.14)
         - bad UASM microMIPS encoding (3.16)
         - CM definitions (3.15)"
      [ I had taken the email address updates separately, because I didn't
        expect James to send a pull request, so those got applied twice.   - Linus]
      * tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips:
        MIPS: Update email address for Marcin Nowakowski
        MIPS: smp-cmp: Fix vpe_id build error
        MAINTAINERS: Update Pistachio platform maintainers
        MIPS: smp-cmp: Use right include for task_struct
        MIPS: Update Goldfish RTC driver maintainer email address
        MIPS: Update RINT emulation maintainer email address
        MIPS: CPS: Fix use of current_cpu_data in preemptible code
        MIPS: SMP: Fix deadlock & online race
        MIPS: bpf: Fix a typo in build_one_insn()
        MIPS: microMIPS: Fix incorrect mask in insn_table_MM
        MIPS: Fix CM region target definitions
        MIPS: generic: Fix compilation error from include asm/mips-cpc.h
        MIPS: Fix exception entry when CONFIG_EVA enabled
        MIPS: generic: Fix NI 169445 its build
        Update MIPS email addresses
    • Josh Poimboeuf's avatar
      objtool: Prevent GCC from merging annotate_unreachable(), take 2 · ec1e1b61
      Josh Poimboeuf authored
      This fixes the following warning with GCC 4.6:
        mm/migrate.o: warning: objtool: migrate_misplaced_transhuge_page()+0x71: unreachable instruction
      The problem is that the compiler merged identical annotate_unreachable()
      inline asm blocks, resulting in a missing 'unreachable' annotation.
      This problem happened before, and was partially fixed with:
       ("objtool: Prevent GCC from merging annotate_unreachable()")
      That commit tried to ensure that each instance of the
      annotate_unreachable() inline asm statement has a unique label.  It used
      the __LINE__ macro to generate the label number.  However, even the line
      number isn't necessarily unique when used in an inline function with
      multiple callers (in this case, __alloc_pages_node()'s use of
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: kbuild-all@01.org
      Cc: tipbuild@zytor.com
      Fixes: 3d1e2360 ("objtool: Prevent GCC from merging annotate_unreachable()")
      Link: http://lkml.kernel.org/r/20171103221941.cajpwszir7ujxyc4@treble
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    • Andy Lutomirski's avatar
      Revert "x86/mm: Stop calling leave_mm() in idle code" · 67535736
      Andy Lutomirski authored
      This reverts commit 43858b4f.
      The reason I removed the leave_mm() calls in question is because the
      heuristic wasn't needed after that patch.  With the original version
      of my PCID series, we never flushed a "lazy cpu" (i.e. a CPU running
      kernel thread) due a flush on the loaded mm.
      Unfortunately, that caused architectural issues, so now I've
      reinstated these flushes on non-PCID systems in:
          commit b956575b
       ("x86/mm: Flush more aggressively in lazy TLB mode").
      That, in turn, gives us a power management and occasionally
      performance regression as compared to old kernels: a process that
      goes into a deep idle state on a given CPU and gets its mm flushed
      due to activity on a different CPU will wake the idle CPU.
      Reinstate the old ugly heuristic: if a CPU goes into ACPI C3 or an
      intel_idle state that is likely to cause a TLB flush gets its mm
      switched to init_mm before going idle.
      FWIW, this heuristic is lousy.  Whether we should change CR3 before
      idle isn't a good hint except insofar as the performance hit is a bit
      lower if the TLB is getting flushed by the idle code anyway.  What we
      really want to know is whether we anticipate being idle long enough
      that the mm is likely to be flushed before we wake up.  This is more a
      matter of the expected latency than the idle state that gets chosen.
      This heuristic also completely fails on systems that don't know
      whether the TLB will be flushed (e.g. AMD systems?).  OTOH it may be a
      bit obsolete anyway -- PCID systems don't presently benefit from this
      heuristic at all.
      We also shouldn't do this callback from innermost bit of the idle code
      due to the RCU nastiness it causes.  All the information need is
      available before rcu_idle_enter() needs to happen.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Borislav Petkov <bpetkov@suse.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: 43858b4f "x86/mm: Stop calling leave_mm() in idle code"
      Link: http://lkml.kernel.org/r/c513bbd4e653747213e05bc7062de000bf0202a5.1509793738.git.luto@kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    • Frank Rowand's avatar
    • Willy Tarreau's avatar
    • Ingo Molnar's avatar
      tools/headers: Synchronize kernel ABI headers · fb7df12d
      Ingo Molnar authored
      After the SPDX license tags were added a number of tooling headers got out of
      sync with their kernel variants, generating lots of build warnings.
      Sync them:
       - tools/arch/x86/include/asm/disabled-features.h,
           Remove the SPDX tag where the kernel version does not have it.
       - tools/include/asm-generic/bitops/__fls.h,
           Add the SPDX tag of the respective kernel header.
       - tools/include/uapi/linux/bpf_common.h,
           Change the tag to the kernel header version:
             -/* SPDX-License-Identifier: GPL-2.0 */
             +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
      Also sync other header details:
       - include/uapi/sound/asound.h:
           Fix pointless end of line whitespace noise the header grew in this cycle.
       - tools/arch/x86/lib/memcpy_64.S:
           Sync the code and add tools/include/asm/export.h with dummy wrappers
           to support building the kernel side code in a tooling header environment.
       - tools/include/uapi/asm-generic/mman.h,
           Sync other details that don't impact tooling's use of the ABIs.
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    • Josh Poimboeuf's avatar
      objtool: Resync objtool's instruction decoder source code copy with the kernel's latest version · da0db32b
      Josh Poimboeuf authored
      This fixes the following warning:
        warning: objtool: x86 instruction decoder differs from kernel
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/013315a808ccf5580abc293808827c8e2b5e1354.1509719152.git.jpoimboe@redhat.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    • Ingo Molnar's avatar
      Merge branch 'linus' into core/urgent, to pick up dependent commits · 649e441f
      Ingo Molnar authored
      We want to fix an objtool build warning that got introduced in the latest upstream kernel.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e50f82f8
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
       "Just a couple of fixups to the sparse-keymap module and the Microchip
        AR1021 touchscreen driver"
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: sparse-keymap - send sync event for KE_SW/KE_VSW
        Input: ar1021_i2c - set INPUT_PROP_DIRECT
  6. 03 Nov, 2017 12 commits
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d4c2e9fc
      Linus Torvalds authored
      Pull clk fix from Stephen Boyd:
       "One fix for USB clks on Uniphier PXs3 SoCs"
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: uniphier: fix clock data for PXs3
    • Stefan Brüns's avatar
      Input: sparse-keymap - send sync event for KE_SW/KE_VSW · 6f29c244
      Stefan Brüns authored
      Sync events are sent by sparse_keymap_report_entry for normal KEY_*
      events, and are generated by several drivers after generating
      SW_* events, so sparse_keymap_report_entry should do the same.
      Without the sync, events are accumulated in the kernel.
      Currently, no driver uses sparse-keymap for SW_* events, but
      it is required for the intel-vbtn platform driver to generate
      SW_TABLET_MODE events.
      Signed-off-by: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    • Martin Kepplinger's avatar
      Input: ar1021_i2c - set INPUT_PROP_DIRECT · 53f0b7f0
      Martin Kepplinger authored
      If INPUT_PROP_DIRECT is set, userspace doesn't have to fall back to old
      ways of identifying touchscreen devices. Let's add it.
      Signed-off-by: default avatarMartin Kepplinger <martink@posteo.de>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 81ca2cae
      Linus Torvalds authored
      Pull arch/tile fixes from Chris Metcalf:
       "Two one-line bug fixes"
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: Implement ->set_state_oneshot_stopped()
        tile: pass machine size to sparse
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 01073ac1
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "One minor fix in the error leg of the qla2xxx driver (it oopses the
        system if we get an error trying to start the internal kernel thread).
        The fix is minor because the problem isn't often encountered in the
        field (although it can be induced by inserting the module in a low
        memory environment)"
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qla2xxx: Fix oops in qla2x00_probe_one error path
    • Chris Metcalf's avatar
      arch/tile: Implement ->set_state_oneshot_stopped() · 777a45b4
      Chris Metcalf authored
      set_state_oneshot_stopped() is called by the clkevt core, when the
      next event is required at an expiry time of 'KTIME_MAX'. This normally
      happens with NO_HZ_{IDLE|FULL} in both LOWRES/HIGHRES modes.
      This patch makes the clockevent device to stop on such an event, to
      avoid spurious interrupts, as explained by: commit 8fff52fd
      ("clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state").
      Signed-off-by: default avatarChris Metcalf <cmetcalf@mellanox.com>
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 866ba84e
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Some more powerpc fixes for 4.14.
        This is bigger than I like to send at rc7, but that's at least partly
        because I didn't send any fixes last week. If it wasn't for the IMC
        driver, which is new and getting heavy testing, the diffstat would
        look a bit better. I've also added ftrace on big endian to my test
        suite, so we shouldn't break that again in future.
         - A fix to the handling of misaligned paste instructions (P9 only),
           where a change to a #define has caused the check for the
           instruction to always fail.
         - The preempt handling was unbalanced in the radix THP flush (P9
           only). Though we don't generally use preempt we want to keep it
           working as much as possible.
         - Two fixes for IMC (P9 only), one when booting with restricted
           number of CPUs and one in the error handling when initialisation
           fails due to firmware etc.
         - A revert to fix function_graph on big endian machines, and then a
           rework of the reverted patch to fix kprobes blacklist handling on
           big endian machines.
        Thanks to: Anju T Sudhakar, Guilherme G. Piccoli, Madhavan Srinivasan,
        Naveen N. Rao, Nicholas Piggin, Paul Mackerras"
      * tag 'powerpc-4.14-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/perf: Fix core-imc hotplug callback failure during imc initialization
        powerpc/kprobes: Dereference function pointers only if the address does not belong to kernel text
        Revert "powerpc64/elfv1: Only dereference function descriptor for non-text symbols"
        powerpc/64s/radix: Fix preempt imbalance in TLB flush
        powerpc: Fix check for copy/paste instructions in alignment handler
        powerpc/perf: Fix IMC allocation routine
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.14-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 3f46540e
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Fix dw_mmc request timeout issues"
      * tag 'mmc-v4.14-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: dw_mmc: Fix the DTO timeout calculation
        mmc: dw_mmc: Add locking to the CTO timer
        mmc: dw_mmc: Fix the CTO timeout calculation
        mmc: dw_mmc: cancel the CTO timer after a voltage switch
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.14-rc8' of git://people.freedesktop.org/~airlied/linux · e65a139d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       - one nouveau regression fix
       - some amdgpu fixes for stable to fix hangs on some harvested Polaris
       - a set of KASAN and regression fixes for i915, their CI system seems
         to be working pretty well now.
      * tag 'drm-fixes-for-v4.14-rc8' of git://people.freedesktop.org/~airlied/linux:
        drm/amdgpu: allow harvesting check for Polaris VCE
        drm/amdgpu: return -ENOENT from uvd 6.0 early init for harvesting
        drm/i915: Check incoming alignment for unfenced buffers (on i915gm)
        drm/nouveau/kms/nv50: use the correct state for base channel notifier setup
        drm/i915: Hold rcu_read_lock when iterating over the radixtree (vma idr)
        drm/i915: Hold rcu_read_lock when iterating over the radixtree (objects)
        drm/i915/edp: read edp display control registers unconditionally
        drm/i915: Do not rely on wm preservation for ILK watermarks
        drm/i915: Cancel the modeset retry work during modeset cleanup
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7ba3ebff
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Hopefully this is the last batch of networking fixes for 4.14
        Fingers crossed...
         1) Fix stmmac to use the proper sized OF property read, from Bhadram
         2) Fix use after free in net scheduler tc action code, from Cong
         3) Fix SKB control block mangling in tcp_make_synack().
         4) Use proper locking in fib_dump_info(), from Florian Westphal.
         5) Fix IPG encodings in systemport driver, from Florian Fainelli.
         6) Fix division by zero in NV TCP congestion control module, from
            Konstantin Khlebnikov.
         7) Fix use after free in nf_reject_ipv4, from Tejaswi Tanikella"
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: systemport: Correct IPG length settings
        tcp: do not mangle skb->cb[] in tcp_make_synack()
        fib: fib_dump_info can no longer use __in_dev_get_rtnl
        stmmac: use of_property_read_u32 instead of read_u8
        net_sched: hold netns refcnt for each action
        net_sched: acquire RTNL in tc_action_net_exit()
        net: vrf: correct FRA_L3MDEV encode type
        tcp_nv: fix division by zero in tcpnv_acked()
        netfilter: nf_reject_ipv4: Fix use-after-free in send_reset
        netfilter: nft_set_hash: disable fast_ops for 2-len keys
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · f0395d5b
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "7 fixes"
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm, swap: fix race between swap count continuation operations
        mm/huge_memory.c: deposit page table when copying a PMD migration entry
        initramfs: fix initramfs rebuilds w/ compression after disabling
        fs/hugetlbfs/inode.c: fix hwpoison reserve accounting
        ocfs2: fstrim: Fix start offset of first cluster group during fstrim
        mm, /proc/pid/pagemap: fix soft dirty marking for PMD migration entry
        userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size
    • Paul Burton's avatar
      Update MIPS email addresses · fb615d61
      Paul Burton authored
      MIPS will soon not be a part of Imagination Technologies, and as such
      many @imgtec.com email addresses will no longer be valid. This patch
      updates the addresses for those who:
       - Have 10 or more patches in mainline authored using an @imgtec.com
         email address, or any patches dated within the past year.
       - Are still with Imagination but leaving as part of the MIPS business
         unit, as determined from an internal email address list.
       - Haven't already updated their email address (ie. JamesH) or expressed
         a desire to be excluded (ie. Maciej).
       - Acked v2 or earlier of this patch, which leaves Deng-Cheng, Matt &
      New addresses are of the form firstname.lastname@mips.com, and all
      verified against an internal email address list.  An entry is added to
      .mailmap for each person such that get_maintainer.pl will report the new
      addresses rather than @imgtec.com addresses which will soon be dead.
      Instances of the affected addresses throughout the tree are then
      mechanically replaced with the new @mips.com address.
      Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
      Cc: Deng-Cheng Zhu <dengcheng.zhu@mips.com>
      Acked-by: default avatarDengcheng Zhu <dengcheng.zhu@mips.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Matt Redfearn <matt.redfearn@mips.com>
      Acked-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: trivial@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>