[PATCH 3.18 05/86] sunrpc: dont mark uninitialised items as VALID.

2019-05-15 Thread Greg Kroah-Hartman
From: NeilBrown commit d58431eacb226222430940134d97bfd72f292fcd upstream. A recent commit added a call to cache_fresh_locked() when an expired item was found. The call sets the CACHE_VALID flag, so it is important that the item actually is valid. There are two ways it could be valid: 1/ If

[PATCH 3.18 25/86] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit c8206579175c34a2546de8a74262456278a7795a ] If an incoming ELS of type RSCN contains more than one element, zfcp suboptimally causes repeated erp trigger NOP trace records for each previously failed port. These could be ports that went away. It loops over each RSCN element, and

[PATCH 3.18 27/86] kconfig/[mn]conf: handle backspace (^H) key

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ] Backspace is not working on some terminal emulators which do not send the key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127). But currently only '^?' is handled. Let's also handle '^H' for those terminals.

[PATCH 3.18 30/86] packet: validate msg_namelen in send directly

2019-05-15 Thread Greg Kroah-Hartman
From: Willem de Bruijn [ Upstream commit 486efdc8f6ce802b27e15921d2353cc740c55451 ] Packet sockets in datagram mode take a destination address. Verify its length before passing to dev_hard_header. Prior to 2.6.14-rc3, the send code ignored sll_halen. This is established behavior. Directly

[PATCH 3.18 32/86] USB: yurex: Fix protection fault after device removal

2019-05-15 Thread Greg Kroah-Hartman
From: Alan Stern commit ef61eb43ada6c1d6b94668f0f514e4c268093ff3 upstream. The syzkaller USB fuzzer found a general-protection-fault bug in the yurex driver. The fault occurs when a device has been unplugged; the driver's interrupt-URB handler logs an error message referring to the device by

[PATCH 3.18 31/86] ipv6/flowlabel: wait rcu grace period before put_pid()

2019-05-15 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 6c0afef5fb0c27758f4d52b2210c61b6bd8b4470 ] syzbot was able to catch a use-after-free read in pid_nr_ns() [1] ip6fl_seq_show() seems to use RCU protection, dereferencing fl->owner.pid but fl_free() releases fl->owner.pid before rcu grace period is started.

[PATCH 3.18 35/86] USB: media: disable tlg2300 driver

2019-05-15 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman The tlg2300 driver was moved to the staging tree back in 3.19, and then removed entirely from the tree in 4.0. Because it breaks with an upcoming fix for the USB power management logic, let's just disable it from 3.18.y in case anyone is actually using it, as they

[PATCH 3.18 17/86] net: ks8851: Dequeue RX packets explicitly

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 536d3680fd2dab5c39857d62a3e084198fc74ff9 ] The ks8851 driver lets the chip auto-dequeue received packets once they have been read in full. It achieves that by setting the ADRFE flag in the RXQCR register ("Auto-Dequeue RXQ Frame Enable"). However if allocation of a packet's

[PATCH 3.18 39/86] igb: Fix WARN_ONCE on runtime suspend

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit dabb8338be533c18f50255cf39ff4f66d4dabdbe ] The runtime_suspend device callbacks are not supposed to save configuration state or change the power state. Commit fb29f76cc566 ("igb: Fix an issue that PME is not enabled during runtime suspend") changed the driver to not save

[PATCH 3.18 43/86] hugetlbfs: fix memory leak for resv_map

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 58b6e5e8f1addd44583d61b0a03c0f5519527e35 ] When mknod is used to create a block special file in hugetlbfs, it will allocate an inode and kmalloc a 'struct resv_map' via resv_map_alloc(). inode->i_mapping->private_data will point the newly allocated resv_map. However, when the

[PATCH 3.18 46/86] ARM: iop: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmamask =

[PATCH 3.18 47/86] usb: usbip: fix isoc packet num validation in get_pipe

2019-05-15 Thread Greg Kroah-Hartman
commit c409ca3be3c6ff3a1eeb303b191184e80d412862 upstream. Backport of the upstream commit, which fixed c6688ef9f297. c6688ef9f297 got backported as commit eebf31529012, as the unavailable function usb_endpoint_maxp_mult had to be replaced. The upstream commit removed the call to this function, so

[PATCH 3.18 50/86] staging: iio: adt7316: fix the dac write calculation

2019-05-15 Thread Greg Kroah-Hartman
From: Jeremy Fertic commit 78accaea117c1ae878774974fab91ac4a0b0e2b0 upstream. The lsb calculation is not masking the correct bits from the user input. Subtract 1 from (1 << offset) to correctly set up the mask to be applied to user input. The lsb register stores its value starting at the bit 7

[PATCH 3.18 48/86] staging: iio: adt7316: allow adt751x to use internal vref for all dacs

2019-05-15 Thread Greg Kroah-Hartman
From: Jeremy Fertic commit 10bfe7cc1739c22f0aa296b39e53f61e9e3f4d99 upstream. With adt7516/7/9, internal vref is available for dacs a and b, dacs c and d, or all dacs. The driver doesn't currently support internal vref for all dacs. Change the else if to an if so both bits are checked rather

[PATCH 3.18 52/86] scsi: libsas: fix a race condition when smp task timeout

2019-05-15 Thread Greg Kroah-Hartman
From: Jason Yan commit b90cd6f2b905905fb42671009dc0e27c310a16ae upstream. When the lldd is processing the complete sas task in interrupt and set the task stat as SAS_TASK_STATE_DONE, the smp timeout timer is able to be triggered at the same time. And smp_task_timedout() will complete the task

[PATCH 3.18 53/86] ASoC:soc-pcm:fix a codec fixup issue in TDM case

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 570f18b6a8d1f0e60e8caf30e66161b6438dcc91 ] On HDaudio platforms, if playback is started when capture is working, there is no audible output. This can be root-caused to the use of the rx|tx_mask to store an HDaudio stream tag. If capture is stared before playback, rx_mask would

[PATCH 3.18 24/86] ceph: fix use-after-free on symlink traversal

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit daf5cc27eed99afdea8d96e71b89ba41f5406ef6 ] free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro Reviewed-by: Jeff Layton Signed-off-by: Ilya

[PATCH 3.18 15/86] usb: gadget: net2280: Fix overrun of OUT messages

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 9d6a54c1430647355a5e23434881b2ca3d192b48 ] The OUT endpoint normally blocks (NAK) subsequent packets when a short packet was received and returns an incomplete queue entry to the gadget driver. Thereby the gadget driver can detect a short packet when reading queue entries with a

[PATCH 3.18 58/86] genirq: Prevent use-after-free and work list corruption

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 59c39840f5abf4a71e1810a8da71aaccd6c17d26 ] When irq_set_affinity_notifier() replaces the notifier, then the reference count on the old notifier is dropped which causes it to be freed. But nothing ensures that the old notifier is not longer queued in the work list. If it is

[PATCH 1/2] iio: frequency: adf4371: Add support for ADF4371 PLL

2019-05-15 Thread Stefan Popa
The ADF4371 is a frequency synthesizer with an integrated voltage controlled oscillator (VCO) for phase-locked loops (PLLs). The ADF4371 has an integrated VCO with a fundamental output frequency ranging from 4000 MHz to 8000 MHz. In addition, the VCO frequency is connected to divide by 1, 2, 4, 8,

[PATCH 3.18 68/86] s390/3270: fix lockdep false positive on view->lock

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 5712f3301a12c0c3de9cc423484496b0464f2faf ] The spinlock in the raw3270_view structure is used by con3270, tty3270 and fs3270 in different ways. For con3270 the lock can be acquired in irq context, for tty3270 and fs3270 the highest context is bh. Lockdep sees the view->lock as

[PATCH 3.18 71/86] init: initialize jump labels before command line option parsing

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 6041186a32585fc7a1d0f6cfe2f138b05fdc3c82 ] When a module option, or core kernel argument, toggles a static-key it requires jump labels to be initialized early. While x86, PowerPC, and ARM64 arrange for jump_label_init() to be called before parse_args(), ARM does not. Kernel

[PATCH 3.18 23/86] usb: u132-hcd: fix resource leak

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit f276e002793cdb820862e8ea8f76769d56bba575 ] if platform_driver_register fails, cleanup the allocated resource gracefully. Signed-off-by: Mukesh Ojha Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin (Microsoft) --- drivers/usb/host/u132-hcd.c | 3 +++ 1 file

[PATCH 3.18 74/86] gpu: ipu-v3: dp: fix CSC handling

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit d4fad0a426c6e26f48c9a7cdd21a7fe9c198d645 ] Initialize the flow input colorspaces to unknown and reset to that value when the channel gets disabled. This avoids the state getting mixed up with a previous mode. Also keep the CSC settings for the background flow intact when

[PATCH 2/2] dt-bindings: iio: frequency: Add docs for ADF4371 PLL

2019-05-15 Thread Stefan Popa
Document support for Analog Devices ADF4371 SPI Wideband Synthesizer. Signed-off-by: Stefan Popa --- .../devicetree/bindings/iio/frequency/adf4371.yaml | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/frequency/adf4371.yaml

[PATCH 3.18 76/86] USB: serial: use variable for status

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 3161da970d38cd6ed2ba8cadec93874d1d06e11e ] This patch turns status in a variable read once from the URB. The long term plan is to deliver status to the callback. In addition it makes the code a bit more elegant. Signed-off-by: Oliver Neukum Signed-off-by: Johan Hovold

[PATCH 3.18 72/86] s390: ctcm: fix ctcm_new_device error return code

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 27b141fc234a3670d21bd742c35d7205d03cbb3a ] clang points out that the return code from this function is undefined for one of the error paths: ../drivers/s390/net/ctcm_main.c:1595:7: warning: variable 'result' is used uninitialized whenever 'if' condition is true

[PATCH 3.18 83/86] bonding: fix arp_validate toggling in active-backup mode

2019-05-15 Thread Greg Kroah-Hartman
From: Jarod Wilson [ Upstream commit a9b8a2b39ce65df45687cf9ef648885c2a99fe75 ] There's currently a problem with toggling arp_validate on and off with an active-backup bond. At the moment, you can start up a bond, like so: modprobe bonding mode=1 arp_interval=100 arp_validate=0

[PATCH 3.18 84/86] drivers/virt/fsl_hypervisor.c: dereferencing error pointers in ioctl

2019-05-15 Thread Greg Kroah-Hartman
From: Dan Carpenter commit c8ea3663f7a8e6996d44500ee818c9330ac4fd88 upstream. strndup_user() returns error pointers on error, and then in the error handling we pass the error pointers to kfree(). It will cause an Oops. Link: http://lkml.kernel.org/r/20181218082003.GD32567@kadam Fixes:

[PATCH 3.18 81/86] vlan: disable SIOCSHWTSTAMP in container

2019-05-15 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 873017af778439f2f8e3d87f28ddb1fcaf244a76 ] With NET_ADMIN enabled in container, a normal user could be mapped to root and is able to change the real device's rx filter via ioctl on vlan, which would affect the other ptp process on host. Fix it by disabling

[PATCH 3.18 85/86] drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl

2019-05-15 Thread Greg Kroah-Hartman
From: Dan Carpenter commit 6a024330650e24556b8a18cc654ad00cfecf6c6c upstream. The "param.count" value is a u64 thatcomes from the user. The code later in the function assumes that param.count is at least one and if it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR. Also

[PATCH 3.18 80/86] packet: Fix error path in packet_init

2019-05-15 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit 36096f2f4fa05f7678bc87397665491700bae757 ] kernel BUG at lib/list_debug.c:47! invalid opcode: [#1 CPU: 0 PID: 12914 Comm: rmmod Tainted: GW 5.1.0+ #47 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS

[PATCH 3.18 60/86] Bluetooth: hidp: fix buffer overflow

2019-05-15 Thread Greg Kroah-Hartman
From: Young Xiao commit a1616a5ac99ede5d605047a9012481ce7ff18b16 upstream. Struct ca is copied from userspace. It is not checked whether the "name" field is NULL terminated, which allows local users to obtain potentially sensitive information from kernel stack memory, via a HIDPCONNADD command.

[PATCH 3.18 82/86] ipv4: Fix raw socket lookup for local traffic

2019-05-15 Thread Greg Kroah-Hartman
From: David Ahern [ Upstream commit 19e4e768064a87b073a4b4c138b55db70e0cfb9f ] inet_iif should be used for the raw socket lookup. inet_iif considers rt_iif which handles the case of local traffic. As it stands, ping to a local address with the '-I ' option fails ever since ping was changed to

[PATCH 3.18 62/86] timer/debug: Change /proc/timer_stats from 0644 to 0600

2019-05-15 Thread Greg Kroah-Hartman
From: Ben Hutchings The timer_stats facility should filter and translate PIDs if opened from a non-initial PID namespace, to avoid leaking information about the wider system. It should also not show kernel virtual addresses. Unfortunately it has now been removed upstream (as redundant) instead

[PATCH 3.18 63/86] netfilter: compat: initialize all fields in xt_init

2019-05-15 Thread Greg Kroah-Hartman
commit 8d29d16d21342a0c86405d46de0c4ac5daf1760f upstream If a non zero value happens to be in xt[NFPROTO_BRIDGE].cur at init time, the following panic can be caused by running % ebtables -t broute -F BROUTING from a 32-bit user level on a 64-bit kernel. This patch replaces kmalloc_array with

[PATCH 4.4 012/266] USB: Consolidate LPM checks to avoid enabling LPM twice

2019-05-15 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit d7a6c0ce8d26412903c7981503bad9e1cc7c45d2 upstream. USB Bluetooth controller QCA ROME (0cf3:e007) sometimes stops working after S3: [ 165.110742] Bluetooth: hci0: using NVM file: qca/nvm_usb_0302.bin [ 168.432065] Bluetooth: hci0: Failed to send body at 4 of 1953

[PATCH 4.4 014/266] powerpc/64s: Improve RFI L1-D cache flush fallback

2019-05-15 Thread Greg Kroah-Hartman
From: Nicholas Piggin commit bdcb1aefc5b3f7d0f1dc8b02673602bca2ff7a4b upstream. The fallback RFI flush is used when firmware does not provide a way to flush the cache. It's a "displacement flush" that evicts useful data by displacing it with an uninteresting buffer. The flush has to take care

Re: [PATCH v4 2/3] PM / EM: Expose perf domain struct

2019-05-15 Thread Quentin Perret
On Wednesday 15 May 2019 at 12:51:57 (+0200), Daniel Lezcano wrote: > On 15/05/2019 12:46, Quentin Perret wrote: > > On Wednesday 15 May 2019 at 11:40:44 (+0100), Quentin Perret wrote: > > [ ... ] > > >> +#ifdef CONFIG_THERMAL_GOV_POWER_ALLOCATOR > >> if (capacitance) { > >>

[PATCH 3.18 66/86] HID: input: add mapping for keyboard Brightness Up/Down/Toggle keys

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 7975a1d6a7afeb3eb61c971a153d24dd8fa032f3 ] According to HUTRR73 usages 0x79, 0x7a and 0x7c from the consumer page correspond to Brightness Up/Down/Toggle keys, so let's add the mappings. Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/hid/hid-input.c |

[PATCH 4.4 015/266] powerpc/pseries: Support firmware disable of RFI flush

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 582605a429e20ae68fd0b041b2e840af296edd08 upstream. Some versions of firmware will have a setting that can be configured to disable the RFI flush, add support for it. Fixes: 8989d56878a7 ("powerpc/pseries: Query hypervisor for RFI flush settings") Signed-off-by:

[PATCH 4.4 017/266] powerpc/rfi-flush: Move the logic to avoid a redo into the debugfs code

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 1e2a9fc7496955faacbbed49461d611b704a7505 upstream. rfi_flush_enable() includes a check to see if we're already enabled (or disabled), and in that case does nothing. But that means calling setup_rfi_flush() a 2nd time doesn't actually work, which is a bit

[PATCH 4.4 016/266] powerpc/powernv: Support firmware disable of RFI flush

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit eb0a2d2620ae431c543963c8c7f08f597366fc60 upstream. Some versions of firmware will have a setting that can be configured to disable the RFI flush, add support for it. Fixes: 6e032b350cd1 ("powerpc/powernv: Check device-tree for RFI flush settings") Signed-off-by:

[PATCH] staging: kpc2000: fix alloc_cast.cocci warnings

2019-05-15 Thread kbuild test robot
From: kbuild test robot drivers/staging/kpc2000/kpc_dma/fileops.c:60:8-26: WARNING: casting value returned by memory allocation function to (struct aio_cb_data *) is useless. Remove casting the values returned by memory allocation functions like kmalloc, kzalloc, kmem_cache_alloc,

drivers/staging/kpc2000/kpc_dma/fileops.c:60:8-26: WARNING: casting value returned by memory allocation function to (struct aio_cb_data *) is useless.

2019-05-15 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 5ac94332248ee017964ba368cdda4ce647e3aba7 commit: 7df95299b94a63ec67a6389fc02dc25019a80ee8 staging: kpc2000: Add DMA driver date: 3 weeks ago If you fix the issue, kindly add following tag Reported-by:

[PATCH 4.4 022/266] powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 921bc6cf807ceb2ab8005319cf39f33494d6b100 upstream. We might have migrated to a machine that uses a different flush type, or doesn't need flushing at all. Signed-off-by: Michael Ellerman Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Michael Ellerman

[PATCH 4.4 005/266] trace: Fix preempt_enable_no_resched() abuse

2019-05-15 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit d6097c9e4454adf1f8f2c9547c2fa6060d55d952 upstream. Unless the very next line is schedule(), or implies it, one must not use preempt_enable_no_resched(). It can cause a preemption to go missing and thereby cause arbitrary delays, breaking the PREEMPT=y invariant.

[PATCH 4.4 037/266] powerpc/64s: Add barrier_nospec

2019-05-15 Thread Greg Kroah-Hartman
From: Michal Suchanek commit a6b3964ad71a61bb7c61d80a60bea7d42187b2eb upstream. A no-op form of ori (or immediate of 0 into r31 and the result stored in r31) has been re-tasked as a speculation barrier. The instruction only acts as a barrier on newer machines with appropriate firmware support.

[PATCH 4.4 034/266] powerpc/pseries: Restore default security feature flags on setup

2019-05-15 Thread Greg Kroah-Hartman
From: Mauricio Faria de Oliveira commit 6232774f1599028a15418179d17f7df47ede770a upstream. After migration the security feature flags might have changed (e.g., destination system with unpatched firmware), but some flags are not set/clear again in init_cpu_char_feature_flags() because it assumes

[PATCH 4.4 043/266] powerpc/64s: Enhance the information in cpu_show_spectre_v1()

2019-05-15 Thread Greg Kroah-Hartman
From: Michal Suchanek commit a377514519b9a20fa1ea9adddbb4129573129cef upstream. We now have barrier_nospec as mitigation so print it in cpu_show_spectre_v1() when enabled. Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.4 041/266] powerpc/64: Use barrier_nospec in syscall entry

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 51973a815c6b46d7b23b68d6af371ad1c9d503ca upstream. Our syscall entry is done in assembly so patch in an explicit barrier_nospec. Based on a patch by Michal Suchanek. Signed-off-by: Michal Suchanek Signed-off-by: Michael Ellerman Signed-off-by: Greg

[PATCH 4.4 024/266] powerpc/pseries: Set or clear security feature flags

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit f636c14790ead6cc22cf62279b1f8d7e11a67116 upstream. Now that we have feature flags for security related things, set or clear them based on what we receive from the hypercall. Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.4 006/266] sched/numa: Fix a possible divide-by-zero

2019-05-15 Thread Greg Kroah-Hartman
From: Xie XiuQi commit a860fa7b96e1a1c974556327aa1aee852d434c21 upstream. sched_clock_cpu() may not be consistent between CPUs. If a task migrates to another CPU, then se.exec_start is set to that CPU's rq_clock_task() by update_stats_curr_start(). Specifically, the new value might be before

[PATCH 4.4 051/266] powerpc/asm: Add a patch_site macro & helpers for patching instructions

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 06d0bbc6d0f56dacac3a79900e9a9a0d5972d818 upstream. Add a macro and some helper C functions for patching single asm instructions. The gas macro means we can do something like: 1:nop patch_site 1b, patch__foo Which is less visually distracting than

[PATCH 4.4 049/266] powerpc/64: Make meltdown reporting Book3S 64 specific

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 406d2b6ae3420f5bb2b3db6986dc6f0b6dbb637b upstream. In a subsequent patch we will enable building security.c for Book3E. However the NXP platforms are not vulnerable to Meltdown, so make the Meltdown vulnerability reporting PPC_BOOK3S_64 specific. Signed-off-by: Diana

[PATCH 4.4 048/266] powerpc/64: Call setup_barrier_nospec() from setup_arch()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit af375eefbfb27cbb5b831984e66d724a40d26b5c upstream. Currently we require platform code to call setup_barrier_nospec(). But if we add an empty definition for the !CONFIG_PPC_BARRIER_NOSPEC case then we can call it in setup_arch(). Signed-off-by: Diana Craciun

[PATCH 4.4 060/266] powerpc/fsl: Add nospectre_v2 command line argument

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit f633a8ad636efb5d4bba1a047d4a0f1ef719aa06 upstream. When the command line argument is present, the Spectre variant 2 mitigations are disabled. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.4 063/266] powerpc/security: Fix spectre_v2 reporting

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 92edf8df0ff2ae86cc632eeca0e651fd8431d40d upstream. When I updated the spectre_v2 reporting to handle software count cache flush I got the logic wrong when there's no software count cache enabled at all. The result is that on systems with the software count cache

[PATCH 4.4 061/266] powerpc/fsl: Flush the branch predictor at each kernel entry (64bit)

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 10c5e83afd4a3f01712d97d3bb1ae34d5b74a185 upstream. In order to protect against speculation attacks on indirect branches, the branch predictor is flushed at kernel entry to protect for the following situations: - userspace process attacking another userspace process -

[PATCH 4.4 059/266] powerpc/fsl: Fix spectre_v2 mitigations reporting

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 7d8bad99ba5a22892f0cad6881289fdc3875a930 upstream. Currently for CONFIG_PPC_FSL_BOOK3E the spectre_v2 file is incorrect: $ cat /sys/devices/system/cpu/vulnerabilities/spectre_v2 "Mitigation: Software count cache flush" Which is wrong. Fix it to report vulnerable

Re: [PATCH 08/18] soc: qcom: ipa: the generic software interface

2019-05-15 Thread Alex Elder
On 5/15/19 2:21 AM, Arnd Bergmann wrote: > On Sun, May 12, 2019 at 3:25 AM Alex Elder wrote: > >> +/** gsi_gpi_channel_scratch - GPI protocol scratch register >> + * >> + * @max_outstanding_tre: >> + * Defines the maximum number of TREs allowed in a single transaction >> + * on a channel

[PATCH 4.4 106/266] scsi: zfcp: reduce flood of fcrscn1 trace records on multi-element RSCN

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit c8206579175c34a2546de8a74262456278a7795a ] If an incoming ELS of type RSCN contains more than one element, zfcp suboptimally causes repeated erp trigger NOP trace records for each previously failed port. These could be ports that went away. It loops over each RSCN element, and

[PATCH 4.4 094/266] usb: gadget: net2272: Fix net2272_dequeue()

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 091dacc3cc10979ab0422f0a9f7fcc27eee97e69 ] Restore the status of ep->stopped in function net2272_dequeue(). When the given request is not found in the endpoint queue the function returns -EINVAL without restoring the state of ep->stopped. Thus the endpoint keeps blocked and

[PATCH 2/2] NFC: nxp-nci: Fix recommendation for NFC_NXP_NCI_I2C Kconfig

2019-05-15 Thread Sedat Dilek
This is a simple cleanup to the Kconfig help text as discussed in [1]. [1] https://marc.info/?t=15577443561=1=2 Suggested-by: Andy Shevchenko Suggested-by: Oleg Zhurakivskyy Signed-off-by: Sedat Dilek --- drivers/nfc/nxp-nci/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 4.4 099/266] net: ks8851: Set initial carrier state to down

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 9624bafa5f6418b9ca5b3f66d1f6a6a2e8bf6d4c ] The ks8851 chip's initial carrier state is down. A Link Change Interrupt is signaled once interrupts are enabled if the carrier is up. The ks8851 driver has it backwards by assuming that the initial carrier state is up. The state is

[PATCH 4.4 101/266] net: ibm: fix possible object reference leak

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit be693df3cf9dd113ff1d2c0d8150199efdba37f6 ] The call to ehea_get_eth_dn returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH 4.4 088/266] usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

2019-05-15 Thread Greg Kroah-Hartman
From: Gustavo A. R. Silva commit 61c59355e0154a938b28710dfa6c1d8be2ddcefa upstream. _dev_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _dev_ has been null checked. Addresses-Coverity-ID:

[PATCH 4.4 087/266] usbnet: ipheth: prevent TX queue timeouts when device not ready

2019-05-15 Thread Greg Kroah-Hartman
From: Alexander Kappner commit bb1b40c7cb863f0800a6410c7dcb86cf3f28d3b1 upstream. iOS devices require the host to be "trusted" before servicing network packets. Establishing trust requires the user to confirm a dialog on the iOS device.Until trust is established, the iOS device will silently

[PATCH 4.4 105/266] ceph: fix use-after-free on symlink traversal

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit daf5cc27eed99afdea8d96e71b89ba41f5406ef6 ] free the symlink body after the same RCU delay we have for freeing the struct inode itself, so that traversal during RCU pathwalk wouldn't step into freed memory. Signed-off-by: Al Viro Reviewed-by: Jeff Layton Signed-off-by: Ilya

[PATCH 4.4 130/266] net: hns: Fix WARNING when remove HNS driver with SMMU enabled

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 8601a99d7c0256b7a7fdd1ab14cf6c1f1dfcadc6 ] When enable SMMU, remove HNS driver will cause a WARNING: [ 141.924177] WARNING: CPU: 36 PID: 2708 at drivers/iommu/dma-iommu.c:443 __iommu_dma_unmap+0xc0/0xc8 [ 141.954673] Modules linked in: hns_enet_drv(-) [ 141.963615] CPU: 36

[PATCH 4.4 109/266] vfio/type1: Limit DMA mappings per container

2019-05-15 Thread Greg Kroah-Hartman
From: Alex Williamson commit 492855939bdb59c6f947b0b5b44af9ad82b7e38c upstream. Memory backed DMA mappings are accounted against a user's locked memory limit, including multiple mappings of the same memory. This accounting bounds the number of such mappings that a user can create. However, DMA

[PATCH 4.4 110/266] ALSA: line6: use dynamic buffers

2019-05-15 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman commit e5c812e84f0dece3400d5caf42522287e6ef139f upstream. The line6 driver uses a lot of USB buffers off of the stack, which is not allowed on many systems, causing the driver to crash on some of them. Fix this up by dynamically allocating the buffers with kmalloc()

Re: [PATCH 1/2] NFC: nxp-nci: Clarify on supported chips

2019-05-15 Thread Oleg Zhurakivskyy
On 5/15/19 3:02 PM, Sedat Dilek wrote: This patch clarifies on the supported NXP NCI chips and families and lists PN547 and PN548 separately which are known as NPC100 respectively NPC300. LGTM and thanks! Regards, Oleg

[PATCH 4.4 125/266] debugfs: fix use-after-free on symlink traversal

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 93b919da64c15b90953f96a536e5e61df896ca57 ] symlink body shouldn't be freed without an RCU delay. Switch debugfs to ->destroy_inode() and use of call_rcu(); free both the inode and symlink body in the callback. Similar to solution for bpf, only here it's even more obvious that

[PATCH 4.4 127/266] vfio/pci: use correct format characters

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 426b046b748d1f47e096e05bdcc6fb4172791307 ] When compiling with -Wformat, clang emits the following warnings: drivers/vfio/pci/vfio_pci.c:1601:5: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat]

[PATCH 4.4 076/266] team: fix possible recursive locking when add slaves

2019-05-15 Thread Greg Kroah-Hartman
From: Hangbin Liu [ Upstream commit 925b0c841e066b488cc3a60272472b2c56300704 ] If we add a bond device which is already the master of the team interface, we will hold the team->lock in team_add_slave() first and then request the lock in team_set_mac_address() again. The functions are called

[PATCH 4.4 108/266] kconfig/[mn]conf: handle backspace (^H) key

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 9c38f1f044080392603c497ecca4d7d09876ff99 ] Backspace is not working on some terminal emulators which do not send the key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127). But currently only '^?' is handled. Let's also handle '^H' for those terminals.

Re: [PATCH v3 02/16] iommu: Introduce cache_invalidate API

2019-05-15 Thread Jean-Philippe Brucker
On 14/05/2019 18:44, Jacob Pan wrote: > Hi Thank you both for the explanation. > > On Tue, 14 May 2019 11:41:24 +0100 > Jean-Philippe Brucker wrote: > >> On 14/05/2019 08:36, Auger Eric wrote: >>> Hi Jacob, >>> >>> On 5/14/19 12:16 AM, Jacob Pan wrote: On Mon, 13 May 2019 18:09:48 +0100

[PATCH 4.4 055/266] powerpc/powernv: Query firmware for count cache flush settings

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 99d54754d3d5f896a8f616b0b6520662bc99d66b upstream. Look for fw-features properties to determine the appropriate settings for the count cache flush, and then call the generic powerpc code to set it up based on the security feature flags. Signed-off-by: Michael

[PATCH 4.4 057/266] powerpc/fsl: Add infrastructure to fixup branch predictor flush

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 76a5eaa38b15dda92cd6964248c39b5a6f3a4e9d upstream. In order to protect against speculation attacks (Spectre variant 2) on NXP PowerPC platforms, the branch predictor should be flushed when the privillege level is changed. This patch is adding the infrastructure to

[PATCH 4.4 062/266] powerpc/fsl: Update Spectre v2 reporting

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit dfa88658fb0583abb92e062c7a9cd5a5b94f2a46 upstream. Report branch predictor state flush as a mitigation for Spectre variant 2. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/security.c |5

[PATCH 4.4 054/266] powerpc/pseries: Query hypervisor for count cache flush settings

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit ba72dc171954b782a79d25e0f4b3ed91090c3b1e upstream. Use the existing hypercall to determine the appropriate settings for the count cache flush, and then call the generic powerpc code to set it up based on the security feature flags. Signed-off-by: Michael Ellerman

[PATCH 4.4 028/266] powerpc/powernv: Use the security flags in pnv_setup_rfi_flush()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit 37c0bdd00d3ae83369ab60a6712c28e11e6458d5 upstream. Now that we have the security flags we can significantly simplify the code in pnv_setup_rfi_flush(), because we can use the flags instead of checking device tree properties and because the security flags have

[PATCH 4.4 083/266] powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit c28218d4abbf4f2035495334d8bfcba64bda4787 upstream. Used barrier_nospec to sanitize the syscall table. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/entry_32.S | 10 ++ 1 file

[PATCH 4.4 031/266] powerpc/64s: Wire up cpu_show_spectre_v2()

2019-05-15 Thread Greg Kroah-Hartman
From: Michael Ellerman commit d6fbe1c55c55c6937cbea3531af7da84ab7473c3 upstream. Add a definition for cpu_show_spectre_v2() to override the generic version. This has several permuations, though in practice some may not occur we cater for any combination. The most verbose is: Mitigation:

[PATCH 4.4 081/266] powerpc/fsl: Emulate SPRN_BUCSR register

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 98518c4d8728656db349f875fcbbc7c126d4c973 upstream. In order to flush the branch predictor the guest kernel performs writes to the BUCSR register which is hypervisor privilleged. However, the branch predictor is flushed at each KVM entry, so the branch predictor has

[PATCH 4.4 080/266] powerpc/fsl: Flush branch predictor when entering KVM

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit e7aa61f47b23afbec41031bc47ca8d6cb6516abc upstream. Switching from the guest to host is another place where the speculative accesses can be exploited. Flush the branch predictor when entering KVM. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman

[PATCH 4.4 079/266] powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 3bc8ea8603ae4c1e09aca8de229ad38b8091fcb3 upstream. If the user choses not to use the mitigations, replace the code sequence with nops. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman ---

[PATCH 4.4 068/266] fs/proc/proc_sysctl.c: Fix a NULL pointer dereference

2019-05-15 Thread Greg Kroah-Hartman
From: YueHaibing commit 89189557b47b35683a27c80ee78aef18248eefb4 upstream. Syzkaller report this: sysctl could not get directory: /net//bridge -12 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1]

[PATCH 4.4 086/266] Documentation: Add nospectre_v1 parameter

2019-05-15 Thread Greg Kroah-Hartman
From: Diana Craciun commit 26cb1f36c43ee6e89d2a9f48a5a7500d5248f836 upstream. Currently only supported on powerpc. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- Documentation/kernel-parameters.txt |4 1 file changed, 4

Re: ext3/ext4 filesystem corruption under post 5.1.0 kernels

2019-05-15 Thread Arthur Marsh
On 15 May 2019 2:27:17 pm ACST, Theodore Ts'o wrote: >Ah, I think I see the problem. Sorry, this one was my fault. Does >this fix things for you? > > - Ted > >From 0c72924ef346d54e8627440e6d71257aa5b56105 Mon Sep 17 00:00:00 2001 >From: Theodore

[PATCH 1/2] NFC: nxp-nci: Clarify on supported chips

2019-05-15 Thread Sedat Dilek
This patch clarifies on the supported NXP NCI chips and families and lists PN547 and PN548 separately which are known as NPC100 respectively NPC300. This helps to find informations and identify drivers on vendor's support websites. This patch is on top of Andy Shevchenko's patchset: "[PATCH v2

[PATCH 4.4 091/266] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit ac0cdb3d990108df795b676cd0d0e65ac34b2273 ] Add the missing uart_unregister_driver() and i2c_del_driver() before return from sc16is7xx_init() in the error handling case. Signed-off-by: Mao Wenan Reviewed-by: Vladimir Zapolskiy Signed-off-by: Greg Kroah-Hartman Signed-off-by:

[PATCH 4.4 111/266] ipv4: ip_do_fragment: Preserve skb_iif during fragmentation

2019-05-15 Thread Greg Kroah-Hartman
From: Shmulik Ladkani [ Upstream commit d2f0c961148f65bc73eda72b9fa3a4e80973cb49 ] Previously, during fragmentation after forwarding, skb->skb_iif isn't preserved, i.e. 'ip_copy_metadata' does not copy skb_iif from given 'from' skb. As a result, ip_do_fragment's creates fragments with zero

[PATCH 4.4 112/266] ipv6/flowlabel: wait rcu grace period before put_pid()

2019-05-15 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 6c0afef5fb0c27758f4d52b2210c61b6bd8b4470 ] syzbot was able to catch a use-after-free read in pid_nr_ns() [1] ip6fl_seq_show() seems to use RCU protection, dereferencing fl->owner.pid but fl_free() releases fl->owner.pid before rcu grace period is started.

[PATCH] powerpc: Include header file to fix a warning

2019-05-15 Thread Mathieu Malaterre
Make sure to include to provide the following prototype: __find_linux_pte. Remove the following warning treated as error (W=1): arch/powerpc/mm/pgtable.c:316:8: error: no previous prototype for '__find_linux_pte' [-Werror=missing-prototypes] Fixes: 0caed4de502c ("powerpc/mm: move

Re: [PATCH v7 04/23] iommu: Introduce attach/detach_pasid_table API

2019-05-15 Thread Jean-Philippe Brucker
On 08/04/2019 13:18, Eric Auger wrote: > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > index edcc0dda7993..532a64075f23 100644 > --- a/include/uapi/linux/iommu.h > +++ b/include/uapi/linux/iommu.h > @@ -112,4 +112,51 @@ struct iommu_fault { > struct

[PATCH 4.4 131/266] hugetlbfs: fix memory leak for resv_map

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 58b6e5e8f1addd44583d61b0a03c0f5519527e35 ] When mknod is used to create a block special file in hugetlbfs, it will allocate an inode and kmalloc a 'struct resv_map' via resv_map_alloc(). inode->i_mapping->private_data will point the newly allocated resv_map. However, when the

[PATCH] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool

2019-05-15 Thread Mathieu Malaterre
In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") the following piece of code was added: smp_call_function((smp_call_func_t)set_dawr, _brk, 0); Since GCC 8 this trigger the following warning about incompatible function types:

[PATCH 4.4 137/266] staging: iio: adt7316: fix the dac read calculation

2019-05-15 Thread Greg Kroah-Hartman
From: Jeremy Fertic commit 45130fb030aec26ac28b4bb23344901df3ec3b7f upstream. The calculation of the current dac value is using the wrong bits of the dac lsb register. Create two macros to shift the lsb register value into lsb position, depending on whether the dac is 10 or 12 bit. Initialize

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