1. 09 3月, 2018 5 次提交
    • J
      x86/efi: Replace GFP_ATOMIC with GFP_KERNEL in efi_query_variable_store() · 9f66d8d7
      Jia-Ju Bai 提交于
      efi_query_variable_store() does an atomic kzalloc() unnecessarily,
      because we can never get this far when called in an atomic context,
      namely when nonblocking == 1.
      
      Replace it with GFP_KERNEL.
      
      This was found by the DCNS static analysis tool written by myself.
      Signed-off-by: NJia-Ju Bai <baijiaju1990@gmail.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180308080020.22828-7-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9f66d8d7
    • A
      efi/arm64: Check whether x18 is preserved by runtime services calls · 7e611e7d
      Ard Biesheuvel 提交于
      Whether or not we will ever decide to start using x18 as a platform
      register in Linux is uncertain, but by that time, we will need to
      ensure that UEFI runtime services calls don't corrupt it.
      
      So let's start issuing warnings now for this, and increase the
      likelihood that these firmware images have all been replaced by that time.
      
      This has been fixed on the EDK2 side in commit:
      
        6d73863b5464 ("BaseTools/tools_def AARCH64: mark register x18 as reserved")
      
      dated July 13, 2017.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180308080020.22828-6-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      7e611e7d
    • A
      efi/arm*: Stop printing addresses of virtual mappings · 1832e641
      Ard Biesheuvel 提交于
      With the recent %p -> %px changes, we now get something like this in
      the kernel boot log on ARM/arm64 EFI systems:
      
           Remapping and enabling EFI services.
             EFI remap 0x00000087fb830000 =>         (ptrval)
             EFI remap 0x00000087fbdb0000 =>         (ptrval)
             EFI remap 0x00000087fffc0000 =>         (ptrval)
      
      The physical addresses of the UEFI runtime regions will also be
      printed when booting with the efi=debug command line option, and the
      virtual addresses can be inspected via /sys/kernel/debug/efi_page_tables
      (if enabled).
      
      So let's just remove the lines above.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NLeif Lindholm <leif.lindholm@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180308080020.22828-4-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      1832e641
    • A
      efi/apple-properties: Remove redundant attribute initialization from unmarshal_key_value_pairs() · 6e98503d
      Andy Shevchenko 提交于
      There is no need to artificially supply a property length and fake data
      if property has type of boolean.
      
      Remove redundant piece of data and code.
      Reviewed-and-tested-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180308080020.22828-3-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6e98503d
    • M
      efi/arm*: Only register page tables when they exist · 6b31a2fa
      Mark Rutland 提交于
      Currently the arm/arm64 runtime code registers the runtime servies
      pagetables with ptdump regardless of whether runtime services page
      tables have been created.
      
      As efi_mm.pgd is NULL in these cases, attempting to dump the efi page
      tables results in a NULL pointer dereference in the ptdump code:
      
      /sys/kernel/debug# cat efi_page_tables
      [  479.522600] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [  479.522715] Mem abort info:
      [  479.522764]   ESR = 0x96000006
      [  479.522850]   Exception class = DABT (current EL), IL = 32 bits
      [  479.522899]   SET = 0, FnV = 0
      [  479.522937]   EA = 0, S1PTW = 0
      [  479.528200] Data abort info:
      [  479.528230]   ISV = 0, ISS = 0x00000006
      [  479.528317]   CM = 0, WnR = 0
      [  479.528317] user pgtable: 4k pages, 48-bit VAs, pgd = 0000000064ab0cb0
      [  479.528449] [0000000000000000] *pgd=00000000fbbe4003, *pud=00000000fb66e003, *pmd=0000000000000000
      [  479.528600] Internal error: Oops: 96000006 [#1] PREEMPT SMP
      [  479.528664] Modules linked in:
      [  479.528699] CPU: 0 PID: 2457 Comm: cat Not tainted 4.15.0-rc3-00065-g2ad2ee7ecb5c-dirty #7
      [  479.528799] Hardware name: FVP Base (DT)
      [  479.528899] pstate: 00400009 (nzcv daif +PAN -UAO)
      [  479.528941] pc : walk_pgd.isra.1+0x20/0x1d0
      [  479.529011] lr : ptdump_walk_pgd+0x30/0x50
      [  479.529105] sp : ffff00000bf4bc20
      [  479.529185] x29: ffff00000bf4bc20 x28: 0000ffff9d22e000
      [  479.529271] x27: 0000000000020000 x26: ffff80007b4c63c0
      [  479.529358] x25: 00000000014000c0 x24: ffff80007c098900
      [  479.529445] x23: ffff00000bf4beb8 x22: 0000000000000000
      [  479.529532] x21: ffff00000bf4bd70 x20: 0000000000000001
      [  479.529618] x19: ffff00000bf4bcb0 x18: 0000000000000000
      [  479.529760] x17: 000000000041a1c8 x16: ffff0000082139d8
      [  479.529800] x15: 0000ffff9d3c6030 x14: 0000ffff9d2527f4
      [  479.529924] x13: 00000000000003f3 x12: 0000000000000038
      [  479.530000] x11: 0000000000000003 x10: 0101010101010101
      [  479.530099] x9 : 0000000017e94050 x8 : 000000000000003f
      [  479.530226] x7 : 0000000000000000 x6 : 0000000000000000
      [  479.530313] x5 : 0000000000000001 x4 : 0000000000000000
      [  479.530416] x3 : ffff000009069fd8 x2 : 0000000000000000
      [  479.530500] x1 : 0000000000000000 x0 : 0000000000000000
      [  479.530599] Process cat (pid: 2457, stack limit = 0x000000005d1b0e6f)
      [  479.530660] Call trace:
      [  479.530746]  walk_pgd.isra.1+0x20/0x1d0
      [  479.530833]  ptdump_walk_pgd+0x30/0x50
      [  479.530907]  ptdump_show+0x10/0x20
      [  479.530920]  seq_read+0xc8/0x470
      [  479.531023]  full_proxy_read+0x60/0x90
      [  479.531100]  __vfs_read+0x18/0x100
      [  479.531180]  vfs_read+0x88/0x160
      [  479.531267]  SyS_read+0x48/0xb0
      [  479.531299]  el0_svc_naked+0x20/0x24
      [  479.531400] Code: 91400420 f90033a0 a90707a2 f9403fa0 (f9400000)
      [  479.531499] ---[ end trace bfe8e28d8acb2b67 ]---
      Segmentation fault
      
      Let's avoid this problem by only registering the tables after their
      successful creation, which is also less confusing when EFI runtime
      services are not in use.
      Reported-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-efi@vger.kernel.org
      Link: http://lkml.kernel.org/r/20180308080020.22828-2-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6b31a2fa
  2. 08 3月, 2018 8 次提交
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 1b88accf
      Linus Torvalds 提交于
      Pull virtio bugfix from Michael Tsirkin:
       "A bugfix for error handling in virtio"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_ring: fix num_free handling in error case
      1b88accf
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 851710a8
      Linus Torvalds 提交于
      Pull input fixes from Dmitry Torokhov:
      
       - we are reverting patch that was switched touchpad on Lenovo T460P
         over to native RMI because on these boxes BIOS messes up with SMBus
         controller state. We might re-enable it later once SMBus issue is
         resolved
      
       - disabling interrupts in matrix_keypad driver was racy
      
       - mms114 now has SPDX header and matching MODULE_LICENSE
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: synaptics - Lenovo Thinkpad T460p devices should use RMI"
        Input: matrix_keypad - fix race when disabling interrupts
        Input: mms114 - add SPDX identifier
        Input: mms114 - fix license module information
      851710a8
    • A
      Revert "Input: synaptics - Lenovo Thinkpad T460p devices should use RMI" · 5444a992
      Arkadiusz Hiler 提交于
      This reverts commit 48282969 which
      caused the following issues:
      
      1. On T460p with BIOS version 2.22 touchpad and trackpoint stop working
      after suspend-resume cycle. Due to strange state of the device another
      suspend is impossible.
      
      The following dmesg errors can be observed:
      thinkpad_acpi: EC reports that Thermal Table has changed
      rmi4_smbus 7-002c: failed to get SMBus version number!
      rmi4_physical rmi4-00: rmi_driver_reset_handler: Failed to read current IRQ mask.
      rmi4_f01 rmi4-00.fn01: Failed to restore normal operation: -16.
      rmi4_f01 rmi4-00.fn01: Resume failed with code -16.
      rmi4_physical rmi4-00: Failed to suspend functions: -16
      rmi4_smbus 7-002c: Failed to resume device: -16
      PM: resume devices took 0.640 seconds
      rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Failed to write to F03 TX register (-16).
      rmi4_physical rmi4-00: rmi_driver_clear_irq_bits: Failed to change enabled interrupts!
      rmi4_physical rmi4-00: rmi_driver_set_irq_bits: Failed to change enabled interrupts!
      psmouse: probe of serio3 failed with error -1
      
      2. On another T460p with BIOS version 2.15 two finger scrolling gesture
      on the touchpad stops working after suspend-resume cycle (about 75%
      reproducibility, when it still works, the scrolling gesture becomes
      laggy). Nothing suspicious appears in the dmesg.
      
      Analysis form Richard Schütz:
      
      "RMI is unreliable on the ThinkPad T460p because the device is affected
      by the firmware behavior addressed in a7ae8195 ("i2c: i801: Allow
      ACPI SystemIO OpRegion to conflict with PCI BAR")."
      
      The affected devices often show:
      
      i801_smbus 0000:00:1f.4: BIOS is accessing SMBus registers
      i801_smbus 0000:00:1f.4: Driver SMBus register access inhibited
      Reported-by: NRichard Schütz <rschuetz@uni-koblenz.de>
      Signed-off-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Tested-by: NMartin Peres <martin.peres@linux.intel.com>
      Tested-by: NArkadiusz Hiler <arkadiusz.hiler@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      5444a992
    • L
      Merge tag 'gfs2-4.16.rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · ea9b5ee3
      Linus Torvalds 提交于
      Pull gfs2 fix from Bob Peterson:
       "An additional patch from Andreas Gruenbacher that fixes another
        unfortunate GFS2 regression"
      
      * tag 'gfs2-4.16.rc4.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fixes to "Implement iomap for block_map" (2)
      ea9b5ee3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 69f39c57
      Linus Torvalds 提交于
      Pull s390 fixes from Martin Schwidefsky:
       "Nine bug fixes for s390:
      
         - Three fixes for the expoline code, one of them is strictly speaking
           a cleanup but as it relates to code added with 4.16 I would like to
           include the patch.
      
         - Three timer related fixes in the common I/O layer
      
         - A fix for the handling of internal DASD request which could cause
           panics.
      
         - One correction in regard to the accounting of pud page tables vs.
           compat tasks.
      
         - The register scrubbing in entry.S caused spurious crashes, this is
           fixed now as well"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/entry.S: fix spurious zeroing of r0
        s390: Fix runtime warning about negative pgtables_bytes
        s390: do not bypass BPENTER for interrupt system calls
        s390/cio: clear timer when terminating driver I/O
        s390/cio: fix return code after missing interrupt
        s390/cio: fix ccw_device_start_timeout API
        s390/clean-up: use CFI_* macros in entry.S
        s390: Replace IS_ENABLED(EXPOLINE_*) with IS_ENABLED(CONFIG_EXPOLINE_*)
        s390/dasd: fix handling of internal requests
      69f39c57
    • L
      Merge tag 'regulator-fix-v4.16-rc4' of... · b910a918
      Linus Torvalds 提交于
      Merge tag 'regulator-fix-v4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A couple of fixes here:
      
         - another half of the supend to idle fix from Geert that went in
           earlier, both he and I are confused as to why he didn't notice that
           this was missing when his earlier fix was merged.
      
         - a simple fix for a test done the wrong way round in the
           stm32-vrefbuf driver"
      
      * tag 'regulator-fix-v4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: Fix resume from suspend to idle
        regulator: stm32-vrefbuf: fix check on ready flag
      b910a918
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · be75b1b8
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "This is mostly fixes for driver specific issues (nine of them) and the
        storvsc performance improvement with interrupt handling which was
        dropped from the previous fixes pull request.
      
        We also have two regressions: one is a double call_rcu() in ATA error
        handling and the other is a missed conversion to BLK_STS_OK in
        __scsi_error_from_host_byte()"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: qedi: Fix kernel crash during port toggle
        scsi: qla2xxx: Fix FC-NVMe LUN discovery
        scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()
        scsi: core: Avoid that ATA error handling can trigger a kernel hang or oops
        scsi: qla2xxx: ensure async flags are reset correctly
        scsi: qla2xxx: do not check login_state if no loop id is assigned
        scsi: qla2xxx: Fixup locking for session deletion
        scsi: qla2xxx: Fix NULL pointer crash due to active timer for ABTS
        scsi: mpt3sas: wait for and flush running commands on shutdown/unload
        scsi: mpt3sas: fix oops in error handlers after shutdown/unload
        scsi: storvsc: Spread interrupts when picking a channel for I/O requests
        scsi: megaraid_sas: Do not use 32-bit atomic request descriptor for Ventura controllers
      be75b1b8
    • A
      gfs2: Fixes to "Implement iomap for block_map" (2) · 3b5da96e
      Andreas Gruenbacher 提交于
      It turns out that commit 3229c18c0d6b2 'Fixes to "Implement iomap for
      block_map"' introduced another bug in gfs2_iomap_begin that can cause
      gfs2_block_map to set bh->b_size of an actual buffer to 0.  This can
      lead to arbitrary incorrect behavior including crashes or disk
      corruption.  Revert the incorrect part of that commit.
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      3b5da96e
  3. 07 3月, 2018 2 次提交
  4. 06 3月, 2018 11 次提交
  5. 05 3月, 2018 14 次提交