[PATCH 4.14 120/195] media: v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit b2469c814fbc8f1f19676dd4912717b798df511e upstream. Don't duplicate the buffer type checks in enum/g/s/try_fmt. The check_fmt function does that already. It is hard to keep

[PATCH 4.14 091/195] [Variant 2/Spectre-v2] arm/arm64: smccc: Make function identifiers an unsigned quantity

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Marc Zyngier Commit ded4c39e93f3 upstream. Function identifiers are a 32bit, unsigned quantity. But we never tell so to the compiler, resulting in the following: 4ac: b26187e0mov

[PATCH 4.14 095/195] mtd: cfi: convert inline functions to macros

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit 9e343e87d2c4c707ef8fae2844864d4dde3a2d13 upstream. The map_word_() functions, dating back to linux-2.6.8, try to perform bitwise operations on a 'map_word' structure. This

Consolidate tasklet + tasklet-hi code

2018-02-15 Thread Sebastian Andrzej Siewior
Ingo made a RT patch a few years back called "tasklet: Prevent tasklets from going into infinite spin in RT" [0]. I ripped the non-RT pieces out of it and here they are. I kept him as the original Author. [0] https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/tree/patches/taskl

[PATCH 2/2] kernel/sofirq: consolidate common code in tasklet_action() + tasklet_hi_action()

2018-02-15 Thread Sebastian Andrzej Siewior
From: Ingo Molnar tasklet_action() + tasklet_hi_action() are almost identical. Move the common code from both function into __tasklet_schedule_common() and let both functions invoke it with different arguments. Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: Thomas Glei

[PATCH 1/2] kernel/sofirq: consolidate common code in __tasklet_schedule() + _hi_

2018-02-15 Thread Sebastian Andrzej Siewior
From: Ingo Molnar __tasklet_schedule() and __tasklet_hi_schedule() are almost identical. Move the common code from both function into __tasklet_schedule_common() and let both functions invoke it with different arguments. Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt Signed-off-by: T

[PATCH 4.14 135/195] crypto: talitos - fix Kernel Oops on hashing an empty file

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: LEROY Christophe commit 87a81dce53b1ea61acaeefa5191a0376a2d1d721 upstream. Performing the hash of an empty file leads to a kernel Oops [ 44.504600] Unable to handle kernel paging request fo

[PATCH 4.14 132/195] media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit 273caa260035c03d89ad63d72d8cd3d9e5c5e3f1 upstream. If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check wou

[PATCH] bus: ti-sysc: Fix checking of no-reset-on-init quirk

2018-02-15 Thread Tony Lindgren
We are currently only checking for the first entry in the table while we should check them all. Usual no-idle-on-init is together with no-reset-on-init, so this has gone unnoticed. Fixes: 566a9b05e1fa ("bus: ti-sysc: Handle module quirks based dts configuration") Signed-off-by: Tony Lindgren ---

Re: v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Eric Dumazet
On Thu, Feb 15, 2018 at 9:04 AM, Mark Rutland wrote: > Hi, > > While fuzzing arm64 v4.16-rc1 with Syzkaller, I've been hitting a > misaligned atomic in __skb_clone: > > atomic_inc(&(skb_shinfo(skb)->dataref)); > > .. where dataref doesn't have the required natural alignment, and the > atom

[PATCH 4.14 122/195] media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit 3ee6d040719ae09110e5cdf24d5386abe5d1b776 upstream. The result of the VIDIOC_PREPARE_BUF ioctl was never copied back to userspace since it was missing in the switch. Signed

[PATCH 4.14 134/195] crypto: sha512-mb - initialize pending lengths correctly

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Eric Biggers commit eff84b379089cd8b4e83599639c1f5f6e34ef7bf upstream. The SHA-512 multibuffer code keeps track of the number of blocks pending in each lane. The minimum of these values is us

[PATCH 4.14 140/195] KVM: PPC: Book3S HV: Drop locks before reading guest memory

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Paul Mackerras commit 36ee41d161c67a6fcf696d4817a0da31f778938c upstream. Running with CONFIG_DEBUG_ATOMIC_SLEEP reveals that HV KVM tries to read guest memory, in order to emulate guest instru

[PATCH 4.14 141/195] KVM: arm/arm64: Handle CPU_PM_ENTER_FAILED

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: James Morse commit 58d6b15e9da5042a99c9c30ad725792e4569150e upstream. cpu_pm_enter() calls the pm notifier chain with CPU_PM_ENTER, then if there is a failure: CPU_PM_ENTER_FAILED. When KVM r

[PATCH 4.14 145/195] watchdog: imx2_wdt: restore previous timeout after suspend+resume

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Martin Kaiser commit 0be267255cef64e1c58475baa7b25568355a3816 upstream. When the watchdog device is suspended, its timeout is set to the maximum value. During resume, the previously set timeou

[PATCH 4.14 143/195] ASoC: rockchip: i2s: fix playback after runtime resume

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: John Keeping commit c66234cfedfc3e6e3b62563a5f2c1562be09a35d upstream. When restoring registers during runtime resume, we must not write to I2S_TXDR which is the transmit FIFO as this queues u

[PATCH 4.14 146/195] Btrfs: raid56: iterate raid56 internal bio with bio_for_each_segment_all

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Liu Bo commit 0198e5b707cfeb5defbd1b71b1ec6e71580d7db9 upstream. Bio iterated by set_bio_pages_uptodate() is raid56 internal one, so it will never be a BIO_CLONED bio, and since this is called

[PATCH 4.14 151/195] media: cxusb, dib0700: ignore XC2028_I2C_FLUSH

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Mauro Carvalho Chehab commit 9893b905e743ded332575ca04486bd586c0772f7 upstream. The XC2028_I2C_FLUSH only needs to be implemented on a few devices. Others can safely ignore it. That prevents

[PATCH 4.14 124/195] media: v4l2-compat-ioctl32.c: move helper functions to __get/put_v4l2_format32

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit 486c521510c44a04cd756a9267e7d1e271c8a4ba upstream. These helper functions do not really help. Move the code to the __get/put_v4l2_format32 functions. Signed-off-by: Hans V

Re: [PATCH v12 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-15 Thread Hans Verkuil
On 15/02/18 17:39, Tim Harvey wrote: > Add support for the TDA1997x HDMI receivers. > > Cc: Hans Verkuil > Signed-off-by: Tim Harvey > --- > v12: > - fix coccinelle warnings Did you post the right version? I still see the owner being set and the other kbuild warning ('note: in expansion of mac

[PATCH 4.14 148/195] kasan: rework Kconfig settings

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit e7c52b84fb18f08ce49b6067ae6285aca79084a8 upstream. We get a lot of very large stack frames using gcc-7.0.1 with the default -fsanitize-address-use-after-scope --param asan

[PATCH 4.14 152/195] fs/proc/kcore.c: use probe_kernel_read() instead of memcpy()

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Heiko Carstens commit d0290bc20d4739b7a900ae37eb5d4cc3be2b393f upstream. Commit df04abfd181a ("fs/proc/kcore.c: Add bounce buffer for ktext data") added a bounce buffer to avoid hardened userc

[PATCH 4.14 149/195] media: dvb-frontends: fix i2c access helpers for KASAN

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit 3cd890dbe2a4f14cc44c85bb6cf37e5e22d4dd0e upstream. A typical code fragment was copied across many dvb-frontend drivers and causes large stack frames when built with with C

[PATCH 4.14 153/195] kernel/async.c: revert "async: simplify lowest_in_progress()"

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Rasmus Villemoes commit 4f7e988e63e336827f4150de48163bed05d653bd upstream. This reverts commit 92266d6ef60c ("async: simplify lowest_in_progress()") which was simply wrong: In the case where d

[PATCH 4.14 154/195] kernel/relay.c: revert "kernel/relay.c: fix potential memory leak"

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Eric Biggers commit a1be1f3931bfe0a42b46fef77a04593c2b136e7f upstream. This reverts commit ba62bafe942b ("kernel/relay.c: fix potential memory leak"). This commit introduced a double free bug

[PATCH 4.14 156/195] pipe: fix off-by-one error when checking buffer limits

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Eric Biggers commit 9903a91c763ecdae333a04a9d89d79d2b8966503 upstream. With pipe-user-pages-hard set to 'N', users were actually only allowed up to 'N - 1' buffers; and likewise for pipe-user-

Re: [PATCH v7 6/6] drm/msm: iommu: Replace runtime calls with runtime suppliers

2018-02-15 Thread Robin Murphy
On 15/02/18 04:17, Tomasz Figa wrote: [...] Could you elaborate on what kind of locking you are concerned about? As I explained before, the normally happening fast path would lock dev->power_lock only for the brief moment of incrementing the runtime PM usage counter. My bad, that's not even it.

[PATCH 4.14 129/195] media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit 169f24ca68bf0f247d111aef07af00dd3a02ae88 upstream. There is nothing wrong with using an unknown buffer type. So stop spamming the kernel log whenever this happens. The kern

[PATCH 4.14 127/195] media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit b8c601e8af2d08f733d74defa8465303391bb930 upstream. ctrl_is_pointer just hardcoded two known string controls, but that caused problems when using e.g. custom controls that u

[PATCH 4.14 126/195] media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit 8ed5a59dcb47a6f76034ee760b36e089f3e82529 upstream. The struct v4l2_plane32 should set m.userptr as well. The same happens in v4l2_buffer32 and v4l2-compliance tests for thi

[PATCH 4.14 130/195] media: v4l2-compat-ioctl32.c: dont copy back the result for certain errors

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit d83a8243aaefe62ace433e4384a4f077bed86acb upstream. Some ioctls need to copy back the result even if the ioctl returned an error. However, don't do this for the error code -

[PATCH 4.14 128/195] media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans Verkuil commit a751be5b142ef6bcbbb96d9899516f4d9c8d0ef4 upstream. put_v4l2_window32() didn't copy back the clip list to userspace. Drivers can update the clip rectangles, so this should b

[PATCH 4.14 159/195] Revert "Bluetooth: btusb: fix QCA Rome suspend/resume"

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Kai-Heng Feng commit 7d06d5895c159f64c46560dc258e553ad8670fe0 upstream. This reverts commit fd865802c66bc451dc515ed89360f84376ce1a56. This commit causes a regression on some QCA ROME chips. T

Re: [PATCH] x86/mm/kaiser: avoid 32-bit/PAE build warning

2018-02-15 Thread Arnd Bergmann
On Thu, Feb 15, 2018 at 6:43 AM, Greg KH wrote: > On Wed, Feb 14, 2018 at 11:12:24PM +0100, Arnd Bergmann wrote: >> On Wed, Dec 6, 2017 at 4:08 PM, Dave Hansen >> wrote: >> >> I also saw another warning: >> >> /git/arm-soc/arch/x86/mm/kaiser.c: In function 'kaiser_init': >> /git/arm-soc/arch/x8

[PATCH 4.14 169/195] xtensa: fix futex_atomic_cmpxchg_inatomic

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Max Filippov commit ca47480921587ae30417dd234a9f79af188e3666 upstream. Return 0 if the operation was successful, not the userspace memory value. Check that userspace value equals passed oldval

[PATCH 4.14 172/195] pinctrl: mcp23s08: fix irq setup order

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Dmitry Mastykin commit 02e389e63e3523828fc3832f27e0341885f60f6f upstream. When using mcp23s08 module with gpio-keys, often (50% of boots) it fails to get irq numbers with message: "gpio-keys k

[PATCH 4.14 174/195] pinctrl: sx150x: Register pinctrl before adding the gpiochip

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Peter Rosin commit 1a1d39e1b8dd1d0f92a79da4fcc1ab0be3ae9bfc upstream. Various gpiolib activity depend on the pinctrl to be up and kicking. Therefore, register the pinctrl before adding a gpioc

[PATCH 4.14 177/195] pktcdvd: Fix a recently introduced NULL pointer dereference

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Bart Van Assche commit 882d4171a8950646413b1a3cbe0e4a6a612fe82e upstream. Call bdev_get_queue(bdev) after bdev->bd_disk has been initialized instead of just before that pointer has been initia

[PATCH 4.14 175/195] pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Peter Rosin commit b930151e5b55a0e62a3aad06876de891ac980471 upstream. Without such a range, gpiolib fails with -EPROBE_DEFER, pending the addition of the range. So, without a range, gpiolib wi

[PATCH 4.14 181/195] lib/ubsan: add type mismatch handler for new GCC/Clang

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Andrey Ryabinin commit 42440c1f9911b4b7b8ba3dc4e90c1197bc561211 upstream. UBSAN=y fails to build with new GCC/clang: arch/x86/kernel/head64.o: In function `sanitize_boot_params': arch

Re: [PATCH-next] sched/headers: Clean up

2018-02-15 Thread Christopher Díaz Riveros
Hi Peter, thanks for the reply. El jue, 15-02-2018 a las 17:52 +0100, Peter Zijlstra escribió: > On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros > wrote: > > @@ -183,7 +183,7 @@ extern void io_schedule_finish(int token); > > extern long io_schedule_timeout(long timeout); > >

[PATCH 4.14 178/195] blk-mq: quiesce queue before freeing queue

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Ming Lei commit c2856ae2f315d754a0b6a268e4c6745b332b42e7 upstream. After queue is frozen, dispatch still may happen, for example: 1) requests are submitted from several contexts 2) requests f

[PATCH 4.14 179/195] clocksource/drivers/stm32: Fix kernel panic with multiple timers

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Daniel Lezcano commit e0aeca3d8cbaea514eb98df1149faa918f9ec42d upstream. The current code hides a couple of bugs: - The global variable 'clock_event_ddata' is overwritten each time the in

Re: [RFC PATCH 3/5] asm-generic/bitops/atomic.h: Rewrite using atomic_fetch_*

2018-02-15 Thread Peter Zijlstra
On Thu, Feb 15, 2018 at 03:29:33PM +, Will Deacon wrote: > +static inline void set_bit(unsigned int nr, volatile unsigned long *p) > +{ > + p += BIT_WORD(nr); > + atomic_long_fetch_or_relaxed(BIT_MASK(nr), (atomic_long_t *)p); > +} > > +static inline void clear_bit(unsigned int nr, vo

Re: [PATCH 2/2] perf inject: Emit instruction records on ETM trace discontinuity

2018-02-15 Thread 'Arnaldo Carvalho de Melo'
Em Thu, Feb 15, 2018 at 03:22:52PM -, Robert Walker escreveu: > > From: Arnaldo Carvalho de Melo [mailto:a...@kernel.org] > > Can you please address Mathieu's comments, and if you agree with > > them, resubmit? > Hi Arnaldo, > I've addressed Mathieu's comments and resubmitted them yester

[PATCH] cpufreq: qoriq: Delete two error messages for a failed memory allocation in qoriq_cpufreq_cpu_init()

2018-02-15 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 15 Feb 2018 18:00:37 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/cpufreq/qoriq-cpufreq.c | 8 ++-- 1 file changed, 2 insertio

[PATCH 4.14 184/195] arm64: dts: marvell: add Ethernet aliases

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Yan Markman commit 474c5885582c4a79c21bcf01ed98f98c935f1f4a upstream. This patch adds Ethernet aliases in the Marvell Armada 7040 DB, 8040 DB and 8040 mcbin device trees so that the bootloader

[PATCH 4.14 187/195] acpi, nfit: fix register dimm error handling

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Toshi Kani commit 23fbd7c70aec7600e3227eb24259fc55bf6e4881 upstream. A NULL pointer reference kernel bug was observed when acpi_nfit_add_dimm() called in acpi_nfit_register_dimms() failed. Thi

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 14/02/2018 16:16, Andy Shevchenko wrote: Another approach is to use ~0UL if that is preferable. >>> + list_for_each_entry(rentry, &resource_list, node) >>> + resources[count++] = *rentry->res; >> It has similarities with acpi_create_platform_device(). >> I guess we can u

[PATCH 4.14 190/195] mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Eric W. Biederman commit 6ac1dc736b323011a55ecd1fc5897c24c4f77cbd upstream. Setting si_code to 0 is the same a setting si_code to SI_USER which is definitely not correct. With si_code set to

Re: [PATCH 2/2] mm: Add kvmalloc_ab_c and kvzalloc_struct

2018-02-15 Thread Christopher Lameter
On Thu, 15 Feb 2018, Matthew Wilcox wrote: > I dunno. Yes, there's macro trickery going on here, but it certainly > resembles a function. It doesn't fail any of the rules laid out in that > chapter of coding-style about unacceptable uses of macros. It sure looks like a function but does magic t

[PATCH 4.14 192/195] ftrace: Remove incorrect setting of glob search field

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Steven Rostedt (VMware) commit 7b6586562708d2b3a04fe49f217ddbad0546 upstream. __unregister_ftrace_function_probe() will incorrectly parse the glob filter because it resets the search varia

Re: [PATCH v5 1/3] sched: Stop nohz stats when decayed

2018-02-15 Thread Vincent Guittot
Hi Patrick, On 15 February 2018 at 16:22, Patrick Bellasi wrote: > Hi Vincent, > here are some possible small code improvement suggestions from my side. > > Cheers Patrick > > On 14-Feb 16:26, Vincent Guittot wrote: >> > Stopped the periodic update of blocked load when all idle CPUs have fully >>

Re: [PATCH v3 0/5] crypto: ahash.c: Require export/import in ahash

2018-02-15 Thread Marek Vasut
On 02/15/2018 06:00 PM, Kamil Konieczny wrote: > > > On 15.02.2018 17:27, Marek Vasut wrote: >> On 02/15/2018 04:41 PM, Herbert Xu wrote: >>> On Thu, Jan 18, 2018 at 07:33:59PM +0100, Kamil Konieczny wrote: First four patches add empty hash export and import functions to each driver, >

[v4 2/6] x86/mm/memory_hotplug: determine block size based on the end of boot memory

2018-02-15 Thread Pavel Tatashin
Memory sections are combined into "memory block" chunks. These chunks are the units upon which memory can be added and removed. On x86 the new memory may be added after the end of the boot memory, therefore, if block size does not align with end of boot memory, memory hotplugging/hotremoving can

[PATCH 4.14 194/195] scsi: lpfc: Fix crash after bad bar setup on driver attachment

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: James Smart commit e4b9794efdce13242f4af6682f3ed48ce3864a87 upstream. In test cases where an instance of the driver is detached and reattached, the driver will crash on reattachment. There is

[v4 6/6] mm/memory_hotplug: optimize memory hotplug

2018-02-15 Thread Pavel Tatashin
During memory hotplugging we traverse struct pages three times: 1. memset(0) in sparse_add_one_section() 2. loop in __add_section() to set do: set_page_node(page, nid); and SetPageReserved(page); 3. loop in memmap_init_zone() to call __init_single_pfn() This patch remove the first two loops, a

[PATCH 4.14 162/195] signal/openrisc: Fix do_unaligned_access to send the proper signal

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Eric W. Biederman commit 500d58300571b6602341b041f97c082a461ef994 upstream. While reviewing the signal sending on openrisc the do_unaligned_access function stood out because it is obviously wr

Re: [GIT PULL] x86 PTI and Spectre related fixes and updates

2018-02-15 Thread Linus Torvalds
On Wed, Feb 14, 2018 at 9:48 PM, Greg Kroah-Hartman wrote: > > I do use it, I take the commits from there and then queue them up as > individual patches for the stable releases. > > And if it wasn't there, the conflict resolution would have to be on my > side, making them "not the same commits in

v4.16-rc1 misaligned atomics in skb__clone / __napi_alloc_skb

2018-02-15 Thread Mark Rutland
Hi, While fuzzing arm64 v4.16-rc1 with Syzkaller, I've been hitting a misaligned atomic in __skb_clone: atomic_inc(&(skb_shinfo(skb)->dataref)); .. where dataref doesn't have the required natural alignment, and the atomic operation faults. e.g. i often see it aligned to a single byte bou

[PATCH 4.14 195/195] scsi: cxlflash: Reset command ioasc

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Uma Krishnan commit 96cf727fe8f102bf92150b741db71ee39fb8c521 upstream. In the event of a command failure, cxlflash returns the failure to the upper layers to process. After processing the erro

[PATCH 4.14 166/195] alpha: Fix mixed up args in EXC macro in futex operations

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Michael Cree commit 84e455361ec97ea6037d31d42a2955628ea2094b upstream. Fix the typo (mixed up arguments) in the EXC macro in the futex definitions introduced by commit ca282f697381 (alpha: add

[PATCH 4.14 167/195] alpha: fix reboot on Avanti platform

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Mikulas Patocka commit 55fc633c41a08ce9244ff5f528f420b16b1e04d6 upstream. We need to define NEED_SRM_SAVE_RESTORE on the Avanti, otherwise we get machine check exception when attempting to reb

Re: [PATCH 05/15] ARM64: dts: Add R-Car Salvator-x M3-N support

2018-02-15 Thread Simon Horman
On Wed, Feb 14, 2018 at 02:58:34PM +0100, Geert Uytterhoeven wrote: > Hi Jacopo, > > On Tue, Feb 13, 2018 at 10:45 AM, Jacopo Mondi > wrote: > > Add initial support for R-Car M3-N Salvator-x and r8a77965 SoC in > > device tree with cpg-mssr, reset and clock nodes. > > > > Add place-holder device

[PATCH 4.14 165/195] alpha: osf_sys.c: fix put_tv32 regression

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit 47669fb6b5951d0e09fc99719653e0ac92b50b99 upstream. There was a typo in the new version of put_tv32() that caused an unguarded access of a user space pointer, and failed to

[PATCH 4.14 158/195] Bluetooth: btsdio: Do not bind to non-removable BCM43341

2018-02-15 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Hans de Goede commit b4cdaba274247c9c841c6a682c08fa91fb3aa549 upstream. BCM43341 devices soldered onto the PCB (non-removable) always (AFAICT) use an UART connection for bluetooth. But they al

[PATCH 4.15 002/202] cifs: Fix missing put_xid in cifs_file_strict_mmap

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Matthew Wilcox commit f04a703c3d613845ae3141bfaf223489de8ab3eb upstream. If cifs_zap_mapping() returned an error, we would return without putting the xid that we got earlier. Restructure cifs

[PATCH 4.15 006/202] dmaengine: dmatest: fix container_of member in dmatest_callback

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Yang Shunyong commit 66b3bd2356e0a1531c71a3dcf96944621e25c17c upstream. The type of arg passed to dmatest_callback is struct dmatest_done. It refers to test_done in struct dmatest_thread, not

[PATCH 4.15 003/202] cifs: Fix autonegotiate security settings mismatch

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Daniel N Pettersson commit 9aca7e454415f7878b28524e76bebe1170911a88 upstream. Autonegotiation gives a security settings mismatch error if the SMB server selects an SMBv3 dialect that isn't SMB

Re: [PATCH V2] posix-timers: Protect posix clock array access against speculation

2018-02-15 Thread Peter Zijlstra
On Thu, Feb 15, 2018 at 05:21:55PM +0100, Thomas Gleixner wrote: > The clockid argument of clockid_to_kclock() comes straight from user space > via various syscalls and is used as index into the posix_clocks array. > > Protect it against spectre v1 array out of bounds speculation. Remove the > red

[v4 5/6] mm/memory_hotplug: don't read nid from struct page during hotplug

2018-02-15 Thread Pavel Tatashin
During memory hotplugging the probe routine will leave struct pages uninitialized, the same as it is currently done during boot. Therefore, we do not want to access the inside of struct pages before __init_single_page() is called during onlining. Because during hotplug we know that pages in one me

[v4 3/6] mm: uninitialized struct page poisoning sanity checking

2018-02-15 Thread Pavel Tatashin
During boot we poison struct page memory in order to ensure that no one is accessing this memory until the struct pages are initialized in __init_single_page(). This patch adds more scrutiny to this checking by making sure that flags do not equal the poison pattern when they are accessed. The pat

Re: [PATCH v3 0/5] crypto: ahash.c: Require export/import in ahash

2018-02-15 Thread Kamil Konieczny
On 15.02.2018 17:27, Marek Vasut wrote: > On 02/15/2018 04:41 PM, Herbert Xu wrote: >> On Thu, Jan 18, 2018 at 07:33:59PM +0100, Kamil Konieczny wrote: >>> First four patches add empty hash export and import functions to each >>> driver, >>> with the same behaviour as in crypto framework. The la

[v4 4/6] mm/memory_hotplug: optimize probe routine

2018-02-15 Thread Pavel Tatashin
When memory is hotplugged pages_correctly_reserved() is called to verify that the added memory is present, this routine traverses through every struct page and verifies that PageReserved() is set. This is a slow operation especially if a large amount of memory is added. Instead of checking every p

[v4 1/6] mm/memory_hotplug: enforce block size aligned range check

2018-02-15 Thread Pavel Tatashin
Start qemu with the following arguments: -m 64G,slots=2,maxmem=66G -object memory-backend-ram,id=mem1,size=2G Which boots machine with 64G and adds a device mem1 with 2G that can be hotplugged later. Also make sure that .config has the following options turned on: CONFIG_MEMORY_HOTPLUG CONFIG_M

[v4 0/6] optimize memory hotplug

2018-02-15 Thread Pavel Tatashin
Changelog: v3 - v4 Addressed comments from Ingo Molnar and from Michal Hocko Splitted 4th patch into three patches Instead of using section table to save node ids, saving node id in the first page of every section. v2 - v3 Fixed two issues fo

Re: [PATCH v5 1/3] sched: Stop nohz stats when decayed

2018-02-15 Thread Patrick Bellasi
On 15-Feb 17:50, Peter Zijlstra wrote: > On Thu, Feb 15, 2018 at 03:22:47PM +, Patrick Bellasi wrote: > > > > static struct { > > > > cpumask_var_t idle_cpus_mask; > > > > atomic_t nr_cpus; > > > > + int has_blocked;/* Idle CPUS has blocked load */ > > >

[PATCH 4.15 017/202] [Variant 3/Meltdown] arm64: mm: Move ASID from TTBR0 to TTBR1

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 7655abb95386 upstream. In preparation for mapping kernelspace and userspace with different ASIDs, move the ASID to TTBR1 and update switch_mm to context-switch TTBR0 via an

[PATCH 4.15 016/202] [Variant 3/Meltdown] arm64: mm: Temporarily disable ARM64_SW_TTBR0_PAN

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 376133b7edc2 upstream. We're about to rework the way ASIDs are allocated, switch_mm is implemented and low-level kernel entry/exit is handled, so keep the ARM64_SW_TTBR0_PA

[PATCH 4.15 021/202] [Variant 3/Meltdown] arm64: mm: Allocate ASIDs in pairs

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 0c8ea531b774 upstream. In preparation for separate kernel/user ASIDs, allocate them in pairs for each mm_struct. The bottom bit distinguishes the two: if it is set, then th

[PATCH 4.15 015/202] [Variant 3/Meltdown] arm64: mm: Use non-global mappings for kernel space

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit e046eb0c9bf2 upstream. In preparation for unmapping the kernel whilst running in userspace, make the kernel mappings non-global so we can avoid expensive TLB invalidation o

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-15 Thread Sebastian Andrzej Siewior
On 2018-02-15 17:13:52 [+0100], Frederic Weisbecker wrote: > Yeah that makes sense. These workqueues are too much headaches eventually. > I'm going to try that ksoftirqd thing. I may have something for that USB problem, I just need some testing before posting… > Thanks. Sebastian

[PATCH 4.15 020/202] [Variant 3/Meltdown] arm64: mm: Fix and re-enable ARM64_SW_TTBR0_PAN

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 27a921e75711 upstream. With the ASID now installed in TTBR1, we can re-enable ARM64_SW_TTBR0_PAN by ensuring that we switch to a reserved ASID of zero when disabling user a

[PATCH 4.15 022/202] [Variant 3/Meltdown] arm64: mm: Add arm64_kernel_unmapped_at_el0 helper

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit fc0e1299da54 upstream. In order for code such as TLB invalidation to operate efficiently when the decision to map the kernel at EL0 is determined at runtime, this patch int

[PATCH 4.15 023/202] [Variant 3/Meltdown] arm64: mm: Invalidate both kernel and user ASIDs when performing TLBI

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 9b0de864b5bc upstream. Since an mm has both a kernel and a user ASID, we need to ensure that broadcast TLB maintenance targets both address spaces so that things like CoW c

[PATCH 4.15 024/202] [Variant 3/Meltdown] arm64: entry: Add exception trampoline page for exceptions from EL0

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit c7b9adaf85f8 upstream. To allow unmapping of the kernel whilst running at EL0, we need to point the exception vectors at an entry trampoline that can map/unmap the kernel o

[PATCH 4.15 026/202] [Variant 3/Meltdown] arm64: entry: Explicitly pass exception level to kernel_ventry macro

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 5b1f7fe41909 upstream. We will need to treat exceptions from EL0 differently in kernel_ventry, so rework the macro to take the exception level as an argument and construct

[PATCH 4.15 028/202] [Variant 3/Meltdown] arm64: erratum: Work around Falkor erratum #E1003 in trampoline code

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit d1777e686ad1 upstream. We rely on an atomic swizzling of TTBR1 when transitioning from the entry trampoline to the kernel proper on an exception. We can't rely on this atom

[PATCH 1/3] x86/Kconfig : Add missing i586-class cpus to X86_CMPXCHG64 Kconfig group

2018-02-15 Thread Matthew Whitehead
Several i586-class cpus supporting this instruction are missing from the X86_CMPXCHG64 config group. Using a configuration with either M586TSC or M586MMX currently sets X86_MINIMUM_CPU_FAMILY=4 instead of the correct value 5. Booting on an i486 it will fail to generate the "This kernel requires a

Re: [PATCH v3 2/5] arm64: dts: renesas: r8a77995: add VSP instances

2018-02-15 Thread Simon Horman
On Thu, Feb 15, 2018 at 04:41:58PM +, Kieran Bingham wrote: > Hi Simon, > > On 15/02/18 16:33, Simon Horman wrote: > > On Wed, Feb 14, 2018 at 09:55:05AM +, Kieran Bingham wrote: > >> From: Kieran Bingham > >> > >> The r8a77995 has a VSPBS to support image processing such as blending of >

[PATCH 4.15 030/202] [Variant 3/Meltdown] arm64: tls: Avoid unconditional zeroing of tpidrro_el0 for native tasks

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 18011eac28c7 upstream. When unmapping the kernel at EL0, we use tpidrro_el0 as a scratch register during exception entry from native tasks and subsequently zero it in the k

[PATCH 2/3] x86/Kconfig : Exclude i586-class cpus lacking PAE support from HIGHMEM64G Kconfig group

2018-02-15 Thread Matthew Whitehead
i586-class machines also lack support for Physical Address Extension (PAE), so add them to the exclusion list Signed-off-by: Matthew Whitehead --- arch/x86/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 72d5149..89bf3fa 10064

[PATCH 3/3] x86/Kconfig : Explicitly enumerate i686-class cpus in Kconfig

2018-02-15 Thread Matthew Whitehead
The X86_P6_NOP config class leaves out many i686-class cpus. Instead, explicitly enumerate all these cpus. Using a configuration with M686 currently sets X86_MINIMUM_CPU_FAMILY=5 instead of the correct value 6. Booting on an i586 it will fail to generate the "This kernel requires an i686 CPU, but

Re: [PATCH 06/15] Documentation: devicetree: dma: Add r8a77965 dmac

2018-02-15 Thread Simon Horman
On Tue, Feb 13, 2018 at 10:45:53AM +0100, Jacopo Mondi wrote: > Add documentation for r8a77965 compatible string to rcar-dmac device > tree bindings documentation. > > Signed-off-by: Jacopo Mondi Reviewed-by: Simon Horman

[PATCH 4.15 032/202] [Variant 3/Meltdown] arm64: kaslr: Put kernel vectors address in separate data page

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 6c27c4082f4f upstream. The literal pool entry for identifying the vectors base is the only piece of information in the trampoline page that identifies the true location of

Re: [PATCH RFC v2 5/6] x86: Use global pages when PTI is disabled

2018-02-15 Thread Dave Hansen
On 02/15/2018 08:36 AM, Nadav Amit wrote: > As long as PTI is disabled, it is possible to use global pages, as long > as we remove them once PTI is enabled again. To do so, return the global > bit to __supported_pte_mask and disable global pages using CR4. > > Signed-off-by: Nadav Amit > --- > a

[PATCH 4.15 035/202] [Variant 3/Meltdown] arm64: Kconfig: Reword UNMAP_KERNEL_AT_EL0 kconfig entry

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 0617052ddde3 upstream. Although CONFIG_UNMAP_KERNEL_AT_EL0 does make KASLR more robust, it's actually more useful as a mitigation against speculation attacks that can leak

[PATCH 4.15 034/202] [Variant 3/Meltdown] arm64: Kconfig: Add CONFIG_UNMAP_KERNEL_AT_EL0

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 084eb77cd3a8 upstream. Add a Kconfig entry to control use of the entry trampoline, which allows us to unmap the kernel whilst running in userspace and improve the robustnes

[PATCH 4.15 036/202] [Variant 3/Meltdown] arm64: Take into account ID_AA64PFR0_EL1.CSV3

2018-02-15 Thread Greg Kroah-Hartman
4.15-stable review patch. If anyone has any objections, please let me know. -- From: Will Deacon Commit 179a56f6f9fb upstream. For non-KASLR kernels where the KPTI behaviour has not been overridden on the command line we can use ID_AA64PFR0_EL1.CSV3 to determine whether or no

Re: [PATCH-next] sched/headers: Clean up

2018-02-15 Thread Peter Zijlstra
On Thu, Feb 15, 2018 at 10:43:18AM -0500, Christopher Diaz Riveros wrote: > @@ -183,7 +183,7 @@ extern void io_schedule_finish(int token); > extern long io_schedule_timeout(long timeout); > extern void io_schedule(void); > > -/** > +/* > * struct prev_cputime - snapshot of system and user cpu

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