Skip to content
  1. Sep 14, 2019
    • Paul Walmsley's avatar
      riscv: modify the Image header to improve compatibility with the ARM64 header · 474efecb
      Paul Walmsley authored
      
      
      Part of the intention during the definition of the RISC-V kernel image
      header was to lay the groundwork for a future merge with the ARM64
      image header.  One error during my original review was not noticing
      that the RISC-V header's "magic" field was at a different size and
      position than the ARM64's "magic" field.  If the existing ARM64 Image
      header parsing code were to attempt to parse an existing RISC-V kernel
      image header format, it would see a magic number 0.  This is
      undesirable, since it's our intention to align as closely as possible
      with the ARM64 header format.  Another problem was that the original
      "res3" field was not being initialized correctly to zero.
      
      Address these issues by creating a 32-bit "magic2" field in the RISC-V
      header which matches the ARM64 "magic" field.  RISC-V binaries will
      store "RSC\x05" in this field.  The intention is that the use of the
      existing 64-bit "magic" field in the RISC-V header will be deprecated
      over time.  Increment the minor version number of the file format to
      indicate this change, and update the documentation accordingly.  Fix
      the assembler directives in head.S to ensure that reserved fields are
      properly zero-initialized.
      
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      Reported-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      Reviewed-by: default avatarPalmer Dabbelt <palmer@sifive.com>
      Cc: Atish Patra <atish.patra@wdc.com>
      Cc: Karsten Merker <merker@debian.org>
      Link: https://lore.kernel.org/linux-riscv/194c2f10c9806720623430dbf0cc59a965e50448.camel@wdc.com/T/#u
      Link: https://lore.kernel.org/linux-riscv/mhng-755b14c4-8f35-4079-a7ff-e421fd1b02bc@palmer-si-x1e/T/#t
      474efecb
  2. Sep 09, 2019
  3. Sep 08, 2019
    • Nick Desaulniers's avatar
      include/linux/compiler.h: fix Oops for Clang-compiled kernels · bfafddd8
      Nick Desaulniers authored
      
      
      GCC unescapes escaped string section names while Clang does not. Because
      __section uses the `#` stringification operator for the section name, it
      doesn't need to be escaped.
      
      This fixes an Oops observed in distro's that use systemd and not
      net.core.bpf_jit_enable=1, when their kernels are compiled with Clang.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/619
      Link: https://bugs.llvm.org/show_bug.cgi?id=42950
      Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2
      Link: https://lore.kernel.org/lkml/20190904181740.GA19688@gmail.com/
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Reported-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Suggested-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      [Cherry-picked from the __section cleanup series for 5.3]
      [Adjusted commit message]
      Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      bfafddd8
    • Linus Torvalds's avatar
      Revert "x86/apic: Include the LDR when clearing out APIC registers" · 950b07c1
      Linus Torvalds authored
      This reverts commit 558682b5
      
      .
      
      Chris Wilson reports that it breaks his CPU hotplug test scripts.  In
      particular, it breaks offlining and then re-onlining the boot CPU, which
      we treat specially (and the BIOS does too).
      
      The symptoms are that we can offline the CPU, but it then does not come
      back online again:
      
          smpboot: CPU 0 is now offline
          smpboot: Booting Node 0 Processor 0 APIC 0x0
          smpboot: do_boot_cpu failed(-1) to wakeup CPU#0
      
      Thomas says he knows why it's broken (my personal suspicion: our magic
      handling of the "cpu0_logical_apicid" thing), but for 5.3 the right fix
      is to just revert it, since we've never touched the LDR bits before, and
      it's not worth the risk to do anything else at this stage.
      
      [ Hotpluging of the boot CPU is special anyway, and should be off by
        default. See the "BOOTPARAM_HOTPLUG_CPU0" config option and the
        cpu0_hotplug kernel parameter.
      
        In general you should not do it, and it has various known limitations
        (hibernate and suspend require the boot CPU, for example).
      
        But it should work, even if the boot CPU is special and needs careful
        treatment       - Linus ]
      
      Link: https://lore.kernel.org/lkml/156785100521.13300.14461504732265570003@skylake-alporthouse-com/
      Reported-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Bandan Das <bsd@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      950b07c1
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · b3a9964c
      Linus Torvalds authored
      Pull Documentation updates from Greg KH:
       "A few small patches for the documenation file that came in through the
        char-misc tree in -rc7 for your tree.
      
        They fix the mistake in the .rst format that kept the table of
        companies from showing up in the html output, and most importantly,
        add people's names to the list showing support for our process"
      
      * tag 'char-misc-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Documentation/process: Add Qualcomm process ambassador for hardware security issues
        Documentation/process/embargoed-hardware-issues: Microsoft ambassador
        Documentation/process: Add Google contact for embargoed hardware issues
        Documentation/process: Volunteer as the ambassador for Xen
      b3a9964c
    • Trilok Soni's avatar
      Documentation/process: Add Qualcomm process ambassador for hardware security issues · a8e0abae
      Trilok Soni authored
      
      
      Add Trilok Soni as process ambassador for hardware security issues
      from Qualcomm.
      
      Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
      Link: https://lore.kernel.org/r/1567796517-8964-1-git-send-email-tsoni@codeaurora.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a8e0abae
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.3' of git://git.infradead.org/users/vkoul/slave-dma · d3464ccd
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "Some late fixes for drivers:
      
         - memory leak in ti crossbar dma driver
      
         - cleanup of omap dma probe
      
         - Fix for link list configuration in sprd dma driver
      
         - Handling fixed for DMACHCLR if iommu is mapped in rcar dma"
      
      * tag 'dmaengine-fix-5.3' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: rcar-dmac: Fix DMACHCLR handling if iommu is mapped
        dmaengine: sprd: Fix the DMA link-list configuration
        dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe()
        dmaengine: ti: dma-crossbar: Fix a memory leak bug
      d3464ccd
  4. Sep 07, 2019
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1e3778cb
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "Just a single lpfc fix adjusting the number of available queues for
        high CPU count systems"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: lpfc: Raise config max for lpfc_fcp_mq_threshold variable
      1e3778cb
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 7641033e
      Linus Torvalds authored
      Pull libnvdimm fix from Dan Williams:
       "Restore support for 1GB alignment namespaces, truncate the end of
        misaligned namespaces"
      
      * tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        libnvdimm/pfn: Fix namespace creation on misaligned addresses
      7641033e
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 9772152b
      Linus Torvalds authored
      Pull input fix from Dmitry Torokhov:
       "A tiny update from Benjamin removing a mistakenly added Elan PNP ID so
        that the device is again handled by hid-multitouch"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: elan_i2c - remove Lenovo Legion Y7000 PnpID
      9772152b
    • Benjamin Tissoires's avatar
      Input: elan_i2c - remove Lenovo Legion Y7000 PnpID · 0c043d70
      Benjamin Tissoires authored
      Looks like the Bios of the Lenovo Legion Y7000 is using ELAN061B
      when the actual device is supposed to be used with hid-multitouch.
      
      Remove it from the list of the supported device, hoping that
      no one will complain about the loss in functionality.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=203467
      Fixes: 738c06d0
      
       ("Input: elan_i2c - add hardware ID for multiple Lenovo laptops")
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      0c043d70
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 36daa831
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are three more fixes for this week:
      
         - The Windows-on-ARM laptops require a workaround to prevent crashing
           at boot from ACPI
      
         - The Renesas 'draak' board needs one bugfix for the backlight
           regulator
      
         - Also for Renesas, the 'hihope' board accidentally had its eMMC
           turned off in the 5.3 merge window"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        soc: qcom: geni: Provide parameter error checking
        arm64: dts: renesas: hihope-common: Fix eMMC status
        arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name
      36daa831
    • Linus Torvalds's avatar
      Merge tag 'configfs-for-5.3' of git://git.infradead.org/users/hch/configfs · 30d7030b
      Linus Torvalds authored
      Pull configfs fixes from Christoph Hellwig:
       "Late configfs fixes from Al that fix pretty nasty removal vs attribute
        access races"
      
      * tag 'configfs-for-5.3' of git://git.infradead.org/users/hch/configfs:
        configfs: provide exclusion between IO and removals
        configfs: new object reprsenting tree fragments
        configfs_register_group() shouldn't be (and isn't) called in rmdirable parts
        configfs: stash the data we need into configfs_buffer at open time
      30d7030b
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 76f5e9f8
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - Revert an Intel VT-d patch that caused problems for some users.
      
       - Removal of a feature in the Intel VT-d driver that was never
         supported in hardware. This qualifies as a fix because the code for
         this feature sets reserved bits in the invalidation queue descriptor,
         causing failed invalidations on real hardware.
      
       - Two fixes for AMD IOMMU driver to fix a race condition and to add a
         missing IOTLB flush when kernel is booted in kdump mode.
      
      * tag 'iommu-fixes-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix race in increase_address_space()
        iommu/amd: Flush old domains in kdump kernel
        iommu/vt-d: Remove global page flush support
        Revert "iommu/vt-d: Avoid duplicated pci dma alias consideration"
      76f5e9f8
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 04459710
      Linus Torvalds authored
      Pull MMC fix from Ulf Hansson:
       "Revert in order to fix card init for some eMMCs that need retries for
        CMD6"
      
      * tag 'mmc-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        Revert "mmc: core: do not retry CMD6 in __mmc_switch()"
      04459710
  5. Sep 06, 2019
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-09-06' of git://anongit.freedesktop.org/drm/drm · 08d433d8
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Live from my friend's couch in Barcelona, latest round of drm fixes.
      
        The command line parser regression fixes look a bit larger because
        they come with selftests included for the bugs they fix. Otherwise a
        single nouveau, single ingenic and single vmwgfx fix:
      
        nouveau:
         - add missing MODULE_FIRMWARE definitions
      
        igenic:
         - hardcode panel type DPI
      
        vmwgfx:
         - double free fix
      
        core:
         - command line mode parser fixes"
      
      * tag 'drm-fixes-2019-09-06' of git://anongit.freedesktop.org/drm/drm:
        drm/vmwgfx: Fix double free in vmw_recv_msg()
        drm/nouveau/sec2/gp102: add missing MODULE_FIRMWAREs
        drm/selftests: modes: Add more unit tests for the cmdline parser
        drm/modes: Introduce a whitelist for the named modes
        drm/modes: Fix the command line parser to take force options into account
        drm/modes: Add a switch to differentiate free standing options
        drm/ingenic: Hardcode panel type to DPI
      08d433d8
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 9d098a62
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "virtio, vhost, and balloon bugfixes.
      
        A couple of last minute bugfixes. And a revert of a failed attempt at
        metadata access optimization - we'll try again in the next cycle"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        mm/balloon_compaction: suppress allocation warnings
        Revert "vhost: access vq metadata through kernel virtual address"
        vhost: Remove unnecessary variable
        virtio-net: lower min ring num_free for efficiency
        vhost/test: fix build for vhost test
        vhost/test: fix build for vhost test
      9d098a62
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 13da6ac1
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "One fix for a boot hang on some Freescale machines when PREEMPT is
        enabled.
      
        Two CVE fixes for bugs in our handling of FP registers and
        transactional memory, both of which can result in corrupted FP state,
        or FP state leaking between processes.
      
        Thanks to: Chris Packham, Christophe Leroy, Gustavo Romero, Michael
        Neuling"
      
      * tag 'powerpc-5.3-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts
        powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction
        powerpc/64e: Drop stale call to smp_processor_id() which hangs SMP startup
      13da6ac1
    • Sasha Levin's avatar
      Documentation/process/embargoed-hardware-issues: Microsoft ambassador · 1f493162
      Sasha Levin authored
      
      
      Add Sasha Levin as Microsoft's process ambassador.
      
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      Link: https://lore.kernel.org/r/20190906095852.23568-1-sashal@kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f493162
    • Lee Jones's avatar
      soc: qcom: geni: Provide parameter error checking · 8928e917
      Lee Jones authored
      When booting with ACPI, the Geni Serial Engine is not set as the I2C/SPI
      parent and thus, the wrapper (parent device) is unassigned.  This causes
      the kernel to crash with a null dereference error.
      
      Link: https://lore.kernel.org/r/20190905082555.15020-1-lee.jones@linaro.org
      Fixes: 8bc529b2
      
       ("soc: qcom: geni: Add support for ACPI")
      Acked-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      8928e917
    • Joerg Roedel's avatar
      iommu/amd: Fix race in increase_address_space() · 754265bc
      Joerg Roedel authored
      
      
      After the conversion to lock-less dma-api call the
      increase_address_space() function can be called without any
      locking. Multiple CPUs could potentially race for increasing
      the address space, leading to invalid domain->mode settings
      and invalid page-tables. This has been happening in the wild
      under high IO load and memory pressure.
      
      Fix the race by locking this operation. The function is
      called infrequently so that this does not introduce
      a performance regression in the dma-api path again.
      
      Reported-by: default avatarQian Cai <cai@lca.pw>
      Fixes: 256e4621
      
       ('iommu/amd: Make use of the generic IOVA allocator')
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      754265bc
    • Stuart Hayes's avatar
      iommu/amd: Flush old domains in kdump kernel · 36b7200f
      Stuart Hayes authored
      
      
      When devices are attached to the amd_iommu in a kdump kernel, the old device
      table entries (DTEs), which were copied from the crashed kernel, will be
      overwritten with a new domain number.  When the new DTE is written, the IOMMU
      is told to flush the DTE from its internal cache--but it is not told to flush
      the translation cache entries for the old domain number.
      
      Without this patch, AMD systems using the tg3 network driver fail when kdump
      tries to save the vmcore to a network system, showing network timeouts and
      (sometimes) IOMMU errors in the kernel log.
      
      This patch will flush IOMMU translation cache entries for the old domain when
      a DTE gets overwritten with a new domain number.
      
      Signed-off-by: default avatarStuart Hayes <stuart.w.hayes@gmail.com>
      Fixes: 3ac3e5ee
      
       ('iommu/amd: Copy old trans table from old kernel')
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      36b7200f
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2019-09-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 1e19ec6c
      Dave Airlie authored
      
      
      drm-misc-fixes for v5.3 final:
      - Make ingenic panel type DPI insteado f unknown.
      - Fixes for command line parser modes.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/606d87b2-1840-c893-eb30-d6c471c9e50a@linux.intel.com
      1e19ec6c
    • Dave Airlie's avatar
      7610bb0b
    • Hillf Danton's avatar
      keys: Fix missing null pointer check in request_key_auth_describe() · d41a3eff
      Hillf Danton authored
      If a request_key authentication token key gets revoked, there's a window in
      which request_key_auth_describe() can see it with a NULL payload - but it
      makes no check for this and something like the following oops may occur:
      
      	BUG: Kernel NULL pointer dereference at 0x00000038
      	Faulting instruction address: 0xc0000000004ddf30
      	Oops: Kernel access of bad area, sig: 11 [#1]
      	...
      	NIP [...] request_key_auth_describe+0x90/0xd0
      	LR [...] request_key_auth_describe+0x54/0xd0
      	Call Trace:
      	[...] request_key_auth_describe+0x54/0xd0 (unreliable)
      	[...] proc_keys_show+0x308/0x4c0
      	[...] seq_read+0x3d0/0x540
      	[...] proc_reg_read+0x90/0x110
      	[...] __vfs_read+0x3c/0x70
      	[...] vfs_read+0xb4/0x1b0
      	[...] ksys_read+0x7c/0x130
      	[...] system_call+0x5c/0x70
      
      Fix this by checking for a NULL pointer when describing such a key.
      
      Also make the read routine check for a NULL pointer to be on the safe side.
      
      [DH: Modified to not take already-held rcu lock and modifie...
      d41a3eff
    • Linus Torvalds's avatar
      Merge tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a3f5e1f5
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small HD-audio fixes:
      
         - A regression fix for Realtek codecs due to the recent
           initialization procedure change
      
         - A fix for potential endless loop at the quirk table lookup
      
         - Quirks for Lenovo, ASUS and HP machines"
      
      * tag 'sound-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre
        ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL
        ALSA: hda/realtek - Add quirk for HP Pavilion 15
        ALSA: hda/realtek - Fix overridden device-specific initialization
        ALSA: hda - Fix potential endless loop at applying quirks
      a3f5e1f5
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 19e4147a
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc fixes:
      
         - EFI boot fix for signed kernels
      
         - an AC flags fix related to UBSAN
      
         - Hyper-V infinite loop fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hyper-v: Fix overflow bug in fill_gva_list()
        x86/uaccess: Don't leak the AC flags into __get_user() argument evaluation
        x86/boot: Preserve boot_params.secure_boot from sanitizing
      19e4147a
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 262f7eed
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "This fixes an ABI bug introduced this cycle, plus fixes a throttling
        bug"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code
        sched/fair: Don't assign runtime for throttled cfs_rq
      262f7eed
    • Linus Torvalds's avatar
      Merge tag 'clang-format-for-linus-v5.3-rc8' of git://github.com/ojeda/linux · 13133f93
      Linus Torvalds authored
      Pull clang-format update from Miguel Ojeda:
       "Update with the latest for_each macro list"
      
      * tag 'clang-format-for-linus-v5.3-rc8' of git://github.com/ojeda/linux:
        clang-format: Update with the latest for_each macro list
      13133f93
  6. Sep 05, 2019
    • Arnd Bergmann's avatar
      Merge tag 'renesas-fixes2-for-v5.3' of... · 13212a64
      Arnd Bergmann authored
      
      Merge tag 'renesas-fixes2-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes
      
      Second Round of Renesas ARM Based SoC Fixes for v5.3
      
      * RZ/G2M based HiHope main board
        - Re-enabled accidently disabled SDHI3 (eMMC) support
      
      * tag 'renesas-fixes2-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        arm64: dts: renesas: hihope-common: Fix eMMC status
      
      Link: https://lore.kernel.org/r/cover.1567675986.git.horms+renesas@verge.net.au
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      13212a64
    • Dan Carpenter's avatar
      drm/vmwgfx: Fix double free in vmw_recv_msg() · 08b0c891
      Dan Carpenter authored
      We recently added a kfree() after the end of the loop:
      
      	if (retries == RETRIES) {
      		kfree(reply);
      		return -EINVAL;
      	}
      
      There are two problems.  First the test is wrong and because retries
      equals RETRIES if we succeed on the last iteration through the loop.
      Second if we fail on the last iteration through the loop then the kfree
      is a double free.
      
      When you're reading this code, please note the break statement at the
      end of the while loop.  This patch changes the loop so that if it's not
      successful then "reply" is NULL and we can test for that afterward.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 6b7c3b86
      
       ("drm/vmwgfx: fix memory leak when too many retries have occurred")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      08b0c891
    • Kees Cook's avatar
      Documentation/process: Add Google contact for embargoed hardware issues · f56f791f
      Kees Cook authored
      
      
      This adds myself as the Google contact for embargoed hardware security
      issues and fixes some small typos.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Matt Linton <amuse@google.com>
      Cc: Matthew Garrett <mjg59@google.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarGuenter Roeck <groeck@chromium.org>
      Link: https://lore.kernel.org/r/201909040922.56496BF70@keescook
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f56f791f
    • Andrew Cooper's avatar
      Documentation/process: Volunteer as the ambassador for Xen · 02e740ae
      Andrew Cooper authored
      
      
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tyler Hicks <tyhicks@canonical.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarAndrew Cooper <andrew.cooper3@citrix.com>
      Link: https://lore.kernel.org/r/20190904181702.19788-1-andrew.cooper3@citrix.com
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      02e740ae
    • Al Viro's avatar
      configfs: provide exclusion between IO and removals · b0841eef
      Al Viro authored
      
      
      Make sure that attribute methods are not called after the item
      has been removed from the tree.  To do so, we
      	* at the point of no return in removals, grab ->frag_sem
      exclusive and mark the fragment dead.
      	* call the methods of attributes with ->frag_sem taken
      shared and only after having verified that the fragment is still
      alive.
      
      	The main benefit is for method instances - they are
      guaranteed that the objects they are accessing *and* all ancestors
      are still there.  Another win is that we don't need to bother
      with extra refcount on config_item when opening a file -
      the item will be alive for as long as it stays in the tree, and
      we won't touch it/attributes/any associated data after it's
      been removed from the tree.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      b0841eef
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 3b47fd5c
      Linus Torvalds authored
      Pull NFS client bugfix from Trond Myklebust:
       "Regression fix inode fileid checks in attribute revalidation code"
      
      * tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix inode fileid checks in attribute revalidation code
      3b47fd5c
    • Ingo Molnar's avatar
      sched/core: Fix uclamp ABI bug, clean up and robustify sched_read_attr() ABI logic and code · 1251201c
      Ingo Molnar authored
      Thadeu Lima de Souza Cascardo reported that 'chrt' broke on recent kernels:
      
        $ chrt -p $$
        chrt: failed to get pid 26306's policy: Argument list too long
      
      and he has root-caused the bug to the following commit increasing sched_attr
      size and breaking sched_read_attr() into returning -EFBIG:
      
        a509a7cd
      
       ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
      
      The other, bigger bug is that the whole sched_getattr() and sched_read_attr()
      logic of checking non-zero bits in new ABI components is arguably broken,
      and pretty much any extension of the ABI will spuriously break the ABI.
      That's way too fragile.
      
      Instead implement the perf syscall's extensible ABI instead, which we
      already implement on the sched_setattr() side:
      
       - if user-attributes have the same size as kernel attributes then the
         logic is unchanged.
      
       - if user-attributes are larger than the kernel knows about then simply
         skip the extra bits, but set attr->size to the (smaller) kernel size
         so that tooling can (in principle) handle older kernel as well.
      
       - if user-attributes are smaller than the kernel knows about then just
         copy whatever user-space can accept.
      
      Also clean up the whole logic:
      
       - Simplify the code flow - there's no need for 'ret' for example.
      
       - Standardize on 'kattr/uattr' and 'ksize/usize' naming to make sure we
         always know which side we are dealing with.
      
       - Why is it called 'read' when what it does is to copy to user? This
         code is so far away from VFS read() semantics that the naming is
         actively confusing. Name it sched_attr_copy_to_user() instead, which
         mirrors other copy_to_user() functionality.
      
       - Move the attr->size assignment from the head of sched_getattr() to the
         sched_attr_copy_to_user() function. Nothing else within the kernel
         should care about the size of the structure.
      
      With these fixes the sched_getattr() syscall now nicely supports an
      extensible ABI in both a forward and backward compatible fashion, and
      will also fix the chrt bug.
      
      As an added bonus the bogus -EFBIG return is removed as well, which as
      Thadeu noted should have been -E2BIG to begin with.
      
      Reported-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Tested-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
      Tested-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Acked-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Patrick Bellasi <patrick.bellasi@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: a509a7cd
      
       ("sched/uclamp: Extend sched_setattr() to support utilization clamping")
      Link: https://lkml.kernel.org/r/20190904075532.GA26751@gmail.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1251201c
  7. Sep 04, 2019
    • Arnd Bergmann's avatar
      Merge tag 'renesas-fixes-for-v5.3' of... · d9a2b63c
      Arnd Bergmann authored
      
      Merge tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into arm/fixes
      
      Renesas ARM Based SoC Fixes for v5.3
      
      * R-Car D3 (r8a77995) based Draak Board
        - Correct backlight regulator name in device tree
      
      * tag 'renesas-fixes-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        arm64: dts: renesas: r8a77995: draak: Fix backlight regulator name
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d9a2b63c
    • Gustavo Romero's avatar
      powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts · a8318c13
      Gustavo Romero authored
      When in userspace and MSR FP=0 the hardware FP state is unrelated to
      the current process. This is extended for transactions where if tbegin
      is run with FP=0, the hardware checkpoint FP state will also be
      unrelated to the current process. Due to this, we need to ensure this
      hardware checkpoint is updated with the correct state before we enable
      FP for this process.
      
      Unfortunately we get this wrong when returning to a process from a
      hardware interrupt. A process that starts a transaction with FP=0 can
      take an interrupt. When the kernel returns back to that process, we
      change to FP=1 but with hardware checkpoint FP state not updated. If
      this transaction is then rolled back, the FP registers now contain the
      wrong state.
      
      The process looks like this:
         Userspace:                      Kernel
      
                     Start userspace
                      with MSR FP=0 TM=1
                        < -----
         ...
         tbegin
         bne
                     Hardware interrupt
                         ---- >
                                          <do_IRQ...>
                                          ....
                                          ret_from_except
                                            restore_math()
      				        /* sees FP=0 */
                                              restore_fp()
                                                tm_active_with_fp()
      					    /* sees FP=1 (Incorrect) */
                                                load_fp_state()
                                              FP = 0 -> 1
                        < -----
                     Return to userspace
                       with MSR TM=1 FP=1
                       with junk in the FP TM checkpoint
         TM rollback
         reads FP junk
      
      When returning from the hardware exception, tm_active_with_fp() is
      incorrectly making restore_fp() call load_fp_state() which is setting
      FP=1.
      
      The fix is to remove tm_active_with_fp().
      
      tm_active_with_fp() is attempting to handle the case where FP state
      has been changed inside a transaction. In this case the checkpointed
      and transactional FP state is different and hence we must restore the
      FP state (ie. we can't do lazy FP restore inside a transaction that's
      used FP). It's safe to remove tm_active_with_fp() as this case is
      handled by restore_tm_state(). restore_tm_state() detects if FP has
      been using inside a transaction and will set load_fp and call
      restore_math() to ensure the FP state (checkpoint and transaction) is
      restored.
      
      This is a data integrity problem for the current process as the FP
      registers are corrupted. It's also a security problem as the FP
      registers from one process may be leaked to another.
      
      Similarly for VMX.
      
      A simple testcase to replicate this will be posted to
      tools/testing/selftests/powerpc/tm/tm-poison.c
      
      This fixes CVE-2019-15031.
      
      Fixes: a7771176
      
       ("powerpc: Don't enable FP/Altivec if not checkpointed")
      Cc: stable@vger.kernel.org # 4.15+
      Signed-off-by: default avatarGustavo Romero <gromero@linux.ibm.com>
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20190904045529.23002-2-gromero@linux.vnet.ibm.com
      a8318c13