[PATCH 5.4 106/109] perf scripts python: exported-sql-viewer.py: Fix zero id in call graph Find result

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 7ff520b0a71dd2db695b52ad117d81b7eaf6ff9d upstream. Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selection. Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write dat

[PATCH 5.4 095/109] drm/radeon: fix double free

2020-07-14 Thread Greg Kroah-Hartman
From: Tom Rix commit 41855a898650803e24b284173354cc3e44d07725 upstream. clang static analysis flags this error drivers/gpu/drm/radeon/ci_dpm.c:5652:9: warning: Use of memory after it is freed [unix.Malloc] kfree(rdev->pm.dpm.ps[i].ps_priv); ^~~

decruft the early init / initrd / initramfs code v2

2020-07-14 Thread Christoph Hellwig
Hi all, this series starts to move the early init code away from requiring KERNEL_DS to be implicitly set during early startup. It does so by first removing legacy unused cruft, and the switches away the code from struct file based APIs to our more usual in-kernel APIs. There is no really good t

Re: [RFC PATCH 04/15] x86/pks: Preserve the PKRS MSR on context switch

2020-07-14 Thread Peter Zijlstra
On Tue, Jul 14, 2020 at 11:53:22AM -0700, Ira Weiny wrote: > On Tue, Jul 14, 2020 at 10:27:01AM +0200, Peter Zijlstra wrote: > > On Tue, Jul 14, 2020 at 12:02:09AM -0700, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > The PKRS MSR is defined as a per-core register. This isolates me

Re: [RFC PATCH 12/15] kmap: Add stray write protection for device pages

2020-07-14 Thread Ira Weiny
On Tue, Jul 14, 2020 at 10:44:51AM +0200, Peter Zijlstra wrote: > On Tue, Jul 14, 2020 at 12:02:17AM -0700, ira.we...@intel.com wrote: > > From: Ira Weiny > > > > Device managed pages may have additional protections. These protections > > need to be removed prior to valid use by kernel users. >

[PATCH 5.7 017/166] ALSA: hda: Intel: add missing PCI IDs for ICL-H, TGL-H and EKL

2020-07-14 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit d50313a5a0d803bcf55121a2b82086633060d05e ] Mirror PCI ids used for SOF. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200617164909.18225-1-pierre-louis.boss...@l

[PATCH 5.4 080/109] KVM: arm64: Fix definition of PAGE_HYP_DEVICE

2020-07-14 Thread Greg Kroah-Hartman
From: Will Deacon commit 68cf617309b5f6f3a651165f49f20af1494753ae upstream. PAGE_HYP_DEVICE is intended to encode attribute bits for an EL2 stage-1 pte mapping a device. Unfortunately, it includes PROT_DEVICE_nGnRE which encodes attributes for EL1 stage-1 mappings such as UXN and nG, which are R

[PATCH 5.7 016/166] ASoC: hdac_hda: fix memleak with regmap not freed on remove

2020-07-14 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit a94eaccefea1186947c5c5451fcae2245dd7e714 ] kmemleak throws error reports on module load/unload tests, add snd_hdac_regmap_exit() in .remove(). While we are at it, also fix the error handling flow in .probe() to use snd_hdac_regmap_exit() if needed.

[PATCH 5.4 084/109] KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode

2020-07-14 Thread Greg Kroah-Hartman
From: Sean Christopherson commit d74fcfc1f0ff4b6c26ecef1f9e48d8089ab4eaac upstream. Inject a #GP on MOV CR4 if CR4.LA57 is toggled in 64-bit mode, which is illegal per Intel's SDM: CR4.LA57 57-bit linear addresses (bit 12 of CR4) ... blah blah blah ... This bit cannot be modified in I

[PATCH 5.4 083/109] KVM: x86: bit 8 of non-leaf PDPEs is not reserved

2020-07-14 Thread Greg Kroah-Hartman
From: Paolo Bonzini commit 5ecad245de2ae23dc4e2dbece92f8ccfbaed2fa7 upstream. Bit 8 would be the "global" bit, which does not quite make sense for non-leaf page table entries. Intel ignores it; AMD ignores it in PDEs and PDPEs, but reserves it in PML4Es. Probably, earlier versions of the AMD m

[PATCH 5.4 105/109] perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 640432e6bed08e9d5d2ba26856ba3f55008b07e3 upstream. Python 3.8 is requiring that arguments being packed as integers are also integers. Add int() accordingly. Before: $ perf record -e intel_pt//u uname $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/

Re: [PATCH -v2.1] x86/msr: Filter MSR writes

2020-07-14 Thread Srinivas Pandruvada
On Tue, 2020-07-14 at 18:56 +0200, Borislav Petkov wrote: > On Tue, Jul 14, 2020 at 05:04:48PM +0100, Chris Down wrote: > > Since the issue involves DPTF which is only supported via binary > > blobs, I > > can't say for certain what the issue is. As I understand it, when > > the > > throttling beha

Re: [PATCH 6/6] staging: qlge: qlge_ethtool: Remove one byte memset.

2020-07-14 Thread Suraj Upadhyay
On Tue, Jul 14, 2020 at 11:57:23AM -0700, Joe Perches wrote: > On Mon, 2020-07-13 at 17:17 +0300, Dan Carpenter wrote: > > On Mon, Jul 13, 2020 at 05:52:22PM +0530, Suraj Upadhyay wrote: > > > Use direct assignment instead of using memset with just one byte as an > > > argument. > > > Issue found b

[PATCH 5.7 001/166] KVM: s390: reduce number of IO pins to 1

2020-07-14 Thread Greg Kroah-Hartman
From: Christian Borntraeger [ Upstream commit 774911290c589e98e3638e73b24b0a4d4530e97c ] The current number of KVM_IRQCHIP_NUM_PINS results in an order 3 allocation (32kb) for each guest start/restart. This can result in OOM killer activity even with free swap when the memory is fragmented enoug

[PATCH 5.4 108/109] perf scripts python: exported-sql-viewer.py: Fix unexpanded Find result

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 3a3cf7c570a486b07d9a6e68a77548aea6a8421f upstream. Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find') would not expand the tree to the result. Fix by using setExpanded(). Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken

[PATCH 5.7 043/166] nfs: Fix memory leak of export_path

2020-07-14 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 4659ed7cc8514369043053463514408ca16ad6f3 ] The try_location function is called within a loop by nfs_follow_referral. try_location calls nfs4_pathname_string to created the export_path. nfs4_pathname_string allocates the memory. export_path is stored in the nfs_fs_

[PATCH 5.7 042/166] arm64: Add KRYO{3,4}XX silver CPU cores to SSB safelist

2020-07-14 Thread Greg Kroah-Hartman
From: Sai Prakash Ranjan [ Upstream commit 108447fd0d1a34b0929cd26dc637c917a734ebab ] QCOM KRYO{3,4}XX silver/LITTLE CPU cores are based on Cortex-A55 and are SSB safe, hence add them to SSB safelist -> arm64_ssb_cpus[]. Reported-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Reviewed-by:

[PATCH 5.7 047/166] gpio: pca953x: Synchronize interrupt handler properly

2020-07-14 Thread Greg Kroah-Hartman
From: Andy Shevchenko [ Upstream commit 064c73afe7385de99e5b2785b88c83dc5d84403b ] Since the commit aa58a21ae378 ("gpio: pca953x: disable regmap locking") the locking of regmap is disabled and that immediately introduces a synchronization issue. It's easy to see when we try to monitor more than

[PATCH 5.7 038/166] arm64: kpti: Add KRYO{3, 4}XX silver CPU cores to kpti safelist

2020-07-14 Thread Greg Kroah-Hartman
From: Sai Prakash Ranjan [ Upstream commit f4617be35b4b547e82d30993f56d631dfc2d5f88 ] QCOM KRYO{3,4}XX silver/LITTLE CPU cores are based on Cortex-A55 and are meltdown safe, hence add them to kpti_safe_list[]. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/20200624123406.34

[PATCH 5.7 024/166] ice: protect ring accesses with WRITE_ONCE

2020-07-14 Thread Greg Kroah-Hartman
From: Ciara Loftus [ Upstream commit b1d95cc2391ffac0c5b27256a4fb0d2cfb021a29 ] The READ_ONCE macro is used when reading rings prior to accessing the statistics pointer. The corresponding WRITE_ONCE usage when allocating and freeing the rings to ensure protected access was not in place. Introduc

[PATCH 5.7 033/166] cifs: update ctime and mtime during truncate

2020-07-14 Thread Greg Kroah-Hartman
From: Zhang Xiaoxu [ Upstream commit 5618303d8516f8ac5ecfe53ee8e8bc9a40eaf066 ] As the man description of the truncate, if the size changed, then the st_ctime and st_mtime fields should be updated. But in cifs, we doesn't do it. It lead the xfstests generic/313 failed. So, add the ATTR_MTIME|A

[PATCH 5.7 015/166] ASoC: SOF: Intel: add PCI ID for CometLake-S

2020-07-14 Thread Greg Kroah-Hartman
From: Pierre-Louis Bossart [ Upstream commit 258fb4f4c34a0db9d3834aba6784d7b322176bb9 ] Mirror ID added for legacy HDaudio Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200617164755.18104-3-pierre-louis.bos

[PATCH 5.7 019/166] spi: spidev: fix a potential use-after-free in spidev_release()

2020-07-14 Thread Greg Kroah-Hartman
From: Zhenzhong Duan [ Upstream commit 06096cc6c5a84ced929634b0d79376b94c65a4bd ] If an spi device is unbounded from the driver before the release process, there will be an NULL pointer reference when it's referenced in spi_slave_abort(). Fix it by checking it's already freed before reference.

[PATCH 5.7 007/166] ARM: dts: omap4-droid4: Fix spi configuration and increase rate

2020-07-14 Thread Greg Kroah-Hartman
From: Tony Lindgren [ Upstream commit 0df12a01f4857495816b05f048c4c31439446e35 ] We can currently sometimes get "RXS timed out" errors and "EOT timed out" errors with spi transfers. These errors can be made easy to reproduce by reading the cpcap iio values in a loop while keeping the CPUs busy

[PATCH 5.7 066/166] drm/meson: viu: fix setting the OSD burst length in VIU_OSD1_FIFO_CTRL_STAT

2020-07-14 Thread Greg Kroah-Hartman
From: Martin Blumenstingl [ Upstream commit 17f64701ea6f541db7eb5d7423a830cb929b3052 ] The burst length is configured in VIU_OSD1_FIFO_CTRL_STAT[31] and VIU_OSD1_FIFO_CTRL_STAT[11:10]. The public S905D3 datasheet describes this as: - 0x0 = up to 24 per burst - 0x1 = up to 32 per burst - 0x2 = up

Re: [PATCH v4 1/5] docs: IOMMU user API

2020-07-14 Thread Alex Williamson
On Mon, 13 Jul 2020 22:00:23 -0700 Jacob Pan wrote: > Hi Alex, > > On Mon, 13 Jul 2020 16:48:42 -0600 > Alex Williamson wrote: > > > On Tue, 7 Jul 2020 16:43:45 -0700 > > Jacob Pan wrote: > > > > > IOMMU UAPI is newly introduced to support communications between > > > guest virtual IOMMU

[PATCH 5.7 028/166] iommu/vt-d: Dont apply gfx quirks to untrusted devices

2020-07-14 Thread Greg Kroah-Hartman
From: Rajat Jain [ Upstream commit 67e8a5b18d41af9298db5c17193f671f235cce01 ] Currently, an external malicious PCI device can masquerade the VID:PID of faulty gfx devices, and thus apply iommu quirks to effectively disable the IOMMU restrictions for itself. Thus we need to ensure that the devic

Re: [PATCH v5 1/4] arm64: dts: rockchip: Trivial cleanups for RockPI N10

2020-07-14 Thread Heiko Stuebner
Am Donnerstag, 9. Juli 2020, 12:07:53 CEST schrieb Jagan Teki: > Radxa dalang carrier boards are used to mount vmarc SoM's > of rk3399pro and rk3288 to make complete SBC. > > So, this patch adds trivial changes to properties. > - move common properties into radxa dalang carrier dtsi. > - maintain

[PATCH 5.7 053/166] KVM: arm64: vgic-v4: Plug race between non-residency and v4.1 doorbell

2020-07-14 Thread Greg Kroah-Hartman
From: Marc Zyngier [ Upstream commit a3f574cd65487cd993f79ab235d70229d9302c1e ] When making a vPE non-resident because it has hit a blocking WFI, the doorbell can fire at any time after the write to the RD. Crucially, it can fire right between the write to GICR_VPENDBASER and the write to the pe

[PATCH 5.7 082/166] net: ipa: fix QMI structure definition bugs

2020-07-14 Thread Greg Kroah-Hartman
From: Alex Elder [ Upstream commit 74478ea4ded519db35cb1f059948b1e713bb4abf ] Building with "W=1" did exactly what it was supposed to do, namely point out some suspicious-looking code to be verified not to contain bugs. Some QMI message structures defined in "ipa_qmi_msg.c" contained some bad f

[PATCH 5.7 068/166] net: dsa: microchip: set the correct number of ports

2020-07-14 Thread Greg Kroah-Hartman
From: Codrin Ciubotariu [ Upstream commit af199a1a9cb02ec0194804bd46c174b6db262075 ] The number of ports is incorrectly set to the maximum available for a DSA switch. Even if the extra ports are not used, this causes some functions to be called later, like port_disable() and port_stp_state_set()

Re: [PATCH 0/2] iowait and idle fixes in /proc/stat

2020-07-14 Thread Tom Hromatka
Ping. Thanks. Tom On 6/10/20 3:05 PM, Tom Hromatka wrote: A customer is using /proc/stat to track cpu usage in a VM and noted that the iowait and idle times behave strangely when a cpu goes offline and comes back online. This patchset addresses two issues that can cause iowait and idle to fl

[PATCH 5.7 067/166] IB/sa: Resolv use-after-free in ib_nl_make_request()

2020-07-14 Thread Greg Kroah-Hartman
From: Divya Indi [ Upstream commit f427f4d6214c183c474eeb46212d38e6c7223d6a ] There is a race condition where ib_nl_make_request() inserts the request data into the linked list but the timer in ib_nl_request_timeout() can see it and destroy it before ib_nl_send_msg() is done touching it. This co

[PATCH 5.7 072/166] perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()

2020-07-14 Thread Greg Kroah-Hartman
From: Wei Li [ Upstream commit d61cbb859b45fdb6b4997f2d51834fae41af0e94 ] The segmentation fault can be reproduced as following steps: 1) Executing perf report in tui. 2) Typing '/x' to filter the symbol to get nothing matched. 3) Pressing enter with no entry selected. Then it will repor

[PATCH 5.7 103/166] net: macb: fix macb_suspend() by removing call to netif_carrier_off()

2020-07-14 Thread Greg Kroah-Hartman
From: Nicolas Ferre [ Upstream commit 64febc5e56c9a748162f206dcc5be1a44436087a ] As we now use the phylink call to phylink_stop() in the non-WoL path, there is no need for this call to netif_carrier_off() anymore. It can disturb the underlying phylink FSM. Fixes: 7897b071ac3b ("net: macb: conve

[PATCH 5.7 063/166] net: ipa: no checksum offload for SDM845 LAN RX

2020-07-14 Thread Greg Kroah-Hartman
From: Alex Elder [ Upstream commit 41af5436e857ec64f302fcc9b6e4a8c526b6b402 ] The AP LAN RX endpoint should not have download checksum offload enabled. The receive handler does properly accommodate the trailer that's added by the hardware, but we ignore it. Fixes: 1ed7d0c0fdba ("soc: qcom: ipa

[PATCH 5.7 090/166] cxgb4: fix all-mask IP address comparison

2020-07-14 Thread Greg Kroah-Hartman
From: Rahul Lakkireddy [ Upstream commit 76c4d85c9260c3d741cbd194c30c61983d0a4303 ] Convert all-mask IP address to Big Endian, instead, for comparison. Fixes: f286dd8eaad5 ("cxgb4: use correct type for all-mask IP address comparison") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Mi

[PATCH 5.7 101/166] net: macb: mark device wake capable when "magic-packet" property present

2020-07-14 Thread Greg Kroah-Hartman
From: Nicolas Ferre [ Upstream commit ced4799d06375929e013eea04ba6908207afabbe ] Change the way the "magic-packet" DT property is handled in the macb_probe() function, matching DT binding documentation. Now we mark the device as "wakeup capable" instead of calling the device_init_wakeup() functi

Re: [PATCH 6/6] staging: qlge: qlge_ethtool: Remove one byte memset.

2020-07-14 Thread Joe Perches
On Mon, 2020-07-13 at 17:17 +0300, Dan Carpenter wrote: > On Mon, Jul 13, 2020 at 05:52:22PM +0530, Suraj Upadhyay wrote: > > Use direct assignment instead of using memset with just one byte as an > > argument. > > Issue found by checkpatch.pl. > > > > Signed-off-by: Suraj Upadhyay > > --- > > Hi

[PATCH 5.7 080/166] net: hns3: fix use-after-free when doing self test

2020-07-14 Thread Greg Kroah-Hartman
From: Yonglong Liu [ Upstream commit a06656211304fec653c1931c2ca6d644013b5bbb ] Enable promisc mode of PF, set VF link state to enable, and run iperf of the VF, then do self test of the PF. The self test will fail with a low frequency, and may cause a use-after-free problem. [ 87.142126] self

[PATCH 5.7 084/166] ionic: centralize queue reset code

2020-07-14 Thread Greg Kroah-Hartman
From: Shannon Nelson [ Upstream commit 086c18f2452d0028f81e319f098bcb8e53133dbf ] The queue reset pattern is used in a couple different places, only slightly different from each other, and could cause issues if one gets changed and the other didn't. This puts them together so that only one vers

[PATCH 5.7 062/166] net: mvneta: fix use of state->speed

2020-07-14 Thread Greg Kroah-Hartman
From: Russell King [ Upstream commit f2ca673d2cd5df9a76247b670e9ffd4d63682b3f ] When support for short preambles was added, it incorrectly keyed its decision off state->speed instead of state->interface. state->speed is not guaranteed to be correct for in-band modes, which can lead to short pre

[PATCH 5.7 102/166] net: macb: fix macb_get/set_wol() when moving to phylink

2020-07-14 Thread Greg Kroah-Hartman
From: Nicolas Ferre [ Upstream commit 253fe09435045ab9346a8e364299d971185ae031 ] Keep previous function goals and integrate phylink actions to them. phylink_ethtool_get_wol() is not enough to figure out if Ethernet driver supports Wake-on-Lan. Initialization of "supported" and "wolopts" members

[PATCH 5.7 088/166] arm64: kgdb: Fix single-step exception handling oops

2020-07-14 Thread Greg Kroah-Hartman
From: Wei Li [ Upstream commit 8523c006264df65aac7d77284cc69aac46a6f842 ] After entering kdb due to breakpoint, when we execute 'ss' or 'go' (will delay installing breakpoints, do single-step first), it won't work correctly, and it will enter kdb due to oops. It's because the reason gotten in k

[PATCH 5.7 104/166] net: macb: fix call to pm_runtime in the suspend/resume functions

2020-07-14 Thread Greg Kroah-Hartman
From: Nicolas Ferre [ Upstream commit 6c8f85cac98a4c6b767c4c4f6af7283724c32b47 ] The calls to pm_runtime_force_suspend/resume() functions are only relevant if the device is not configured to act as a WoL wakeup source. Add the device_may_wakeup() test before calling them. Fixes: 3e2a5e153906 ("

[PATCH 5.7 121/166] KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode

2020-07-14 Thread Greg Kroah-Hartman
From: Sean Christopherson commit d74fcfc1f0ff4b6c26ecef1f9e48d8089ab4eaac upstream. Inject a #GP on MOV CR4 if CR4.LA57 is toggled in 64-bit mode, which is illegal per Intel's SDM: CR4.LA57 57-bit linear addresses (bit 12 of CR4) ... blah blah blah ... This bit cannot be modified in I

[PATCH 5.7 114/166] ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC

2020-07-14 Thread Greg Kroah-Hartman
From: Jian-Hong Pan commit 8eae7e9b3967f08efaa4d70403aec513cbe45ad0 upstream. The Acer desktop vCopperbox with ALC269VC cannot detect the MIC of headset, the line out and internal speaker until ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied. Signed-off-by: Jian-Hong Pan Signed-off-by: Chris

[PATCH 5.7 118/166] KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART

2020-07-14 Thread Greg Kroah-Hartman
From: Andrew Scull commit b9e10d4a6c9f5cbe6369ce2c17ebc67d2e5a4be5 upstream. HVC_SOFT_RESTART is given values for x0-2 that it should installed before exiting to the new address so should not set x0 to stub HVC success or failure code. Fixes: af42f20480bf1 ("arm64: hyp-stub: Zero x0 on successf

[PATCH 5.7 132/166] bpf: Check correct cred for CAP_SYSLOG in bpf_dump_raw_ok()

2020-07-14 Thread Greg Kroah-Hartman
From: Kees Cook commit 63960260457a02af2a6cb35d75e6bdb17299c882 upstream. When evaluating access control over kallsyms visibility, credentials at open() time need to be used, not the "current" creds (though in BPF's case, this has likely always been the same). Plumb access to associated file->f_

Re: [PATCH] KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled

2020-07-14 Thread Jim Mattson
On Tue, Jul 14, 2020 at 11:59 AM Sean Christopherson wrote: > > On Tue, Jul 14, 2020 at 11:55:45AM -0700, Jim Mattson wrote: > > On Mon, Jul 13, 2020 at 6:57 PM Sean Christopherson > > wrote: > > > > > > Don't attempt to load PDPTRs if EFER.LME=1, i.e. if 64-bit mode is > > > enabled. A recent c

Re: [GIT PULL tip/core/rcu] RCU commits for v5.9

2020-07-14 Thread Sebastian Andrzej Siewior
On 2020-07-14 11:27:32 [-0700], Paul E. McKenney wrote: > I believe that Ulad and Joel are working on an update. I expressed multiple times that I am unhappy with the raw_spinlock_t which both want to keep. It is important to be future proof but at the same time I am not sure if they know how many

[PATCH 5.7 109/166] ALSA: opl3: fix infoleak in opl3

2020-07-14 Thread Greg Kroah-Hartman
From: xidongwang commit ad155712bb1ea2151944cf06a0e08c315c70c1e3 upstream. The stack object “info” in snd_opl3_ioctl() has a leaking problem. It has 2 padding bytes which are not initialized and leaked via “copy_to_user”. Signed-off-by: xidongwang Cc: Link: https://lore.kernel.org/r/15940060

[PATCH 5.7 097/166] net/mlx5e: Fix 50G per lane indication

2020-07-14 Thread Greg Kroah-Hartman
From: Aya Levin [ Upstream commit 6a1cf4e443a3b0a4d690d3c93b84b1e9cbfcb1bd ] Some released FW versions mistakenly don't set the capability that 50G per lane link-modes are supported for VFs (ptys_extended_ethernet capability bit). When the capability is unset, read PTYS.ext_eth_proto_capability

[PATCH 5.7 089/166] nbd: Fix memory leak in nbd_add_socket

2020-07-14 Thread Greg Kroah-Hartman
From: Zheng Bin [ Upstream commit 579dd91ab3a5446b148e7f179b6596b270dace46 ] When adding first socket to nbd, if nsock's allocation failed, the data structure member "config->socks" was reallocated, but the data structure member "config->num_connections" was not updated. A memory leak will occur

[PATCH 5.7 092/166] qed: Populate nvm-file attributes while reading nvm config partition.

2020-07-14 Thread Greg Kroah-Hartman
From: Sudarsana Reddy Kalluru [ Upstream commit 13cf8aab7425a253070433b5a55b4209ceac8b19 ] NVM config file address will be modified when the MBI image is upgraded. Driver would return stale config values if user reads the nvm-config (via ethtool -d) in this state. The fix is to re-populate nvm a

[PATCH 5.7 108/166] IB/hfi1: Do not destroy link_wq when the device is shut down

2020-07-14 Thread Greg Kroah-Hartman
From: Kaike Wan commit 2315ec12ee8e8257bb335654c62e0cae71dc278d upstream. The workqueue link_wq should only be destroyed when the hfi1 driver is unloaded, not when the device is shut down. Fixes: 71d47008ca1b ("IB/hfi1: Create workqueue for link events") Link: https://lore.kernel.org/r/2020062

[PATCH 5.7 144/166] drm/i915: Drop vm.ref for duplicate vma on construction

2020-07-14 Thread Greg Kroah-Hartman
From: Chris Wilson commit 42723673a193d5f8e30dba6ea9826d42262a502b upstream. As we allow for parallel threads to create the same vma instance concurrently, and we only filter out the duplicates upon reacquiring the spinlock for the rbtree, we have to free the loser of the constructors' race. Whe

[PATCH 5.7 126/166] io_uring: fix memleak in io_sqe_files_register()

2020-07-14 Thread Greg Kroah-Hartman
From: Yang Yingliang commit 667e57da358f61b6966e12e925a69e42d912e8bb upstream. I got a memleak report when doing some fuzz test: BUG: memory leak unreferenced object 0x607eeac06e78 (size 8): comm "test", pid 295, jiffies 4294735835 (age 31.745s) hex dump (first 8 bytes): 00 00 00 00 00

[PATCH 5.7 148/166] smb3: fix unneeded error message on change notify

2020-07-14 Thread Greg Kroah-Hartman
From: Steve French commit 8668115cf2db40e22e7be02652a3673d8d30c9f0 upstream. We should not be logging a warning repeatedly on change notify. CC: Stable # v5.6+ Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2misc.c |8 ++--

[PATCH 5.7 125/166] io_uring: account user memory freed when exit has been queued

2020-07-14 Thread Greg Kroah-Hartman
From: Jens Axboe commit 309fc03a3284af62eb6082fb60327045a1dabf57 upstream. We currently account the memory after the exit work has been run, but that leaves a gap where a process has closed its ring and until the memory has been accounted as freed. If the memlocked ulimit is borderline, then tha

[PATCH 5.7 130/166] module: Do not expose section addresses to non-CAP_SYSLOG

2020-07-14 Thread Greg Kroah-Hartman
From: Kees Cook commit b25a7c5af9051850d4f3d93ca500056ab6ec724b upstream. The printing of section addresses in /sys/module/*/sections/* was not using the correct credentials to evaluate visibility. Before: # cat /sys/module/*/sections/.*text 0xc0458000 ... # capsh --drop=CAP_SYSLOG

[PATCH 5.7 127/166] io_uring: fix missing msg_name assignment

2020-07-14 Thread Greg Kroah-Hartman
From: Pavel Begunkov commit dd821e0c95a64b5923a0c57f07d3f7563553e756 upstream. Ensure to set msg.msg_name for the async portion of send/recvmsg, as the header copy will copy to/from it. Cc: sta...@vger.kernel.org # v5.5+ Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe Signed-off-by: G

[PATCH 5.7 153/166] ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE

2020-07-14 Thread Greg Kroah-Hartman
From: Vineet Gupta commit 00fdec98d9881bf5173af09aebd353ab3b9ac729 upstream. Trap handler for syscall tracing reads EFA (Exception Fault Address), in case strace wants PC of trap instruction (EFA is not part of pt_regs as of current code). However this EFA read is racy as it happens after dropp

Re: [PATCH] KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled

2020-07-14 Thread Sean Christopherson
On Tue, Jul 14, 2020 at 11:55:45AM -0700, Jim Mattson wrote: > On Mon, Jul 13, 2020 at 6:57 PM Sean Christopherson > wrote: > > > > Don't attempt to load PDPTRs if EFER.LME=1, i.e. if 64-bit mode is > > enabled. A recent change to reload the PDTPRs when CR0.CD or CR0.NW is > > toggled botched the

[PATCH 5.7 086/166] RDMA/siw: Fix reporting vendor_part_id

2020-07-14 Thread Greg Kroah-Hartman
From: Kamal Heib [ Upstream commit 04340645f69ab7abb6f9052688a60f0213b3f79c ] Move the initialization of the vendor_part_id to be before calling ib_register_device(), this is needed because the query_device() callback is called from the context of ib_register_device() before initializing the ven

[PATCH 5.7 137/166] btrfs: fix double put of block group with nocow

2020-07-14 Thread Greg Kroah-Hartman
From: Josef Bacik commit 230ed397435e85b54f055c524fcb267ae2ce3bc4 upstream. While debugging a patch that I wrote I was hitting use-after-free panics when accessing block groups on unmount. This turned out to be because in the nocow case if we bail out of doing the nocow for whatever reason we n

[PATCH 5.7 143/166] drm/amdgpu: asd function needs to be unloaded in suspend phase

2020-07-14 Thread Greg Kroah-Hartman
From: Huang Rui commit 20303ec5d2165ee6344190274bc59118921f71d9 upstream. Unload ASD function in suspend phase. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH 5.7 138/166] drm/radeon: fix double free

2020-07-14 Thread Greg Kroah-Hartman
From: Tom Rix commit 41855a898650803e24b284173354cc3e44d07725 upstream. clang static analysis flags this error drivers/gpu/drm/radeon/ci_dpm.c:5652:9: warning: Use of memory after it is freed [unix.Malloc] kfree(rdev->pm.dpm.ps[i].ps_priv); ^~~

[PATCH 5.7 123/166] KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE

2020-07-14 Thread Greg Kroah-Hartman
From: Steven Price If SVE is enabled then 'ret' can be assigned the return value of kvm_vcpu_enable_sve() which may be 0 causing future "goto out" sites to erroneously return 0 on failure rather than -EINVAL as expected. Remove the initialisation of 'ret' and make setting the return value explic

[PATCH 5.7 164/166] perf scripts python: exported-sql-viewer.py: Fix zero id in call tree Find result

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 031c8d5edb1ddeb6d398f7942ce2a01a1a51ada9 upstream. Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selection. Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write

[PATCH 5.7 166/166] perf scripts python: exported-sql-viewer.py: Fix time chart call tree

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit f18d5cf86cdb58eb50cafb5a5e20943ec7a61b1f upstream. Using Python version 3.8.2 and PySide2 version 5.14.0, time chart call tree would not expand the tree to the result. Fix by using setExpanded(). Example: $ perf record -e intel_pt//u uname Linux [ perf record:

[PATCH 5.7 157/166] arm64: Introduce a way to disable the 32bit vdso

2020-07-14 Thread Greg Kroah-Hartman
From: Marc Zyngier commit 97884ca8c2925d14c32188e865069f21378b4b4f upstream. We have a class of errata (grouped under the ARM64_WORKAROUND_1418040 banner) that force the trapping of counter access from 32bit EL0. We would normally disable the whole vdso for such defect, except that it would dis

[PATCH 5.7 158/166] arm64: arch_timer: Allow an workaround descriptor to disable compat vdso

2020-07-14 Thread Greg Kroah-Hartman
From: Marc Zyngier commit c1fbec4ac0d701f350a581941d35643d5a9cd184 upstream. As we are about to disable the vdso for compat tasks in some circumstances, let's allow a workaround descriptor to express exactly that. Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Cc: sta...@vger.kernel.org L

[PATCH 5.7 131/166] kprobes: Do not expose probe addresses to non-CAP_SYSLOG

2020-07-14 Thread Greg Kroah-Hartman
From: Kees Cook commit 60f7bb66b88b649433bf700acfc60c3f24953871 upstream. The kprobe show() functions were using "current"'s creds instead of the file opener's creds for kallsyms visibility. Fix to use seq_file->file->f_cred. Cc: Masami Hiramatsu Cc: sta...@vger.kernel.org Fixes: 81365a947de4

[PATCH 5.7 159/166] arm64: arch_timer: Disable the compat vdso for cores affected by ARM64_WORKAROUND_1418040

2020-07-14 Thread Greg Kroah-Hartman
From: Marc Zyngier commit 4b661d6133c5d3a7c9aca0b4ee5a78c7766eff3f upstream. ARM64_WORKAROUND_1418040 requires that AArch32 EL0 accesses to the virtual counter register are trapped and emulated by the kernel. This makes the vdso pretty pointless, and in some cases livelock prone. Provide a work

[PATCH 5.7 161/166] dm writecache: reject asynchronous pmem devices

2020-07-14 Thread Greg Kroah-Hartman
From: Michal Suchanek commit a46624580376a3a0beb218d94cbc7f258696e29f upstream. DM writecache does not handle asynchronous pmem. Reject it when supplied as cache. Link: https://lore.kernel.org/linux-nvdimm/87lfk5hahc@linux.ibm.com/ Fixes: 6e84200c0a29 ("virtio-pmem: Add virtio pmem driver")

[PATCH 5.7 122/166] KVM: x86: Mark CR4.TSD as being possibly owned by the guest

2020-07-14 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 7c83d096aed055a7763a03384f92115363448b71 upstream. Mark CR4.TSD as being possibly owned by the guest as that is indeed the case on VMX. Without TSD being tagged as possibly owned by the guest, a targeted read of CR4 to get TSD could observe a stale value. This

[PATCH 5.7 160/166] blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()

2020-07-14 Thread Greg Kroah-Hartman
From: Ming Lei commit 05a4fed69ff00a8bd83538684cb602a4636b07a7 upstream. dm-multipath is the only user of blk_mq_queue_inflight(). When dm-multipath calls blk_mq_queue_inflight() to check if it has outstanding IO it can get a false negative. The reason for this is blk_mq_rq_inflight() doesn't

[PATCH 5.7 155/166] s390/setup: init jump labels before command line parsing

2020-07-14 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit 95e61b1b5d6394b53d147c0fcbe2ae70fbe09446 upstream. Command line parameters might set static keys. This is true for s390 at least since commit 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options"). To avoid the following WARN: static_

[PATCH 5.7 163/166] perf scripts python: exported-sql-viewer.py: Fix zero id in call graph Find result

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 7ff520b0a71dd2db695b52ad117d81b7eaf6ff9d upstream. Using ctrl-F ('Find') would not find 'unknown' because it matches id zero. Fix by excluding id zero from selection. Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken up 1 times to write dat

[PATCH 5.7 162/166] perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 640432e6bed08e9d5d2ba26856ba3f55008b07e3 upstream. Python 3.8 is requiring that arguments being packed as integers are also integers. Add int() accordingly. Before: $ perf record -e intel_pt//u uname $ perf script --itrace=bep -s ~/libexec/perf-core/scripts/

[PATCH 5.7 165/166] perf scripts python: exported-sql-viewer.py: Fix unexpanded Find result

2020-07-14 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 3a3cf7c570a486b07d9a6e68a77548aea6a8421f upstream. Using Python version 3.8.2 and PySide2 version 5.14.0, ctrl-F ('Find') would not expand the tree to the result. Fix by using setExpanded(). Example: $ perf record -e intel_pt//u uname Linux [ perf record: Woken

[PATCH 5.7 128/166] kallsyms: Refactor kallsyms_show_value() to take cred

2020-07-14 Thread Greg Kroah-Hartman
From: Kees Cook commit 160251842cd35a75edfb0a1d76afa3eb674ff40a upstream. In order to perform future tests against the cred saved during open(), switch kallsyms_show_value() to operate on a cred, and have all current callers pass current_cred(). This makes it very obvious where callers are check

[PATCH 5.7 129/166] module: Refactor section attr into bin attribute

2020-07-14 Thread Greg Kroah-Hartman
From: Kees Cook commit ed66f991bb19d94cae5d38f77de81f96aac7813f upstream. In order to gain access to the open file's f_cred for kallsym visibility permission checks, refactor the module section attributes to use the bin_attribute instead of attribute interface. Additionally removes the redundant

[PATCH 5.7 156/166] s390/mm: fix huge pte soft dirty copying

2020-07-14 Thread Greg Kroah-Hartman
From: Janosch Frank commit 528a9539348a0234375dfaa1ca5dbbb2f8f8e8d2 upstream. If the pmd is soft dirty we must mark the pte as soft dirty (and not dirty). This fixes some cases for guest migration with huge page backings. Cc: # 4.8 Fixes: bc29b7ac1d9f ("s390/mm: clean up pte/pmd encoding") Rev

[PATCH][next] drm/rockchip: lvds: ensure ret is assigned before checking for an error

2020-07-14 Thread Colin King
From: Colin Ian King Currently there are two places where the return status in ret is being checked for an error however the assignment of ret has been omitted making the checks redundant. Fix this by adding in the missing assignments of ret. Addresses-Coverity: ("Logically dead code") Fixes: c

[PATCH 5.7 139/166] drm/i915/gt: Pin the rings before marking active

2020-07-14 Thread Greg Kroah-Hartman
From: Chris Wilson commit 5a383d443b29a140094430f3ad1d02fa1acc2b80 upstream. On eviction, we acquire the vm->mutex and then wait on the vma->active. Therefore when binding and pinning the vma, we must follow the same sequence, lock/pin the vma then mark it active. Otherwise, we mark the vma as a

[PATCH 5.7 136/166] btrfs: discard: add missing put when grabbing block group from unused list

2020-07-14 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 04e484c5973ed0f9234c97685c3c5e1ebf0d6eb6 upstream. [BUG] The following small test script can trigger ASSERT() at unmount time: mkfs.btrfs -f $dev mount $dev $mnt mount -o remount,discard=async $mnt umount $mnt The call trace: assertion failed: atomic_read(&bloc

[PATCH 5.7 152/166] pinctrl: baytrail: Fix pin being driven low for a while on gpiod_get(..., GPIOD_OUT_HIGH)

2020-07-14 Thread Greg Kroah-Hartman
From: Hans de Goede commit 45c11a927606c612e4898a9484867b71318699f6 upstream. The pins on the Bay Trail SoC have separate input-buffer and output-buffer enable bits and a read of the level bit of the value register will always return the value from the input-buffer. The BIOS of a device may con

[PATCH 5.7 150/166] mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed

2020-07-14 Thread Greg Kroah-Hartman
From: Neil Armstrong commit 27a5e7d36d383970affae801d77141deafd536a8 upstream. The actual max_segs computation leads to failure while using the broadcom sdio brcmfmac/bcmsdh driver, since the driver tries to make usage of scatter gather. But with the dram-access-quirk we use a 1,5K SRAM bounce

[PATCH 5.7 141/166] drm/amdgpu: dont do soft recovery if gpu_recovery=0

2020-07-14 Thread Greg Kroah-Hartman
From: Marek Olšák commit f4892c327a8e5df7ce16cab40897daf90baf6bec upstream. It's impossible to debug shader hangs with soft recovery. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org Signed-off-by: Greg

[PATCH 5.7 146/166] cifs: fix reference leak for tlink

2020-07-14 Thread Greg Kroah-Hartman
From: Ronnie Sahlberg commit a77592a70081edb58a95b9da18fd5a2882a25666 upstream. Don't leak a reference to tlink during the NOTIFY ioctl Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel CC: Stable # v5.6+ Signed-off-by: Greg Kroah-Hartman --- fs/cifs/

[PATCH 5.7 140/166] drm/i915: Skip stale object handle for debugfs per-file-stats

2020-07-14 Thread Greg Kroah-Hartman
From: Chris Wilson commit 7dfbf8a07cf8c936b0d6cc810df6ae7923954d5b upstream. As we close a handle GEM object, we update the drm_file's idr with an error^W NULL pointer to indicate the in-progress closure, and finally removing it. If we read the idr directly, we may then see an invalid object poi

[PATCH 5.7 145/166] drm/i915: Also drop vm.ref along error paths for vma construction

2020-07-14 Thread Greg Kroah-Hartman
From: Chris Wilson commit cf1976b11372cac3b57fbae1831f66a4486355d3 upstream. Not only do we need to release the vm.ref we acquired for the vma on the duplicate insert branch, but also for the normal error paths, so roll them all into one. Reported-by: Andi Shyti Suggested-by: Andi Shyti Fixes

[PATCH 5.7 147/166] smb3: fix access denied on change notify request to some servers

2020-07-14 Thread Greg Kroah-Hartman
From: Steve French commit 4ef9b4f1a76ea2370fbfe20e80fef141ab92b65e upstream. read permission, not just read attributes permission, is required on the directory. See MS-SMB2 (protocol specification) section 3.3.5.19. Signed-off-by: Steve French CC: Stable # v5.6+ Reviewed-by: Pavel Shilovsky

[PATCH 5.7 154/166] ARC: elf: use right ELF_ARCH

2020-07-14 Thread Greg Kroah-Hartman
From: Vineet Gupta commit b7faf971081a4e56147f082234bfff55135305cb upstream. Cc: Signed-off-by: Vineet Gupta Signed-off-by: Greg Kroah-Hartman --- arch/arc/include/asm/elf.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arc/include/asm/elf.h +++ b/arch/arc/include/asm

[PATCH 5.7 124/166] io_uring: fix memleak in __io_sqe_files_update()

2020-07-14 Thread Greg Kroah-Hartman
From: Yang Yingliang commit f3bd9dae3708a0ff6b067e766073ffeb853301f9 upstream. I got a memleak report when doing some fuzz test: BUG: memory leak unreferenced object 0x888113e02300 (size 488): comm "syz-executor401", pid 356, jiffies 4294809529 (age 11.954s) hex dump (first 32 bytes): 00 00

[PATCH 5.7 142/166] drm/amdgpu: add TMR destory function for psp

2020-07-14 Thread Greg Kroah-Hartman
From: Huang Rui commit c564b8601ae917086751d90f464d5f19d731ece7 upstream. TMR is required to be destoried with GFX_CMD_ID_DESTROY_TMR while the system goes to suspend. Otherwise, PSP may return the failure state (0x007) on Gfx-2-PSP command GFX_CMD_ID_SETUP_TMR after do multiple times suspen

[PATCH 5.7 149/166] dm: use noio when sending kobject event

2020-07-14 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 6958c1c640af8c3f40fa8a2eee3b5b905d95b677 upstream. kobject_uevent may allocate memory and it may be called while there are dm devices suspended. The allocation may recurse into a suspended device, causing a deadlock. We must set the noio flag when sending a uevent.

[PATCH 5.7 151/166] mmc: owl-mmc: Get rid of of_match_ptr() macro

2020-07-14 Thread Greg Kroah-Hartman
From: Manivannan Sadhasivam commit f8884711f78fa946041cf04492e218c377479a9c upstream. Remove the 'of_match_ptr()' macro to fix the warning when CONFIG_OF is not selected. drivers/mmc/host/owl-mmc.c:677:34: warning: unused variable 'owl_mmc_of_match' [-Wunused-const-variable] Reported-by: kerne

<    2   3   4   5   6   7   8   9   10   11   >