[PATCH 4.14 78/92] bpf: move tmp variable into ax register in interpreter

2019-04-18 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 144cd91c4c2bced6eb8a7e25e590f6618a11e854 upstream. This change moves the on-stack 64 bit tmp variable in ___bpf_prog_run() into the hidden ax register. The latter is currently only used in JITs for constant blinding as a temporary scratch register, meaning the BPF in

[PATCH 4.9 15/50] perf build-id: Fix memory leak in print_sdt_events()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 8bde8516893da5a5fdf06121f74d11b52ab92df5 ] Detected with gcc's ASan: Direct leak of 4356 byte(s) in 120 object(s) allocated from: #0 0x7ff1a2b5a070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x55719aef4814 in build_id_cache__origna

[PATCH 4.14 70/92] include/linux/swap.h: use offsetof() instead of custom __swapoffset macro

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a4046c06be50a4f01d435aa7fe57514818e6cc82 ] Use offsetof() to calculate offset of a field to take advantage of compiler built-in version when possible, and avoid UBSAN warning when compiling with Clang: UBSAN: Undefined behaviour in mm/swapfile.c:3010:38 member access within

Re: [v2 RFC PATCH 0/9] Another Approach to Use PMEM as NUMA Node

2019-04-18 Thread Keith Busch
On Wed, Apr 17, 2019 at 10:13:44AM -0700, Dave Hansen wrote: > On 4/17/19 2:23 AM, Michal Hocko wrote: > > yes. This could be achieved by GFP_NOWAIT opportunistic allocation for > > the migration target. That should prevent from loops or artificial nodes > > exhausting quite naturaly AFAICS. Maybe

[PATCH 4.14 73/92] bpf: reduce verifier memory consumption

2019-04-18 Thread Greg Kroah-Hartman
From: Alexei Starovoitov commit 638f5b90d46016372a8e3e0a434f199cc5e12b8c upstream. the verifier got progressively smarter over time and size of its internal state grew as well. Time to reduce the memory consumption. Before: sizeof(struct bpf_verifier_state) = 6520 After: sizeof(struct bpf_verif

[PATCH 4.14 91/92] net: stmmac: Set dma ring length before enabling the DMA

2019-04-18 Thread Greg Kroah-Hartman
From: Lars Persson This was fixed in upstream by commit 7d9e6c5afab6 ("net: stmmac: Integrate XGMAC into main driver flow") that is a new feature commit. We found a race condition in the DMA init sequence that hits if the PHY already has link up during stmmac_hw_setup. Since the ring length was

[PATCH 4.14 90/92] tools include: Adopt linux/bits.h

2019-04-18 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit ba4aa02b417f08a0bee5e7b8ed70cac788a7c854 upstream. So that we reduce the difference of tools/include/linux/bitops.h to the original kernel file, include/linux/bitops.h, trying to remove the need to define BITS_PER_LONG, to avoid clashes with asm/bitsperlong.

[PATCH 4.14 87/92] bpf: do not restore dst_reg when cur_state is freed

2019-04-18 Thread Greg Kroah-Hartman
From: Xu Yu commit 0803278b0b4d8eeb2b461fb698785df65a725d9e upstream. Syzkaller hit 'KASAN: use-after-free Write in sanitize_ptr_alu' bug. Call trace: dump_stack+0xbf/0x12e print_address_description+0x6a/0x280 kasan_report+0x237/0x360 sanitize_ptr_alu+0x85a/0x8d0 adjust_ptr_min_max_v

Re: [PATCH] prctl_set_mm: downgrade mmap_sem to read lock

2019-04-18 Thread Cyrill Gorcunov
On Thu, Apr 18, 2019 at 03:50:39PM +0200, Michal Koutný wrote: > I learnt, it's, alas, too late to drop the non PRCTL_SET_MM_MAP calls > [1], so at least downgrade the write acquisition of mmap_sem as in the > patch below (that should be stacked on the previous one or squashed). > > Cyrill, you me

[PATCH v2] fix compile errors due to unsync linux/in6.h and netinet/in.h

2019-04-18 Thread Wang YanQing
I meet below compile errors: " In file included from test_tcpnotify_kern.c:12: /usr/include/netinet/in.h:101:5: error: expected identifier IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */ ^ /usr/include/linux/in6.h:131:26: note: expanded from macro 'IPPROTO_HOPOPTS'

Re: [PATCH] selftests/bpf: fix compile errors with older glibc

2019-04-18 Thread Wang YanQing
On Thu, Apr 18, 2019 at 05:09:53AM +, Yonghong Song wrote: > > > On 4/17/19 10:48 AM, Wang YanQing wrote: > > The older glibc (for example, 2.23) doesn't handle __UAPI_DEF_* > > in libc-compat.h properly, and it bring below compile errors: > > I have an even old glibc 2.17 and it still works

[PATCH 4.14 84/92] bpf: prevent out of bounds speculation on pointer arithmetic

2019-04-18 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 979d63d50c0c0f7bc537bf821e056cc9fe5abd38 upstream. Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on

[PATCH 4.14 37/92] ext4: prohibit fstrim in norecovery mode

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 18915b5873f07e5030e6fb108a050fa7c71c59fb ] The ext4 fstrim implementation uses the block bitmaps to find free space that can be discarded. If we haven't replayed the journal, the bitmaps will be stale and we absolutely *cannot* use stale metadata to zap the underlying storage.

[PATCH 4.14 41/92] 9p locks: add mount option for lock retry interval

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 5e172f75e51e3de1b4274146d9b990f803cb5c2a ] The default P9_LOCK_TIMEOUT can be too long for some users exporting a local file system to a guest VM (30s), make this configurable at mount time. Link: http://lkml.kernel.org/r/1536295827-3181-1-git-send-email-asmad...@codewreck.org

[PATCH 4.14 38/92] gpio: pxa: handle corner case of unprobed device

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9ce3ebe973bf4073426f35f282c6b955ed802765 ] In the corner case where the gpio driver probe fails, for whatever reason, the suspend and resume handlers will still be called as they have to be registered as syscore operations. This applies as well when no probe was called while the

[PATCH 4.14 43/92] netfilter: xt_cgroup: shrink size of v2 path

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 0d704967f4a49cc2212350b3e4a8231f8b4283ed ] cgroup v2 path field is PATH_MAX which is too large, this is placing too much pressure on memory allocation for people with many rules doing cgroup v1 classid matching, side effects of this are bug reports like: https://bugzilla.kernel.

[PATCH 4.14 42/92] f2fs: fix to do sanity check with current segment number

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 042be0f849e5fc24116d0afecfaf926eed5cac63 ] https://bugzilla.kernel.org/show_bug.cgi?id=200219 Reproduction way: - mount image - run poc code - umount image F2FS-fs (loop1): Bitmap was wrongly set, blk:15364 [ cut here ] kernel BUG at /home/yuchao/git/dev

[PATCH 4.14 82/92] bpf: restrict unknown scalars of mixed signed bounds for unprivileged

2019-04-18 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 9d7eceede769f90b66cfa06ad5b357140d5141ed upstream. For unknown scalars of mixed signed bounds, meaning their smin_value is negative and their smax_value is positive, we need to reject arithmetic with pointer to map value. For unprivileged the goal is to mask every ma

[PATCH 4.14 39/92] rsi: improve kernel thread handling to fix kernel panic

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4c62764d0fc21a34ffc44eec1210038c3a2e4473 ] While running regressions, observed below kernel panic when sdio disconnect called. This is because of, kthread_stop() is taking care of wait_for_completion() by default. When wait_for_completion triggered in kthread_stop and as it was d

[PATCH 4.14 57/92] iommu/dmar: Fix buffer overflow during PCI bus notification

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cffaaf0c816238c45cd2d06913476c83eb50f682 ] Commit 57384592c433 ("iommu/vt-d: Store bus information in RMRR PCI device path") changed the type of the path data, however, the change in path type was not reflected in size calculations. Update to use the correct type and prevent a b

[PATCH 4.14 55/92] crypto: sha256/arm - fix crash bug in Thumb2 build

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 69216a545cf81b2b32d01948f7039315abaf75a0 ] The SHA256 code we adopted from the OpenSSL project uses a rather peculiar way to take the address of the round constant table: it takes the address of the sha256_block_data_order() routine, and substracts a constant known quantity to ar

[PATCH 4.14 36/92] fix incorrect error code mapping for OBJECTID_NOT_FOUND

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 85f9987b236cf46e06ffdb5c225cf1f3c0acb789 ] It was mapped to EIO which can be confusing when user space queries for an object GUID for an object for which the server file system doesn't support (or hasn't saved one). As Amir Goldstein suggested this is similar to ENOATTR (equival

[PATCH 4.14 53/92] cifs: fallback to older infolevels on findfirst queryinfo retry

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 3b7960caceafdfc2cdfe2850487f8d091eb41144 ] In cases where queryinfo fails, we have cases in cifs (vers=1.0) where with backupuid mounts we retry the query info with findfirst. This doesn't work to some NetApp servers which don't support WindowsXP (and later) infolevel 261 (SMB_FI

[PATCH 1/4] net/skbuff: don't waste memory reserves

2019-04-18 Thread Andrey Ryabinin
In some workloads we have noticed packets being dropped by sk_filter_trim_cap() because the 'skb' was allocated from pfmemalloc reserves: /* * If the skb was allocated from pfmemalloc reserves, only * allow SOCK_MEMALLOC sockets to use it as this socket is * help

Re: [PATCH 4/5] mm: rework non-root kmem_cache lifecycle management

2019-04-18 Thread Roman Gushchin
On Thu, Apr 18, 2019 at 01:38:44PM +, Christopher Lameter wrote: > On Wed, 17 Apr 2019, Roman Gushchin wrote: > > > static __always_inline int memcg_charge_slab(struct page *page, > > gfp_t gfp, int order, > > s

[PATCH 2/4] net/skbuff: warn if kmalloc_reserve() fails to allocate memory.

2019-04-18 Thread Andrey Ryabinin
Commit c93bdd0e03e8 ("netvm: allow skb allocation to use PFMEMALLOC reserves") removed memory potential allocation failure messages in the cases when pfmemalloc reserves are not allowed to be used. Inability to allocate skb usually indicates some problem, e.g. these ones: commit 5d4c9bfbab

[PATCH 4.14 46/92] media: au0828: cannot kfree dev before usb disconnect

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4add7104919f9e94e0db03e234caeadbfcc02ea9 ] If au0828_analog_register fails, the dev is kfree'd and then flow jumps to done, which can call au0828_usb_disconnect. Since all USB error codes are negative, au0828_usb_disconnect will be called. The problem is au0828_usb_disconnect use

[PATCH 4.14 47/92] HID: i2c-hid: override HID descriptors for certain devices

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9ee3e06610fdb8a601cde59c92089fb6c1deb4aa ] A particular touchpad (SIPODEV SP1064) refuses to supply the HID descriptors. This patch provides the framework for overriding these descriptors based on DMI data. It also includes the descriptors for said touchpad, which were extracted

[PATCH 4.14 52/92] compiler.h: update definition of unreachable()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8 ] Fixes the objtool warning seen with Clang: arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable instruction Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Josh noted that

[PATCH 4.14 49/92] usbip: fix vhci_hcd controller counting

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e0a2e73e501c77037c8756137e87b12c7c3c9793 ] Without this usbip fails on a machine with devices that lexicographically come after vhci_hcd. ie. $ ls -l /sys/devices/platform ... drwxr-xr-x. 4 root root0 Sep 19 16:21 serial8250 -rw-r--r--. 1 root root 4096 Sep 19 23:50

[PATCH 4.14 50/92] ACPI / SBS: Fix GPE storm on recent MacBookPros

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ca1721c5bee77105829cbd7baab8ee0eab85b06d ] On Apple machines, plugging-in or unplugging the power triggers a GPE for the EC. Since these machines expose an SBS device, this GPE ends up triggering the acpi_sbs_callback(). This in turn tries to get the status of the SBS charger. Ho

[PATCH 4.14 09/92] IB/mlx4: Fix race condition between catas error reset and aliasguid flows

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 587443e7773e150ae29e643ee8f41a1eed226565 ] Code review revealed a race condition which could allow the catas error flow to interrupt the alias guid query post mechanism at random points. Thiis is fixed by doing cancel_delayed_work_sync() instead of cancel_delayed_work() during th

[PATCH 4.14 35/92] x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e898e69d6b9475bf123f99b3c5d1a67bb7cb2361 ] When building with -Wsometimes-uninitialized, Clang warns: arch/x86/kernel/hw_breakpoint.c:355:2: warning: variable 'align' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] The default cannot be reache

[PATCH 4.14 06/92] ALSA: echoaudio: add a check for ioremap_nocache

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6ade657d6125ec3ec07f95fa51e28138aef6208f ] In case ioremap_nocache fails, the fix releases chip and returns an error code upstream to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/echoaudio/echo

[PATCH 4.14 44/92] serial: uartps: console_setup() cant be placed to init section

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ] When console device is rebinded, console_setup() is called again. But marking it as __init means that function will be clear after boot is complete. If console device is binded again console_setup() is not found and error "Unable to hand

[PATCH 4.14 07/92] ALSA: sb8: add a check for request_region

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit dcd0feac9bab901d5739de51b3f69840851f8919 ] In case request_region fails, the fix returns an error code to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/isa/sb/sb8.c | 4 1 file changed, 4 inser

[PATCH 4.14 04/92] ext4: add missing brelse() in add_new_gdb_meta_bg()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d64264d6218e6892edd832dc3a5a5857c2856c53 ] Currently in add_new_gdb_meta_bg() there is a missing brelse of gdb_bh in case ext4_journal_get_write_access() fails. Additionally kvfree() is missing in the same error path. Fix it by moving the ext4_journal_get_write_access() before th

[PATCH 4.14 31/92] x86/hpet: Prevent potential NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2e84f116afca3719c9d0a1a78b47b48f75fd5724 ] hpet_virt_address may be NULL when ioremap_nocache fail, but the code lacks a check. Add a check to prevent NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Thomas Gleixner Cc: k...@umn.edu Cc: Borislav Petkov Cc

[PATCH 4.14 29/92] perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d982b33133284fa7efa0e52ae06b88f9be3ea764 ] = ==20875==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1160 byte(s) in 1 object(s) allocated from: #0 0x7f1b6fc84138 in calloc (/usr/lib/x86_64-

Re: [PATCH 0/5] mm: reparent slab memory on cgroup removal

2019-04-18 Thread Roman Gushchin
On Thu, Apr 18, 2019 at 11:15:38AM +0300, Vladimir Davydov wrote: > Hello Roman, > > On Wed, Apr 17, 2019 at 02:54:29PM -0700, Roman Gushchin wrote: > > There is however a significant problem with reparenting of slab memory: > > there is no list of charged pages. Some of them are in shrinker lists

[PATCH 4.14 13/92] thermal: bcm2835: Fix crash in bcm2835_thermal_debugfs

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 35122495a8c6683e863acf7b05a7036b2be64c7a ] "cat /sys/kernel/debug/bcm2835_thermal/regset" causes a NULL pointer dereference in bcm2835_thermal_debugfs. The driver makes use of the implementation details of the thermal framework to retrieve a pointer to its private data from a str

[PATCH 4.14 23/92] perf build-id: Fix memory leak in print_sdt_events()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 8bde8516893da5a5fdf06121f74d11b52ab92df5 ] Detected with gcc's ASan: Direct leak of 4356 byte(s) in 120 object(s) allocated from: #0 0x7ff1a2b5a070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x55719aef4814 in build_id_cache__origna

[PATCH 4.14 18/92] x86/mm: Dont leak kernel addresses

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a3151724437f54076cc10bc02b1c4f0003ae36cd ] Since commit: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") at boot "ptrval" is printed instead of actual addresses: found SMP MP-table at [mem 0x000f5cc0-0x000f5ccf] mapped at [(ptrval)] Instead

[PATCH 4.14 01/92] ARC: u-boot args: check that magic number is correct

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit edb64bca50cd736c6894cc6081d5263c007ce005 ] In case of devboards we really often disable bootloader and load Linux image in memory via JTAG. Even if kernel tries to verify uboot_tag and uboot_arg there is sill a chance that we treat some garbage in registers as valid u-boot argume

[PATCH 4.14 14/92] thermal/int340x_thermal: Add additional UUIDs

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 16fc8eca1975358111dbd7ce65e4ce42d1a848fb ] Add more supported DPTF policies than the driver currently exposes. Signed-off-by: Matthew Garrett Cc: Nisha Aram Signed-off-by: Zhang Rui Signed-off-by: Sasha Levin --- drivers/thermal/int340x_thermal/int3400_thermal.c | 14 ++

[PATCH 4.14 15/92] thermal/int340x_thermal: fix mode setting

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ] int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-

[PATCH 4.14 19/92] tools/power turbostat: return the exit status of a command

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2a95496634a017c19641f26f00907af75b962f01 ] turbostat failed to return a non-zero exit status even though the supplied command (turbostat ) failed. Currently when turbostat forks a command it returns zero instead of the actual exit status of the command. Modify the code to retur

[PATCH 4.19 110/110] [PATCH 4.19.y 2/2] mm: hide incomplete nr_indirectly_reclaimable in sysfs

2019-04-18 Thread Greg Kroah-Hartman
From: Konstantin Khlebnikov In upstream branch this fixed by commit b29940c1abd7 ("mm: rename and change semantics of nr_indirectly_reclaimable_bytes"). This fixes /sys/devices/system/node/node*/vmstat format: ... nr_dirtied 6613155 nr_written 5796802 11089216 ... Cc: # 4.19.y Fixes: 7aaf772

[PATCH 4.19 089/110] scsi: core: Avoid that system resume triggers a kernel warning

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 388b4e6a00bb3097278ed1648ac5a1cb48c894e6 ] scsi_device_quiesce() and scsi_device_resume() are called during system-wide suspend and resume. scsi_device_quiesce() only succeeds for SCSI devices that are in one of the RUNNING, OFFLINE or TRANSPORT_OFFLINE states (see also scsi_set_

[PATCH 4.19 109/110] mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo

2019-04-18 Thread Greg Kroah-Hartman
From: Roman Gushchin [fixed differently upstream, this is a work-around to resolve it for 4.19.y] Yongqin reported that /proc/zoneinfo format is broken in 4.14 due to commit 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat") Node 0, zone DMA per-node stats nr

[PATCH 4.19 103/110] rxrpc: Fix client call connect/disconnect race

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 930c9f9125c85b5134b3e711bc252ecc094708e3 ] rxrpc_disconnect_client_call() reads the call's connection ID protocol value (call->cid) as part of that function's variable declarations. This is bad because it's not inside the locked section and so may race with someone granting use

[PATCH 4.19 107/110] tools include: Adopt linux/bits.h

2019-04-18 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit ba4aa02b417f08a0bee5e7b8ed70cac788a7c854 upstream. So that we reduce the difference of tools/include/linux/bitops.h to the original kernel file, include/linux/bitops.h, trying to remove the need to define BITS_PER_LONG, to avoid clashes with asm/bitsperlong.

[PATCH 4.19 097/110] PCI: Blacklist power management of Gigabyte X299 DESIGNARE EX PCIe ports

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 85b0cae89d5266e6a7abb2e83c6f716326fc494c ] Gigabyte X299 DESIGNARE EX motherboard has one PCIe root port that is connected to an Alpine Ridge Thunderbolt controller. This port has slot implemented bit set in the config space but other than that it is not hotplug capable in the s

[PATCH 4.19 098/110] drm/nouveau/volt/gf117: fix speedo readout register

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fc782242749fa4235592854fafe1a1297583c1fb ] GF117 appears to use the same register as GK104 (but still with the general Fermi readout mechanism). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs Signed-off-by: Sa

[PATCH 4.19 095/110] Revert "ACPI / EC: Remove old CLEAR_ON_RESUME quirk"

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit b6a3e1475b0220378ad32bdf4d8692f058b1fc03 ] On some Samsung hardware, it is necessary to clear events accumulated by the EC during sleep. These ECs stop reporting GPEs until they are manually polled, if too many events are accumulated. Thus the CLEAR_ON_RESUME quirk is introduced

[PATCH 4.19 052/110] ext4: prohibit fstrim in norecovery mode

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 18915b5873f07e5030e6fb108a050fa7c71c59fb ] The ext4 fstrim implementation uses the block bitmaps to find free space that can be discarded. If we haven't replayed the journal, the bitmaps will be stale and we absolutely *cannot* use stale metadata to zap the underlying storage.

[PATCH 4.19 082/110] ACPI: EC / PM: Disable non-wakeup GPEs for suspend-to-idle

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit f941d3e41da7f86bdb9dcc1977c2bcc6b89bfe47 ] There are systems in which non-wakeup GPEs fire during the "noirq" suspend stage of suspending devices and that effectively prevents the system that tries to suspend to idle from entering any low-power state at all. If the offending GPE

[PATCH 4.19 057/110] 9p: do not trust pdu content for stat item size

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2803cf4379ed252894f046cb8812a48db35294e3 ] v9fs_dir_readdir() could deadloop if a struct was sent with a size set to -2 Link: http://lkml.kernel.org/r/1536134432-11997-1-git-send-email-asmad...@codewreck.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88021 Signed-off

[PATCH 4.19 056/110] f2fs: fix to avoid NULL pointer dereference on se->discard_map

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 7d20c8abb2edcf962ca857d51f4d0f9cd4b19053 ] https://bugzilla.kernel.org/show_bug.cgi?id=200951 These is a NULL pointer dereference issue reported in bugzilla: Hi, in the setup there is a SATA SSD connected to a SATA-to-USB bridge. The disc is "Samsung SSD 850 PRO 256G" which su

[PATCH 4.19 081/110] ALSA: hda: fix front speakers on Huawei MBXP

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 8ac51bbc4cfec4ef08b03bef24b31e2d50ef8b37 ] This patch solves bug 200501 'Only 2 of 4 speakers playing sound.' It enables the front speakers on Huawei Matebook X Pro laptops. These laptops come with Dolby Atmos sound system and these pins configuration enables the front speakers.

[PATCH 4.19 079/110] platform/x86: Add Intel AtomISP2 dummy / power-management driver

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 49ad712afa88c502831d37f7089d98eac441fb80 ] The Image Signal Processor found on Cherry Trail devices is brought up in D0 state on devices which have camera sensors attached to it. The ISP will not enter D3 state again without some massaging of its registers beforehand and the ISP

Re: [PATCH v20 00/28] Intel SGX1 support

2019-04-18 Thread Dave Hansen
On 4/18/19 10:10 AM, Dr. Greg wrote: > Both the current controls for enclave access to the PROVISION > attribute and the security controls that are being proposed to emerge > for the driver, sometime in the future, suffer from being dependent on > discretionary access controls, ie. file privileges,

[PATCH 4.19 072/110] KVM: nVMX: restore host state in nested_vmx_vmexit for VMFail

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit bd18bffca35397214ae68d85cf7203aca25c3c1d ] A VMEnter that VMFails (as opposed to VMExits) does not touch host state beyond registers that are explicitly noted in the VMFail path, e.g. EFLAGS. Host state does not need to be loaded because VMFail is only signaled for consistency c

[PATCH 4.19 065/110] Bluetooth: Fix debugfs NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 30d65e0804d58a03d1a8ea4e12c6fc07ed08218b ] Fix crash caused by NULL pointer dereference when debugfs functions le_max_key_read, le_max_key_size_write, le_min_key_size_read or le_min_key_size_write and Bluetooth adapter was powered off. Fix is to move max_key_size and min_key_siz

[PATCH 4.19 054/110] gpio: pxa: handle corner case of unprobed device

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9ce3ebe973bf4073426f35f282c6b955ed802765 ] In the corner case where the gpio driver probe fails, for whatever reason, the suspend and resume handlers will still be called as they have to be registered as syscore operations. This applies as well when no probe was called while the

[PATCH 4.19 071/110] HID: usbhid: Add quirk for Redragon/Dragonrise Seymur 2

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ce9d58d3eafcb2d452a69bdcc1c5f8b8ff640de5 ] Redragon Seymur 2 stops working since commit 190d7f02ce8e ("HID: input: do not increment usages when a duplicate is found"). Use quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE suggested by the commit can solve the issue. Bugzilla: https:

[PATCH 4.19 073/110] compiler.h: update definition of unreachable()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8 ] Fixes the objtool warning seen with Clang: arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable instruction Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Josh noted that

[PATCH 4.19 085/110] crypto: sha256/arm - fix crash bug in Thumb2 build

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 69216a545cf81b2b32d01948f7039315abaf75a0 ] The SHA256 code we adopted from the OpenSSL project uses a rather peculiar way to take the address of the round constant table: it takes the address of the sha256_block_data_order() routine, and substracts a constant known quantity to ar

[PATCH 4.19 104/110] f2fs: fix to dirty inode for i_mode recovery

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ca597bddedd94906cd761d8be6a3ad21292725de ] As Seulbae Kim reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202637 We didn't recover permission field correctly after sudden power-cut, the reason is in setattr we didn't add inode into global dirty list once i_mod

[PATCH 4.19 069/110] usbip: fix vhci_hcd controller counting

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e0a2e73e501c77037c8756137e87b12c7c3c9793 ] Without this usbip fails on a machine with devices that lexicographically come after vhci_hcd. ie. $ ls -l /sys/devices/platform ... drwxr-xr-x. 4 root root0 Sep 19 16:21 serial8250 -rw-r--r--. 1 root root 4096 Sep 19 23:50

[tip:sched/core] sched/core: Make some functions static

2019-04-18 Thread tip-bot for YueHaibing
Commit-ID: b1546edcf2aab710a5afc98d65c948a4bfac0353 Gitweb: https://git.kernel.org/tip/b1546edcf2aab710a5afc98d65c948a4bfac0353 Author: YueHaibing AuthorDate: Thu, 18 Apr 2019 22:47:13 +0800 Committer: Ingo Molnar CommitDate: Thu, 18 Apr 2019 20:28:02 +0200 sched/core: Make some functi

[PATCH 4.19 053/110] drm/cirrus: Use drm_framebuffer_put to avoid kernel oops in clean-up

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit abf7b30d7f61d981bfcca65d1e8331b27021b475 ] In the Cirrus driver, the regular clean-up code also performs the clean-up of a failed initialization. If the fbdev's framebuffer was not initialized, the clean-up will fail within drm_framebuffer_unregister_private. Booting with cirrus.

[PATCH 4.19 067/110] pinctrl: core: make sure strcmp() doesnt get a null parameter

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 54a58185bfafb5af5045fb8388c45daa373f90f3 ] Some drivers, for example, QCOM's qdf2xxx, set groups[gpio].name only when gpio is valid, and leave invalid gpio names as null. If we want to access the sys node "pinconf-groups", pinctrl_get_group_selector() -> get_group_name() may retu

[PATCH 4.19 025/110] sched/core: Fix buffer overflow in cgroup2 property cpu.max

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4c47acd8248fc6dc519fb4e08d1522105b7a ] Add limit into sscanf format string for on-stack buffer. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc

[PATCH 4.19 045/110] x86/hyperv: Prevent potential NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 534c89c22e26b183d838294f0937ee092c82ad3a ] The page allocation in hv_cpu_init() can fail, but the code does not have a check for that. Add a check and return -ENOMEM when the allocation fails. [ tglx: Massaged changelog ] Signed-off-by: Kangjie Lu Signed-off-by: Thomas Gleixn

[PATCH 4.19 046/110] x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 18fb053f9b827bd98cfc64f2a35df8ab19745a1d ] There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style: setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); This is because it expands the macro into a non-functioning ca

[PATCH 4.19 035/110] perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 93faa52e8371f0291ee1ff4994edae2b336b6233 ] = ==7497==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7f0333a88f30 in __interceptor_malloc (/usr/

[PATCH 4.19 047/110] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/dr

[PATCH 4.19 039/110] PM / Domains: Avoid a potential deadlock

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2071ac985d37efe496782c34318dbead93beb02f ] Lockdep warns that prepare_lock and genpd->mlock can cause a deadlock the deadlock scenario is like following: First thread is probing cs2000 cs2000_probe() clk_register() __clk_core_init() clk_prepare_lock()

[PATCH 4.19 022/110] thermal/intel_powerclamp: fix truncated kthread name

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e925b5be5751f6a7286bbd9a4cbbc4ac90cc5fa6 ] kthread name only allows 15 characters (TASK_COMMON_LEN is 16). Thus rename the kthreads created by intel_powerclamp driver from "kidle_inject/ + decimal cpuid" to "kidle_inj/ + decimal cpuid" to avoid truncated kthead name for cpu 100 a

[PATCH 4.19 051/110] x86/gart: Exclude GART aperture from kcore

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ffc8599aa9763f39f6736a79da4d1575e7006f9a ] On machines where the GART aperture is mapped over physical RAM, /proc/kcore contains the GART aperture range. Accessing the GART range via /proc/kcore results in a kernel crash. vmcore used to have the same issue, until it was fixed wi

[PATCH 4.19 030/110] perf config: Fix a memory leak in collect_config()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 54569ba4b06d5baedae4614bde33a25a191473ba ] Detected with gcc's ASan: Direct leak of 66 byte(s) in 5 object(s) allocated from: #0 0x7ff3b1f32070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x560c8761034d in collect_config util/config

[PATCH 4.19 033/110] perf hist: Add missing map__put() in error case

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cb6186aeffda4d27e56066c79e9579e7831541d3 ] We need to map__put() before returning from failure of sample__resolve_callchain(). Detected with gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Krister Johansen Cc: Na

[PATCH 4.19 031/110] perf build-id: Fix memory leak in print_sdt_events()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 8bde8516893da5a5fdf06121f74d11b52ab92df5 ] Detected with gcc's ASan: Direct leak of 4356 byte(s) in 120 object(s) allocated from: #0 0x7ff1a2b5a070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) #1 0x55719aef4814 in build_id_cache__origna

[PATCH 4.19 043/110] irqchip/mbigen: Dont clear eventid when freeing an MSI

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fca269f201a8d9985c0a31fb60b15d4eb57cef80 ] mbigen_write_msg clears eventid bits of a mbigen register when free a interrupt, because msi_domain_deactivate memset struct msg to zero. Then multiple mbigen pins with zero eventid will report the same interrupt number. The eventid cle

[PATCH 4.19 042/110] irqchip/stm32: Dont clear rising/falling config registers at init

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 0dda09666f50eae9c5b794dd89b1fd8a8d89d714 ] Falling and rising configuration and status registers are not banked. As they are shared with M4 co-processor, they should not be cleared at probe time, else M4 co-processor configuration will be lost. Fixes: f9fc1745501e ("irqchip/stm3

[PATCH 4.19 027/110] tools/power turbostat: return the exit status of a command

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2a95496634a017c19641f26f00907af75b962f01 ] turbostat failed to return a non-zero exit status even though the supplied command (turbostat ) failed. Currently when turbostat forks a command it returns zero instead of the actual exit status of the command. Modify the code to retur

[PATCH 4.19 008/110] ext4: report real fs size after failed resize

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6c7328400e0488f7d49e19e02290ba343b6811b2 ] Currently when the file system resize using ext4_resize_fs() fails it will report into log that "resized filesystem to ". However this may not be true in the case of failure. Use the current block count as returned by ext4_blocks_count

[PATCH 4.19 000/110] 4.19.36-stable review

2019-04-18 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.36 release. There are 110 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 Sat Apr 20 16:03:29 UTC 2019. Anything recei

[PATCH 4.19 018/110] thermal: samsung: Fix incorrect check after code merge

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 3b5236cc5d086dd3ddd01113ee9255421aab9fab ] Merge commit 19785cf93b6c ("Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal") broke the code introduced by commit ffe6e16f14fa ("thermal: exynos: Reduce severity of too early temperature r

[PATCH 4.19 007/110] ext4: add missing brelse() in add_new_gdb_meta_bg()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d64264d6218e6892edd832dc3a5a5857c2856c53 ] Currently in add_new_gdb_meta_bg() there is a missing brelse of gdb_bh in case ext4_journal_get_write_access() fails. Additionally kvfree() is missing in the same error path. Fix it by moving the ext4_journal_get_write_access() before th

[PATCH 4.19 004/110] perf/core: Restore mmap record type correctly

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d9c1bb2f6a2157b38e8eb63af437cb22701d31ee ] On mmap(), perf_events generates a RECORD_MMAP record and then checks which events are interested in this record. There are currently 2 versions of mmap records: RECORD_MMAP and RECORD_MMAP2. MMAP2 is larger. The event configuration cont

[PATCH 4.19 003/110] inotify: Fix fsnotify_mark refcount leak in inotify_update_existing_watch()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 62c9d2674b31d4c8a674bee86b7edc6da2803aea ] Commit 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inotify_add_watch()") forgot to call fsnotify_put_mark() with IN_MASK_CREATE after fsnotify_find_mark() Fixes: 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inoti

[PATCH 4.19 010/110] ALSA: sb8: add a check for request_region

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit dcd0feac9bab901d5739de51b3f69840851f8919 ] In case request_region fails, the fix returns an error code to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/isa/sb/sb8.c | 4 1 file changed, 4 inser

[PATCH 4.19 014/110] i40iw: Avoid panic when handling the inetdev event

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ec4fe4bcc584b55e24e8d1768f5510a62c0fd619 ] There is a panic reported that on a system with x722 ethernet, when doing the operations like: # ip link add br0 type bridge # ip link set eno1 master br0 # systemctl restart systemd-networkd The system will pan

[PATCH v3] power: supply: add Ingenic JZ47xx battery driver.

2019-04-18 Thread Artur Rojek
Add a driver for battery present on Ingenic JZ47xx SoCs. Signed-off-by: Artur Rojek Reviewed-by: Jonathan Cameron --- Changes: v2: - rework the return logic in ingenic_battery_get_property, - make index offsets point forward in ingenic_battery_set_scale, - fix spacing around scale_raw[

Re: Adding plain accesses and detecting data races in the LKMM

2019-04-18 Thread Paul E. McKenney
On Thu, Apr 18, 2019 at 01:44:36PM -0400, Alan Stern wrote: > On Thu, 18 Apr 2019, Andrea Parri wrote: > > > > Another question is "should the kernel permit smp_mb__{before,after}*() > > > anywhere other than immediately before or after the primitive being > > > strengthened?" > > > > Mmh, I do t

Re: [PATCH] x86: tsc: Rework time_cpufreq_notifier()

2019-04-18 Thread Borislav Petkov
On Thu, Apr 18, 2019 at 04:11:37PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > There are problems with running time_cpufreq_notifier() on SMP > systems. Just a stupid question: that must be some old rust you're fixing because we set X86_FEATURE_CONSTANT_TSC on almost anything t

[PATCH] drivers: pci: Define pr_fmt() and use pr_*() instead of printk()

2019-04-18 Thread Mohan Kumar
Define a pr_fmt() macro that convert all of the explicit printk() calls into corresponding pr_*(). Signed-off-by: Mohan Kumar --- drivers/pci/pci-stub.c | 11 +-- drivers/pci/quirks.c | 10 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/pci/pci-stub

Re: [PATCH RFC 1/2] Add polling support to pidfd

2019-04-18 Thread Jonathan Kowalski
On Tue, Apr 16, 2019 at 8:21 PM Joel Fernandes wrote: > > On Tue, Apr 16, 2019 at 02:04:31PM +0200, Oleg Nesterov wrote: > > On 04/11, Joel Fernandes (Google) wrote: > > > > > > +static unsigned int proc_tgid_base_poll(struct file *file, struct > > > poll_table_struct *pts) > > > +{ > > > + int

<    3   4   5   6   7   8   9   10   >