Re: Let's talk about the elephant in the room - the Linux kernel's inability to gracefully handle low memory pressure

2019-08-05 Thread Michal Hocko
On Mon 05-08-19 14:13:16, Vlastimil Babka wrote: > On 8/4/19 11:23 AM, Artem S. Tashkinov wrote: > > Hello, > > > > There's this bug which has been bugging many people for many years > > already and which is reproducible in less than a few minutes under the > > latest and greatest kernel, 5.2.6.

Re: [PATCH v4 2/2] dt-bindings: iio: potentiometer: add max5432.yaml binding

2019-08-05 Thread Jonathan Cameron
On Wed, 31 Jul 2019 10:50:36 -0600 Rob Herring wrote: > On Wed, Jul 31, 2019 at 8:07 AM Martin Kaiser wrote: > > > > Add a binding for the Maxim Integrated MAX5432-MAX5435 family of digital > > potentiometers. > > > > Signed-off-by: Martin Kaiser > > --- > > changes in v4 > > - fix the dt

[PATCH 4.19 73/74] x86/vdso: Prevent segfaults due to hoisted vclock reads

2019-08-05 Thread Greg Kroah-Hartman
From: Andy Lutomirski commit ff17bbe0bb405ad8b36e55815d381841f9fdeebc upstream. GCC 5.5.0 sometimes cleverly hoists reads of the pvclock and/or hvclock pages before the vclock mode checks. This creates a path through vclock_gettime() in which no vclock is enabled at all (due to disabled TSC on

[PATCH 4.19 54/74] s390/dasd: fix endless loop after read unit address configuration

2019-08-05 Thread Greg Kroah-Hartman
From: Stefan Haberland commit 41995342b40c418a47603e1321256d2c4a2ed0fb upstream. After getting a storage server event that causes the DASD device driver to update its unit address configuration during a device shutdown there is the possibility of an endless loop in the device driver. In the

Re: [Y2038] [PATCH 05/20] utimes: Clamp the timestamps before update

2019-08-05 Thread Ben Hutchings
On Mon, 2019-07-29 at 18:49 -0700, Deepa Dinamani wrote: > POSIX is ambiguous on the behavior of timestamps for > futimens, utimensat and utimes. Whether to return an > error or silently clamp a timestamp beyond the range > supported by the underlying filesystems is not clear. > > POSIX.1 section

Re: [PATCH v4 1/2] iio: potentiometer: add a driver for Maxim 5432-5435

2019-08-05 Thread Jonathan Cameron
On Wed, 31 Jul 2019 16:07:05 +0200 Martin Kaiser wrote: > Add a driver for the Maxim Integrated MAX5432-MAX5435 family of digital > potentiometers. > > These potentiometers are connected via I2C and have 32 wiper > positions. > > Supported functionality > - set the volatile wiper position > -

[PATCH 5.2 016/131] soc: imx8: Fix potential kernel dump in error path

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 1bcbe7300815e91fef18ee905b04f65490ad38c9 ] When SoC's revision value is 0, SoC driver will print out "unknown" in sysfs's revision node, this "unknown" is a static string which can NOT be freed, this will caused below kernel dump in later error path which calls kfree: kernel

[PATCH 5.2 030/131] btrfs: qgroup: Dont hold qgroup_ioctl_lock in btrfs_qgroup_inherit()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit e88439debd0a7f969b3ddba6f147152cd0732676 ] [BUG] Lockdep will report the following circular locking dependency: WARNING: possible circular locking dependency detected 5.2.0-rc2-custom #24 Tainted: G O --

[PATCH 5.2 018/131] swiotlb: fix phys_addr_t overflow warning

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 9c106119f6538f65bdddb7948a157d90625effa7 ] On architectures that have a larger dma_addr_t than phys_addr_t, the swiotlb_tbl_map_single() function truncates its return code in the failure path, making it impossible to identify the error later, as we compare to the original value:

Puno ti hvala

2019-08-05 Thread John Makati
Dragi prijatelju, U kratkom uvodu ja sam barrister John Makati, odvjetnik po struci i osobni odvjetnik inženjera. stranac koji je umro u mojoj zemlji s obitelji prije nekoliko godina, ostavivši za sobom ogromnu svotu novca u banci u mojoj zemlji. Ja sam njegov odvjetnik i tražim njegovu rodbinu,

Re: [RFC PATCH 1/2] dt-bindings: net: macb: Add new property for PS SGMII only

2019-08-05 Thread Andrew Lunn
On Mon, Aug 05, 2019 at 11:45:05AM +0530, Harini Katakam wrote: > Hi Andrew, > > On Sun, Aug 4, 2019 at 8:26 PM Andrew Lunn wrote: > > > > On Wed, Jul 31, 2019 at 03:10:32PM +0530, Harini Katakam wrote: > > > Add a new property to indicate when PS SGMII is used with NO > > > external PHY on

[PATCH 5.2 007/131] arm64: dts: qcom: qcs404-evb: fix l3 min voltage

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 887b528c958f40b064d53edd0bfa9fea3a69eccd ] The current l3 min voltage level is not supported by the regulator (the voltage is not a multiple of the regulator step size), so a driver requesting this exact voltage would fail, see discussion in:

[PATCH 5.2 024/131] clk: sprd: Add check for return value of sprd_clk_regmap_init()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit c974c48deeb969c5e4250e4f06af91edd84b1f10 ] sprd_clk_regmap_init() doesn't always return success, adding check for its return value should make the code more strong. Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang [sb...@kernel.org: Add a missing int ret] Signed-off-by:

[PATCH 5.2 029/131] remoteproc: copy parent dma_pfn_offset for vdev

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 72f64cabc4bd6985c7355f5547bd3637c82762ac ] When preparing the subdevice for the vdev, also copy dma_pfn_offset since this is used for sub device dma allocations. Without that, there is incoherency between the parent dma settings and the childs one, potentially leading to

[PATCH 5.2 031/131] cifs: Fix a race condition with cifs_echo_request

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit f2caf901c1b7ce65f9e6aef4217e3241039db768 ] There is a race condition with how we send (or supress and don't send) smb echos that will cause the client to incorrectly think the server is unresponsive and thus needs to be reconnected. Summary of the race condition: 1) Daisy

[PATCH 5.2 025/131] arm64: dts: rockchip: Fix USB3 Type-C on rk3399-sapphire

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit e1d9149e8389f1690cdd4e4056766dd26488a0fe ] Before this patch, the Type-C port on the Sapphire board is dead. If setting the 'regulator-always-on' property to 'vcc5v0_typec0' then the port works for about 4 seconds at start-up. This is a sample trace with a memory stick plugged

[PATCH 5.2 032/131] ceph: fix improper use of smp_mb__before_atomic()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 749607731e26dfb2558118038c40e9c0c80d23b5 ] This barrier only applies to the read-modify-write operations; in particular, it does not apply to the atomic64_set() primitive. Replace the barrier with an smp_mb(). Fixes: fdd4e15838e59 ("ceph: rework dcache readdir") Reported-by:

[PATCH 5.2 038/131] selftests/bpf: do not ignore clang failures

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 9cae4ace80ef39005da106fbb89c952b27d7b89e ] When compiling an eBPF prog fails, make still returns 0, because failing clang command's output is piped to llc and therefore its exit status is ignored. When clang fails, pipe the string "clang failed" to llc. This will make llc fail

[PATCH 5.2 008/131] soc: qcom: rpmpd: fixup rpmpd set performance state

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 8b3344422f097debe52296b87a39707d56ca3abe ] Remoteproc q6v5-mss calls set_performance_state with INT_MAX on rpmpd. This is currently ignored since it is greater than the max supported state. Fixup rpmpd state to max if the required state is greater than all the supported states.

[PATCH 5.2 050/131] mm/z3fold.c: reinitialize zhdr structs after migration

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit c92d2f38563db20c20c8db2f98fa1349290477d5 ] z3fold_page_migration() calls memcpy(new_zhdr, zhdr, PAGE_SIZE). However, zhdr contains fields that can't be directly coppied over (ex: list_head, a circular linked list). We only need to initialize the linked lists in new_zhdr, as

[PATCH 5.2 005/131] ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 8ef1ba39a9fa53d2205e633bc9b21840a275908e ] This is similar to commit e6186820a745 ("arm64: dts: rockchip: Arch counter doesn't tick in system suspend"). Specifically on the rk3288 it can be seen that the timer stops ticking in suspend if we end up running through the

[PATCH 5.2 013/131] kernel/module.c: Only return -EEXIST for modules that have finished loading

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 6e6de3dee51a439f76eb73c22ae2ffd2c9384712 ] Microsoft HyperV disables the X86_FEATURE_SMCA bit on AMD systems, and linux guests boot with repeated errors: amd64_edac_mod: Unknown symbol amd_unregister_ecc_decoder (err -2) amd64_edac_mod: Unknown symbol amd_register_ecc_decoder

[PATCH 5.2 010/131] soc: imx: soc-imx8: Correct return value of error handle

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 4c396a604a57da8f883a8b3368d83181680d6907 ] Current implementation of i.MX8 SoC driver returns -ENODEV for all cases of error during initialization, this is incorrect. This patch fixes them using correct return value according to different errors. Signed-off-by: Anson Huang

[PATCH 5.2 055/131] lib/test_string.c: avoid masking memset16/32/64 failures

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 33d6e0ff68af74be0c846c8e042e84a9a1a0561e ] If a memsetXX implementation is completely broken and fails in the first iteration, when i, j, and k are all zero, the failure is masked as zero is returned. Failing in the first iteration is perhaps the most likely failure, so this

[PATCH 5.2 064/131] mm/hotplug: make remove_memory() interface usable

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit eca499ab3749a4537dee77ffead47a1a2c0dee19 ] Presently the remove_memory() interface is inherently broken. It tries to remove memory but panics if some memory is not offline. The problem is that it is impossible to ensure that all memory blocks are offline as this function also

Re: [PATCH 2/5] firmware: arm_scmi: Make use SCMI v2.0 fastchannel for performance protocol

2019-08-05 Thread Sudeep Holla
On Mon, Aug 05, 2019 at 03:16:41PM +0200, Etienne Carriere wrote: > On Fri, 26 Jul 2019 at 16:00, Sudeep Holla wrote: > > > > SCMI v2.0 adds support for "FastChannel" which do not use a message > > header as they are specialized for a single message. > > > > Only PERFORMANCE_LIMITS_{SET,GET} and

[PATCH 5.2 056/131] mm/ioremap: check virtual address alignment while creating huge mappings

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 6b95ab4218bfa59bc315105127ffe03aef3b5742 ] Virtual address alignment is essential in ensuring correct clearing for all intermediate level pgtable entries and freeing associated pgtable pages. An unaligned address can end up randomly freeing pgtable page that potentially still

[PATCH 5.2 086/131] mmc: mmc_spi: Enable stable writes

2019-08-05 Thread Greg Kroah-Hartman
From: Andreas Koop commit 3a6ffb3c8c3274a39dc8f2514526e645c5d21753 upstream. While using the mmc_spi driver occasionally errors like this popped up: mmcblk0: error -84 transferring data end_request: I/O error, dev mmcblk0, sector 581756 I looked on the Internet for occurrences of the same

Re: [PATCH] fork: Improve error message for corrupted page tables

2019-08-05 Thread Vlastimil Babka
On 8/2/19 8:46 AM, Prakhya, Sai Praneeth wrote: > +static const char * const resident_page_types[NR_MM_COUNTERS] = { > + "MM_FILEPAGES", > + "MM_ANONPAGES", > + "MM_SWAPENTS", > + "MM_SHMEMPAGES", > +}; But please let's not put this in a header file. We're asking

Re: [PATCH v3 2/2] mm,thp: Add experimental config option RO_EXEC_FILEMAP_HUGE_FAULT_THP

2019-08-05 Thread Kirill A. Shutemov
On Sat, Aug 03, 2019 at 04:27:51PM -0600, William Kucharski wrote: > > > On 8/1/19 6:36 AM, Kirill A. Shutemov wrote: > > > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > > > -#define HPAGE_PMD_SHIFT PMD_SHIFT > > > -#define HPAGE_PMD_SIZE ((1UL) << HPAGE_PMD_SHIFT) > > > -#define HPAGE_PMD_MASK

[PATCH 5.2 059/131] uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit f90fb3c7e2c13ae829db2274b88b845a75038b8a ] Only users of upc_req in kernel side fs/coda/psdev.c and fs/coda/upcall.c already include linux/coda_psdev.h. Suggested by Jan Harkes in https://lore.kernel.org/lkml/2015053913.ga23...@cs.cmu.edu/ Fixes these

[PATCH 5.2 084/131] mmc: meson-mx-sdio: Fix misuse of GENMASK macro

2019-08-05 Thread Greg Kroah-Hartman
From: Joe Perches commit 665e985c2f41bebc3e6cee7e04c36a44afbc58f7 upstream. Arguments are supposed to be ordered high then low. Signed-off-by: Joe Perches Reviewed-by: Neil Armstrong Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic Meson8 and Meson8b SoCs") Cc:

[PATCH 5.2 074/131] drm/nouveau/dmem: missing mutex_lock in error path

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit d304654bd79332ace9ac46b9a3d8de60acb15da3 ] In nouveau_dmem_pages_alloc(), the drm->dmem->mutex is unlocked before calling nouveau_dmem_chunk_alloc() as shown when CONFIG_PROVE_LOCKING is enabled: [ 1294.871933] = [ 1294.876656] WARNING: bad

[PATCH 5.2 054/131] lib/test_overflow.c: avoid tainting the kernel and fix wrap size

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 8e060c21ae2c265a2b596e9e7f9f97ec274151a4 ] This adds __GFP_NOWARN to the kmalloc()-portions of the overflow test to avoid tainting the kernel. Additionally fixes up the math on wrap size to be architecture and page size agnostic. Link:

[PATCH 5.2 092/131] mtd: rawnand: micron: handle on-die "ECC-off" devices correctly

2019-08-05 Thread Greg Kroah-Hartman
From: Marco Felsch commit 8493b2a06fc5b77ef5c579dc32b12761f7b7a84c upstream. Some devices are not supposed to support on-die ECC but experience shows that internal ECC machinery can actually be enabled through the "SET FEATURE (EFh)" command, even if a read of the "READ ID Parameter Tables"

[PATCH 5.2 102/131] mm: compaction: avoid 100% CPU usage during compaction when a task is killed

2019-08-05 Thread Greg Kroah-Hartman
From: Mel Gorman commit 670105a25608affe01cb0ccdc2a1f4bd2327172b upstream. "howaboutsynergy" reported via kernel buzilla number 204165 that compact_zone_order was consuming 100% CPU during a stress test for prolonged periods of time. Specifically the following command, which should exit in 10

[PATCH 5.2 099/131] ALSA: hda: Fix 1-minute detection delay when i915 module is not available

2019-08-05 Thread Greg Kroah-Hartman
From: Samuel Thibault commit 74bf71ed792ab0f64631cc65ccdb54c356c36d45 upstream. Distribution installation images such as Debian include different sets of modules which can be downloaded dynamically. Such images may notably include the hda sound modules but not the i915 DRM module, even if the

[PATCH 5.2 098/131] selinux: fix memory leak in policydb_init()

2019-08-05 Thread Greg Kroah-Hartman
From: Ondrej Mosnacek commit 45385237f65aeee73641f1ef737d7273905a233f upstream. Since roles_init() adds some entries to the role hash table, we need to destroy also its keys/values on error, otherwise we get a memory leak in the error path. Cc: Reported-by:

[PATCH 5.2 097/131] powerpc/kasan: fix early boot failure on PPC32

2019-08-05 Thread Greg Kroah-Hartman
From: Christophe Leroy commit d7e23b887f67178c4f840781be7a6aa6aeb52ab1 upstream. Due to commit 4a6d8cf90017 ("powerpc/mm: don't use pte_alloc_kernel() until slab is available on PPC32"), pte_alloc_kernel() cannot be used during early KASAN init. Fix it by using memblock_alloc() instead.

[PATCH 5.2 095/131] i2c: at91: disable TXRDY interrupt after sending data

2019-08-05 Thread Greg Kroah-Hartman
From: Michał Mirosław commit d12e3aae160fb26b534c4496b211d6e60a5179ed upstream. Driver was not disabling TXRDY interrupt after last TX byte. This caused interrupt storm until transfer timeouts for slow or broken device on the bus. The patch fixes the interrupt storm on my SAMA5D2-based board.

[PATCH 5.2 078/131] tpm: Fix null pointer dereference on chip register error path

2019-08-05 Thread Greg Kroah-Hartman
From: Milan Broz commit 1e5ac6300a07ceecfc70a893ebef3352be21e6f8 upstream. If clk_enable is not defined and chip initialization is canceled code hits null dereference. Easily reproducible with vTPM init fail: swtpm chardev --tpmstate dir=nonexistent_dir --tpm2 --vtpm-proxy BUG: kernel NULL

[PATCH 5.2 126/131] IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specification

2019-08-05 Thread Greg Kroah-Hartman
From: Yishai Hadas commit b7165bd0d6cbb93732559be6ea8774653b204480 upstream. The specification for the Toeplitz function doesn't require to set the key explicitly to be symmetric. In case a symmetric functionality is required a symmetric key can be simply used. Wrongly forcing the algorithm to

[PATCH 5.2 118/131] xen/swiotlb: fix condition for calling xen_destroy_contiguous_region()

2019-08-05 Thread Greg Kroah-Hartman
From: Juergen Gross commit 50f6393f9654c561df4cdcf8e6cfba7260143601 upstream. The condition in xen_swiotlb_free_coherent() for deciding whether to call xen_destroy_contiguous_region() is wrong: in case the region to be freed is not contiguous calling xen_destroy_contiguous_region() is the wrong

[PATCH 5.2 121/131] RDMA/devices: Do not deadlock during client removal

2019-08-05 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit 621e55ff5b8e0ab5d1063f0eae0ef3960bef8f6e upstream. lockdep reports: WARNING: possible circular locking dependency detected modprobe/302 is trying to acquire lock: 07c8919c ((wq_completion)ib_cm){+.+.}, at: flush_workqueue+0xdf/0x990 but task

[PATCH 5.2 127/131] IB/hfi1: Check for error on call to alloc_rsm_map_table

2019-08-05 Thread Greg Kroah-Hartman
From: John Fleck commit cd48a82087231fdba0e77521102386c6ed0168d6 upstream. The call to alloc_rsm_map_table does not check if the kmalloc fails. Check for a NULL on alloc, and bail if it fails. Fixes: 372cc85a13c9 ("IB/hfi1: Extract RSM map table init from QOS") Link:

[PATCH 5.2 106/131] s390/dasd: fix endless loop after read unit address configuration

2019-08-05 Thread Greg Kroah-Hartman
From: Stefan Haberland commit 41995342b40c418a47603e1321256d2c4a2ed0fb upstream. After getting a storage server event that causes the DASD device driver to update its unit address configuration during a device shutdown there is the possibility of an endless loop in the device driver. In the

[PATCH 5.2 108/131] parisc: Add archclean Makefile target

2019-08-05 Thread Greg Kroah-Hartman
From: James Bottomley commit f2c5ed0dd5004c2cff5c0e3d430a107576fcc17f upstream. Apparently we don't have an archclean target in our arch/parisc/Makefile, so files in there never get cleaned out by make mrproper. This, in turn means that the sizes.h file in arch/parisc/boot/compressed never

[PATCH 5.2 103/131] ubsan: build ubsan.c more conservatively

2019-08-05 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit af700eaed0564d5d3963a7a51cb0843629d7fe3d upstream. objtool points out several conditions that it does not like, depending on the combination with other configuration options and compiler variants: stack protector: lib/ubsan.o: warning: objtool:

[PATCH 5.2 111/131] drivers/perf: arm_pmu: Fix failure path in PM notifier

2019-08-05 Thread Greg Kroah-Hartman
From: Will Deacon commit 0d7fd70f26039bd4b33444ca47f0e69ce3ae0354 upstream. Handling of the CPU_PM_ENTER_FAILED transition in the Arm PMU PM notifier code incorrectly skips restoration of the counters. Fix the logic so that CPU_PM_ENTER_FAILED follows the same path as CPU_PM_EXIT. Cc: Fixes:

[PATCH 5.2 110/131] parisc: Fix build of compressed kernel even with debug enabled

2019-08-05 Thread Greg Kroah-Hartman
From: Helge Deller commit 3fe6c873af2f2247544debdbe51ec29f690a2ccf upstream. With debug info enabled (CONFIG_DEBUG_INFO=y) the resulting vmlinux may get that huge that we need to increase the start addresss for the decompression text section otherwise one will face a linker error. Reported-by:

Re: [PATCH 0/9] arm64: Stolen time support

2019-08-05 Thread Marc Zyngier
On 05/08/2019 14:06, Steven Price wrote: > On 03/08/2019 19:05, Marc Zyngier wrote: >> On Fri, 2 Aug 2019 15:50:08 +0100 >> Steven Price wrote: >> >> Hi Steven, >> >>> This series add support for paravirtualized time for arm64 guests and >>> KVM hosts following the specification in Arm's

[PATCH 5.2 112/131] arm64: compat: Allow single-byte watchpoints on all addresses

2019-08-05 Thread Greg Kroah-Hartman
From: Will Deacon commit 849adec41203ac5837c40c2d7e08490ffdef3c2c upstream. Commit d968d2b801d8 ("ARM: 7497/1: hw_breakpoint: allow single-byte watchpoints on all addresses") changed the validation requirements for hardware watchpoints on arch/arm/. Update our compat layer to implement the same

[PATCH 5.2 107/131] cgroup: kselftest: relax fs_spec checks

2019-08-05 Thread Greg Kroah-Hartman
From: Chris Down commit b59b1baab789eacdde809135542e3d4f256f6878 upstream. On my laptop most memcg kselftests were being skipped because it claimed cgroup v2 hierarchy wasn't mounted, but this isn't correct. Instead, it seems current systemd HEAD mounts it with the name "cgroup2" instead of

[PATCH 5.2 109/131] parisc: Strip debug info from kernel before creating compressed vmlinuz

2019-08-05 Thread Greg Kroah-Hartman
From: Helge Deller commit e50beea8e7738377b4fa664078547be338038ff9 upstream. Same as on x86-64, strip the .comment, .note and debug sections from the Linux kernel before creating the compressed image for the boot loader. Reported-by: James Bottomley Reported-by: Sven Schnelle Cc:

[PATCH 5.2 131/131] drm/i915/gvt: fix incorrect cache entry for guest page mapping

2019-08-05 Thread Greg Kroah-Hartman
From: Xiaolin Zhang commit 7366aeb77cd840f3edea02c65065d40affaa7f45 upstream. GPU hang observed during the guest OCL conformance test which is caused by THP GTT feature used durning the test. It was observed the same GFN with different size (4K and 2M) requested from the guest in GVT. So

[PATCH 5.2 124/131] IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache

2019-08-05 Thread Greg Kroah-Hartman
From: Yishai Hadas commit 9ec4483a3f0f71a228a5933bc040441322bfb090 upstream. Fix unreg_umr to move the MR to a kernel owned PD (i.e. the UMR PD) which can't be accessed by userspace. This ensures that nothing can continue to access the MR once it has been placed in the kernels cache for reuse.

[PATCH 5.2 123/131] IB/mlx5: Use direct mkey destroy command upon UMR unreg failure

2019-08-05 Thread Greg Kroah-Hartman
From: Yishai Hadas commit afd1417404fba6dbfa6c0a8e5763bd348da682e4 upstream. Use a direct firmware command to destroy the mkey in case the unreg UMR operation has failed. This prevents a case that a mkey will leak out from the cache post a failure to be destroyed by a UMR WR. In case the MR

[PATCH 5.2 125/131] IB/mlx5: Fix clean_mr() to work in the expected order

2019-08-05 Thread Greg Kroah-Hartman
From: Yishai Hadas commit b9332dad987018745a0c0bb718d12dacfa760489 upstream. Any dma map underlying the MR should only be freed once the MR is fenced at the hardware. As of the above we first destroy the MKEY and just after that can safely call to dma_unmap_single(). Link:

[PATCH 5.2 130/131] drm/i915/perf: fix ICL perf register offsets

2019-08-05 Thread Greg Kroah-Hartman
From: Lionel Landwerlin commit 95eef14cdad150fed43147bcd4f29eea3d0a3f03 upstream. We got the wrong offsets (could they have changed?). New values were computed off an error state by looking up the register offset in the context image as written by the HW. Signed-off-by: Lionel Landwerlin

[PATCH 5.2 129/131] IB/hfi1: Field not zero-ed when allocating TID flow memory

2019-08-05 Thread Greg Kroah-Hartman
From: Kaike Wan commit dc25b239ebeaa3c58e5ceaa732140427d386aa16 upstream. The field flow->resync_npkts is added for TID RDMA WRITE request and zero-ed when a TID RDMA WRITE RESP packet is received by the requester. This field is used to rewind a request during retry in the function

[PATCH 5.2 128/131] IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn

2019-08-05 Thread Greg Kroah-Hartman
From: Kaike Wan commit f4d46119f214f9a7620b0d18b153d7e0e8c90b4f upstream. When a TID sequence error occurs while receiving TID RDMA READ RESP packets, all packets after flow->flow_state.r_next_psn should be dropped, including those response packets for subsequent segments. The current

[PATCH 5.2 105/131] loop: Fix mount(2) failure due to race with LOOP_SET_FD

2019-08-05 Thread Greg Kroah-Hartman
From: Jan Kara commit 89e524c04fa966330e2e80ab2bc50b9944c5847a upstream. Commit 33ec3e53e7b1 ("loop: Don't change loop device under exclusive opener") made LOOP_SET_FD ioctl acquire exclusive block device reference while it updates loop device binding. However this can make perfectly valid

[PATCH 5.2 122/131] IB/mlx5: Fix unreg_umr to ignore the mkey state

2019-08-05 Thread Greg Kroah-Hartman
From: Yishai Hadas commit 6a053953739d23694474a5f9c81d1a30093da81a upstream. Fix unreg_umr to ignore the mkey state and do not fail if was freed. This prevents a case that a user space application already changed the mkey state to free and then the UMR operation will fail leaving the mkey in

[PATCH 5.2 119/131] xen/gntdev.c: Replace vm_map_pages() with vm_map_pages_zero()

2019-08-05 Thread Greg Kroah-Hartman
From: Souptick Joarder commit 8d1502f629c9966743de45744f4c1ba93a57d105 upstream. 'commit df9bde015a72 ("xen/gntdev.c: convert to use vm_map_pages()")' breaks gntdev driver. If vma->vm_pgoff > 0, vm_map_pages() will: - use map->pages starting at vma->vm_pgoff instead of 0 - verify map->count

[PATCH 5.2 120/131] RDMA/bnxt_re: Honor vlan_id in GID entry comparison

2019-08-05 Thread Greg Kroah-Hartman
From: Selvin Xavier commit c56b593d2af4cbd189c6af5fd6790728fade80cc upstream. A GID entry consists of GID, vlan, netdev and smac. Extend GID duplicate check comparisons to consider vlan_id as well to support IPv6 VLAN based link local addresses. Introduce a new structure (bnxt_qplib_gid_info)

[PATCH 5.2 115/131] clk: mediatek: mt8183: Register 13MHz clock earlier for clocksource

2019-08-05 Thread Greg Kroah-Hartman
From: Weiyi Lu commit c93d059a80450af99dd6c0e8c36790579343675a upstream. The 13MHz clock should be registered before clocksource driver is initialized. Use CLK_OF_DECLARE_DRIVER() to guarantee. Fixes: acddfc2c261b ("clk: mediatek: Add MT8183 clock support") Cc: Signed-off-by: Weiyi Lu

[PATCH 5.2 114/131] io_uring: fix KASAN use after free in io_sq_wq_submit_work

2019-08-05 Thread Greg Kroah-Hartman
From: Jackie Liu commit d0ee879187df966ef638031b5f5183078d672141 upstream. [root@localhost ~]# ./liburing/test/link QEMU Standard PC report that: [ 29.379892] CPU: 0 PID: 84 Comm: kworker/u2:2 Not tainted 5.3.0-rc2-00051-g4010b622f1d2-dirty #86 [ 29.379902] Hardware name: QEMU Standard

[PATCH 5.2 116/131] scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA

2019-08-05 Thread Greg Kroah-Hartman
From: Suganath Prabu commit df9a606184bfdb5ae3ca9d226184e9489f5c24f7 upstream. Although SAS3 & SAS3.5 IT HBA controllers support 64-bit DMA addressing, as per hardware design, if DMA-able range contains all 64-bits set (0x-) then it results in a firmware fault. E.g. SGE's start

[PATCH 5.2 113/131] arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG}

2019-08-05 Thread Greg Kroah-Hartman
From: Will Deacon commit 147b9635e6347104b91f48ca9dca61eb0fbf2a54 upstream. If CTR_EL0.{CWG,ERG} are 0b then they must be interpreted to have their architecturally maximum values, which defeats the use of FTR_HIGHER_SAFE when sanitising CPU ID registers on heterogeneous machines. Introduce

[PATCH 5.2 076/131] kbuild: initialize CLANG_FLAGS correctly in the top Makefile

2019-08-05 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 upstream. CLANG_FLAGS is initialized by the following line: CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) ..., which is run only when CROSS_COMPILE is set. Some build targets (bindeb-pkg etc.) recurse to

[PATCH 5.2 073/131] dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 449fa54d6815be8c2c1f68fa9dbbae9384a7c03e ] dma_map_sg() may use swiotlb buffer when the kernel command line includes "swiotlb=force" or the dma_addr is out of dev->dma_mask range. After DMA complete the memory moving from device to memory, then user call dma_sync_sg_for_cpu()

[PATCH 5.2 077/131] kbuild: modpost: include .*.cmd files only when targets exist

2019-08-05 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit 944cfe9be1fbbec73bab2f7e77fe2e8f9c72970f upstream. If a build rule fails, the .DELETE_ON_ERROR special target removes the target, but does nothing for the .*.cmd file, which might be corrupted. So, .*.cmd files should be included only when the corresponding targets

[PATCH 5.2 104/131] mm/migrate.c: initialize pud_entry in migrate_vma()

2019-08-05 Thread Greg Kroah-Hartman
From: Ralph Campbell commit 7b358c6f12dc82364f6d317f8c8f1d794adbc3f5 upstream. When CONFIG_MIGRATE_VMA_HELPER is enabled, migrate_vma() calls migrate_vma_collect() which initializes a struct mm_walk but didn't initialize mm_walk.pud_entry. (Found by code inspection) Use a C structure

[PATCH 5.2 081/131] dax: Fix missed wakeup in put_unlocked_entry()

2019-08-05 Thread Greg Kroah-Hartman
From: Jan Kara commit 61c30c98ef17e5a330d7bb8494b78b3d6dffe9b8 upstream. The condition checking whether put_unlocked_entry() needs to wake up following waiter got broken by commit 23c84eb78375 ("dax: Fix missed wakeup with PMD faults"). We need to wake the waiter whenever the passed entry is

[PATCH 5.2 082/131] fgraph: Remove redundant ftrace_graph_notrace_addr() test

2019-08-05 Thread Greg Kroah-Hartman
From: Changbin Du commit 6c77221df96177da0520847ce91e33f539fb8b2d upstream. We already have tested it before. The second one should be removed. With this change, the performance should have little improvement. Link: http://lkml.kernel.org/r/20190730140850.7927-1-changbin...@gmail.com Cc:

[PATCH 5.2 091/131] drm/nouveau: Only release VCPI slots on mode changes

2019-08-05 Thread Greg Kroah-Hartman
From: Lyude Paul commit 412e85b605315fd129a849599cf4a5a7959573a8 upstream. Looks like a regression got introduced into nv50_mstc_atomic_check() that somehow didn't get found until now. If userspace changes crtc_state->active to false but leaves the CRTC enabled, we end up calling

[PATCH 5.2 100/131] mm: vmscan: check if mem cgroup is disabled or not before calling memcg slab shrinker

2019-08-05 Thread Greg Kroah-Hartman
From: Yang Shi commit fa1e512fac717f34e7c12d7a384c46e90a647392 upstream. Shakeel Butt reported premature oom on kernel with "cgroup_disable=memory" since mem_cgroup_is_root() returns false even though memcg is actually NULL. The drop_caches is also broken. It is because commit aeed1d325d42

[PATCH 5.2 094/131] i2c: iproc: Fix i2c master read more than 63 bytes

2019-08-05 Thread Greg Kroah-Hartman
From: Rayagonda Kokatanur commit fd01eecdf9591453177d7b06faaabef8c300114a upstream. Use SMBUS_MASTER_DATA_READ.MASTER_RD_STATUS bit to check for RX FIFO empty condition because SMBUS_MASTER_FIFO_CONTROL.MASTER_RX_PKT_COUNT is not updated for read >= 64 bytes. This fixes the issue when trying to

[PATCH 5.2 075/131] kconfig: Clear "written" flag to avoid data loss

2019-08-05 Thread Greg Kroah-Hartman
From: M. Vefa Bicakci commit 0c5b6c28ed68becb692b43eae5e44d5aa7e160ce upstream. Prior to this commit, starting nconfig, xconfig or gconfig, and saving the .config file more than once caused data loss, where a .config file that contained only comments would be written to disk starting from the

[PATCH 5.2 087/131] gpiolib: Preserve desc->flags when setting state

2019-08-05 Thread Greg Kroah-Hartman
From: Chris Packham commit d95da993383c78f7efd25957ba3af23af4b1c613 upstream. desc->flags may already have values set by of_gpiochip_add() so make sure that this isn't undone when setting the initial direction. Cc: sta...@vger.kernel.org Fixes: 3edfb7bd76bd1cba ("gpiolib: Show correct

[PATCH 5.2 088/131] gpio: dont WARN() on NULL descs if gpiolib is disabled

2019-08-05 Thread Greg Kroah-Hartman
From: Bartosz Golaszewski commit ffe0bbabb0cffceceae07484fde1ec2a63b1537c upstream. If gpiolib is disabled, we use the inline stubs from gpio/consumer.h instead of regular definitions of GPIO API. The stubs for 'optional' variants of gpiod_get routines return NULL in this case as if the

[PATCH 5.2 096/131] i2c: at91: fix clk_offset for sama5d2

2019-08-05 Thread Greg Kroah-Hartman
From: Michał Mirosław commit b1ac6704493fa14b5dc19eb6b69a73932361a131 upstream. In SAMA5D2 datasheet, TWIHS_CWGR register rescription mentions clock offset of 3 cycles (compared to 4 in eg. SAMA5D3). Cc: sta...@vger.kernel.org # 5.2.x [needs applying to i2c-at91.c instead for earlier kernels]

[PATCH 5.2 090/131] IB/hfi1: Fix Spectre v1 vulnerability

2019-08-05 Thread Greg Kroah-Hartman
From: Gustavo A. R. Silva commit 6497d0a9c53df6e98b25e2b79f2295d7caa47b6e upstream. sl is controlled by user-space, hence leading to a potential exploitation of the Spectre variant 1 vulnerability. Fix this by sanitizing sl before using it to index ibp->sl_to_sc. Notice that given that

[PATCH 5.2 080/131] Btrfs: fix race leading to fs corruption after transaction abort

2019-08-05 Thread Greg Kroah-Hartman
From: Filipe Manana commit cb2d3daddbfb6318d170e79aac1f7d5e4d49f0d7 upstream. When one transaction is finishing its commit, it is possible for another transaction to start and enter its initial commit phase as well. If the first ends up getting aborted, we have a small time window where the

[PATCH 5.2 093/131] eeprom: at24: make spd world-readable again

2019-08-05 Thread Greg Kroah-Hartman
From: Jean Delvare commit 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 upstream. The integration of the at24 driver into the nvmem framework broke the world-readability of spd EEPROMs. Fix it. Signed-off-by: Jean Delvare Cc: sta...@vger.kernel.org Fixes: 57d155506dd5 ("eeprom: at24: extend driver

[PATCH 5.2 079/131] Btrfs: fix incremental send failure after deduplication

2019-08-05 Thread Greg Kroah-Hartman
From: Filipe Manana commit b4f9a1a87a48c255bb90d8a6c3d555a1abb88130 upstream. When doing an incremental send operation we can fail if we previously did deduplication operations against a file that exists in both snapshots. In that case we will fail the send operation with -EIO and print a

[PATCH 5.2 089/131] gpiolib: fix incorrect IRQ requesting of an active-low lineevent

2019-08-05 Thread Greg Kroah-Hartman
From: Michael Wu commit 223ecaf140b1dd1c1d2a1a1d96281efc5c906984 upstream. When a pin is active-low, logical trigger edge should be inverted to match the same interrupt opportunity. For example, a button pushed triggers falling edge in ACTIVE_HIGH case; in ACTIVE_LOW case, the button pushed

[PATCH 5.2 101/131] mm: migrate: fix reference check race between __find_get_block() and migration

2019-08-05 Thread Greg Kroah-Hartman
From: Jan Kara commit ebdf4de5642fb6580b0763158b6b4b791c4d6a4d upstream. buffer_migrate_page_norefs() can race with bh users in the following way: CPU1CPU2 buffer_migrate_page_norefs() buffer_migrate_lock_buffers() checks bh refs

[PATCH 5.2 083/131] mmc: dw_mmc: Fix occasional hang after tuning on eMMC

2019-08-05 Thread Greg Kroah-Hartman
From: Douglas Anderson commit ba2d139b02ba684c6c101de42fed782d6cd2b997 upstream. In commit 46d179525a1f ("mmc: dw_mmc: Wait for data transfer after response errors.") we fixed a tuning-induced hang that I saw when stress testing tuning on certain SD cards. I won't re-hash that whole commit,

[PATCH 5.2 085/131] mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()

2019-08-05 Thread Greg Kroah-Hartman
From: Baolin Wang commit fc62113b32c95906b3ea8ba42e91014c7d0c6fa6 upstream. When the SD host controller tries to probe again due to the derferred probe mechanism, it will always keep the SD host device as runtime resume state due to missing the runtime put operation in error path last time.

[PATCH 5.2 049/131] mm/memcontrol.c: keep local VM counters in sync with the hierarchical ones

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 766a4c19d880887c457811b86f1f68525e416965 ] After commit 815744d75152 ("mm: memcontrol: don't batch updates of local VM stats and events"), the local VM counter are not in sync with the hierarchical ones. Below is one example in a leaf memcg on my server (with 8 CPUs):

[PATCH 5.2 040/131] cifs: fix crash in cifs_dfs_do_automount

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit ce465bf94b70f03136171a62b607864f00093b19 ] RHBZ: 1649907 Fix a crash that happens while attempting to mount a DFS referral from the same server on the root of a filesystem. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Sasha Levin ---

[PATCH 5.2 048/131] mm/slab_common.c: work around clang bug #42570

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit a07057dce2823e10d64a2b73cefbf09d8645efe9 ] Clang gets rather confused about two variables in the same special section when one of them is not initialized, leading to an assembler warning later: /tmp/slab_common-18f869.s: Assembler messages: /tmp/slab_common-18f869.s:7526:

[PATCH 5.2 047/131] mm/z3fold: dont try to use buddy slots after free

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit bb9a374dfa3a2f46581455ab66cd1d24c5e3d183 ] As reported by Henry Burns: Running z3fold stress testing with address sanitization showed zhdr->slots was being used after it was freed. z3fold_free(z3fold_pool, handle) free_handle(handle) kmem_cache_free(pool->c_handle,

[PATCH 5.2 072/131] drm/nouveau: fix memory leak in nouveau_conn_reset()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 09b90e2fe35faeace2488234e2a7728f2ea8ba26 ] In nouveau_conn_reset(), if connector->state is true, __drm_atomic_helper_connector_destroy_state() will be called, but the memory pointed by asyc isn't freed. Memory leak happens in the following function

[PATCH 5.2 046/131] be2net: Signal that the device cannot transmit during reconfiguration

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 7429c6c0d9cb086d8e79f0d2a48ae14851d2115e ] While changing the number of interrupt channels, be2net stops adapter operation (including netif_tx_disable()) but it doesn't signal that it cannot transmit. This may lead dev_watchdog() to falsely trigger during that time. Add the

[PATCH 5.2 044/131] KVM: nVMX: Ignore segment base for VMX memory operand when segment not FS or GS

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 6694e48012826351036fd10fc506ca880023e25f ] As reported by Maxime at https://bugzilla.kernel.org/show_bug.cgi?id=204175: In vmx/nested.c::get_vmx_mem_address(), when the guest runs in long mode, the base address of the memory operand is computed with a simple: *ret = s.base

[PATCH 5.2 045/131] bpf: fix BTF verifier size resolution logic

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 1acc5d5c5832da9a98b22374a8fae08ffe31b3f8 ] BTF verifier has a size resolution bug which in some circumstances leads to invalid size resolution for, e.g., TYPEDEF modifier. This happens if we have [1] PTR -> [2] TYPEDEF -> [3] ARRAY, in which case due to being in pointer context

[PATCH 5.2 071/131] bpf: Disable GCC -fgcse optimization for ___bpf_prog_run()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 3193c0836f203a91bef96d88c64cccf0be090d9c ] On x86-64, with CONFIG_RETPOLINE=n, GCC's "global common subexpression elimination" optimization results in ___bpf_prog_run()'s jumptable code changing from this: select_insn: jmp *jumptable(, %rax, 8)

[PATCH 5.2 070/131] x86, boot: Remove multiple copy of static function sanitize_boot_params()

2019-08-05 Thread Greg Kroah-Hartman
[ Upstream commit 8c5477e8046ca139bac250386c08453da37ec1ae ] Kernel build warns: 'sanitize_boot_params' defined but not used [-Wunused-function] at below files: arch/x86/boot/compressed/cmdline.c arch/x86/boot/compressed/error.c arch/x86/boot/compressed/early_serial_console.c

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