[PATCH 5.7 005/124] bcache: avoid nr_stripes overflow in bcache_device_init()

2020-08-24 Thread Greg Kroah-Hartman
From: Coly Li [ Upstream commit 65f0f017e7be8c70330372df23bcb2a407ecf02d ] For some block devices which large capacity (e.g. 8TB) but small io_opt size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu- lated by, DIV_ROUND_UP_ULL(sectors, d->stripe_size); might be overfl

[PATCH 5.7 045/124] xfs: fix inode quota reservation checks

2020-08-24 Thread Greg Kroah-Hartman
From: Darrick J. Wong [ Upstream commit f959b5d037e71a4d69b5bf71faffa065d9269b4a ] xfs_trans_dqresv is the function that we use to make reservations against resource quotas. Each resource contains two counters: the q_core counter, which tracks resources allocated on disk; and the dquot reservat

[PATCH 5.7 048/124] jffs2: fix UAF problem

2020-08-24 Thread Greg Kroah-Hartman
From: Zhe Li [ Upstream commit 798b7347e4f29553db4b996393caf12f5b233daf ] The log of UAF problem is listed below. BUG: KASAN: use-after-free in jffs2_rmdir+0xa4/0x1cc [jffs2] at addr c1f165fc Read of size 4 by task rm/8283 =

[PATCH 5.7 007/124] ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion

2020-08-24 Thread Greg Kroah-Hartman
From: Mike Pozulp commit e17f02d0559c174cf1f6435e45134490111eaa37 upstream. The Galaxy Book Ion uses the same ALC298 codec as other Samsung laptops which have the no headphone sound bug, like my Samsung Notebook. The Galaxy Book owner confirmed that this patch fixes the bug. BugLink: https://bu

[PATCH 5.7 047/124] riscv: Fixup static_obj() fail

2020-08-24 Thread Greg Kroah-Hartman
From: Guo Ren [ Upstream commit 6184358da0004c8fd940afda6c0a0fa4027dc911 ] When enable LOCKDEP, static_obj() will cause error. Because some __initdata static variables is before _stext: static int static_obj(const void *obj) { unsigned long start = (unsigned long) &_stext,

[PATCH 5.7 031/124] io_uring: find and cancel head link async work on files exit

2020-08-24 Thread Greg Kroah-Hartman
From: Jens Axboe [ Upstream commit b711d4eaf0c408a811311ee3e94d6e9e5a230a9a ] Commit f254ac04c874 ("io_uring: enable lookup of links holding inflight files") only handled 2 out of the three head link cases we have, we also need to lookup and cancel work that is blocked in io-wq if that work has

[PATCH 5.7 003/124] khugepaged: khugepaged_test_exit() check mmget_still_valid()

2020-08-24 Thread Greg Kroah-Hartman
From: Hugh Dickins [ Upstream commit bbe98f9cadff58cdd6a4acaeba0efa8565dabe65 ] Move collapse_huge_page()'s mmget_still_valid() check into khugepaged_test_exit() itself. collapse_huge_page() is used for anon THP only, and earned its mmget_still_valid() check because it inserts a huge pmd entry

[PATCH 5.7 004/124] khugepaged: adjust VM_BUG_ON_MM() in __khugepaged_enter()

2020-08-24 Thread Greg Kroah-Hartman
From: Hugh Dickins [ Upstream commit f3f99d63a8156c7a4a6b20aac22b53c5579c7dc1 ] syzbot crashes on the VM_BUG_ON_MM(khugepaged_test_exit(mm), mm) in __khugepaged_enter(): yes, when one thread is about to dump core, has set core_state, and is waiting for others, another might do something calling

[PATCH 5.8 124/148] afs: Fix key ref leak in afs_put_operation()

2020-08-24 Thread Greg Kroah-Hartman
From: David Howells [ Upstream commit ba8e42077bbe046a09bdb965dbfbf8c27594fe8f ] The afs_put_operation() function needs to put the reference to the key that's authenticating the operation. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch

[PATCH 5.7 014/124] mm: include CMA pages in lowmem_reserve at boot

2020-08-24 Thread Greg Kroah-Hartman
From: Doug Berger commit e08d3fdfe2dafa0331843f70ce1ff6c1c4900bf4 upstream. The lowmem_reserve arrays provide a means of applying pressure against allocations from lower zones that were targeted at higher zones. Its values are a function of the number of pages managed by higher zones and are as

[PATCH 5.7 015/124] mm, page_alloc: fix core hung in free_pcppages_bulk()

2020-08-24 Thread Greg Kroah-Hartman
From: Charan Teja Reddy commit 88e8ac11d2ea3acc003cf01bb5a38c8aa76c3cfd upstream. The following race is observed with the repeated online, offline and a delay between two successive online of memory blocks of movable zone. P1 P2 Online the first mem

Re: [PATCH 0/4] mm: Simplfy cow handling

2020-08-24 Thread Kirill Tkhai
On 22.08.2020 02:49, Peter Xu wrote: > This is a small series that I picked up from Linus's suggestion [0] to > simplify > cow handling (and also more strict) by checking against page refcounts rather > than mapcounts. > > I'm CCing the author and reviewer of commit 52d1e606ee73 on ksm ("mm: reus

[PATCH 5.7 020/124] scsi: zfcp: Fix use-after-free in request timeout handlers

2020-08-24 Thread Greg Kroah-Hartman
From: Steffen Maier commit 2d9a2c5f581be3991ba67fa9e7497c711220ea8e upstream. Before v4.15 commit 75492a51568b ("s390/scsi: Convert timers to use timer_setup()"), we intentionally only passed zfcp_adapter as context argument to zfcp_fsf_request_timeout_handler(). Since we only trigger adapter re

[PATCH 5.7 012/124] kernel/relay.c: fix memleak on destroy relay channel

2020-08-24 Thread Greg Kroah-Hartman
From: Wei Yongjun commit 71e843295c680898959b22dc877ae3839cc22470 upstream. kmemleak report memory leak as follows: unreferenced object 0x607ee4e5f948 (size 8): comm "syz-executor.1", pid 2098, jiffies 4295031601 (age 288.468s) hex dump (first 8 bytes): 00 00 00 00 00 00 00 00

Re: [PATCH v2] drm/etnaviv: fix external abort seen on GC600 rev 0x19

2020-08-24 Thread Ing. Josua Mayer
Verified that it works as intended on 5.7.10. Thank you very much :) Feel free to add my tested-by ... Am 23.08.20 um 21:09 schrieb Christian Gmeiner: > It looks like that this GPU core triggers an abort when > reading VIVS_HI_CHIP_PRODUCT_ID and/or VIVS_HI_CHIP_ECO_ID. > > I looked at different

[PATCH 5.7 017/124] ext4: do not block RWF_NOWAIT dio write on unallocated space

2020-08-24 Thread Greg Kroah-Hartman
From: Jan Kara commit 0b3171b6d195637f84ddf8b59bae818ea20bc8ac upstream. Since commit 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") we don't properly bail out of RWF_NOWAIT direct IO write if underlying blocks are not allocated. Also ext4_dio_write_checks() does no

Re: [PATCH 6/6] drm: bridge: dw-hdmi: Get output bus format when dw-hdmi is the only bridge

2020-08-24 Thread Neil Armstrong
Hi, On 12/08/2020 10:36, Algea Cao wrote: > If plat_data->get_output_bus_format() is exist, we can > use it to get hdmi output bus format when dw-hdmi is the > only bridge. The hdmi output bus format can be set by vendor > properties. > > Signed-off-by: Algea Cao > --- > > drivers/gpu/drm/brid

[PATCH 5.7 013/124] uprobes: __replace_page() avoid BUG in munlock_vma_page()

2020-08-24 Thread Greg Kroah-Hartman
From: Hugh Dickins commit c17c3dc9d08b9aad9a55a1e53f205187972f448e upstream. syzbot crashed on the VM_BUG_ON_PAGE(PageTail) in munlock_vma_page(), when called from uprobes __replace_page(). Which of many ways to fix it? Settled on not calling when PageCompound (since Head and Tail are equals in

Re: [PATCH v1] mfd: core: Fix double-free in mfd_remove_devices_fn()

2020-08-24 Thread Marek Szyprowski
Hi On 18.08.2020 01:50, Dmitry Osipenko wrote: > The pdev.mfd_cell is released by platform_device_release(), which is > invoked by platform_device_unregister(). Hence mfd_remove_devices_fn() > shouldn't release the cell variable. The double-free bug is reported KASAN > during of MFD driver module

[PATCH 5.7 022/124] mm/memory.c: skip spurious TLB flush for retried page fault

2020-08-24 Thread Greg Kroah-Hartman
From: Yang Shi commit b7333b58f358f38d90d78e00c1ee5dec82df10ad upstream. Recently we found regression when running will_it_scale/page_fault3 test on ARM64. Over 70% down for the multi processes cases and over 20% down for the multi threads cases. It turns out the regression is caused by commit

[PATCH 5.7 023/124] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal

2020-08-24 Thread Greg Kroah-Hartman
From: Daniel Kolesa commit f41ed88cbd6f025f7a683a11a74f901555fba11c upstream. GFP_KERNEL may and will sleep, and this is being executed in a non-preemptible context; this will mess things up since it's called inbetween DC_FP_START/END, and rescheduling will result in the DC_FP_END later being ca

[PATCH 5.7 010/124] spi: Prevent adding devices below an unregistering controller

2020-08-24 Thread Greg Kroah-Hartman
From: Lukas Wunner commit ddf75be47ca748f8b12d28ac64d624354fddf189 upstream. CONFIG_OF_DYNAMIC and CONFIG_ACPI allow adding SPI devices at runtime using a DeviceTree overlay or DSDT patch. CONFIG_SPI_SLAVE allows the same via sysfs. But there are no precautions to prevent adding a device below

Re: [PATCH 4/8] mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()

2020-08-24 Thread Ulf Hansson
On Thu, 20 Aug 2020 at 12:44, Viresh Kumar wrote: > > dev_pm_opp_of_remove_table() doesn't report any errors when it fails to > find the OPP table with error -ENODEV (i.e. OPP table not present for > the device). And we can call dev_pm_opp_of_remove_table() > unconditionally here. > > Signed-off-b

Re: [v5,1/3] mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings

2020-08-24 Thread Ulf Hansson
On Fri, 14 Aug 2020 at 03:44, Wenbin Mei wrote: > > Add description for resets/reset-names. > > Cc: # v5.4+ > Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC") > Signed-off-by: Wenbin Mei > Tested-by: Frank Wunderlich Applied for fixes, thanks! Kind regards Uffe > --- > Doc

drivers/ide/falconide.c:67:17: sparse: sparse: incorrect type in argument 1 (different address spaces)

2020-08-24 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d012a7190fc1fd72ed48911e77ca97ba4521bccd commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces date: 10 weeks ago config: m68k-randconfig-s032-20200824

Re: [v5,2/3] arm64: dts: mt7622: add reset node for mmc device

2020-08-24 Thread Ulf Hansson
On Fri, 14 Aug 2020 at 03:44, Wenbin Mei wrote: > > This commit adds reset node for mmc device. > > Cc: # v5.4+ > Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC") > Signed-off-by: Wenbin Mei > Tested-by: Frank Wunderlich I can pick this for my fixes branch, together with the o

Re: [PATCH 01/12] staging: wfx: fix BA when device is AP and MFP is enabled

2020-08-24 Thread Dan Carpenter
On Thu, Aug 20, 2020 at 05:58:47PM +0200, Jerome Pouiller wrote: > From: Jérôme Pouiller > > The protection of the management frames is mainly done by mac80211. > However, frames for the management of the BlockAck sessions are directly > sent by the device. These frames have to be protected if MF

[PATCH 5.8 119/148] kconfig: qconf: fix signal connection to invalid slots

2020-08-24 Thread Greg Kroah-Hartman
From: Masahiro Yamada [ Upstream commit d85de3399f97467baa2026fbbbe587850d01ba8a ] If you right-click in the ConfigList window, you will see the following messages in the console: QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:888 QObject::connect: (sender nam

[PATCH 5.8 144/148] efi: add missed destroy_workqueue when efisubsys_init fails

2020-08-24 Thread Greg Kroah-Hartman
From: Li Heng commit 98086df8b70c06234a8f4290c46064e44dafa0ed upstream. destroy_workqueue() should be called to destroy efi_rts_wq when efisubsys_init() init resources fails. Cc: Reported-by: Hulk Robot Signed-off-by: Li Heng Link: https://lore.kernel.org/r/1595229738-10087-1-git-send-email

[PATCH 5.8 147/148] efi/libstub: Handle unterminated cmdline

2020-08-24 Thread Greg Kroah-Hartman
From: Arvind Sankar commit 8a8a3237a78cbc0557f0eb16a89f16d616323e99 upstream. Make the command line parsing more robust, by handling the case it is not NUL-terminated. Use strnlen instead of strlen, and make sure that the temporary copy is NUL-terminated before parsing. Cc: Signed-off-by: Arv

Re: [v5,3/3] mmc: mediatek: add optional module reset property

2020-08-24 Thread Ulf Hansson
On Fri, 14 Aug 2020 at 03:44, Wenbin Mei wrote: > > This patch fixs eMMC-Access on mt7622/Bpi-64. > Before we got these Errors on mounting eMMC ion R64: > [ 48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op > 0x1:(WRITE) > flags 0x800 phys_seg 1 prio class 0 > [ 48.67601

Re: [PATCH] mmc: mmc_spi: fix timeout calculation

2020-08-24 Thread Ulf Hansson
On Fri, 14 Aug 2020 at 20:50, Tobias Schramm wrote: > > Previously the cycle timeout was converted to a microsecond value but > then incorrectly treated as a nanosecond timeout. This patch changes > the code to convert both the nanosecond timeout and the cycle timeout > to a microsecond value and

[PATCH 5.8 123/148] Revert "RDMA/hns: Reserve one sge in order to avoid local length error"

2020-08-24 Thread Greg Kroah-Hartman
From: Weihang Li [ Upstream commit 6da06c6291f38be4df6df2efb76ba925096d2691 ] This patch caused some issues on SEND operation, and it should be reverted to make the drivers work correctly. There will be a better solution that has been tested carefully to solve the original problem. This reverts

[PATCH 5.8 115/148] scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel EHL

2020-08-24 Thread Greg Kroah-Hartman
From: Adrian Hunter [ Upstream commit 8da76f71fef7d8a1a72af09d48899573feb60065 ] Intel EHL UFS host controller advertises auto-hibernate capability but it does not work correctly. Add a quirk for that. [mkp: checkpatch fix] Link: https://lore.kernel.org/r/20200810141024.28859-1-adrian.hun...@i

Re: [PATCH v2] drivers: mmc: host: via-sdmmc: Fix data race bug

2020-08-24 Thread Ulf Hansson
On Sat, 22 Aug 2020 at 08:15, wrote: > > From: Madhuparna Bhowmik > > via_save_pcictrlreg() should be called with host->lock held > as it writes to pm_pcictrl_reg, otherwise there can be a race > condition between via_sd_suspend() and via_sdc_card_detect(). > The same pattern is used in the funct

[PATCH 5.8 121/148] Fix build error when CONFIG_ACPI is not set/enabled:

2020-08-24 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit ee87e1557c42dc9c2da11c38e11b87c311569853 ] ../arch/x86/pci/xen.c: In function ‘pci_xen_init’: ../arch/x86/pci/xen.c:410:2: error: implicit declaration of function ‘acpi_noirq_set’; did you mean ‘acpi_irq_get’? [-Werror=implicit-function-declaration] acpi_

Re: [PATCH 0/4] mmc: sdio: Export CISTPL_VERS_1 attributes to userspace

2020-08-24 Thread Ulf Hansson
On Mon, 27 Jul 2020 at 15:38, Pali Rohár wrote: > > CISTPL_VERS_1 structure contains useful information for identification > of SDIO cards. It contains revision number according to which standard > is SDIO card compliant. And also it contain human readable info strings > which should contain manuf

[PATCH 5.8 134/148] net: ena: Change WARN_ON expression in ena_del_napi_in_range()

2020-08-24 Thread Greg Kroah-Hartman
From: Shay Agroskin [ Upstream commit 8b147f6f3e7de4e51113e3e9ec44aa2debc02c58 ] The ena_del_napi_in_range() function unregisters the napi handler for rings in a given range. This function had the following WARN_ON macro: WARN_ON(ENA_IS_XDP_INDEX(adapter, i) && adapter->ena_napi

[PATCH 5.8 138/148] net: dsa: b53: check for timeout

2020-08-24 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 774d977abfd024e6f73484544b9abe5a5cd62de7 ] clang static analysis reports this problem b53_common.c:1583:13: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage ent.port &= ~BIT(por

[PATCH] Revert "vc_screen: extract vcs_read_buf_header"

2020-08-24 Thread Jiri Slaby
This reverts commit b1c32fcfadf5593ab7a63261cc8a5747c36e627e, because Syzkaller reports a use-after-free, a write in vcs_read: BUG: KASAN: use-after-free in vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] BUG: KASAN: use-after-free in vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 Writ

Re: [PATCH 3/6] drm: bridge: dw-hdmi: Introduce previous_pixelclock/previous_tmdsclock

2020-08-24 Thread Neil Armstrong
On 12/08/2020 10:34, Algea Cao wrote: > Introduce previous_pixelclock/previous_tmdsclock to > determine whether PHY needs initialization. If phy is power off, > or mpixelclock/mtmdsclock is different to previous value, phy is > neet to be reinitialized. > > Signed-off-by: Algea Cao > --- > > dr

[PATCH 5.8 137/148] hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit()

2020-08-24 Thread Greg Kroah-Hartman
From: Haiyang Zhang [ Upstream commit c3d897e01aef8ddc43149e4d661b86f823e3aae7 ] netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the queue number, so the “skb->queue_mapping - 1” will be used. This may cau

[PATCH 5.8 129/148] powerpc/fixmap: Fix the size of the early debug area

2020-08-24 Thread Greg Kroah-Hartman
From: Christophe Leroy [ Upstream commit fdc6edbb31fba76fd25d7bd016b675a92908d81e ] Commit ("03fd42d458fb powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k") reworked the setup of the early debug area and mistakenly replaced 128 * 1024 by SZ_128. Change to SZ_128K to restore the o

Re: drivers/greybus/es2.c:439 message_send() error: double unlocked 'es2->cport_out_urb_lock' (orig line 417)

2020-08-24 Thread Johan Hovold
On Fri, Aug 14, 2020 at 03:26:27AM +0800, kernel test robot wrote: > Hi Greg, > > First bad commit (maybe != root cause): > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: dc06fe51d26efc100ac74121607c01a454867c91 > commit: b81beec9cb2d586412c7166c8

[PATCH 5.8 133/148] net: ena: Prevent reset after device destruction

2020-08-24 Thread Greg Kroah-Hartman
From: Shay Agroskin [ Upstream commit 63d4a4c145cca2e84dc6e62d2ef5cb990c9723c2 ] The reset work is scheduled by the timer routine whenever it detects that a device reset is required (e.g. when a keep_alive signal is missing). When releasing device resources in ena_destroy_device() the driver can

[PATCH 5.8 128/148] powerpc: Add POWER10 raw mode cputable entry

2020-08-24 Thread Greg Kroah-Hartman
From: Madhavan Srinivasan [ Upstream commit 327da008e65a25b8206b36b7fc0c9e4edbb36a58 ] Add a raw mode cputable entry for POWER10. Copies most of the fields from commit a3ea40d5c736 ("powerpc: Add POWER10 architected mode") except for oprofile_cpu_type, machine_check_early, pvr_mask and pvr_mask

[PATCH 5.8 108/148] of/address: check for invalid range.cpu_addr

2020-08-24 Thread Greg Kroah-Hartman
From: Colin Ian King [ Upstream commit f49c7faf776f16607c948d852a03b04a88c3b583 ] Currently invalid CPU addresses are not being sanity checked resulting in SATA setup failure on a SynQuacer SC2A11 development machine. The original check was removed by and earlier commit, so add a sanity check ba

[PATCH 5.8 116/148] scsi: ufs: Fix interrupt error message for shared interrupts

2020-08-24 Thread Greg Kroah-Hartman
From: Adrian Hunter [ Upstream commit 6337f58cec030b34ced435b3d9d7d29d63c96e36 ] The interrupt might be shared, in which case it is not an error for the interrupt handler to be called when the interrupt status is zero, so don't print the message unless there was enabled interrupt status. Link:

[PATCH 5.8 125/148] kconfig: qconf: remove qInfo() to get back Qt4 support

2020-08-24 Thread Greg Kroah-Hartman
From: Masahiro Yamada [ Upstream commit 53efe2e76ca2bfad7f35e0b5330e2ccd44a643e3 ] qconf is supposed to work with Qt4 and Qt5, but since commit c4f7398bee9c ("kconfig: qconf: make debug links work again"), building with Qt4 fails as follows: HOSTCXX scripts/kconfig/qconf.o scripts/kconfig/qco

[PATCH 5.8 099/148] s390/ptrace: fix storage key handling

2020-08-24 Thread Greg Kroah-Hartman
From: Heiko Carstens [ Upstream commit fd78c59446b8d050ecf3e0897c5a486c7de7c595 ] The key member of the runtime instrumentation control block contains only the access key, not the complete storage key. Therefore the value must be shifted by four bits. Since existing user space does not necessari

[RFC PATCH v2] iio: core: Add optional symbolic label to a device channel

2020-08-24 Thread Cristian Pop
If a label is defined in the device tree for this channel add that to the channel specific attributes. This is useful for userspace to be able to identify an individual channel. Signed-off-by: Cristian Pop --- Changes in v2: - Move label check before "read_raw" callback. - Move t

[PATCH 5.8 098/148] s390/runtime_instrumentation: fix storage key handling

2020-08-24 Thread Greg Kroah-Hartman
From: Heiko Carstens [ Upstream commit 9eaba29c7985236e16468f4e6a49cc18cf01443e ] The key member of the runtime instrumentation control block contains only the access key, not the complete storage key. Therefore the value must be shifted by four bits. Note: this is only relevant for debugging pu

[PATCH 5.8 097/148] ipvlan: fix device features

2020-08-24 Thread Greg Kroah-Hartman
From: Mahesh Bandewar [ Upstream commit d0f5c7076e01fef6fcb86988d9508bf3ce258bd4 ] Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose NETIF_F_LLTX feature because of the incorrect handling of features in ipvlan_fix_features(). --before-- lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-l

Re: [PATCH v4 07/15] iommu/vt-d: Delegate the dma domain to upper layer

2020-08-24 Thread Chris Wilson
Quoting Lu Baolu (2020-08-24 07:31:23) > Hi Chris, > > On 2020/8/22 2:33, Chris Wilson wrote: > > Quoting Lu Baolu (2019-05-25 06:41:28) > >> This allows the iommu generic layer to allocate a dma domain and > >> attach it to a device through the iommu api's. With all types of > >> domains being de

[PATCH 5.8 113/148] scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk

2020-08-24 Thread Greg Kroah-Hartman
From: Alim Akhtar [ Upstream commit 26f968d7de823ba4974a8f25c8bd8ee2df6ab74b ] Some UFS host controllers like Exynos uses granularities of PRDT length and offset as bytes, whereas others use actual segment count. Link: https://lore.kernel.org/r/20200528011658.71590-5-alim.akh...@samsung.com Rev

[PATCH 5.8 112/148] scsi: ufs: Add quirk to enable host controller without hce

2020-08-24 Thread Greg Kroah-Hartman
From: Alim Akhtar [ Upstream commit 39bf2d83b54e900675cd7b52737ded695bb60bf1 ] Some host controllers don't support host controller enable via HCE. Link: https://lore.kernel.org/r/20200528011658.71590-4-alim.akh...@samsung.com Reviewed-by: Can Guo Reviewed-by: Avri Altman Signed-off-by: Seungw

[PATCH 5.8 104/148] vfio/type1: Add proper error unwind for vfio_iommu_replay()

2020-08-24 Thread Greg Kroah-Hartman
From: Alex Williamson [ Upstream commit aae7a75a821a793ed6b8ad502a5890fb8e8f172d ] The vfio_iommu_replay() function does not currently unwind on error, yet it does pin pages, perform IOMMU mapping, and modify the vfio_dma structure to indicate IOMMU mapping. The IOMMU mappings are torn down whe

[PATCH 5.8 114/148] scsi: ufs: Add quirk to fix abnormal ocs fatal error

2020-08-24 Thread Greg Kroah-Hartman
From: Kiwoong Kim [ Upstream commit d779a6e90e189f4883ce6f900da02995fb000df5 ] Some controller like Exynos determines if FATAL ERROR (0x7) in OCS field in UTRD occurs for values other than GOOD (0x0) in STATUS field in response upiu as well as errors that a host controller can't cover. This pat

[PATCH 5.8 105/148] arch/ia64: Restore arch-specific pgd_offset_k implementation

2020-08-24 Thread Greg Kroah-Hartman
From: Jessica Clarke [ Upstream commit bd05220c7be3356046861c317d9c287ca50445ba ] IA-64 is special and treats pgd_offset_k() differently to pgd_offset(), using different formulae to calculate the indices into the kernel and user PGDs. The index into the user PGDs takes into account the region n

[PATCH 5.8 107/148] kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode

2020-08-24 Thread Greg Kroah-Hartman
From: Jim Mattson [ Upstream commit cb957adb4ea422bd758568df5b2478ea3bb34f35 ] See the SDM, volume 3, section 4.4.1: If PAE paging would be in use following an execution of MOV to CR0 or MOV to CR4 (see Section 4.1.1) and the instruction is modifying any of CR0.CD, CR0.NW, CR0.PG, CR4.PAE, CR4.

[PATCH 5.8 106/148] kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode

2020-08-24 Thread Greg Kroah-Hartman
From: Jim Mattson [ Upstream commit 427890aff8558eb4326e723835e0eae0e6fe3102 ] See the SDM, volume 3, section 4.4.1: If PAE paging would be in use following an execution of MOV to CR0 or MOV to CR4 (see Section 4.1.1) and the instruction is modifying any of CR0.CD, CR0.NW, CR0.PG, CR4.PAE, CR4.

[PATCH 5.8 101/148] ASoC: intel: Fix memleak in sst_media_open

2020-08-24 Thread Greg Kroah-Hartman
From: Dinghao Liu [ Upstream commit 062fa09f44f4fb3776a23184d5d296b0c8872eb9 ] When power_up_sst() fails, stream needs to be freed just like when try_module_get() fails. However, current code is returning directly and ends up leaking memory. Fixes: 0121327c1a68b ("ASoC: Intel: mfld-pcm: add con

[PATCH 5.8 085/148] can: j1939: transport: j1939_simple_recv(): ignore local J1939 messages send not by J1939 stack

2020-08-24 Thread Greg Kroah-Hartman
From: Oleksij Rempel [ Upstream commit b43e3a82bc432c1caaed8950e7662c143470c54c ] In current J1939 stack implementation, we process all locally send messages as own messages. Even if it was send by CAN_RAW socket. To reproduce it use following commands: testj1939 -P -r can0:0x80 & cansend can0

[PATCH 5.8 086/148] can: j1939: transport: add j1939_session_skb_find_by_offset() function

2020-08-24 Thread Greg Kroah-Hartman
From: Oleksij Rempel [ Upstream commit 840835c9281215341d84966a8855f267a971e6a3 ] Sometimes it makes no sense to search the skb by pkt.dpo, since we need next the skb within the transaction block. This may happen if we have an ETP session with CTS set to less than 255 packets. After this patch,

[PATCH 5.8 076/148] netfilter: nf_tables: nft_exthdr: the presence return value should be little-endian

2020-08-24 Thread Greg Kroah-Hartman
From: Stephen Suryaputra [ Upstream commit b428336676dbca363262cc134b6218205df4f530 ] On big-endian machine, the returned register data when the exthdr is present is not being compared correctly because little-endian is assumed. The function nft_cmp_fast_mask(), called by nft_cmp_fast_eval() and

[PATCH 5.8 057/148] xfs: fix inode quota reservation checks

2020-08-24 Thread Greg Kroah-Hartman
From: Darrick J. Wong [ Upstream commit f959b5d037e71a4d69b5bf71faffa065d9269b4a ] xfs_trans_dqresv is the function that we use to make reservations against resource quotas. Each resource contains two counters: the q_core counter, which tracks resources allocated on disk; and the dquot reservat

[PATCH 5.8 079/148] ASoC: q6routing: add dummy register read/write function

2020-08-24 Thread Greg Kroah-Hartman
From: Srinivas Kandagatla [ Upstream commit 796a58fe2b8c9b6668db00d92512ec84be663027 ] Most of the DAPM widgets for DSP ASoC components reuse reg field of the widgets for its internal calculations, however these are not real registers. So read/writes to these numbers are not really valid. Howeve

[PATCH 5.8 060/148] jffs2: fix UAF problem

2020-08-24 Thread Greg Kroah-Hartman
From: Zhe Li [ Upstream commit 798b7347e4f29553db4b996393caf12f5b233daf ] The log of UAF problem is listed below. BUG: KASAN: use-after-free in jffs2_rmdir+0xa4/0x1cc [jffs2] at addr c1f165fc Read of size 4 by task rm/8283 =

[PATCH 5.8 075/148] ext4: check journal inode extents more carefully

2020-08-24 Thread Greg Kroah-Hartman
From: Jan Kara [ Upstream commit ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 ] Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for in

[PATCH 1/2] mm/migrate: Fixup setting UFFD_WP flag

2020-08-24 Thread Alistair Popple
Commit f45ec5ff16a75 ("userfaultfd: wp: support swap and page migration") introduced support for tracking the uffd wp bit during page migration. However the non-swap PTE variant was used to set the flag for zone device private pages which are a type of swap page. This leads to corruption of the sw

[PATCH 5.8 081/148] bpf: sock_ops ctx access may stomp registers in corner case

2020-08-24 Thread Greg Kroah-Hartman
From: John Fastabend [ Upstream commit fd09af010788a884de1c39537c288830c3d305db ] I had a sockmap program that after doing some refactoring started spewing this splat at me: [18610.807284] BUG: unable to handle kernel NULL pointer dereference at 0001 [...] [18610.807359] Call Trace

[PATCH 5.8 054/148] MIPS: Fix unable to reserve memory for Crash kernel

2020-08-24 Thread Greg Kroah-Hartman
From: Jinyang He [ Upstream commit b1ce9716f3b5ed3b49badf1f003b9e34b7ead0f9 ] Use 0 as the align parameter in memblock_find_in_range() is incorrect when we reserve memory for Crash kernel. The environment as follows: [0.00] MIPS: machine is loongson,loongson64c-4core-rs780e ... [1.9

[PATCH 5.8 080/148] tools/bpftool: Make skeleton code C++17-friendly by dropping typeof()

2020-08-24 Thread Greg Kroah-Hartman
From: Andrii Nakryiko [ Upstream commit 8faf7fc597d59b142af41ddd4a2d59485f75f88a ] Seems like C++17 standard mode doesn't recognize typeof() anymore. This can be tested by compiling test_cpp test with -std=c++17 or -std=c++1z options. The use of typeof in skeleton generated code is unnecessary,

[PATCH 2/2] mm/rmap: Fixup copying of soft dirty and uffd ptes

2020-08-24 Thread Alistair Popple
During memory migration a pte is temporarily replaced with a migration swap pte. Some pte bits from the existing mapping such as the soft-dirty and uffd write-protect bits are preserved by copying these to the temporary migration swap pte. However these bits are not stored at the same location for

[PATCH 5.8 082/148] bpf: sock_ops sk access may stomp registers when dst_reg = src_reg

2020-08-24 Thread Greg Kroah-Hartman
From: John Fastabend [ Upstream commit 84f44df664e9f0e261157e16ee1acd77cc1bb78d ] Similar to patch ("bpf: sock_ops ctx access may stomp registers") if the src_reg = dst_reg when reading the sk field of a sock_ops struct we generate xlated code, 53: (61) r9 = *(u32 *)(r9 +28) 54: (15) if r9

[PATCH 5.8 068/148] xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init

2020-08-24 Thread Greg Kroah-Hartman
From: Eiichi Tsukata [ Upstream commit 96cf2a2c75567ff56195fe3126d497a2e7e4379f ] If xfs_sysfs_init is called with parent_kobj == NULL, UBSAN shows the following warning: UBSAN: null-ptr-deref in ./fs/xfs/xfs_sysfs.h:37:23 member access within null pointer of type 'struct xfs_kobj' Call T

[PATCH 5.8 050/148] rtc: goldfish: Enable interrupt in set_alarm() when necessary

2020-08-24 Thread Greg Kroah-Hartman
From: Huacai Chen [ Upstream commit 22f8d5a1bf230cf8567a4121fc3789babb46336d ] When use goldfish rtc, the "hwclock" command fails with "select() to /dev/rtc to wait for clock tick timed out". This is because "hwclock" need the set_alarm() hook to enable interrupt when alrm->enabled is true. This

[PATCH 5.8 053/148] Input: psmouse - add a newline when printing proto by sysfs

2020-08-24 Thread Greg Kroah-Hartman
From: Xiongfeng Wang [ Upstream commit 4aec14de3a15cf9789a0e19c847f164776f49473 ] When I cat parameter 'proto' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/psmouse/parameters/proto autoroot@syzkaller:~# Signed-off-by: Xiongf

[PATCH 5.8 019/148] mm, page_alloc: fix core hung in free_pcppages_bulk()

2020-08-24 Thread Greg Kroah-Hartman
From: Charan Teja Reddy commit 88e8ac11d2ea3acc003cf01bb5a38c8aa76c3cfd upstream. The following race is observed with the repeated online, offline and a delay between two successive online of memory blocks of movable zone. P1 P2 Online the first mem

[PATCH 5.8 063/148] cpufreq: intel_pstate: Fix cpuinfo_max_freq when MSR_TURBO_RATIO_LIMIT is 0

2020-08-24 Thread Greg Kroah-Hartman
From: Srinivas Pandruvada [ Upstream commit 4daca379c703ff55edc065e8e5173dcfeecf0148 ] The MSR_TURBO_RATIO_LIMIT can be 0. This is not an error. User can update this MSR via BIOS settings on some systems or can use msr tools to update. Also some systems boot with value = 0. This results in disp

[PATCH 5.8 061/148] ceph: fix use-after-free for fsc->mdsc

2020-08-24 Thread Greg Kroah-Hartman
From: Xiubo Li [ Upstream commit a7caa88f8b72c136f9a401f498471b8a8e35370d ] If the ceph_mdsc_init() fails, it will free the mdsc already. Reported-by: syzbot+b57f46d8d6ea51960...@syzkaller.appspotmail.com Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov Signed-off

[PATCH 5.8 071/148] fs/signalfd.c: fix inconsistent return codes for signalfd4

2020-08-24 Thread Greg Kroah-Hartman
From: Helge Deller [ Upstream commit a089e3fd5a82aea20f3d9ec4caa5f4c65cc2cfcc ] The kernel signalfd4() syscall returns different error codes when called either in compat or native mode. This behaviour makes correct emulation in qemu and testing programs like LTP more complicated. Fix the code

[PATCH 5.8 040/148] drm/amd/display: Blank stream before destroying HDCP session

2020-08-24 Thread Greg Kroah-Hartman
From: Jaehyun Chung commit 79940e4d10df9c737a394630968471c632246ee0 upstream. [Why] Stream disable sequence incorretly destroys HDCP session while stream is not blanked and while audio is not muted. This sequence causes a flash of corruption during mode change and an audio click. [How] Change s

[PATCH 5.8 041/148] drm/amd/display: Fix DFPstate hang due to view port changed

2020-08-24 Thread Greg Kroah-Hartman
From: Paul Hsieh commit 8e80d482608a4e6a97c75272ef8b4bcfc5d0c490 upstream. [Why] Place the cursor in the center of screen between two pipes then adjusting the viewport but cursour doesn't update cause DFPstate hang. [How] If viewport changed, update cursor as well. Cc: sta...@vger.kernel.org S

[PATCH 5.8 026/148] ext4: fix checking of directory entry validity for inline directories

2020-08-24 Thread Greg Kroah-Hartman
From: Jan Kara commit 7303cb5bfe845f7d43cd9b2dbd37dbb266efda9b upstream. ext4_search_dir() and ext4_generic_delete_entry() can be called both for standard director blocks and for inline directories stored inside inode or inline xattr space. For the second case we didn't call ext4_check_dir_entry

[PATCH 5.8 047/148] media: budget-core: Improve exception handling in budget_register()

2020-08-24 Thread Greg Kroah-Hartman
From: Chuhong Yuan [ Upstream commit fc0456458df8b3421dba2a5508cd817fbc20ea71 ] budget_register() has no error handling after its failure. Add the missed undo functions for error handling to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab Si

[PATCH 5.8 045/148] scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices

2020-08-24 Thread Greg Kroah-Hartman
From: Stanley Chu [ Upstream commit c0a18ee0ce78d7957ec1a53be35b1b3beba80668 ] It is confirmed that Micron device needs DELAY_BEFORE_LPM quirk to have a delay before VCC is powered off. Sdd Micron vendor ID and this quirk for Micron devices. Link: https://lore.kernel.org/r/20200612012625.6615-2

[PATCH 5.8 028/148] scsi: zfcp: Fix use-after-free in request timeout handlers

2020-08-24 Thread Greg Kroah-Hartman
From: Steffen Maier commit 2d9a2c5f581be3991ba67fa9e7497c711220ea8e upstream. Before v4.15 commit 75492a51568b ("s390/scsi: Convert timers to use timer_setup()"), we intentionally only passed zfcp_adapter as context argument to zfcp_fsf_request_timeout_handler(). Since we only trigger adapter re

[PATCH 5.8 035/148] mm/memory.c: skip spurious TLB flush for retried page fault

2020-08-24 Thread Greg Kroah-Hartman
From: Yang Shi commit b7333b58f358f38d90d78e00c1ee5dec82df10ad upstream. Recently we found regression when running will_it_scale/page_fault3 test on ARM64. Over 70% down for the multi processes cases and over 20% down for the multi threads cases. It turns out the regression is caused by commit

Re: [PATCH 1/2] mm/slub: Introduce two counters for the partial objects

2020-08-24 Thread xunlei
On 2020/8/20 PM9:58, Pekka Enberg wrote: > Hi Christopher, > > On Tue, Aug 11, 2020 at 3:52 PM Christopher Lameter wrote: >> >> On Fri, 7 Aug 2020, Pekka Enberg wrote: >> >>> Why do you consider this to be a fast path? This is all partial list >>> accounting when we allocate/deallocate a slab, no

Re: {standard input}:5973: Error: operand out of range (512 is not between -512 and 511)

2020-08-24 Thread Sebastian Andrzej Siewior
cks > date: 5 months ago > config: arc-randconfig-r004-20200824 (attached as .config) > compiler: arc-elf-gcc (GCC) 9.3.0 > reproduce (this is a W=1 build): > wget > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > ~/bin/make.cross

[PATCH 5.8 030/148] selftests: kvm: Use a shorter encoding to clear RAX

2020-08-24 Thread Greg Kroah-Hartman
From: Yang Weijiang commit 98b0bf02738004829d7e26d6cb47b2e469aaba86 upstream. If debug_regs.c is built with newer binutils, the resulting binary is "optimized" by the assembler: asm volatile("ss_start: " "xor %%rax,%%rax\n\t" "cpuid\n\t" "movl $0x1a0,%%ec

[PATCH 5.8 036/148] drm: amdgpu: Use the correct size when allocating memory

2020-08-24 Thread Greg Kroah-Hartman
From: Christophe JAILLET commit 78484d7c747e30468b35bd5f19edf602f50162a7 upstream. When '*sgt' is allocated, we must allocated 'sizeof(**sgt)' bytes instead of 'sizeof(*sg)'. The sizeof(*sg) is bigger than sizeof(**sgt) so this wastes memory but it won't lead to corruption. Fixes: f44ffd677fb3

[PATCH 5.8 029/148] KVM: Pass MMU notifier range flags to kvm_unmap_hva_range()

2020-08-24 Thread Greg Kroah-Hartman
From: Will Deacon commit fdfe7cbd58806522e799e2a50a15aee7f2cbb7b6 upstream. The 'flags' field of 'struct mmu_notifier_range' is used to indicate whether invalidate_range_{start,end}() are permitted to block. In the case of kvm_mmu_notifier_invalidate_range_start(), this field is not forwarded on

[PATCH 5.8 038/148] drm/amd/display: Fix incorrect backlight register offset for DCN

2020-08-24 Thread Greg Kroah-Hartman
From: Aric Cyr commit a49f6727e14caff32419cc3002b9ae9cafb750d7 upstream. [Why] Typo in backlight refactor inctroduced wrong register offset. [How] Change DCE to DCN register map for PWRSEQ_REF_DIV Cc: sta...@vger.kernel.org Signed-off-by: Aric Cyr Reviewed-by: Ashley Thomas Acked-by: Qingqin

[PATCH 5.8 000/148] 5.8.4-rc1 review

2020-08-24 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.8.4 release. There are 148 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Wed, 26 Aug 2020 08:23:34 +. Anything rece

[PATCH 5.8 033/148] s390/pci: fix PF/VF linking on hot plug

2020-08-24 Thread Greg Kroah-Hartman
From: Niklas Schnelle commit b97bf44f99155e57088e16974afb1f2d7b5287aa upstream. Currently there are four places in which a PCI function is scanned and made available to drivers: 1. In pci_scan_root_bus() as part of the initial zbus creation. 2. In zpci_bus_add_devices() when registering

[PATCH 5.8 018/148] mm: include CMA pages in lowmem_reserve at boot

2020-08-24 Thread Greg Kroah-Hartman
From: Doug Berger commit e08d3fdfe2dafa0331843f70ce1ff6c1c4900bf4 upstream. The lowmem_reserve arrays provide a means of applying pressure against allocations from lower zones that were targeted at higher zones. Its values are a function of the number of pages managed by higher zones and are as

[PATCH 5.8 003/148] drm/ast: Remove unused code paths for AST 1180

2020-08-24 Thread Greg Kroah-Hartman
From: Thomas Zimmermann [ Upstream commit 05f13f5b5996d20a9819e0c6fd0cda4956c8aff9 ] The ast driver contains code paths for AST 1180 chips. The chip is not supported and the rsp code has never been tested. Simplify the driver by removing the AST 1180 code. Signed-off-by: Thomas Zimmermann Revi

[PATCH 5.8 016/148] uprobes: __replace_page() avoid BUG in munlock_vma_page()

2020-08-24 Thread Greg Kroah-Hartman
From: Hugh Dickins commit c17c3dc9d08b9aad9a55a1e53f205187972f448e upstream. syzbot crashed on the VM_BUG_ON_PAGE(PageTail) in munlock_vma_page(), when called from uprobes __replace_page(). Which of many ways to fix it? Settled on not calling when PageCompound (since Head and Tail are equals in

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