[PATCH 4.4 18/35] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-02-22 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a different

[PATCH 4.4 19/35] net: watchdog: hold device global xmit lock during tx disable

2021-02-22 Thread Greg Kroah-Hartman
From: Edwin Peer commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 upstream. Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown seque

[PATCH 4.4 29/35] xen/arm: dont ignore return errors from set_phys_to_machine

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Stabellini commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream. set_phys_to_machine can fail due to lack of memory, see the kzalloc call in arch/arm/xen/p2m.c:__set_phys_to_machine_multi. Don't ignore the potential return error in set_foreign_p2m_mapping, returning it to the

[PATCH 4.4 34/35] scsi: qla2xxx: Fix crash during driver load on big endian machines

2021-02-22 Thread Greg Kroah-Hartman
From: Arun Easi commit 8de309e7299a00b3045fb274f82b326f356404f0 upstream Crash stack: [576544.715489] Unable to handle kernel paging request for data at address 0xdf97 [576544.715497] Faulting instruction address: 0xdf880f64 [576544.715503] Oops: Kern

[PATCH 4.4 21/35] x86/build: Disable CET instrumentation in the kernel for 32-bit too

2021-02-22 Thread Greg Kroah-Hartman
From: Borislav Petkov commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It

[PATCH 4.9 02/49] fgraph: Initialize tracing_graph_pause at task creation

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 7e0a9220467dbcfdc5bc62825724f3e52e50ab31 upstream. On some archs, the idle task can call into cpu_suspend(). The cpu_suspend() will disable or pause function graph tracing, as there's some paths in bringing down the CPU that can have issues with its return ad

[PATCH 4.4 17/35] usb: dwc3: ulpi: fix checkpatch warning

2021-02-22 Thread Greg Kroah-Hartman
From: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 upstream no functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/ulpi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers

[PATCH 4.9 03/49] remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load

2021-02-22 Thread Greg Kroah-Hartman
From: Sibi Sankar commit e013f455d95add874f310dc47c608e8c70692ae5 upstream The following mem abort is observed when the mba firmware size exceeds the allocated mba region. MBA firmware size is restricted to a maximum size of 1M and remaining memory region is used by modem debug policy firmware w

[PATCH 4.9 01/49] mm: memcontrol: fix NULL pointer crash in test_clear_page_writeback()

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Weiner commit 739f79fc9db1b38f96b5a5109b247a650fbebf6d upstream. Jaegeuk and Brad report a NULL pointer crash when writeback ending tries to update the memcg stats: BUG: unable to handle kernel NULL pointer dereference at 03b0 IP: test_clear_page_writeback+0x1

[PATCH 4.9 04/49] af_key: relax availability checks for skb size calculation

2021-02-22 Thread Greg Kroah-Hartman
From: Cong Wang [ Upstream commit afbc293add6466f8f3f0c3d944d85f53709c170f ] xfrm_probe_algs() probes kernel crypto modules and changes the availability of struct xfrm_algo_desc. But there is a small window where ealg->available and aalg->available get changed between count_ah_combs()/count_esp_

[PATCH 4.9 07/49] iwlwifi: mvm: guard against device removal in reprobe

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 7a21b1d4a728a483f07c638ccd8610d4b4f12684 ] If we get into a problem severe enough to attempt a reprobe, we schedule a worker to do that. However, if the problem gets more severe and the device is actually destroyed before this worker has a chance to run, we

[PATCH 4.9 06/49] iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap

2021-02-22 Thread Greg Kroah-Hartman
From: Emmanuel Grumbach [ Upstream commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 ] I hit a NULL pointer exception in this function when the init flow went really bad. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlw

Re: [PATCH] rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

2021-02-22 Thread Hao Chen
Hi: I have tried setting module parameter disable_aspm=1, but it's not useful. >The cpu info is follow: uos@uos-PC:~$ lscpu Architecture:    x86_64 CPU op-mode(s):  32-bit, 64-bit Byte Order:  Little Endian Address sizes:   48 bits physical, 48 bits virtual CPU(s):  

[PATCH 4.4 30/35] xen-blkback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 5a264285ed1cd32e26d9de4f3c8c6855e467fd63 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.4 33/35] xen-blkback: fix error handling in xen_blkbk_map()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 871997bc9e423f05c7da7c9178e62dde5df2a7f8 upstream. The function uses a goto-based loop, which may lead to an earlier error getting discarded by a later iteration. Exit this ad-hoc loop when an error was encountered. The out-of-memory error path additionally fails to fil

[PATCH 4.4 32/35] xen-scsiback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 7c77474b2d22176d2bfb592ec74e0f2cb71352c9 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.4 35/35] kvm: check tlbs_dirty directly

2021-02-22 Thread Greg Kroah-Hartman
From: Lai Jiangshan commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c upstream In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is always

[PATCH 4.4 20/35] vsock: fix locking in vsock_shutdown()

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit 1c5fae9c9a092574398a17facc31c533791ef232 upstream. In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in vsock_send_

[PATCH 4.9 08/49] SUNRPC: Move simple_get_bytes and simple_get_netobj into private header

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit ba6dfce47c4d002d96cd02a304132fca76981172 ] Remove duplicated helper functions to parse opaque XDR objects and place inside new file net/sunrpc/auth_gss/auth_gss_internal.h. In the new file carry the license and copyright from the source file net/sunrpc/au

[PATCH 4.9 19/49] tracing: Do not count ftrace events in top level enable output

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit 256cfdd6fdf70c6fcf0f7c8ddb0ebd73ce8f3bc9 upstream. The file /sys/kernel/tracing/events/enable is used to enable all events by echoing in "1", or disabling all events when echoing in "0". To know if all events are enabled, disabled, or some are enabled but not

[PATCH 4.4 31/35] xen-netback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 3194a1746e8aabe86075fd3c5e7cf1f4632d7f16 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.9 10/49] lib/string: Add strscpy_pad() function

2021-02-22 Thread Greg Kroah-Hartman
From: Tobin C. Harding [ Upstream commit 458a3bf82df4fe1f951d0f52b1e0c1e9d5a88a3b ] We have a function to copy strings safely and we have a function to copy strings and zero the tail of the destination (if source string is shorter than destination buffer) but we do not have a function to do both

[PATCH 4.9 00/49] 4.9.258-rc1 review

2021-02-22 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.258 release. There are 49 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, 24 Feb 2021 12:07:46 +. Anything rec

[PATCH 4.4 23/35] tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

2021-02-22 Thread Greg Kroah-Hartman
From: Greg Thelen commit ed7d40bc67b8353c677b38c6cdddcdc310c0f452 upstream. Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail. Example output: /bin/sh: init/.tmp_main.o: Permission denied commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"), adde

[PATCH 4.4 22/35] trace: Use -mcount-record for dynamic ftrace

2021-02-22 Thread Greg Kroah-Hartman
From: Andi Kleen commit 96f60dfa5819a065bfdd2f2ba0df7d9cbce7f4dd upstream. gcc 5 supports a new -mcount-record option to generate ftrace tables directly. This avoids the need to run record_mcount manually. Use this option when available. So far doesn't use -mcount-nop, which also exists now.

[PATCH 4.9 20/49] tracing: Check length before giving out the filter buffer

2021-02-22 Thread Greg Kroah-Hartman
From: Steven Rostedt (VMware) commit b220c049d5196dd94d992dd2dc8cba1a5e6123bf upstream. When filters are used by trace events, a page is allocated on each CPU and used to copy the trace event fields to this page before writing to the ring buffer. The reason to use the filter and not write direct

[PATCH 4.4 25/35] Xen/x86: dont bail early from clear_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit a35f2ef3b7376bfd0a57f7844bd7454389aae1fc upstream. Its sibling (set_foreign_p2m_mapping()) as well as the sibling of its only caller (gnttab_map_refs()) don't clean up after themselves in case of error. Higher level callers are expected to do so. However, in order for th

[PATCH 4.9 21/49] ovl: skip getxattr of security labels

2021-02-22 Thread Greg Kroah-Hartman
From: Amir Goldstein [ Upstream commit 03fedf93593c82538b18476d8c4f0e8f8435ea70 ] When inode has no listxattr op of its own (e.g. squashfs) vfs_listxattr calls the LSM inode_listsecurity hooks to list the xattrs that LSMs will intercept in inode_getxattr hooks. When selinux LSM is installed but

[PATCH 4.9 05/49] iwlwifi: mvm: take mutex for calling iwl_mvm_get_sync_time()

2021-02-22 Thread Greg Kroah-Hartman
From: Johannes Berg [ Upstream commit 5c56d862c749669d45c256f581eac4244be00d4d ] We need to take the mutex to call iwl_mvm_get_sync_time(), do it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210115130252.4bb5ccf

[PATCH 4.4 24/35] tracing: Avoid calling cc-option -mrecord-mcount for every Makefile

2021-02-22 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit 07d0408120216b60625c9a5b8012d1c3a907984d upstream. Currently if CONFIG_FTRACE_MCOUNT_RECORD is enabled -mrecord-mcount compiler flag support is tested for every Makefile. Top 4 cc-option usages: 511 -mrecord-mcount 11 -fno-stack-protector 9 -Wno-overri

[PATCH 4.4 26/35] Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit b512e1b077e5ccdbd6e225b15d934ab12453b70a upstream. We should not set up further state if either mapping failed; paying attention to just the user mapping's status isn't enough. Also use GNTST_okay instead of implying its value (zero). This is part of XSA-361. Signed-o

[PATCH 4.9 29/49] usb: dwc3: ulpi: fix checkpatch warning

2021-02-22 Thread Greg Kroah-Hartman
From: Felipe Balbi commit 2a499b45295206e7f3dc76edadde891c06cc4447 upstream no functional changes. Signed-off-by: Felipe Balbi Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/ulpi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers

[PATCH 4.9 26/49] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-22 Thread Greg Kroah-Hartman
From: Juergen Gross [ Upstream commit ec7d8e7dd3a59528e305a18e93f1cb98f7faf83b ] Since commit 23025393dbeb3b8b3 ("xen/netback: use lateeoi irq binding") xenvif_rx_ring_slots_available() is no longer called only from the rx queue kernel thread, so it needs to access the rx queue with the associat

[PATCH 4.9 11/49] include/trace/events/writeback.h: fix -Wstringop-truncation warnings

2021-02-22 Thread Greg Kroah-Hartman
From: Qian Cai [ Upstream commit d1a445d3b86c9341ce7a0954c23be0edb5c9bec5 ] There are many of those warnings. In file included from ./arch/powerpc/include/asm/paca.h:15, from ./arch/powerpc/include/asm/current.h:13, from ./include/linux/thread_info.h:21,

[PATCH 4.9 22/49] ARM: dts: lpc32xx: Revert set default clock rate of HCLK PLL

2021-02-22 Thread Greg Kroah-Hartman
From: Alexandre Belloni [ Upstream commit 5638159f6d93b99ec9743ac7f65563fca3cf413d ] This reverts commit c17e9377aa81664d94b4f2102559fcf2a01ec8e7. The lpc32xx clock driver is not able to actually change the PLL rate as this would require reparenting ARM_CLK, DDRAM_CLK, PERIPH_CLK to SYSCLK, the

[PATCH 4.9 23/49] memblock: do not start bottom-up allocations with kernel_end

2021-02-22 Thread Greg Kroah-Hartman
From: Roman Gushchin [ Upstream commit 2dcb3964544177c51853a210b6ad400de78ef17d ] With kaslr the kernel image is placed at a random place, so starting the bottom-up allocation with the kernel_end can result in an allocation failure and a warning like this one: hugetlb_cma: reserve 2048 MiB, u

[PATCH 4.9 27/49] netfilter: conntrack: skip identical origin tuple in same zone only

2021-02-22 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit 07998281c268592963e1cd623fe6ab0270b65ae4 ] The origin skip check needs to re-test the zone. Else, we might skip a colliding tuple in the reply direction. This only occurs when using 'directional zones' where origin tuples reside in different zones but th

[PATCH 4.9 25/49] netfilter: xt_recent: Fix attempt to update deleted entry

2021-02-22 Thread Greg Kroah-Hartman
From: Jozsef Kadlecsik [ Upstream commit b1bdde33b72366da20d10770ab7a49fe87b5e190 ] When both --reap and --update flag are specified, there's a code path at which the entry to be updated is reaped beforehand, which then leads to kernel crash. Reap only entries which won't be updated. Fixes kern

[PATCH 4.9 28/49] h8300: fix PREEMPTION build, TI_PRE_COUNT undefined

2021-02-22 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit ade9679c159d5bbe14fb7e59e97daf6062872e2b ] Fix a build error for undefined 'TI_PRE_COUNT' by adding it to asm-offsets.c. h8300-linux-ld: arch/h8300/kernel/entry.o: in function `resume_kernel': (.text+0x29a): undefined reference to `TI_PRE_COUNT' Link: ht

[PATCH 4.9 24/49] bpf: Check for integer overflow when using roundup_pow_of_two()

2021-02-22 Thread Greg Kroah-Hartman
From: Bui Quang Minh [ Upstream commit 6183f4d3a0a2ad230511987c6c362ca43ec0055f ] On 32-bit architecture, roundup_pow_of_two() can return 0 when the argument has upper most bit set due to resulting 1UL << 32. Add a check for this case. Fixes: d5a3b1f69186 ("bpf: introduce BPF_MAP_TYPE_STACK_TRA

[PATCH 4.9 30/49] usb: dwc3: ulpi: Replace CPU-based busyloop with Protocol-based one

2021-02-22 Thread Greg Kroah-Hartman
From: Serge Semin commit fca3f138105727c3a22edda32d02f91ce1bf11c9 upstream Originally the procedure of the ULPI transaction finish detection has been developed as a simple busy-loop with just decrementing counter and no delays. It's wrong since on different systems the loop will take a different

[PATCH 4.9 36/49] trace: Use -mcount-record for dynamic ftrace

2021-02-22 Thread Greg Kroah-Hartman
From: Andi Kleen commit 96f60dfa5819a065bfdd2f2ba0df7d9cbce7f4dd upstream. gcc 5 supports a new -mcount-record option to generate ftrace tables directly. This avoids the need to run record_mcount manually. Use this option when available. So far doesn't use -mcount-nop, which also exists now.

[PATCH 4.9 32/49] net: watchdog: hold device global xmit lock during tx disable

2021-02-22 Thread Greg Kroah-Hartman
From: Edwin Peer commit 3aa6bce9af0e25b735c9c1263739a5639a336ae8 upstream. Prevent netif_tx_disable() running concurrently with dev_watchdog() by taking the device global xmit lock. Otherwise, the recommended: netif_carrier_off(dev); netif_tx_disable(dev); driver shutdown seque

[PATCH 4.9 35/49] x86/build: Disable CET instrumentation in the kernel for 32-bit too

2021-02-22 Thread Greg Kroah-Hartman
From: Borislav Petkov commit 256b92af784d5043eeb7d559b6d5963dcc2ecb10 upstream. Commit 20bf2b378729 ("x86/build: Disable CET instrumentation in the kernel") disabled CET instrumentation which gets added by default by the Ubuntu gcc9 and 10 by default, but did that only for 64-bit builds. It

[PATCH 4.9 31/49] net/vmw_vsock: improve locking in vsock_connect_timeout()

2021-02-22 Thread Greg Kroah-Hartman
From: Norbert Slusarek commit 3d0bc44d39bca615b72637e340317b7899b7f911 upstream. A possible locking issue in vsock_connect_timeout() was recognized by Eric Dumazet which might cause a null pointer dereference in vsock_transport_cancel_pkt(). This patch assures that vsock_transport_cancel_pkt() w

Re: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot

2021-02-22 Thread Allen Pais
On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote: - /* -* Ask OP-TEE to free all cached shared memory objects to decrease -* reference counters and also avoid wild pointers in secure world -* into the old shared memory range. -*/ - optee_disable_

[PATCH 4.9 38/49] tracing: Avoid calling cc-option -mrecord-mcount for every Makefile

2021-02-22 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit 07d0408120216b60625c9a5b8012d1c3a907984d upstream. Currently if CONFIG_FTRACE_MCOUNT_RECORD is enabled -mrecord-mcount compiler flag support is tested for every Makefile. Top 4 cc-option usages: 511 -mrecord-mcount 11 -fno-stack-protector 9 -Wno-overri

[PATCH 4.9 39/49] Xen/x86: dont bail early from clear_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit a35f2ef3b7376bfd0a57f7844bd7454389aae1fc upstream. Its sibling (set_foreign_p2m_mapping()) as well as the sibling of its only caller (gnttab_map_refs()) don't clean up after themselves in case of error. Higher level callers are expected to do so. However, in order for th

[PATCH 4.9 34/49] vsock: fix locking in vsock_shutdown()

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit 1c5fae9c9a092574398a17facc31c533791ef232 upstream. In vsock_shutdown() we touched some socket fields without holding the socket lock, such as 'state' and 'sk_flags'. Also, after the introduction of multi-transport, we are accessing 'vsk->transport' in vsock_send_

[PATCH 4.9 33/49] vsock/virtio: update credit only if socket is not closed

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Garzarella commit ce7536bc7398e2ae552d2fabb7e0e371a9f1fe46 upstream. If the socket is closed or is being released, some resources used by virtio_transport_space_update() such as 'vsk->trans' may be released. To avoid a use after free bug we should only update the available credit

[PATCH 4.9 12/49] memcg: fix a crash in wb_workfn when a device disappears

2021-02-22 Thread Greg Kroah-Hartman
From: Theodore Ts'o [ Upstream commit 68f23b89067fdf187763e75a56087550624fdbee ] Without memcg, there is a one-to-one mapping between the bdi and bdi_writeback structures. In this world, things are fairly straightforward; the first thing bdi_unregister() does is to shutdown the bdi_writeback st

[PATCH 4.9 37/49] tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount

2021-02-22 Thread Greg Kroah-Hartman
From: Greg Thelen commit ed7d40bc67b8353c677b38c6cdddcdc310c0f452 upstream. Non gcc-5 builds with CONFIG_STACK_VALIDATION=y and SKIP_STACK_VALIDATION=1 fail. Example output: /bin/sh: init/.tmp_main.o: Permission denied commit 96f60dfa5819 ("trace: Use -mcount-record for dynamic ftrace"), adde

[PATCH 4.9 13/49] futex: Ensure the correct return value from futex_lock_pi()

2021-02-22 Thread Greg Kroah-Hartman
From: Thomas Gleixner commit 12bb3f7f1b03d5913b3f9d4236a488aa7774dfe9 upstream In case that futex_lock_pi() was aborted by a signal or a timeout and the task returned without acquiring the rtmutex, but is the designated owner of the futex due to a concurrent futex_unlock_pi() fixup_owner() is in

[PATCH 4.9 16/49] squashfs: add more sanity checks in id lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit f37aa4c7366e23f91b81d00bafd6a7ab54e4a381 upstream. Sysbot has reported a number of "slab-out-of-bounds reads" and "use-after-free read" errors which has been identified as being caused by a corrupted index value read from the inode. This could be because the metadat

[PATCH 4.9 14/49] futex: Change locking rules

2021-02-22 Thread Greg Kroah-Hartman
From: Peter Zijlstra Currently futex-pi relies on hb->lock to serialize everything. But hb->lock creates another set of problems, especially priority inversions on RT where hb->lock becomes a rt_mutex itself. The rt_mutex::wait_lock is the most obvious protection for keeping the futex user space

[PATCH 4.9 17/49] squashfs: add more sanity checks in inode lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit eabac19e40c095543def79cb6ffeb3a8588aaff4 upstream. Sysbot has reported an "slab-out-of-bounds read" error which has been identified as being caused by a corrupted "ino_num" value read from the inode. This could be because the metadata block is uncompressed, or becau

[PATCH 4.9 18/49] squashfs: add more sanity checks in xattr id lookup

2021-02-22 Thread Greg Kroah-Hartman
From: Phillip Lougher commit 506220d2ba21791314af569211ffd8870b8208fa upstream. Sysbot has reported a warning where a kmalloc() attempt exceeds the maximum limit. This has been identified as corruption of the xattr_ids count when reading the xattr id lookup table. This patch adds a number of a

[PATCH 4.9 15/49] futex: Cure exit race

2021-02-22 Thread Greg Kroah-Hartman
From: Thomas Gleixner commit da791a667536bf8322042e38ca85d55a78d3c273 upstream. Stefan reported, that the glibc tst-robustpi4 test case fails occasionally. That case creates the following race between sys_exit() and sys_futex_lock_pi(): CPU0 CPU1 sys_exit()

[PATCH 4.9 41/49] Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit dbe5283605b3bc12ca45def09cc721a0a5c853a2 upstream. We may not skip setting the field in the unmap structure when GNTMAP_device_map is in use - such an unmap would fail to release the respective resources (a page ref in the hypervisor). Otoh the field doesn't need setting

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread Michal Hocko
I am slowly catching up with this thread. On Fri 19-02-21 09:20:16, David Hildenbrand wrote: [...] > So if we have zero, we write zero. We'll COW pages, triggering a write fault > - and that's the only good thing about it. For example, similar to > MADV_POPULATE, nothing stops KSM from merging ano

[PATCH 4.9 42/49] Xen/gntdev: correct error checking in gntdev_map_grant_pages()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit ebee0eab08594b2bd5db716288a4f1ae5936e9bc upstream. Failure of the kernel part of the mapping operation should also be indicated as an error to the caller, or else it may assume the respective kernel VA is okay to access. Furthermore gnttab_map_refs() failing still requi

[PATCH 4.9 43/49] xen/arm: dont ignore return errors from set_phys_to_machine

2021-02-22 Thread Greg Kroah-Hartman
From: Stefano Stabellini commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream. set_phys_to_machine can fail due to lack of memory, see the kzalloc call in arch/arm/xen/p2m.c:__set_phys_to_machine_multi. Don't ignore the potential return error in set_foreign_p2m_mapping, returning it to the

[PATCH 4.9 46/49] xen-scsiback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 7c77474b2d22176d2bfb592ec74e0f2cb71352c9 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.9 48/49] scsi: qla2xxx: Fix crash during driver load on big endian machines

2021-02-22 Thread Greg Kroah-Hartman
From: Arun Easi commit 8de309e7299a00b3045fb274f82b326f356404f0 upstream Crash stack: [576544.715489] Unable to handle kernel paging request for data at address 0xdf97 [576544.715497] Faulting instruction address: 0xdf880f64 [576544.715503] Oops: Kern

[PATCH 4.9 44/49] xen-blkback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 5a264285ed1cd32e26d9de4f3c8c6855e467fd63 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.9 47/49] xen-blkback: fix error handling in xen_blkbk_map()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 871997bc9e423f05c7da7c9178e62dde5df2a7f8 upstream. The function uses a goto-based loop, which may lead to an earlier error getting discarded by a later iteration. Exit this ad-hoc loop when an error was encountered. The out-of-memory error path additionally fails to fil

[PATCH 4.9 45/49] xen-netback: dont "handle" error by BUG()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit 3194a1746e8aabe86075fd3c5e7cf1f4632d7f16 upstream. In particular -ENOMEM may come back here, from set_foreign_p2m_mapping(). Don't make problems worse, the more that handling elsewhere (together with map's status fields now indicating whether a mapping wasn't even attemp

[PATCH 4.9 40/49] Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()

2021-02-22 Thread Greg Kroah-Hartman
From: Jan Beulich commit b512e1b077e5ccdbd6e225b15d934ab12453b70a upstream. We should not set up further state if either mapping failed; paying attention to just the user mapping's status isn't enough. Also use GNTST_okay instead of implying its value (zero). This is part of XSA-361. Signed-o

[PATCH 4.9 49/49] kvm: check tlbs_dirty directly

2021-02-22 Thread Greg Kroah-Hartman
From: Lai Jiangshan commit 88bf56d04bc3564542049ec4ec168a8b60d0b48c upstream In kvm_mmu_notifier_invalidate_range_start(), tlbs_dirty is used as: need_tlb_flush |= kvm->tlbs_dirty; with need_tlb_flush's type being int and tlbs_dirty's type being long. It means that tlbs_dirty is always

Re: [PATCH v2] x86/mce: fix wrong no-return-ip logic in do_machine_check()

2021-02-22 Thread Borislav Petkov
On Mon, Feb 22, 2021 at 08:35:49PM +0800, Aili Yao wrote: > Guest VM, the qemu has no way to know the RIPV value, so always get it > cleared. What does that mean? The guest VM will get the MCE signature it gets from the host kernel so the host kernel most definitely knows the RIPV value. It look

[PATCH 4.9 09/49] SUNRPC: Handle 0 length opaque XDR object data properly

2021-02-22 Thread Greg Kroah-Hartman
From: Dave Wysochanski [ Upstream commit e4a7d1f7707eb44fd953a31dd59eff82009d879c ] When handling an auth_gss downcall, it's possible to get 0-length opaque object for the acceptor. In the case of a 0-length XDR object, make sure simple_get_netobj() fills in dest->data = NULL, and does not cont

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread David Hildenbrand
On 22.02.21 13:46, Michal Hocko wrote: I am slowly catching up with this thread. On Fri 19-02-21 09:20:16, David Hildenbrand wrote: [...] So if we have zero, we write zero. We'll COW pages, triggering a write fault - and that's the only good thing about it. For example, similar to MADV_POPULATE

[PATCH] initramfs: Remove redundant dependency of RD_ZSTD on BLK_DEV_INITRD

2021-02-22 Thread Geert Uytterhoeven
Commit be1859bdc660213b ("initramfs: remove redundant dependency on BLK_DEV_INITRD") removed all redundant dependencies on BLK_DEV_INITRD, but the recent addition of zstd support introduced a new one. Fixes: a30d8a39f0571425 ("usr: Add support for zstd compressed initramfs") Signed-off-by: Geert U

[PATCH] futex: fix dead code in attach_to_pi_owner()

2021-02-22 Thread Xiaoming Ni
From: Thomas Gleixner The handle_exit_race() function is defined in commit c158b461306df82 ("futex: Cure exit race"), which never returns -EBUSY. This results in a small piece of dead code in the attach_to_pi_owner() function: int ret = handle_exit_race(uaddr, uval, p); /* Never return

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread Michal Hocko
On Sat 20-02-21 10:12:26, David Hildenbrand wrote: [...] > Thinking about MADV_POPULATE vs. MADV_POPULATE_WRITE I wonder if it would be > more versatile to break with existing MAP_POPULATE semantics and directly go > with > > MADV_POPULATE_READ: simulate user space read access without actually > r

[PATCH] f2fs: compress: Allow modular (de)compression algorithms

2021-02-22 Thread Geert Uytterhoeven
If F2FS_FS is modular, enabling the compressions options F2FS_FS_{LZ4,LZ4HZ,LZO,LZORLE,ZSTD} will make the (de)compression algorithms {LZ4,LZ4HC,LZO,ZSTD}_{,DE}COMPRESS builtin instead of modular, as the former depend on an intermediate boolean F2FS_FS_COMPRESSION, which in-turn depends on tristate

Re: [PATCH] kprobes: Fix to delay the kprobes jump optimization

2021-02-22 Thread Uladzislau Rezki
On Mon, Feb 22, 2021 at 11:21:04AM +0100, Sebastian Andrzej Siewior wrote: > On 2021-02-19 10:33:36 [-0800], Paul E. McKenney wrote: > > For definiteness, here is the first part of the change, posted earlier. > > The commit log needs to be updated. I will post the change that keeps > > the tick go

Re: [PATCH] drivers: infiniband: sw: rxe: fix kconfig dependency on CRYPTO

2021-02-22 Thread Leon Romanovsky
On Mon, Feb 22, 2021 at 10:39:20AM +0800, Zhu Yanjun wrote: > On Sun, Feb 21, 2021 at 2:49 PM Leon Romanovsky wrote: > > > > On Fri, Feb 19, 2021 at 06:32:26PM -0500, Julian Braha wrote: > > > commit 6e61907779ba99af785f5b2397a84077c289888a > > > Author: Julian Braha > > > Date: Fri Feb 19 18:2

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread David Hildenbrand
On 22.02.21 13:56, Michal Hocko wrote: On Sat 20-02-21 10:12:26, David Hildenbrand wrote: [...] Thinking about MADV_POPULATE vs. MADV_POPULATE_WRITE I wonder if it would be more versatile to break with existing MAP_POPULATE semantics and directly go with MADV_POPULATE_READ: simulate user space

Re: [PATCH v2] rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

2021-02-22 Thread Hao Chen
Because I only have the `HONOR magic 14` laptop with rtl8822ce wifi chip :-( I will try to find out why the target platform can't properly resume with this declaration.Thanks. 在 2021/2/22 下午7:36, Pkshih 写道: On Mon, 2021-02-22 at 12:29 +0200, Kalle Valo wrote: Hao Chen writes: The laptop's

Re: [PATCH v4] kdb: Simplify kdb commands registration

2021-02-22 Thread Sumit Garg
On Mon, 22 Feb 2021 at 17:35, Daniel Thompson wrote: > > On Thu, Feb 18, 2021 at 05:39:58PM +0530, Sumit Garg wrote: > > Simplify kdb commands registration via using linked list instead of > > static array for commands storage. > > > > Signed-off-by: Sumit Garg > > --- > > > > Changes in v4: > >

[PATCH v3 0/6] Introduce intel_skl_int3472 module

2021-02-22 Thread Daniel Scally
v1 for this series was originally 14-18 of this series: https://lore.kernel.org/linux-media/20201130133129.1024662-1-djrsca...@gmail.com/T/#m91934e12e3d033da2e768e952ea3b4a125ee3e67 v2 was here: https://lore.kernel.org/platform-driver-x86/20210118003428.568892-1-djrsca...@gmail.com/ Series level

Re: [PATCH 3/3] media: mtk-vcodec: Separating mtk encoder driver

2021-02-22 Thread Alexandre Courbot
On Sat, Feb 20, 2021 at 3:56 PM Irui Wang wrote: > > On Wed, 2021-02-03 at 19:44 +0900, Alexandre Courbot wrote: > > Hi Irui, > > > > Thanks for pushing this forward. I had two small conflicts when > > applying this patch to the media tree, so you may want to rebase > > before sending the next ver

[PATCH v3 2/6] ACPI: scan: Add function to fetch dependent of acpi device

2021-02-22 Thread Daniel Scally
In some ACPI tables we encounter, devices use the _DEP method to assert a dependence on other ACPI devices as opposed to the OpRegions that the specification intends. We need to be able to find those devices "from" the dependee, so add a callback and a wrapper to walk over the acpi_dep_list and ret

[PATCH v3 1/6] ACPI: scan: Extend acpi_walk_dep_device_list()

2021-02-22 Thread Daniel Scally
The acpi_walk_dep_device_list() is not as generalisable as its name implies, serving only to decrement the dependency count for each dependent device of the input. Extend the function to instead accept a callback which can be applied to all the dependencies in acpi_dep_list. Replace all existing ca

[PATCH v3 5/6] platform/x86: Add intel_skl_int3472 driver

2021-02-22 Thread Daniel Scally
ACPI devices with _HID INT3472 are currently matched to the tps68470 driver, however this does not cover all situations in which that _HID occurs. We've encountered three possibilities: 1. On Chrome OS devices, an ACPI device with _HID INT3472 (representing a physical TPS68470 device) that require

[PATCH v3 4/6] gpiolib: acpi: Export acpi_get_gpiod()

2021-02-22 Thread Daniel Scally
I need to be able to translate GPIO resources in an ACPI device's _CRS into GPIO descriptor array. Those are represented in _CRS as a pathname to a GPIO device plus the pin's index number: this function is perfect for that purpose. As it's currently only used internally within the GPIO layer, prov

[PATCH v3 3/6] i2c: core: Add a format macro for I2C device names

2021-02-22 Thread Daniel Scally
Some places in the kernel allow users to map resources to a device using device name (for example, in the struct gpiod_lookup_table). Currently this involves waiting for the I2C client to have been registered so we can use dev_name(&client->dev). We want to add a function to allow users to refer to

[PATCH v3 6/6] mfd: tps68470: Remove tps68470 MFD driver

2021-02-22 Thread Daniel Scally
This driver only covered one scenario in which ACPI devices with _HID INT3472 are found, and its functionality has been taken over by the intel-skl-int3472 module, so remove it. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally --- Changes in v3: - Replaced Kconfig dependencies

Re: [PATCH v3 0/6] Introduce intel_skl_int3472 module

2021-02-22 Thread Daniel Scally
+cc Andy, who's email address I managed to screw up - sorry. On 22/02/2021 13:07, Daniel Scally wrote: > v1 for this series was originally 14-18 of this series: > https://lore.kernel.org/linux-media/20201130133129.1024662-1-djrsca...@gmail.com/T/#m91934e12e3d033da2e768e952ea3b4a125ee3e67 > > v2 wa

Re: [PATCH 4.9.257 1/1] futex: Fix OWNER_DEAD fixup

2021-02-22 Thread Zhengyejian (Zetta)
On 2021/2/22 20:36, Greg KH wrote: On Mon, Feb 22, 2021 at 08:20:38PM +0800, Zhengyejian (Zetta) wrote: On 2021/2/22 20:07, Greg KH wrote: On Mon, Feb 22, 2021 at 11:54:24AM +, Lee Jones wrote: On Mon, 22 Feb 2021, Zheng Yejian wrote: From: Peter Zijlstra commit a97cb0e7b3f4c6297f

Re: [PATCH v2] rtw88: 8822ce: fix wifi disconnect after S3/S4 on HONOR laptop

2021-02-22 Thread Pkshih
On Mon, 2021-02-22 at 20:57 +0800, Hao Chen wrote: > Because I only have the `HONOR magic 14` laptop with rtl8822ce wifi chip  > :-( > > I will try to find out why the target platform can't properly resume with > this declaration.Thanks. > > 在 2021/2/22 下午7:36, Pkshih 写道: > > On Mon, 2021-02-22 a

Re: [PATCH v4] reboot: allow to specify reboot mode via sysfs

2021-02-22 Thread Matteo Croce
On Mon, Feb 22, 2021 at 11:03 AM Pavel Machek wrote: > > On Tue 2020-11-10 21:27:46, Matteo Croce wrote: > > From: Matteo Croce > > > > The kernel cmdline reboot= option offers some sort of control > > on how the reboot is issued. > > Add handles in sysfs to allow setting these reboot options, so

arch/mips/boot/compressed/../../../../lib/zstd/decompress.c:126:12: warning: no previous prototype for 'ZSTD_createDCtx_advanced'

2021-02-22 Thread kernel test robot
config: mips-randconfig-r014-20210222 (attached as .config) compiler: mipsel-linux-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 chmod +x ~/bin/make.cross # https

Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan

2021-02-22 Thread Guillaume Tucker
On 18/02/2021 22:07, Nicolin Chen wrote: > Commit 25938c73cd79 ("iommu/tegra-smmu: Rework tegra_smmu_probe_device()") > removed certain hack in the tegra_smmu_probe() by relying on IOMMU core to > of_xlate SMMU's SID per device, so as to get rid of tegra_smmu_find() and > tegra_smmu_configure() tha

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread Michal Hocko
On Mon 22-02-21 13:59:55, David Hildenbrand wrote: > On 22.02.21 13:56, Michal Hocko wrote: > > On Sat 20-02-21 10:12:26, David Hildenbrand wrote: > > [...] > > > Thinking about MADV_POPULATE vs. MADV_POPULATE_WRITE I wonder if it would > > > be > > > more versatile to break with existing MAP_POPU

Re: [PATCH v2 -next] IB/mlx5: Add missing error code

2021-02-22 Thread Leon Romanovsky
On Mon, Feb 22, 2021 at 08:23:43PM +0800, YueHaibing wrote: > Set err to -ENOMEM if kzalloc fails instead of 0. > > Fixes: 759738537142 ("IB/mlx5: Enable subscription for device events over > DEVX") > Signed-off-by: YueHaibing > --- > drivers/infiniband/hw/mlx5/devx.c | 4 +++- > 1 file changed,

Re: [PATCH v3 5/6] platform/x86: Add intel_skl_int3472 driver

2021-02-22 Thread Daniel Scally
Hi all On 22/02/2021 13:07, Daniel Scally wrote: > diff --git a/drivers/platform/x86/intel-int3472/Kconfig > b/drivers/platform/x86/intel-int3472/Kconfig > new file mode 100644 > index ..b94622245c21 > --- /dev/null > +++ b/drivers/platform/x86/intel-int3472/Kconfig > @@ -0,0 +1,31 @@

Re: [PATCH RFC] mm/madvise: introduce MADV_POPULATE to prefault/prealloc memory

2021-02-22 Thread David Hildenbrand
Exactly. But for hugetlbfs/shmem ("!RAM-backed files") this is not what we want. OK, then I must have misread your requirements. Maybe I just got lost in all the combinations you have listed. Another special case could be dax/pmem I think. You might want to fault it in readable/writable but n

[PATCH v4 1/6] dt-bindings: display: add Unisoc's drm master bindings

2021-02-22 Thread Kevin Tang
From: Kevin Tang The Unisoc DRM master device is a virtual device needed to list all DPU devices or other display interface nodes that comprise the graphics subsystem Unisoc's display pipeline have several components as below description, multi display controllers and corresponding physical inte

<    5   6   7   8   9   10   11   12   13   14   >