[PATCH 26/32] selftest/timens: Add a test for clock_nanosleep()

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Check that clock_nanosleep() takes into account clock offsets. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- .../selftests/timens/clock_nanosleep.c

[PATCH 30/32] selftest/timens: Check that a right vdso is mapped after fork and exec

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/exec.c | 91 +++ 3 files changed, 93 insertions(+), 1 del

[PATCH 29/32] selftests: Add a simple perf test for clock_gettime()

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 8 +- tools/testing/selftests/timens/gettime_perf.c | 74 +++ .../selftests/timens/gettime_per

[PATCH 32/32] x86/vdso: Restrict splitting VVAR VMA

2019-02-05 Thread Dmitry Safonov
Although, time namespace can work with VVAR VMA split, it seems worth to forbid splitting VVAR resulting in stricter ABI and reducing amount of corner-cases to consider while working further on VDSO. I don't think there is any use-case for partial mremap() of vvar, but it there is - this patch can

[PATCH 31/32] x86/vdso: Align VDSO functions by CPU L1 cache line

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin After performance testing VDSO patches a noticeable 20% regression was found on gettime_perf selftest with a cold cache. As it turns to be, before time namespaces introduction, VDSO functions were quite aligned to cache lines, but adding a new code to adjust timens offset insid

[PATCH 22/32] timens: Add align for timens_offsets

2019-02-05 Thread Dmitry Safonov
Align offsets so that time namespace will work for ia32 applications on x86_64 host. Signed-off-by: Dmitry Safonov --- include/linux/timens_offsets.h | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/linux/timens_offsets.h b/include/linux/timens_offsets.h

[PATCH 21/32] x86/vdso: Switch image on setns()/unshare()/clone()

2019-02-05 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of introd

[PATCH 28/32] selftest/timens: Add timer offsets test

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Check that timer_create() takes into account clock offsets. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 3 +- tools/testing/selftests/timens/timer.c| 115 +

[PATCH 27/32] selftest/timens: Add procfs selftest

2019-02-05 Thread Dmitry Safonov
Check that /proc/uptime is correct inside a new time namespace. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/proc

[PATCH 25/32] selftest/timens: Add a test for timerfd

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Check that timerfd_create() takes into account clock offsets. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- tools/testing/selftests/timens/.gitignore | 1 + tools/testing/selftests/timens/Makefile | 2 +- tools/testing/selftests/timens/timerfd.c | 119

[PATCH 16/32] x86/vdso: Generate vdso{,32}-timens.lds

2019-02-05 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of introd

[PATCH 17/32] x86/vdso2c: Sort vdso entries by addresses for linker script

2019-02-05 Thread Dmitry Safonov
There are two linker scripts for vdso .so(s): - *-timens.lds for building vdso for processes inside time namespace (it has bigger functions and needs to build firstly) - *.lds for host processes vdso (it has smaller functions and entry addresses should be adjusted with the linker script magic

[PATCH 23/32] timens/fs/proc: Introduce /proc/pid/timens_offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin API to set time namespace offsets for children processes, i.e.: echo "clockid off_ses off_nsec" > /proc/self/timens_offsets Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- fs/proc/base.c | 101 + include/linux/ti

[PATCH 20/32] x86/vdso: Initialize timens 64-bit vdso

2019-02-05 Thread Dmitry Safonov
Initialize both 64-bit VDSO(s): host .so and timens one that has code for adding timens offsets. Signed-off-by: Dmitry Safonov --- arch/x86/entry/vdso/vma.c | 4 arch/x86/include/asm/vdso.h | 6 ++ 2 files changed, 10 insertions(+) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/en

[PATCH 18/32] x86/vdso.lds: Align !timens (host's) vdso.so entries

2019-02-05 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of introd

[PATCH 19/32] x86/vdso2c: Align LOCAL symbols between vdso{-timens,}.so

2019-02-05 Thread Dmitry Safonov
Align not only VDSO entries as on timens VDSO, but also addresses of local functions. Otherwise, ld will put them after everything else into *(.text*). That will result in common VDSO size bigger than timens VDSO size (sic!). Unfortunately, filtering by STB_WEAK doesn't work for ia32 VDSO: by some

[PATCH 15/32] x86/vdso2c: Optionally produce linker script for vdso entries

2019-02-05 Thread Dmitry Safonov
Two VDSO images (with/without code for adding offsets inside timens) should be compatible by VDSO function offsets - this way kernel can remap VDSO VMA for a task without fixupping GOT/PLT. Add an optional parameter for vdso2c to generate .entries file from vdso.so. As timens VDSO by nature is big

[PATCH 13/32] x86/vdso: Build timens .so(s)

2019-02-05 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of introd

[PATCH 07/32] timens/kernel: Take into account timens clock offsets in clock_nanosleep

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Wire up clock_nanosleep() to timens offsets. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- kernel/time/hrtimer.c | 8 1 file changed, 8 insertions(+) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index f5cfa1b73d6f..47345aea406d 100644

[PATCH 10/32] x86/vdso2c: Convert iterator to unsigned

2019-02-05 Thread Dmitry Safonov
i and j are used everywhere with unsigned types. Cleanup and prettify the code a bit. Introduce syms_nr for readability and as a preparation for allocating an array of vDSO entries that will be needed for creating two vdso .so's: one for host tasks and another for processes inside time namespace.

[PATCH 01/32] ns: Introduce Time Namespace

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Time Namespace isolates clock values. The kernel provides access to several clocks CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_BOOTTIME, etc. CLOCK_REALTIME System-wide clock that measures real (i.e., wall-clock) time. CLOCK_MONOTONIC Clock that cannot be set and repr

[PATCH 12/32] x86/vdso/timens: Add offsets page in vvar

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin As modern applications fetch time from VDSO without entering the kernel, it's needed to provide offsets for userspace code inside time namespace. A page for timens offsets is allocated on time namespace construction. Put that page into VVAR for tasks inside timens and zero pag

[PATCH 14/32] x86/VDSO: Build VDSO with -ffunction-sections

2019-02-05 Thread Dmitry Safonov
As it has been discussed on timens RFC, adding a new conditional branch `if (inside_time_ns)` on VDSO for all processes is undesirable. It will add a penalty for everybody as branch predictor may mispredict the jump. Also there are instruction cache lines wasted on cmp/jmp. Those effects of introd

[PATCH 05/32] timerfd/timens: Take into account ns clock offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Make timerfd respect timens offsets. Provide two helpers timens_clock_to_host() timens_clock_from_host() that are useful to wire up timens to different kernel subsystems. Following patches will use timens_clock_from_host(), added here for completeness. Signed-off-by: Andrei Va

[PATCH 02/32] timens: Add timens_offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Introduce offsets for time namespace. They will contain an adjustment needed to convert clocks to/from host's. Allocate one page for each time namespace that will be premapped into userspace among vvar pages. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- MA

[PATCH 09/32] x86/vdso2c: Correct err messages on file opening

2019-02-05 Thread Dmitry Safonov
err() message in main() is misleading: it should print `outfilename`, which is argv[3], not argv[2]. Correct error messages to be more precise about what failed and for which file. Signed-off-by: Dmitry Safonov --- arch/x86/entry/vdso/vdso2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH 08/32] timens: Shift /proc/uptime

2019-02-05 Thread Dmitry Safonov
Respect boottime inside time namespace for /proc/uptime Signed-off-by: Dmitry Safonov --- fs/proc/uptime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/proc/uptime.c b/fs/proc/uptime.c index a4c2791ab70b..4421ec058472 100644 --- a/fs/proc/uptime.c +++ b/fs/proc/uptime.c @@ -5,6 +5,7

[PATCH 03/32] timens: Introduce CLOCK_MONOTONIC offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Add monotonic time virtualisation for time namespace. Introduce timespec for monotionic clock into timens offsets and wire clock_gettime() syscall. Signed-off-by: Andrei Vagin Co-developed-by: Dmitry Safonov Signed-off-by: Dmitry Safonov --- include/linux/time_namespace.h

[PATCH 06/32] posix-timers/timens: Take into account clock offsets

2019-02-05 Thread Dmitry Safonov
From: Andrei Vagin Wire timer_settime() syscall into time namespace virtualization. Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov --- kernel/time/posix-timers.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/ti

linux-next: manual merge of the drm-intel tree with the drm tree

2019-02-05 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/i915_pci.c between commit: fcd70cd36b9b ("drm: Split out drm_probe_helper.h") from the drm tree and commit: 5f5c139d6900 ("drm/i915: Allocate active tracking nodes from a slabcache") from the

Re: [PATCH] Input: gpio-keys - Add shutdown callback

2019-02-05 Thread Dmitry Torokhov
On Tue, Feb 05, 2019 at 02:02:49PM -0800, Florian Fainelli wrote: > On 2/1/19 11:24 AM, Florian Fainelli wrote: > > On some platforms (e.g.: ARCH_BRCMSTB) it is possible to enter > > "poweroff" while leaving some wake-up sources enabled such as key > > presses in order to allow for the system to wa

Re: [PATCH 3/7] thermal: mediatek: add calibration item

2019-02-05 Thread Eduardo Valentin
On Mon, Feb 04, 2019 at 06:31:41PM +0100, Matthias Brugger wrote: > > > On 01/02/2019 08:38, michael@mediatek.com wrote: > > From: Michael Kao > > > > Add calibration item in thermal_data to support > > the project with different calibration coefficient. > > > > Signed-off-by: Michael Kao

Re: compile error at sun6i_video

2019-02-05 Thread Kuninori Morimoto
Hi Sakari Cc Niklas Thank you for your feedback > > /opt/RB02197/home/morimoto/save/WORK/linux/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c: > > In function 'sun6i_video_start_streaming': > > /opt/RB02197/home/morimoto/save/WORK/linux/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.

Re: [PATCH 4/7] thermal: mediatek: add thermal controller offset

2019-02-05 Thread Eduardo Valentin
On Fri, Feb 01, 2019 at 03:38:10PM +0800, michael@mediatek.com wrote: > From: Michael Kao > > One thermal controller can read four sensors at most, > so we need to add controller_offset for the project with > more than four sensors to reuse the same register settings. > > Signed-off-by: Mich

Re: [PATCH v3 2/3] Input: add new vibrator driver for various MSM SOCs

2019-02-05 Thread Brian Masney
On Tue, Feb 05, 2019 at 11:42:46AM -0800, Dmitry Torokhov wrote: > > + dev_err(&pdev->dev, "Failed to lookup pwm clock: %ld\n", > > + PTR_ERR(vibrator->clk)); > > + return PTR_ERR(vibrator->clk); > > + } > > + > > + res = platform_get_resource(pdev, IORESOU

RE: [PATCH] libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family

2019-02-05 Thread Dexuan Cui
> From: Dan Williams > Sent: Tuesday, February 5, 2019 9:12 AM > On Tue, Feb 5, 2019 at 8:53 AM Dexuan Cui wrote: > > > > > From: Dan Williams > > > Sent: Sunday, February 3, 2019 11:14 AM > > > > ... > > > > As I understand, the essence of the issue is: Hyper-V emulates the > > > > label mechan

Re: [PATCH RESEND] PCI: Check for USB xHCI class for HAPS platform

2019-02-05 Thread John Youn
On 02/05/2019 03:32 PM, Bjorn Helgaas wrote: [+cc Richard, Lucas] On Tue, Feb 05, 2019 at 01:04:28PM -0800, Thinh Nguyen wrote: The Synopsys HAPS USB controller has a VID PID (16c3,abcd) that matches to an existing PCIe controller. This quirk is intended for USB HAPS devices only. To fix this,

Re: [PATCH v1] binderfs: remove separate device_initcall()

2019-02-05 Thread Todd Kjos
On Wed, Jan 30, 2019 at 4:25 PM Christian Brauner wrote: > > binderfs should not have a separate device_initcall(). When a kernel is > compiled with CONFIG_ANDROID_BINDERFS register the filesystem alongside > CONFIG_ANDROID_IPC. This use-case is especially sensible when users specify > CONFIG_ANDR

Re: linux-next: tracebacks in workqueue.c/__flush_work()

2019-02-05 Thread Rusty Russell
Tetsuo Handa writes: > (Adding Chris Metcalf and Rusty Russell.) > > If NR_CPUS == 1 due to CONFIG_SMP=n, for_each_cpu(cpu, &has_work) loop does > not > evaluate "struct cpumask has_work" modified by cpumask_set_cpu(cpu, > &has_work) at > previous for_each_online_cpu() loop. Guenter Roeck found

Re: [REGRESSION 4.20-rc1] 45975c7d21a1 ("rcu: Define RCU-sched API in terms of RCU for Tree RCU PREEMPT builds")

2019-02-05 Thread tomli
> OK, thanks. This looks slightly different from the Loongson problem: > > - In Loongson, we don't get stuck in RCU, but in > cpufreq_dbs_governor_stop -> irq_work_sync(). > > - I run non-preemptible kernel, and my system still gets stuck. > > What is common is that it's UP with i8259 PIC. >

[PATCH v4 0/3] ARM: qcom: add vibrator support for various MSM SOCs

2019-02-05 Thread Brian Masney
This patch set adds support for the vibrator found on various Qualcomm MSM SOCs. This is based on work from: Jonathan Marek from qcom,pwm-vibrator.c in the PostmarketOS repo: https://gitlab.com/postmarketOS/linux-postmarketos/commit/7647fb36cb1cbd060f8b52087a68ab93583292b5 Jongrak Kwon and Devin

[PATCH v4 1/3] dt-bindings: Input: new bindings for MSM vibrator

2019-02-05 Thread Brian Masney
This patch adds the device tree bindings for the vibrator found on various Qualcomm MSM SOCs. Signed-off-by: Brian Masney Reviewed-by: Rob Herring --- Changes since v3: - None .../bindings/input/msm-vibrator.txt | 36 +++ 1 file changed, 36 insertions(+) create mode

Re: [PATCH v5 05/10] soc: qcom: Add AOSS QMP communication driver

2019-02-05 Thread Bjorn Andersson
On Fri 01 Feb 15:36 PST 2019, Doug Anderson wrote: > Hi, > > On Wed, Jan 30, 2019 at 4:40 PM Bjorn Andersson > wrote: > > +++ b/drivers/soc/qcom/aoss-qmp.c > > @@ -0,0 +1,317 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Copyright (c) 2018, Linaro Ltd > > + */ > > +#include > > +#

[PATCH v4 3/3] ARM: dts: qcom: msm8974-hammerhead: add device tree bindings for vibrator

2019-02-05 Thread Brian Masney
This patch adds device device tree bindings for the vibrator found on the LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney --- Changes since v3: - None .../qcom-msm8974-lge-nexus5-hammerhead.dts| 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/

[PATCH v4 2/3] Input: add new vibrator driver for various MSM SOCs

2019-02-05 Thread Brian Masney
This patch adds a new vibrator driver that supports various Qualcomm MSM SOCs. Driver was tested on a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney --- Changes since v3: - Made msm_vibrator_write a function instead of a macro. - Check for -EPROBE_DEFER for gpio and clk for consistenc

[PATCH] phy: Variable "caldone" in function rockchip_emmc_phy_power() could be uninitialized

2019-02-05 Thread Yizhuo
In function rockchip_emmc_phy_power(), local variable "caldone" could be uninitialized if function regmap_read() returns -EINVAL. However, it will be used directly in the later context, which is potentially unsafe. Signed-off-by: Yizhuo --- drivers/phy/rockchip/phy-rockchip-emmc.c | 10 -

Re: [PATCH RESEND] PCI: Check for USB xHCI class for HAPS platform

2019-02-05 Thread Bjorn Helgaas
On Tue, Feb 05, 2019 at 05:01:18PM -0800, John Youn wrote: > On 02/05/2019 03:32 PM, Bjorn Helgaas wrote: > > On Tue, Feb 05, 2019 at 01:04:28PM -0800, Thinh Nguyen wrote: > > > The Synopsys HAPS USB controller has a VID PID (16c3,abcd) that matches > > > to an existing PCIe controller. This quirk

Re: libelf-0.175 breaks objtool

2019-02-05 Thread Josh Poimboeuf
On Tue, Feb 05, 2019 at 01:38:21PM -0500, Steven Rostedt wrote: > Just a FYI. > > After a recent upgrade in debian testing, I was not able to build the > kernel. I have a custom build of gcc, so I thought it was strange that > I was getting something like this (took this from the web, as I don't >

[PATCH] phy: rockchip-typec: Variable "val" of function rockchip_usb3_phy_power_on() could be uninitialized

2019-02-05 Thread Yizhuo
In function rockchip_usb3_phy_power_on(), local variable "val" could be uninitialized if function regmap_read() returns -EINVAL. However, this value is directly used in later context. This is potentially unsafe. Signed-off-by: Yizhuo --- drivers/phy/rockchip/phy-rockchip-typec.c | 5 - 1 fil

Re: [PATCH] checkpatch: Verify SPDX comment style

2019-02-05 Thread Joe Perches
On Tue, 2019-02-05 at 14:21 -0800, Andrew Morton wrote: > On Thu, 10 Jan 2019 16:05:11 -0800 Joe Perches wrote: > > > Using SPDX commenting style // or /* is specified for > > various file types in Documentation/process/license-rules.rst > > so add an appropriate test for .[chsS] files because ma

Re: [PATCH v2 2/2] r8169: Avoid pointer aliasing

2019-02-05 Thread Paul Zimmerman
On Tue, 2019-02-05, Joe Perches wrote: > On Tue, 2019-02-05 at 12:04 -0800, Eric Dumazet wrote: >> >> On 02/05/2019 10:42 AM, Joe Perches wrote: >> > It's declared after a pointer so it is already is 2 byte aligned. >> > >> > A lot of drivers wouldn't work otherwise. >> >> Maybe these drivers ar

[PATCH v4 1/1] psi: introduce psi monitor

2019-02-05 Thread Suren Baghdasaryan
Psi monitor aims to provide a low-latency short-term pressure detection mechanism configurable by users. It allows users to monitor psi metrics growth and trigger events whenever a metric raises above user-defined threshold within user-defined time window. Time window and threshold are both expres

Re: [PATCH 1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-02-05 Thread Balbir Singh
On Tue, Feb 5, 2019 at 10:24 PM Michael Ellerman wrote: > > Balbir Singh writes: > > On Sat, Feb 2, 2019 at 12:14 PM Balbir Singh wrote: > >> > >> On Tue, Jan 22, 2019 at 10:57:21AM -0500, Joe Lawrence wrote: > >> > From: Nicolai Stange > >> > > >> > The ppc64 specific implementation of the rel

Re: [PATCH] psi: fix aggregation idle shut-off

2019-02-05 Thread Suren Baghdasaryan
Hi Andrew, On Mon, Jan 28, 2019 at 3:06 PM Andrew Morton wrote: > > On Wed, 16 Jan 2019 14:35:01 -0500 Johannes Weiner wrote: > > > psi has provisions to shut off the periodic aggregation worker when > > there is a period of no task activity - and thus no data that needs > > aggregating. However

Re: [PATCH v2 2/2] r8169: Avoid pointer aliasing

2019-02-05 Thread Joe Perches
On Tue, 2019-02-05 at 19:27 -0700, Paul Zimmerman wrote: > On Tue, 2019-02-05, Joe Perches wrote: > > On Tue, 2019-02-05 at 12:04 -0800, Eric Dumazet wrote: > > > On 02/05/2019 10:42 AM, Joe Perches wrote: > > > > It's declared after a pointer so it is already is 2 byte aligned. > > > > > > > > A

Re: [PATCH] powerpc/powernv/npu: Remove redundant change_pte() hook

2019-02-05 Thread Balbir Singh
On Tue, Feb 5, 2019 at 2:52 PM Alistair Popple wrote: > > On Thursday, 31 January 2019 12:11:06 PM AEDT Andrea Arcangeli wrote: > > On Thu, Jan 31, 2019 at 06:30:22PM +0800, Peter Xu wrote: > > > The change_pte() notifier was designed to use as a quick path to > > > update secondary MMU PTEs on wr

Re: [PATCH v2] exec: don't force_sigsegv processes with a pending fatal signal

2019-02-05 Thread Ivan Delalande
On Tue, Feb 05, 2019 at 01:11:19PM -0800, Andrew Morton wrote: > On Mon, 4 Feb 2019 18:53:08 -0800 Ivan Delalande wrote: > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -1660,7 +1660,12 @@ int search_binary_handler(struct linux_binprm *bprm) > > if (retval < 0 && !bprm->mm) { > >

[PATCH] phy: Variable "val" in function miphy_osc_is_ready() could be uninitialized

2019-02-05 Thread Yizhuo
In function miphy_osc_is_ready(), local variable "val" could be uninitalized. if function regmap_read() returns -EINVAL. However, this value is used in if statement. This is potentially unsafe. Signed-off-by: Yizhuo --- drivers/phy/st/phy-miphy28lp.c | 7 +-- 1 file changed, 5 insertions(+),

Re: [PATCH v2 2/2] r8169: Avoid pointer aliasing

2019-02-05 Thread Paul Zimmerman
On Tue, 05 Feb 2019 18:52:18 -0800, Joe Perches wrote: > On Tue, 2019-02-05 at 19:27 -0700, Paul Zimmerman wrote: >> On Tue, 2019-02-05, Joe Perches wrote: >>> On Tue, 2019-02-05 at 12:04 -0800, Eric Dumazet wrote: >>> > On 02/05/2019 10:42 AM, Joe Perches wrote: >>> > > It's declared after a poin

Re: KASAN: use-after-free Read in __wake_up_common_lock

2019-02-05 Thread Dmitry Vyukov
On Wed, Jan 30, 2019 at 10:02 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:62967898789d Merge git://git.kernel.org/pub/scm/linux/kern.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10f0bf08c0 > kernel config:

[PATCH] phy: Variable "val" in function miphy_osc_is_ready() could be uninitialized

2019-02-05 Thread Yizhuo
In function miphy_osc_is_ready(), local variable "val" could be uninitalized. if function regmap_read() returns -EINVAL. However, this value is used in if statement. This is potentially unsafe. Signed-off-by: Yizhuo --- drivers/phy/st/phy-miphy28lp.c | 7 +-- 1 file changed, 5 insertions(+),

[PATCH 4/9] ARM: dts: sun9i: cubieboard4: Add GPIO pin-bank regulator supplies

2019-02-05 Thread Chen-Yu Tsai
The Cubieboard 4 has the PMIC providing voltage to all the pin-bank supply rails from its various regulator outputs. All pin-banks that have supply rails are accounted for. PN pin-bank does not have a supply rail. Also remove any "regulator-always-on" properties from regulators that were only mark

[PATCH 7/9] ARM: dts: sun9i: Add A80 GMAC RGMII pinmux setting

2019-02-05 Thread Chen-Yu Tsai
The GMAC (gigabit ethernet controller) supports RGMII to connect to the ethernet PHY, for gigabit network speeds. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun9i-a80.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/d

[PATCH 5/9] ARM: dts: sun9i: Add GMAC clock node

2019-02-05 Thread Chen-Yu Tsai
The A80 has the same DWMAC hardware as on earlier Allwinner SoCs. The accompanying GMAC clock register has been moved into the "System Control" area. Add a clock node for it. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun9i-a80.dtsi | 31 +++ 1 file changed, 3

[PATCH 9/9] ARM: dts: sun9i: cubieboard4: Enable GMAC

2019-02-05 Thread Chen-Yu Tsai
The Cubieboard4 has a Realtek RTL8211E ethernet PHY which uses RGMII to talk to the MAC. The PHY is powered by 2 regulators: cldo1 for the PHY's core logic and gpio1-ldo for I/O. The latter also powers the SoC side pins. As there is no binding to model a second regulator supply for the PHY, it is o

[PATCH 2/9] ARM: dts: sun9i: a80-optimus: Add node for AXP809's unused dc1sw regulator

2019-02-05 Thread Chen-Yu Tsai
The DC1SW output from the AXP809 is unused. Unused regulators should still be listed so as to be considered to be fully constrained. Fixes: aa4a27bc819e ("ARM: dts: sun9i: a80-optimus: Add AXP809 PMIC device node and regulators") Signed-off-by: Chen-Yu Tsai --- arch/arm/boo

[PATCH 8/9] ARM: dts: sun9i: a80-optimus: Enable GMAC

2019-02-05 Thread Chen-Yu Tsai
The A80 Optimus has a Realtek RTL8211E ethernet PHY which uses RGMII to talk to the MAC. The PHY is powered by 2 regulators: cldo1 for the PHY's core logic and gpio1-ldo for I/O. The latter also powers the SoC side pins. As there is no binding to model a second regulator supply for the PHY, it is o

[PATCH 1/9] pinctrl: sunxi: Support I/O bias voltage setting on A80

2019-02-05 Thread Chen-Yu Tsai
The A80 SoC has configuration registers for I/O bias voltage. Incorrect settings would make the affected peripherals inoperable in some cases, such as Ethernet RGMII signals biased at 2.5V with the settings still at 3.3V. However low speed signals such as MDIO on the same group of pins seem to be u

[PATCH 6/9] ARM: dts: sun9i: Add A80 GMAC gigabit ethernet controller node

2019-02-05 Thread Chen-Yu Tsai
The A80 has the same GMAC found on the A31 SoC. Add a device node, and an alias for it. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun9i-a80.dtsi | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/sun9i-a80.dtsi b/arch/arm/boot/dts/sun9i-a80.dtsi

[PATCH 0/9] ARM: sun9i: a80: Enable GMAC

2019-02-05 Thread Chen-Yu Tsai
Hi everyone, On the Allwinner A80, the PIO pin controller includes configuration registers to set the I/O voltage. These must match the actual voltage provided externally. A mismatch results in signals not being passed through. With the new PIO pin-bank regulator supply support in place, we can t

[PATCH 3/9] ARM: dts: sun9i: a80-optimus: Add GPIO pin-bank regulator supplies

2019-02-05 Thread Chen-Yu Tsai
The A80 Optimus has the PMIC providing voltage to all the pin-bank supply rails from its various regulator outputs. All pin-banks that have supply rails are accounted for. PN pin-bank does not have a supply rail. Also remove any "regulator-always-on" properties from regulators that were only marke

Re: KASAN: use-after-free Read in __wake_up_common_lock

2019-02-05 Thread Eric Dumazet
On 02/05/2019 07:28 PM, Dmitry Vyukov wrote: > On Wed, Jan 30, 2019 at 10:02 PM syzbot > wrote: >> >> Hello, >> >> syzbot found the following crash on: >> >> HEAD commit:62967898789d Merge git://git.kernel.org/pub/scm/linux/kern.. >> git tree: upstream >> console output: https://syzka

[PATCH -next] mm/compaction: no stuck in __reset_isolation_pfn()

2019-02-05 Thread Qian Cai
The commit c68d77911c23 ("mm, compaction: be selective about what pageblocks to clear skip hints") introduced an infinite loop if a pfn is invalid, it will loop again without increasing page counters. It can be reproduced by running LTP tests on an arm64 server. # oom01 (swapping) # hugemmap01 t

Re: [PATCH v2 2/2] r8169: Avoid pointer aliasing

2019-02-05 Thread Joe Perches
On Tue, 2019-02-05 at 20:25 -0700, Paul Zimmerman wrote: > GCC does not lay out stack variables in the same order that they are > declared. True. Most stack variables could be assigned to a register. cheers, Joe

Re: linux-next: Fixes tag needs some work in the scsi-fixes tree

2019-02-05 Thread Vaibhav Jain
Stephen Rothwell writes: > Hi Martin, > > In commit > > bb61b843ffd4 ("scsi: cxlflash: Prevent deadlock when adapter probe fails") > > Fixes tag > > Fixes: c21e0bbfc485("cxlflash: Base support for IBM CXL Flash Adapter") > > has these problem(s): > > - missing space between the SHA1 and the

Re: linux-next: Fixes tag needs some work in the scsi-fixes tree

2019-02-05 Thread Stephen Rothwell
Hi Vaibhav, On Wed, 06 Feb 2019 09:25:12 +0530 Vaibhav Jain wrote: > > Martin, should I resend the patch with this fixed ? I wouldn't bother, it is a really picky report (I almost didn't send it) :-) Consider it just a reminder for next time. -- Cheers, Stephen Rothwell pgpwFIft3qTrz.pgp Des

Re: [PATCH 1/1] Fix: arm: kprobes: optimized kprobes illegal instruction

2019-02-05 Thread Masami Hiramatsu
On Tue, 5 Feb 2019 10:37:40 -0500 Mathieu Desnoyers wrote: > commit e46daee53bb5 ("ARM: 8806/1: kprobes: Fix false positive with > FORTIFY_SOURCE") introduced a regression in optimized kprobes. It > triggers "invalid instruction" oopses when using kprobes instrumentation > through lttng and perf

Re: BUG: optimized kprobes illegal instructions in v4.19 stable kernels

2019-02-05 Thread Masami Hiramatsu
On Tue, 5 Feb 2019 15:06:10 + Kees Cook wrote: > On Mon, Feb 4, 2019 at 7:15 PM Mathieu Desnoyers > wrote: > > > > Hi, > > > > I notice this commit as a possible culprit of the illegal instructions my > > lttng > > users are noticing on arm32 when using kprobes on a v4.19.13 Linux kernel >

Re: [PATCH 1/4] powerpc/64s: Clear on-stack exception marker upon exception return

2019-02-05 Thread Michael Ellerman
Balbir Singh writes: > On Tue, Feb 5, 2019 at 10:24 PM Michael Ellerman wrote: >> Balbir Singh writes: >> > On Sat, Feb 2, 2019 at 12:14 PM Balbir Singh wrote: >> >> On Tue, Jan 22, 2019 at 10:57:21AM -0500, Joe Lawrence wrote: >> >> > From: Nicolai Stange >> >> > >> >> > The ppc64 specific im

Re: [PATCH 1/2] cpufreq: qcom-hw: Register an Energy Model

2019-02-05 Thread Viresh Kumar
On 05-02-19, 09:52, Matthias Kaehlcke wrote: > Try and register an Energy Model from qcom-cpufreq-hw to allow > interested sub-systems like the task scheduler to use the provided > information. > > Signed-off-by: Matthias Kaehlcke > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 2 ++ > 1 file change

[PATCH -next] x86_64: tidy up KASAN_EXTRA

2019-02-05 Thread Qian Cai
The commit 585a4c1f9978 ("kasan: remove use after scope bugs detection.") removed KASAN_EXTRA, so tidy up leftovers. Signed-off-by: Qian Cai --- arch/x86/include/asm/page_64_types.h | 4 1 file changed, 4 deletions(-) diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/as

BUG: spinlock bad magic in __queue_work

2019-02-05 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:962c382d482a Merge tag 'mac80211-next-for-davem-2019-02-01.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=169299f8c0 kernel config: https://syzkaller.appspot.com/x/.config?x=33ad02b9305759c3 da

KASAN: use-after-free Read in tcp_sk_exit

2019-02-05 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:33a0efa4baec devlink: Use DIV_ROUND_UP_ULL in DEVLINK_HEAL.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=14e2e55f40 kernel config: https://syzkaller.appspot.com/x/.config?x=505743eba4e4f68 das

KASAN: slab-out-of-bounds Read in ip_send_unicast_reply

2019-02-05 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:b71acb0e3721 Merge branch 'linus' of git://git.kernel.org/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=11a6994b40 kernel config: https://syzkaller.appspot.com/x/.config?x=b03c5892bb940c76 da

[PATCH v6 6/8] soc: qcom: Add AOSS QMP genpd provider

2019-02-05 Thread Bjorn Andersson
The AOSS QMP genpd provider implements control over power-related resources related to low-power state associated with the remoteprocs in the system as well as control over a set of clocks related to debug hardware in the SoC. Tested-by: Sibi Sankar Tested-by: Sai Prakash Ranjan Reviewed-by: Sib

[PATCH v6 8/8] arm64: dts: qcom: sdm845: Add Q6V5 MSS node

2019-02-05 Thread Bjorn Andersson
From: Sibi Sankar This patch adds Q6V5 MSS remoteproc node for SDM845 SoCs. Signed-off-by: Sibi Sankar Reviewed-by: Douglas Anderson Signed-off-by: Bjorn Andersson --- Changes since v5: - None arch/arm64/boot/dts/qcom/sdm845.dtsi | 58 1 file changed, 58 insert

[PATCH v6 2/8] arm64: dts: qcom: sdm845: Define rmtfs memory

2019-02-05 Thread Bjorn Andersson
Define the rmtfs memory node. As the memory region specified in version 10 of the memory map is only 1MB a chunk of unallocated memory is chosen. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson --- Changes since v5: - Corrected unit address arch/arm64/boot/dts/

[PATCH v6 4/8] dt-bindings: soc: qcom: Add AOSS QMP binding

2019-02-05 Thread Bjorn Andersson
Add binding for the QMP based side-channel communication mechanism to the AOSS, which is used to control resources not exposed through the RPMh interface. Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson --- Changes since v5: - None .../bindings/soc/qcom/qcom

[PATCH v6 1/8] arm64: dts: qcom: sdm845: Update reserved memory map

2019-02-05 Thread Bjorn Andersson
Update existing and add missing regions to the reserved memory map, as described in version 10. Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson --- Changes since v5: - Replaced a few 0x0 with 0 - Corrected size of tz_mem arch/arm64/boot/dts/qcom/sdm845.dtsi | 74 ++

[PATCH v6 7/8] arm64: dts: qcom: Add AOSS QMP node

2019-02-05 Thread Bjorn Andersson
The AOSS QMP provides a number of power domains, used for QDSS and PIL, add the node for this. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson --- Changes since v5: - None arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++ 1 file changed, 10 insertions(+) d

[PATCH v6 3/8] arm64: dts: sdm845: Introduce ADSP and CDSP PAS nodes

2019-02-05 Thread Bjorn Andersson
Add the Audio DSP (ADSP) and Compute DSP (CDSP) nodes for TrustZone based remoteproc, supporting booting these cores on e.g. the MTP, and enable the same for the MTP. Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Signed-off-by: Bjorn Andersson --- Changes since v5: - None arch/arm64/boot/d

[PATCH v6 00/8] Qualcomm AOSS QMP driver and modem dts

2019-02-05 Thread Bjorn Andersson
Update the reserved memory map for SDM845, add the ADSP and CDSP nodes, introduce a communication driver for the AOSS and a PD driver for this and finally add the modem remoteproc driver. Bjorn Andersson (7): arm64: dts: qcom: sdm845: Update reserved memory map arm64: dts: qcom: sdm845: Define

[PATCH v6 5/8] soc: qcom: Add AOSS QMP communication driver

2019-02-05 Thread Bjorn Andersson
The AOSS QMP driver is used to communicate with the AOSS for certain side-channel requests, that are not enabled through the RPMh interface. The communication is a very simple synchronous mechanism of messages being written in message RAM and a doorbell in the AOSS is rung. As the AOSS has process

[PATCH 0/6] vmw_balloon: 64-bit limit support, compaction, shrinker

2019-02-05 Thread Nadav Amit
Various enhancements for VMware balloon, some of which are remainder from a previous patch-set. Patch 1: Aumps the version number, following recent changes Patch 2: Adds support for 64-bit memory limit Patches 3-4: Support for compaction Patch 5: Support for memory shrinker - disabled by default P

[PATCH 1/6] vmw_balloon: bump version number

2019-02-05 Thread Nadav Amit
Following recent changes. Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index f8240b87df22..7294f305753f 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/mi

linux-next: manual merge of the akpm-current tree with the powerpc-fixes tree

2019-02-05 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm-current tree got a conflict in: arch/powerpc/mm/pgtable-book3s64.c between commit: 579b9239c1f3 ("powerpc/radix: Fix kernel crash with mremap()") from the powerpc-fixes tree and commit: 41bde21e85a7 ("arch/powerpc/mm: Nest MMU workaround for

Re: [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface

2019-02-05 Thread Tomasz Figa
On Wed, Jan 30, 2019 at 1:02 PM Nicolas Dufresne wrote: > > Le vendredi 25 janvier 2019 à 12:27 +0900, Tomasz Figa a écrit : > > On Fri, Jan 25, 2019 at 4:55 AM Nicolas Dufresne > > wrote: > > > Le jeudi 24 janvier 2019 à 18:06 +0900, Tomasz Figa a écrit : > > > > > Actually I just realized the

Re: [PATCH v2 2/2] media: docs-rst: Document memory-to-memory video encoder interface

2019-02-05 Thread Tomasz Figa
On Thu, Jan 31, 2019 at 12:06 AM Nicolas Dufresne wrote: > > Le vendredi 25 janvier 2019 à 12:59 +0900, Tomasz Figa a écrit : > > On Fri, Jan 25, 2019 at 5:14 AM Nicolas Dufresne > > wrote: > > > Le mercredi 23 janvier 2019 à 14:04 +0100, Hans Verkuil a écrit : > > > > > > Does this return the s

[PATCH] KVM: export and iif KVM is supported

2019-02-05 Thread Masahiro Yamada
I do not see any consistency about headers_install of and . According to my analysis of Linux 5.0-rc5, there are 3 groups: [1] Both and are exported alpha, arm, hexagon, mips, powerpc, s390, sparc, x86 [2] is exported, but is not arc, arm64, c6x, h8300, ia64, m68k, microblaze, n

linux-next: Tree for Feb 6

2019-02-05 Thread Stephen Rothwell
Hi all, Changes since 20190205: The mips tree gained conflicts against the mips-fixes tree. The opp tree gained a conflict against the pm tree. The drm-intel tree gained a conflict against the drm tree. The akpm-current tree gained a conflict against the powerpc-fixes tree. Non-merge commits

<    4   5   6   7   8   9   10   >