Skip to content
  1. May 29, 2018
  2. May 24, 2018
  3. May 21, 2018
    • Sudip Mukherjee's avatar
      libata: blacklist Micron 500IT SSD with MU01 firmware · 136d769e
      Sudip Mukherjee authored
      While whitelisting Micron M500DC drives, the tweaked blacklist entry
      enabled queued TRIM from M500IT variants also. But these do not support
      queued TRIM. And while using those SSDs with the latest kernel we have
      seen errors and even the partition table getting corrupted.
      
      Some part from the dmesg:
      [    6.727384] ata1.00: ATA-9: Micron_M500IT_MTFDDAK060MBD, MU01, max UDMA/133
      [    6.727390] ata1.00: 117231408 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
      [    6.741026] ata1.00: supports DRM functions and may not be fully accessible
      [    6.759887] ata1.00: configured for UDMA/133
      [    6.762256] scsi 0:0:0:0: Direct-Access     ATA      Micron_M500IT_MT MU01 PQ: 0 ANSI: 5
      
      and then for the error:
      [  120.860334] ata1.00: exception Emask 0x1 SAct 0x7ffc0007 SErr 0x0 action 0x6 frozen
      [  120.860338] ata1.00: irq_stat 0x40000008
      [  120.860342] ata1.00: failed command: SEND FPDMA QUEUED
      [  120.860351] ata1.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 0 ncq dma 512 out
               res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x5 (timeout)
      [  120.860353] ata1.00: status: { DRDY }
      [  120.860543] ata1: hard resetting link
      [  121.166128] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
      [  121.166376] ata1.00: supports DRM functions and may not be fully accessible
      [  121.186238] ata1.00: supports DRM functions and may not be fully accessible
      [  121.204445] ata1.00: configured for UDMA/133
      [  121.204454] ata1.00: device reported invalid CHS sector 0
      [  121.204541] sd 0:0:0:0: [sda] tag#18 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
      [  121.204546] sd 0:0:0:0: [sda] tag#18 Sense Key : 0x5 [current]
      [  121.204550] sd 0:0:0:0: [sda] tag#18 ASC=0x21 ASCQ=0x4
      [  121.204555] sd 0:0:0:0: [sda] tag#18 CDB: opcode=0x93 93 08 00 00 00 00 00 04 28 80 00 00 00 30 00 00
      [  121.204559] print_req_error: I/O error, dev sda, sector 272512
      
      After few reboots with these errors, and the SSD is corrupted.
      After blacklisting it, the errors are not seen and the SSD does not get
      corrupted any more.
      
      Fixes: 243918be
      
       ("libata: Do not blacklist Micron M500DC")
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      136d769e
  4. May 14, 2018
    • François Cami's avatar
      libata: Apply NOLPM quirk for SAMSUNG PM830 CXM13D1Q. · 76936e9a
      François Cami authored
      
      
      Without this patch the drive errors out regularly:
      
      [    1.090154] ata1.00: ATA-8: SAMSUNG SSD PM830 mSATA 256GB,
      CXM13D1Q, max UDMA/133
      (...)
      [  345.154996] ata1.00: exception Emask 0x40 SAct 0x0 SErr 0xc0800 action 0x6
      [  345.155006] ata1.00: irq_stat 0x40000001
      [  345.155013] ata1: SError: { HostInt CommWake 10B8B }
      [  345.155018] ata1.00: failed command: SET FEATURES
      [  345.155032] ata1.00: cmd ef/05:e1:00:00:00/00:00:00:00:00/40 tag 7
                              res 51/04:e1:00:00:00/00:00:00:00:00/40 Emask 0x41 (internal error)
      [  345.155038] ata1.00: status: { DRDY ERR }
      [  345.155042] ata1.00: error: { ABRT }
      [  345.155051] ata1: hard resetting link
      [  345.465661] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
      [  345.466955] ata1.00: configured for UDMA/133
      [  345.467085] ata1: EH complete
      
      Signed-off-by: default avatarFrançois Cami <fcami@fedoraproject.org>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      76936e9a
  5. May 09, 2018
  6. May 07, 2018
  7. May 02, 2018
  8. Apr 27, 2018
    • Hans de Goede's avatar
      libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs · 184add2c
      Hans de Goede authored
      
      
      Richard Jones has reported that using med_power_with_dipm on a T450s
      with a Sandisk SD7UB3Q256G1001 SSD (firmware version X2180501) is
      causing the machine to hang.
      
      Switching the LPM to max_performance fixes this, so it seems that
      this Sandisk SSD does not handle LPM well.
      
      Note in the past there have been bug-reports about the following
      Sandisk models not working with min_power, so we may need to extend
      the quirk list in the future: name - firmware
      Sandisk SD6SB2M512G1022I   - X210400
      Sandisk SD6PP4M-256G-1006  - A200906
      
      Cc: stable@vger.kernel.org
      Cc: Richard W.M. Jones <rjones@redhat.com>
      Reported-and-tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      184add2c
    • Hans de Goede's avatar
      libata: Apply NOLPM quirk for SAMSUNG MZMPC128HBFU-000MV SSD · b5b4d3a5
      Hans de Goede authored
      
      
      Kevin Shanahan reports the following repeating errors when using LPM,
      causing long delays accessing the disk:
      
        Apr 23 10:21:43 link kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x50000 action 0x6 frozen
        Apr 23 10:21:43 link kernel: ata1: SError: { PHYRdyChg CommWake }
        Apr 23 10:21:43 link kernel: ata1.00: failed command: WRITE DMA
        Apr 23 10:21:43 link kernel: ata1.00: cmd ca/00:08:60:5d:cd/00:00:00:00:00/e1 tag 9 dma 4096 out
                                              res 50/01:01:01:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
        Apr 23 10:21:43 link kernel: ata1.00: status: { DRDY }
        Apr 23 10:21:43 link kernel: ata1.00: error: { AMNF }
        Apr 23 10:21:43 link kernel: ata1: hard resetting link
        Apr 23 10:21:43 link kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
        Apr 23 10:21:43 link kernel: ata1.00: configured for UDMA/133
        Apr 23 10:21:43 link kernel: ata1: EH complete
      
      These go away when switching from med_power_with_dipm to medium_power.
      
      This is somewhat weird as the PM830 datasheet explicitly mentions DIPM
      being supported and the idle power-consumption is specified with DIPM
      enabled.
      
      There are many OEM customized firmware versions for the PM830, so for now
      lets assume this is firmware version specific and blacklist LPM based on
      the firmware version.
      
      Cc: Kevin Shanahan <kevin@shanahan.id.au>
      Reported-by: default avatarKevin Shanahan <kevin@shanahan.id.au>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      b5b4d3a5
    • Evan Wang's avatar
      ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI · daa2e3bd
      Evan Wang authored
      
      
      There is an issue(Errata Ref#226) that the SATA can not be
      detected via SATA Port-MultiPlayer(PMP) with following
      error log:
        ata1.15: PMP product ID mismatch
        ata1.15: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
        ata1.15: Port Multiplier vendor mismatch '0x1b4b'!='0x0'
        ata1.15: PMP revalidation failed (errno=-19)
      
      After debugging, the reason is found that the value Port-x
      FIS-based Switching Control(PxFBS@0x40) become wrong.
      According to design, the bits[11:8, 0] of register PxFBS
      are cleared when Port Command and Status (0x18) bit[0]
      changes its value from 1 to 0, i.e. falling edge of Port
      Command and Status bit[0] sends PULSE that resets PxFBS
      bits[11:8; 0].
      So it needs a mvebu SATA WA to save the port PxFBS register
      before PxCMD ST write and restore it afterwards.
      
      This patch implements the WA in a separate function of
      ahci_mvebu_stop_engine to override ahci_stop_gngine.
      
      Signed-off-by: default avatarEvan Wang <xswang@marvell.com>
      Cc: Ofer Heifetz <oferh@marvell.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      daa2e3bd
    • Evan Wang's avatar
      libahci: Allow drivers to override stop_engine · fa89f53b
      Evan Wang authored
      
      
      Marvell armada37xx, armada7k and armada8k share the same
      AHCI sata controller IP, and currently there is an issue
      (Errata Ref#226)that the SATA can not be detected via SATA
      Port-MultiPlayer(PMP). After debugging, the reason is
      found that the value of Port-x FIS-based Switching Control
      (PxFBS@0x40) became wrong.
      According to design, the bits[11:8, 0] of register PxFBS
      are cleared when Port Command and Status (0x18) bit[0]
      changes its value from 1 to 0, i.e. falling edge of Port
      Command and Status bit[0] sends PULSE that resets PxFBS
      bits[11:8; 0].
      So it needs save the port PxFBS register before PxCMD
      ST write and restore the port PxFBS register afterwards
      in ahci_stop_engine().
      
      This commit allows drivers to override ahci_stop_engine
      behavior for use by the Marvell AHCI driver(and potentially
      other drivers in the future).
      
      Signed-off-by: default avatarEvan Wang <xswang@marvell.com>
      Cc: Ofer Heifetz <oferh@marvell.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      fa89f53b
  9. Apr 10, 2018
    • Kunihiko Hayashi's avatar
      Revert "ata: ahci-platform: add reset control support" · fd17ed68
      Kunihiko Hayashi authored
      This reverts commit f0f56716.
      
      According to Thierry's view,
      https://www.spinics.net/lists/linux-ide/msg55357.html
      some hardware-specific drivers already use their own resets,
      and the common reset might make a path to occur double controls of resets.
      
      For now, revert the commit that adds reset control support to ahci-platform,
      and hold until the solution is confirmed not be affect all hardware-specific
      drivers.
      
      Fixes: f0f56716
      
       ("ata: ahci-platform: add reset control support")
      Reported-by: default avatarThierry Reding <thierry.reding@gmail.com>
      Suggested-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      fd17ed68
    • Linus Torvalds's avatar
      Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · fd3b36d2
      Linus Torvalds authored
      Pull vfs namei updates from Al Viro:
      
       - make lookup_one_len() safe with parent locked only shared(incoming
         afs series wants that)
      
       - fix of getname_kernel() regression from 2015 (-stable fodder, that
         one).
      
      * 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        getname_kernel() needs to make sure that ->name != ->iname in long case
        make lookup_one_len() safe to use with directory locked shared
        new helper: __lookup_slow()
        merge common parts of lookup_one_len{,_unlocked} into common helper
      fd3b36d2
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 8ea4a5d8
      Linus Torvalds authored
      Pull orangefs updates from Mike Marshall:
       "Fixes and cleanups:
      
         - Documentation cleanups
      
         - removal of unused code
      
         - make some structs static
      
         - implement Orangefs vm_operations fault callout
      
         - eliminate two single-use functions and put their cleaned up code in
           line.
      
         - replace a vmalloc/memset instance with vzalloc
      
         - fix a race condition bug in wait code"
      
      * tag 'for-linus-4.17-ofs' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
        Orangefs: documentation updates
        orangefs: document package install and xfstests procedure
        orangefs: remove unused code
        orangefs: make several *_operations structs static
        orangefs: implement vm_ops->fault
        orangefs: open code short single-use functions
        orangefs: replace vmalloc and memset with vzalloc
        orangefs: bug fix for a race condition when getting a slot
      8ea4a5d8
    • Linus Torvalds's avatar
      Merge tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 190f2ace
      Linus Torvalds authored
      Pull pstore fix from Kees Cook:
       "Fix another compression Kconfig combination missed in testing (Tobias
        Regnery)"
      
      * tag 'pstore-v4.17-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: fix crypto dependencies without compression
      190f2ace
    • Stephen Smalley's avatar
      selinux: fix missing dput() before selinuxfs unmount · fd40ffc7
      Stephen Smalley authored
      Commit 0619f0f5 ("selinux: wrap selinuxfs state") triggers a BUG
      when SELinux is runtime-disabled (i.e. systemd or equivalent disables
      SELinux before initial policy load via /sys/fs/selinux/disable based on
      /etc/selinux/config SELINUX=disabled).
      
      This does not manifest if SELinux is disabled via kernel command line
      argument or if SELinux is enabled (permissive or enforcing).
      
      Before:
        SELinux:  Disabled at runtime.
        BUG: Dentry 000000006d77e5c7{i=17,n=null}  still in use (1) [unmount of selinuxfs selinuxfs]
      
      After:
        SELinux:  Disabled at runtime.
      
      Fixes: 0619f0f5
      
       ("selinux: wrap selinuxfs state")
      Reported-by: default avatarTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fd40ffc7
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · d8312a3f
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "ARM:
         - VHE optimizations
      
         - EL2 address space randomization
      
         - speculative execution mitigations ("variant 3a", aka execution past
           invalid privilege register access)
      
         - bugfixes and cleanups
      
        PPC:
         - improvements for the radix page fault handler for HV KVM on POWER9
      
        s390:
         - more kvm stat counters
      
         - virtio gpu plumbing
      
         - documentation
      
         - facilities improvements
      
        x86:
         - support for VMware magic I/O port and pseudo-PMCs
      
         - AMD pause loop exiting
      
         - support for AMD core performance extensions
      
         - support for synchronous register access
      
         - expose nVMX capabilities to userspace
      
         - support for Hyper-V signaling via eventfd
      
         - use Enlightened VMCS when running on Hyper-V
      
         - allow userspace to disable MWAIT/HLT/PAUSE vmexits
      
         - usual roundup of optimizations and nested virtualization bugfixes
      
        Generic:
         - API selftest infrastructure (though the only tests are for x86 as
           of now)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (174 commits)
        kvm: x86: fix a prototype warning
        kvm: selftests: add sync_regs_test
        kvm: selftests: add API testing infrastructure
        kvm: x86: fix a compile warning
        KVM: X86: Add Force Emulation Prefix for "emulate the next instruction"
        KVM: X86: Introduce handle_ud()
        KVM: vmx: unify adjacent #ifdefs
        x86: kvm: hide the unused 'cpu' variable
        KVM: VMX: remove bogus WARN_ON in handle_ept_misconfig
        Revert "KVM: X86: Fix SMRAM accessing even if VM is shutdown"
        kvm: Add emulation for movups/movupd
        KVM: VMX: raise internal error for exception during invalid protected mode state
        KVM: nVMX: Optimization: Dont set KVM_REQ_EVENT when VMExit with nested_run_pending
        KVM: nVMX: Require immediate-exit when event reinjected to L2 and L1 event pending
        KVM: x86: Fix misleading comments on handling pending exceptions
        KVM: x86: Rename interrupt.pending to interrupt.injected
        KVM: VMX: No need to clear pending NMI/interrupt on inject realmode interrupt
        x86/kvm: use Enlightened VMCS when running on Hyper-V
        x86/hyper-v: detect nested features
        x86/hyper-v: define struct hv_enlightened_vmcs and clean field bits
        ...
      d8312a3f
    • Linus Torvalds's avatar
      Fix subtle macro variable shadowing in min_not_zero() · e9092d0d
      Linus Torvalds authored
      Commit 3c8ba0d6 ("kernel.h: Retain constant expression output for
      max()/min()") rewrote our min/max macros to be very clever, but in the
      meantime resurrected a variable name shadow issue that we had had
      previously fixed in commit 589a9785 ("min/max: remove sparse
      warnings when they're nested").
      
      That commit talks about the sparse warnings that this shadowing causes,
      which we ignored as just a minor annoyance.  But it turns out that the
      sparse warning is the least of our problems.  We actually have a real
      bug due to the shadowing through the interaction with "min_not_zero()",
      which ends up doing
      
         min(__x, __y)
      
      internally, and then the new declaration of "__x" and "__y" as new
      variables in __cmp_once() results in a complete mess of an expression,
      and "min_not_zero()" doesn't work at all.
      
      For some odd reason, this only ever caused (reported) problems on s390,
      even though it is a generic issue and most of the (obviously successful)
      testing of the problematic commit had happened on other architectures.
      
      Quoting Sebastian Ott:
       "What happened is that the bio build by the partition detection code
        was attempted to be split by the block layer because the block queue
        had a max_sector setting of 0. blk_queue_max_hw_sectors uses
        min_not_zero."
      
      So re-introduce the use of __UNIQUE_ID() to make sure that the min/max
      macros do not have these kinds of clashes.
      
      [ That said, __UNIQUE_ID() itself has several issues that make it less
        than wonderful.
      
        In particular, the "uniqueness" has a fallback on the line number,
        which means that it's not actually unique in more complex cases if you
        don't build with gcc or clang (which have working unique counters that
        aren't tied to line numbers).
      
        That historical broken fallback also means that we have that pointless
        "prefix" argument that doesn't actually make much sense _except_ for
        the known-broken case. Oh well. ]
      
      Fixes: 3c8ba0d6
      
       ("kernel.h: Retain constant expression output for max()/min()")
      Reported-and-tested-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e9092d0d
    • Linus Torvalds's avatar
      Merge branch 'for-linus-sa1100' of git://git.armlinux.org.uk/~rmk/linux-arm · 7886e8aa
      Linus Torvalds authored
      Pull ARM SA1100 updates from Russell King:
       "We have support for arbitary MMIO registers providing platform GPIOs,
        which allows us to abstract some of the SA11x0 CF support.
      
        This set of updates makes that change"
      
      * 'for-linus-sa1100' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: sa1100/simpad: switch simpad CF to use gpiod APIs
        ARM: sa1100/shannon: convert to generic CF sockets
        ARM: sa1100/nanoengine: convert to generic CF sockets
        ARM: sa1100/h3xxx: switch h3xxx PCMCIA to use gpiod APIs
        ARM: sa1100/cerf: convert to generic CF sockets
        ARM: sa1100/assabet: convert to generic CF sockets
        ARM: sa1100: provide infrastructure to support generic CF sockets
        pcmcia: sa1100: provide generic CF support
      7886e8aa
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 4a1e0052
      Linus Torvalds authored
      Pull ARM updates from Russell King:
       "A number of core ARM changes:
      
         - Refactoring linker script by Nicolas Pitre
      
         - Enable source fortification
      
         - Add support for Cortex R8"
      
      * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: decompressor: fix warning introduced in fortify patch
        ARM: 8751/1: Add support for Cortex-R8 processor
        ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
        ARM: simplify and fix linker script for TCM
        ARM: linker script: factor out TCM bits
        ARM: linker script: factor out vectors and stubs
        ARM: linker script: factor out unwinding table sections
        ARM: linker script: factor out stuff for the .text section
        ARM: linker script: factor out stuff for the DISCARD section
        ARM: linker script: factor out some common definitions between XIP and non-XIP
      4a1e0052
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 2025fef0
      Linus Torvalds authored
      Pull m68knommu update from Greg Ungerer:
       "Only a single fix to set the DMA masks in the ColdFire FEC platform
        data structure.
      
        This stops the warning from dma-mapping.h at boot time"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68k: set dma and coherent masks for platform FEC ethernets
      2025fef0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha · 5148408a
      Linus Torvalds authored
      Pull alpha updates from Matt Turner:
       "A few small changes for alpha"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
        alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering
        alpha: Implement CPU vulnerabilities sysfs functions.
        alpha: rtc: stop validating rtc_time in .read_time
        alpha: rtc: remove unused set_mmss ops
      5148408a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · becdce1c
      Linus Torvalds authored
      Pull s390 updates from Martin Schwidefsky:
      
       - Improvements for the spectre defense:
          * The spectre related code is consolidated to a single file
            nospec-branch.c
          * Automatic enable/disable for the spectre v2 defenses (expoline vs.
            nobp)
          * Syslog messages for specve v2 are added
          * Enable CONFIG_GENERIC_CPU_VULNERABILITIES and define the attribute
            functions for spectre v1 and v2
      
       - Add helper macros for assembler alternatives and use them to shorten
         the code in entry.S.
      
       - Add support for persistent configuration data via the SCLP Store Data
         interface. The H/W interface requires a page table that uses 4K pages
         only, the code to setup such an address space is added as well.
      
       - Enable virtio GPU emulation in QEMU. To do this the depends
         statements for a few common Kconfig options are modified.
      
       - Add support for format-3 channel path descriptors and add a binary
         sysfs interface to export the associated utility strings.
      
       - Add a sysfs attribute to control the IFCC handling in case of
         constant channel errors.
      
       - The vfio-ccw changes from Cornelia.
      
       - Bug fixes and cleanups.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (40 commits)
        s390/kvm: improve stack frame constants in entry.S
        s390/lpp: use assembler alternatives for the LPP instruction
        s390/entry.S: use assembler alternatives
        s390: add assembler macros for CPU alternatives
        s390: add sysfs attributes for spectre
        s390: report spectre mitigation via syslog
        s390: add automatic detection of the spectre defense
        s390: move nobp parameter functions to nospec-branch.c
        s390/cio: add util_string sysfs attribute
        s390/chsc: query utility strings via fmt3 channel path descriptor
        s390/cio: rename struct channel_path_desc
        s390/cio: fix unbind of io_subchannel_driver
        s390/qdio: split up CCQ handling for EQBS / SQBS
        s390/qdio: don't retry EQBS after CCQ 96
        s390/qdio: restrict buffer merging to eligible devices
        s390/qdio: don't merge ERROR output buffers
        s390/qdio: simplify math in get_*_buffer_frontier()
        s390/decompressor: trim uncompressed image head during the build
        s390/crypto: Fix kernel crash on aes_s390 module remove.
        s390/defkeymap: fix global init to zero
        ...
      becdce1c
  10. Apr 09, 2018
  11. Apr 08, 2018
    • Al Viro's avatar
      getname_kernel() needs to make sure that ->name != ->iname in long case · 30ce4d19
      Al Viro authored
      
      
      missed it in "kill struct filename.separate" several years ago.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      30ce4d19
    • Linus Torvalds's avatar
      Merge branch 'next-integrity' of... · f8cf2f16
      Linus Torvalds authored
      Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
      
      Pull integrity updates from James Morris:
       "A mixture of bug fixes, code cleanup, and continues to close
        IMA-measurement, IMA-appraisal, and IMA-audit gaps.
      
        Also note the addition of a new cred_getsecid LSM hook by Matthew
        Garrett:
      
           For IMA purposes, we want to be able to obtain the prepared secid
           in the bprm structure before the credentials are committed. Add a
           cred_getsecid hook that makes this possible.
      
        which is used by a new CREDS_CHECK target in IMA:
      
           In ima_bprm_check(), check with both the existing process
           credentials and the credentials that will be committed when the new
           process is started. This will not change behaviour unless the
           system policy is extended to include CREDS_CHECK targets -
           BPRM_CHECK will continue to check the same credentials that it did
           previously"
      
      * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        ima: Fallback to the builtin hash algorithm
        ima: Add smackfs to the default appraise/measure list
        evm: check for remount ro in progress before writing
        ima: Improvements in ima_appraise_measurement()
        ima: Simplify ima_eventsig_init()
        integrity: Remove unused macro IMA_ACTION_RULE_FLAGS
        ima: drop vla in ima_audit_measurement()
        ima: Fix Kconfig to select TPM 2.0 CRB interface
        evm: Constify *integrity_status_msg[]
        evm: Move evm_hmac and evm_hash from evm_main.c to evm_crypto.c
        fuse: define the filesystem as untrusted
        ima: fail signature verification based on policy
        ima: clear IMA_HASH
        ima: re-evaluate files on privileged mounted filesystems
        ima: fail file signature verification on non-init mounted filesystems
        IMA: Support using new creds in appraisal policy
        security: Add a cred_getsecid hook
      f8cf2f16
    • Linus Torvalds's avatar
      Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 4b3f1a15
      Linus Torvalds authored
      Pull TPM updates from James Morris:
       "This release contains only bug fixes. There are no new major features
        added"
      
      * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        tpm: fix intermittent failure with self tests
        tpm: add retry logic
        tpm: self test failure should not cause suspend to fail
        tpm2: add longer timeouts for creation commands.
        tpm_crb: use __le64 annotated variable for response buffer address
        tpm: fix buffer type in tpm_transmit_cmd
        tpm: tpm-interface: fix tpm_transmit/_cmd kdoc
        tpm: cmd_ready command can be issued only after granting locality
      4b3f1a15
    • Linus Torvalds's avatar
      Merge branch 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 706ffc8c
      Linus Torvalds authored
      Pull smack update from James Morris:
       "One small change for Automotive Grade Linux"
      
      * 'next-smack' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        Smack: Handle CGROUP2 in the same way that CGROUP
      706ffc8c
    • Sinan Kaya's avatar
      alpha: io: reorder barriers to guarantee writeX() and iowriteX() ordering · cd0e00c1
      Sinan Kaya authored
      
      
      memory-barriers.txt has been updated with the following requirement.
      
      "When using writel(), a prior wmb() is not needed to guarantee that the
      cache coherent memory writes have completed before writing to the MMIO
      region."
      
      Current writeX() and iowriteX() implementations on alpha are not
      satisfying this requirement as the barrier is after the register write.
      
      Move mb() in writeX() and iowriteX() functions to guarantee that HW
      observes memory changes before performing register operations.
      
      Signed-off-by: default avatarSinan Kaya <okaya@codeaurora.org>
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
      cd0e00c1
    • Michael Cree's avatar
      alpha: Implement CPU vulnerabilities sysfs functions. · 6fd16ce5
      Michael Cree authored
      
      
      Implement the CPU vulnerabilty show functions for meltdown, spectre_v1
      and spectre_v2 on Alpha.
      
      Tests on XP1000 (EV67/667MHz) and ES45 (EV68CB/1.25GHz) show them
      to be vulnerable to Meltdown and Spectre V1.  In the case of
      Meltdown I saw a 1 to 2% success rate in reading bytes on the
      XP1000 and 50 to 60% success rate on the ES45. (This compares to
      99.97% success reported for Intel CPUs.)  Report EV6 and later
      CPUs as vulnerable.
      
      Tests on PWS600au (EV56/600MHz) for Spectre V1 attack were
      unsuccessful (though I did not try particularly hard) so mark EV4
      through to EV56 as not vulnerable.
      
      Signed-off-by: default avatarMichael Cree <mcree@orcon.net.nz>
      Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
      6fd16ce5
    • Alexandre Belloni's avatar
      alpha: rtc: stop validating rtc_time in .read_time · 54f16b19
      Alexandre Belloni authored
      
      
      The RTC core is always calling rtc_valid_tm after the read_time callback.
      It is not necessary to call it just before returning from the callback.
      
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
      54f16b19
    • Alexandre Belloni's avatar
      alpha: rtc: remove unused set_mmss ops · 9917df83
      Alexandre Belloni authored
      
      
      The .set_mmss and .setmmss64 ops are only called when the RTC is not
      providing an implementation for the .set_time callback.
      
      On alpha, .set_time is provided so .set_mmss64 is never called. Remove the
      unused code.
      
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
      9917df83
    • Linus Torvalds's avatar
      Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · bf6879dc
      Linus Torvalds authored
      Pull alpha syscall cleanups from Al Viro:
       "A couple of SYSCALL_DEFINE conversions and removal of pointless (and
        bitrotted) piece stuck in ret_from_kernel_thread since the
        kernel_exceve/kernel_thread conversions six years ago"
      
      * 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        alpha: get rid of pointless insn in ret_from_kernel_thread
        alpha: switch pci syscalls to SYSCALL_DEFINE
      bf6879dc
    • Linus Torvalds's avatar
      Merge branch 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 8844a509
      Linus Torvalds authored
      Pull sparc syscall cleanups from Al Viro:
       "sparc syscall stuff - killing pointless wrappers, conversions to
        {COMPAT_,}SYSCALL_DEFINE"
      
      * 'misc.sparc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        sparc: get rid of asm wrapper for nis_syscall()
        sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE
        sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE
        convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE
        switch sparc_remap_file_pages() to SYSCALL_DEFINE
        sparc: get rid of memory_ordering(2) wrapper
        sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE()
        sparc: bury a zombie extern that had been that way for twenty years
        sparc: get rid of remaining SIGN... wrappers
        sparc: kill useless SIGN... wrappers
        sparc: get rid of sys_sparc_pipe() wrappers
      8844a509
    • Linus Torvalds's avatar
      treewide: fix up files incorrectly marked executable · 90fda63f
      Linus Torvalds authored
      
      
      Joe Perches noted that we have a few source files that for some
      inexplicable reason (read: I'm too lazy to even go look at the history)
      are marked executable:
      
        drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
        drivers/net/ethernet/cadence/macb_ptp.c
      
      A simple git command line to show executable C/asm/header files is this:
      
          git ls-files -s '*.[chsS]' | grep '^100755'
      
      and then you can fix them up with scripting by just feeding that output
      into:
      
          | cut -f2 | xargs chmod -x
      
      and commit it.
      
      Which is exactly what this commit does.
      
      Reported-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      90fda63f
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 0d5b1bd3
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       -I2C core now reports proper OF style module alias. I'd like to repeat
        the note from the commit msg here (Thanks, Javier!):
      
            NOTE: This patch may break out-of-tree drivers that were relying
                  on this behavior, and only had an I2C device ID table even
                  when the device was registered via OF.
      
                  There are no remaining drivers in mainline that do this, but
                  out-of-tree drivers have to be fixed and define a proper OF
                  device ID table to have module auto-loading working.
      
       - new driver for the SynQuacer I2C controller
      
       - major refactoring of the QUP driver
      
       - the piix4 driver now uses request_muxed_region which should fix a
         long standing resource conflict with the sp5100_tco watchdog
      
       - a bunch of small core & driver improvements
      
      * 'i2c/for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (53 commits)
        i2c: add support for Socionext SynQuacer I2C controller
        dt-bindings: i2c: add binding for Socionext SynQuacer I2C
        i2c: Update i2c_trace_msg static key to modern api
        i2c: fix parameter of trace_i2c_result
        i2c: imx: avoid taking clk_prepare mutex in PM callbacks
        i2c: imx: use clk notifier for rate changes
        i2c: make i2c_check_addr_validity() static
        i2c: rcar: fix mask value of prohibited bit
        dt-bindings: i2c: document R8A77965 bindings
        i2c: pca-platform: drop gpio from platform data
        i2c: pca-platform: use device_property_read_u32
        i2c: pca-platform: unconditionally use devm_gpiod_get_optional
        sh: sh7785lcr: add GPIO lookup table for i2c controller reset
        i2c: qup: reorganization of driver code to remove polling for qup v2
        i2c: qup: reorganization of driver code to remove polling for qup v1
        i2c: qup: send NACK for last read sub transfers
        i2c: qup: fix buffer overflow for multiple msg of maximum xfer len
        i2c: qup: change completion timeout according to transfer length
        i2c: qup: use the complete transfer length to choose DMA mode
        i2c: qup: proper error handling for i2c error in BAM mode
        ...
      0d5b1bd3
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 49a695ba
      Linus Torvalds authored
      Pull powerpc updates from Michael Ellerman:
       "Notable changes:
      
         - Support for 4PB user address space on 64-bit, opt-in via mmap().
      
         - Removal of POWER4 support, which was accidentally broken in 2016
           and no one noticed, and blocked use of some modern instructions.
      
         - Workarounds so that the hypervisor can enable Transactional Memory
           on Power9.
      
         - A series to disable the DAWR (Data Address Watchpoint Register) on
           Power9.
      
         - More information displayed in the meltdown/spectre_v1/v2 sysfs
           files.
      
         - A vpermxor (Power8 Altivec) implementation for the raid6 Q
           Syndrome.
      
         - A big series to make the allocation of our pacas (per cpu area),
           kernel page tables, and per-cpu stacks NUMA aware when using the
           Radix MMU on Power9.
      
        And as usual many fixes, reworks and cleanups.
      
        Thanks to: Aaro Koskinen, Alexandre Belloni, Alexey Kardashevskiy,
        Alistair Popple, Andy Shevchenko, Aneesh Kumar K.V, Anshuman Khandual,
        Balbir Singh, Benjamin Herrenschmidt, Christophe Leroy, Christophe
        Lombard, Cyril Bur, Daniel Axtens, Dave Young, Finn Thain, Frederic
        Barrat, Gustavo Romero, Horia Geantă, Jonathan Neuschäfer, Kees Cook,
        Larry Finger, Laurent Dufour, Laurent Vivier, Logan Gunthorpe,
        Madhavan Srinivasan, Mark Greer, Mark Hairgrove, Markus Elfring,
        Mathieu Malaterre, Matt Brown, Matt Evans, Mauricio Faria de Oliveira,
        Michael Neuling, Naveen N. Rao, Nicholas Piggin, Paul Mackerras,
        Philippe Bergheaud, Ram Pai, Rob Herring, Sam Bobroff, Segher
        Boessenkool, Simon Guo, Simon Horman, Stewart Smith, Sukadev
        Bhattiprolu, Suraj Jitindar Singh, Thiago Jung Bauermann, Vaibhav
        Jain, Vaidyanathan Srinivasan, Vasant Hegde, Wei Yongjun"
      
      * tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (207 commits)
        powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep
        powerpc/64s: Fix POWER9 DD2.2 and above in cputable features
        powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit
        powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits
        Revert "powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead"
        powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo}
        powerpc: io.h: move iomap.h include so that it can use readq/writeq defs
        cxl: Fix possible deadlock when processing page faults from cxllib
        powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it
        powerpc/mm/radix: Update command line parsing for disable_radix
        powerpc/mm/radix: Parse disable_radix commandline correctly.
        powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb
        powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix
        powerpc/mm/keys: Update documentation and remove unnecessary check
        powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead
        powerpc/64s/idle: Consolidate power9_offline_stop()/power9_idle_stop()
        powerpc/powernv: Always stop secondaries before reboot/shutdown
        powerpc: hard disable irqs in smp_send_stop loop
        powerpc: use NMI IPI for smp_send_stop
        powerpc/powernv: Fix SMT4 forcing idle code
        ...
      49a695ba
    • Linus Torvalds's avatar
      Merge tag 'leaks-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks · 299f89d5
      Linus Torvalds authored
      Pull leaking-addresses updates from Tobin Harding:
       "This set represents improvements to the scripts/leaking_addresses.pl
        script.
      
        The major improvement is that with this set applied the script
        actually runs in a reasonable amount of time (less than a minute on a
        standard stock Ubuntu user desktop). Also, we have a second maintainer
        now and a tree hosted on kernel.org
      
        We do a few code clean ups. We fix the command help output. Handling
        of the vsyscall address range is fixed to check the whole range
        instead of just the start/end addresses. We add support for 5 page
        table levels (suggested on LKML). We use a system command to get the
        machine architecture instead of using Perl. Calling this command for
        every regex comparison is what previously choked the script, caching
        the result of this call gave the major speed improvement. We add
        support for scanning 32-bit kernels using the user/kernel memory
        split. Path skipping code refactored and simplified (meaning easier
        script configuration). We remove version numbering. We add a variable
        name to improve readability of a regex and finally we check filenames
        for leaking addresses.
      
        Currently script scans /proc/PID for all PID. With this set applied we
        only scan for PID==1. It was observed that on an idle system files
        under /proc/PID are predominantly the same for all processes. Also it
        was noted that the script does not scan _all_ the kernel since it only
        scans active processes. Scanning only for PID==1 makes explicit the
        inherent flaw in the script that the scan is only partial and also
        speeds things up"
      
      * tag 'leaks-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tobin/leaks:
        MAINTAINERS: Update LEAKING_ADDRESSES
        leaking_addresses: check if file name contains address
        leaking_addresses: explicitly name variable used in regex
        leaking_addresses: remove version number
        leaking_addresses: skip '/proc/1/syscall'
        leaking_addresses: skip all /proc/PID except /proc/1
        leaking_addresses: cache architecture name
        leaking_addresses: simplify path skipping
        leaking_addresses: do not parse binary files
        leaking_addresses: add 32-bit support
        leaking_addresses: add is_arch() wrapper subroutine
        leaking_addresses: use system command to get arch
        leaking_addresses: add support for 5 page table levels
        leaking_addresses: add support for kernel config file
        leaking_addresses: add range check for vsyscall memory
        leaking_addresses: indent dependant options
        leaking_addresses: remove command examples
        leaking_addresses: remove mention of kptr_restrict
        leaking_addresses: fix typo function not called
      299f89d5
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.17-rc1' of... · fc22e19a
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest update from Shuah Khan:
       "This Kselftest update for 4.17-rc1 consists of:
      
         - Test build error fixes
      
         - Fixes to prevent intel_pstate from building on non-x86 systems.
      
         - New test for ion with vgem driver.
      
         - Change to print the test name to /dev/kmsg to add context to kernel
           failures if any uncovered from running the test.
      
         - Kselftest framework enhancements to add KSFT_TAP_LEVEL environment
           variable to prevent nested TAP headers being printed in the
           Kselftest output.
      
           Nested TAP13 headers could cause problems for some parsers. This
           change suppresses the nested headers from test programs and test
           shell scripts with changes to framework and Makefiles without
           changing the tests"
      
      * tag 'linux-kselftest-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/intel_pstate: Fix build rule for x86
        selftests: Print the test we're running to /dev/kmsg
        selftests/seccomp: Allow get_metadata to XFAIL
        selftests/android/ion: Makefile: fix build error
        selftests: futex Makefile add top level TAP header echo to RUN_TESTS
        selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers
        selftests: lib.mk set KSFT_TAP_LEVEL to prevent nested TAP headers
        selftests: kselftest framework: add handling for TAP header level
        selftests: ion: Add simple test with the vgem driver
        selftests: ion: Remove some prints
      fc22e19a
    • Linus Torvalds's avatar
      Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 3612605a
      Linus Torvalds authored
      Pull general security layer updates from James Morris:
      
       - Convert security hooks from list to hlist, a nice cleanup, saving
         about 50% of space, from Sargun Dhillon.
      
       - Only pass the cred, not the secid, to kill_pid_info_as_cred and
         security_task_kill (as the secid can be determined from the cred),
         from Stephen Smalley.
      
       - Close a potential race in kernel_read_file(), by making the file
         unwritable before calling the LSM check (vs after), from Kees Cook.
      
      * 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        security: convert security hooks to use hlist
        exec: Set file unwritable before LSM check
        usb, signal, security: only pass the cred, not the secid, to kill_pid_info_as_cred and security_task_kill
      3612605a