Re: [PATCH -mm -V2] mm, swap: Fix THP swap out

2019-06-24 Thread Ming Lei
On Mon, Jun 24, 2019 at 03:55:15PM +0800, Huang, Ying wrote: > From: Huang Ying > > 0-Day test system reported some OOM regressions for several > THP (Transparent Huge Page) swap test cases. These regressions are > bisected to 6861428921b5 ("block: always define BIO_MAX_PAGES as > 256"). In the

Re: [PATCH v3 2/4] mtd: rawnand: Add Macronix MX25F0A NAND controller

2019-06-24 Thread masonccyang
Hi Miquel, > > > > > > > > > How to make all #CS keep high for NAND to enter > > > > > > > > > low-power standby mode if driver don't use > > "legacy.select_chip()" > > > > > ? > > > > > > > > > > > > > > > > See commit 02b4a52604a4 ("mtd: rawnand: Make ->select_chip() > > > > > optiona

Re: [PATCH][next] clocksource: davinci-timer: fix memory leak of clockevent on error return

2019-06-24 Thread Bartosz Golaszewski
pon., 24 cze 2019 o 11:04 Dan Carpenter napisał(a): > > On Mon, Jun 24, 2019 at 10:28:10AM +0200, Bartosz Golaszewski wrote: > > pon., 17 cze 2019 o 13:31 Colin King napisał(a): > > > > > > From: Colin Ian King > > > > > > Currently when the call to request_irq falls there is a memory leak of >

Re: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro

2019-06-24 Thread Daniel Lezcano
Hi Rafael, On 24/06/2019 11:00, Rafael J. Wysocki wrote: > On Mon, Jun 24, 2019 at 10:53 AM Daniel Lezcano > wrote: >> >> >> Hi Viresh, >> >> On 21/06/2019 15:22, Daniel Lezcano wrote: >>> The functions stub already exist for the condition the IS_ENABLED >>> is trying to avoid. >>> >>> Remove t

Re: [PATCH][next] clocksource: davinci-timer: fix memory leak of clockevent on error return

2019-06-24 Thread Colin Ian King
On 24/06/2019 10:03, Dan Carpenter wrote: > On Mon, Jun 24, 2019 at 10:28:10AM +0200, Bartosz Golaszewski wrote: >> pon., 17 cze 2019 o 13:31 Colin King napisał(a): >>> >>> From: Colin Ian King >>> >>> Currently when the call to request_irq falls there is a memory leak of >>> clockevent on the er

Re: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro

2019-06-24 Thread Viresh Kumar
On 24-06-19, 10:53, Daniel Lezcano wrote: > > Hi Viresh, > > On 21/06/2019 15:22, Daniel Lezcano wrote: > > The functions stub already exist for the condition the IS_ENABLED > > is trying to avoid. > > > > Remove the IS_ENABLED macros as they are pointless. > > > > Signed-off-by: Daniel Lezcano

[PATCH] MAINTAINERS: Update Maintainers and Reviewers of DRM Bridge Drivers

2019-06-24 Thread Neil Armstrong
Add myself as co-maintainer of DRM Bridge Drivers then add Jonas Karlman and Jernej Škrabec as Reviewers of DRM Bridge Drivers. Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Andrzej Hajda Cc: Jernej Škrabec Cc: Daniel Vetter Signed-off-by: Neil Armstrong --- MAINTAINERS | 3 +++ 1 file changed

RX CRC errors on I219-V (6) 8086:15be

2019-06-24 Thread Kai-Heng Feng
Hi Jeffrey, We’ve encountered another issue, which causes multiple CRC errors and renders ethernet completely useless, here’s the network stats: /sys/class/net/eno1/statistics$ grep . * collisions:0 multicast:95 rx_bytes:1499851 rx_compressed:0 rx_crc_errors:1165 rx_dropped:0 rx_errors:2330 r

Re: [RFC] deadlock with flush_work() in UAS

2019-06-24 Thread Oliver Neukum
Am Donnerstag, den 20.06.2019, 07:10 -0700 schrieb Tejun Heo: > Hello, > > On Tue, Jun 18, 2019 at 11:59:39AM -0400, Alan Stern wrote: > > > > Even if you disagree, perhaps we should have a global workqueue with a > > > > permanently set noio flag. It could be shared among multiple drivers > > >

Re: [PATCH] MAINTAINERS: Update Maintainers and Reviewers of DRM Bridge Drivers

2019-06-24 Thread Jernej Škrabec
Dne ponedeljek, 24. junij 2019 ob 11:08:51 CEST je Neil Armstrong napisal(a): > Add myself as co-maintainer of DRM Bridge Drivers then add Jonas Karlman > and Jernej Škrabec as Reviewers of DRM Bridge Drivers. > > Cc: Laurent Pinchart > Cc: Jonas Karlman > Cc: Andrzej Hajda > Cc: Jernej Škrabec

[PATCH V11 01/12] PCI: Add #defines for some of PCIe spec r4.0 features

2019-06-24 Thread Vidya Sagar
Add #defines only for the Data Link Feature and Physical Layer 16.0 GT/s features. Signed-off-by: Vidya Sagar Reviewed-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * None Changes since [v8]: * None Changes since [v7]: * None Changes since [v6]: * None Changes since

[PATCH V11 00/12] Add Tegra194 PCIe support

2019-06-24 Thread Vidya Sagar
Tegra194 has six PCIe controllers based on Synopsys DesignWare core. There are two Universal PHY (UPHY) blocks with each supporting 12(HSIO: Hisg Speed IO) and 8(NVHS: NVIDIA High Speed) lanes respectively. Controllers:0~4 use UPHY lanes from HSIO brick whereas Controller:5 uses UPHY lanes from NVH

[PATCH V11 02/12] PCI: Disable MSI for Tegra root ports

2019-06-24 Thread Vidya Sagar
Tegra PCIe rootports don't generate MSI interrupts for PME and AER events. Since PCIe spec (Ref: r4.0 sec 7.7.1.2 and 7.7.2.2) doesn't support using a mix of INTx and MSI/MSI-X, MSI needs to be disabled to avoid root ports service drivers registering their respective ISRs with MSI interrupt and to

[PATCH V11 03/12] PCI: dwc: Perform dbi regs write lock towards the end

2019-06-24 Thread Vidya Sagar
Remove multiple write enable and disable sequences of dbi registers as Tegra194 implements writes to BAR-0 register (offset: 0x10) controlled by DBI write-lock enable bit thereby not allowing any further writes to BAR-0 register in config space to take place. Hence enabling write permission at the

[PATCH] timekeeping: boot should be boottime for coarse ns accessor

2019-06-24 Thread Jason A. Donenfeld
Somewhere in all the patchsets before, this cleanup got lost. Signed-off-by: Jason A. Donenfeld Cc: Arnd Bergmann Cc: Thomas Gleixner --- Documentation/core-api/timekeeping.rst | 2 +- include/linux/timekeeping.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH V11 05/12] PCI: dwc: Add ext config space capability search API

2019-06-24 Thread Vidya Sagar
Add extended configuration space capability search API using struct dw_pcie * pointer Signed-off-by: Vidya Sagar Acked-by: Gustavo Pimentel Acked-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * None Changes since [v8]: * Added Acked-by from Thierry Changes since [v7]

Re: [PATCH v3 1/2] x86/vdso: Move mult and shift into struct vgtod_ts

2019-06-24 Thread Sverdlin, Alexander (Nokia - DE/Ulm)
Hi Thomas, On 23/06/2019 12:18, Thomas Gleixner wrote: > The alternative solution for this is what Vincenzo has in his unified VDSO > patch series: > > https://lkml.kernel.org/r/20190621095252.32307-1-vincenzo.frasc...@arm.com > > It leaves the data struct unmodified and has a separate array f

[PATCH V11 10/12] dt-bindings: PHY: P2U: Add Tegra194 P2U block

2019-06-24 Thread Vidya Sagar
Add support for Tegra194 P2U (PIPE to UPHY) module block which is a glue module instantiated one for each PCIe lane between Synopsys DesignWare core based PCIe IP and Universal PHY block. Signed-off-by: Vidya Sagar Reviewed-by: Rob Herring Acked-by: Thierry Reding Acked-by: Kishon Vijay Abraham

[PATCH V11 04/12] PCI: dwc: Move config space capability search API

2019-06-24 Thread Vidya Sagar
Move PCIe config space capability search API to common DesignWare file as this can be used by both host and ep mode codes. Signed-off-by: Vidya Sagar Acked-by: Gustavo Pimentel Reviewed-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * None Changes since [v8]: * None C

[PATCH V11 08/12] dt-bindings: Add PCIe supports-clkreq property

2019-06-24 Thread Vidya Sagar
Some host controllers need to know the existence of clkreq signal routing to downstream devices to be able to advertise low power features like ASPM L1 substates. Without clkreq signal routing being present, enabling ASPM L1 sub states might lead to downstream devices falling off the bus. Hence a n

[PATCH V11 07/12] PCI: dwc: Add support to enable CDM register check

2019-06-24 Thread Vidya Sagar
Add support to enable CDM (Configuration Dependent Module) register check for any data corruption based on the device-tree flag 'snps,enable-cdm-check'. Signed-off-by: Vidya Sagar Acked-by: Gustavo Pimentel Reviewed-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * None

[PATCH V11 09/12] dt-bindings: PCI: tegra: Add device tree support for Tegra194

2019-06-24 Thread Vidya Sagar
Add support for Tegra194 PCIe controllers. These controllers are based on Synopsys DesignWare core IP. Signed-off-by: Vidya Sagar Reviewed-by: Rob Herring Acked-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * None Changes since [v8]: * Added Acked-by from Thierry Cha

[PATCH V11 06/12] dt-bindings: PCI: designware: Add binding for CDM register check

2019-06-24 Thread Vidya Sagar
Add support to enable CDM (Configuration Dependent Module) registers check for any data corruption. CDM registers include standard PCIe configuration space registers, Port Logic registers and iATU and DMA registers. Refer Section S.4 of Synopsys DesignWare Cores PCI Express Controller Databook Vers

[PATCH V11 11/12] phy: tegra: Add PCIe PIPE2UPHY support

2019-06-24 Thread Vidya Sagar
Synopsys DesignWare core based PCIe controllers in Tegra 194 SoC interface with Universal PHY (UPHY) module through a PIPE2UPHY (P2U) module. For each PCIe lane of a controller, there is a P2U unit instantiated at hardware level. This driver provides support for the programming required for each P2

[PATCH V11 12/12] PCI: tegra: Add Tegra194 PCIe support

2019-06-24 Thread Vidya Sagar
Add support for Synopsys DesignWare core IP based PCIe host controller present in Tegra194 SoC. Signed-off-by: Vidya Sagar Acked-by: Thierry Reding --- Changes since [v10]: * None Changes since [v9]: * Used _relaxed() versions of readl() & writel() Changes since [v8]: * Made it dependent on AR

Re: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro

2019-06-24 Thread Daniel Lezcano
On 22/06/2019 11:12, Rafael J. Wysocki wrote: > On Fri, Jun 21, 2019 at 3:23 PM Daniel Lezcano > wrote: >> >> The functions stub already exist for the condition the IS_ENABLED >> is trying to avoid. >> >> Remove the IS_ENABLED macros as they are pointless. > > AFAICS, the IS_ENABLED checks are an

[PATCH 3/3] module: Properly propagate MODULE_STATE_COMING failure

2019-06-24 Thread Peter Zijlstra
Now that notifiers got unbroken; use the proper interface to handle notifier errors and propagate them. There were already MODULE_STATE_COMING notifiers that failed; notably: - jump_label_module_notifier() - tracepoint_module_notify() - bpf_event_notify() By propagating this error, we fix tho

[PATCH 0/3] Propagate module notifier errors

2019-06-24 Thread Peter Zijlstra
Hi all, These patches came from the desire to propagate MODULE_STATE_COMING errors. While looking at that I spotted fail with a number of module notifiers themselves and with the whole notification business. Please consider.

[PATCH 1/3] notifier: Fix broken error handling pattern

2019-06-24 Thread Peter Zijlstra
The current notifiers have the following error handling pattern all over the place: int nr; ret = __foo_notifier_call_chain(&chain, val_up, v, -1, &nr); if (err & NOTIFIER_STOP_MASK) __foo_notifier_call_chain(&chain, val_down, v, nr-1, NULL) And aside from

[PATCH 2/3] module: Fix up module_notifier return values.

2019-06-24 Thread Peter Zijlstra
While auditing all module notifiers I noticed a whole bunch of fail wrt the return value. Notifiers have a 'special' return semantics. Cc: Robert Richter Cc: Steven Rostedt Cc: Ingo Molnar Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Ma

Re: [RFC 0/5] livepatch: new API to track system state changes

2019-06-24 Thread Nicolai Stange
Hi Petr, > this is another piece in the puzzle that helps to maintain more > livepatches. > > Especially pre/post (un)patch callbacks might change a system state. > Any newly installed livepatch has to somehow deal with system state > modifications done be already installed livepatches. > > This p

Re: general protection fault in do_move_mount (2)

2019-06-24 Thread Dmitry Vyukov
On Tue, Jun 18, 2019 at 4:03 PM Al Viro wrote: > > On Tue, Jun 18, 2019 at 03:47:10AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:9e0babf2 Linux 5.2-rc5 > > git tree: upstream > > console output: https://syzkaller.appspot.com/x/log.txt

Re: [PATCHv3 1/1] coresight: Do not default to CPU0 for missing CPU phandle

2019-06-24 Thread Sai Prakash Ranjan
On 6/24/2019 1:56 PM, Suzuki K Poulose wrote: Sai, Thanks for getting this done. On 24/06/2019 04:36, Sai Prakash Ranjan wrote: Coresight platform support assumes that a missing "cpu" phandle defaults to CPU0. This could be problematic and unnecessarily binds components to CPU0, where they may

Re: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro

2019-06-24 Thread Rafael J. Wysocki
On Monday, June 24, 2019 11:22:19 AM CEST Daniel Lezcano wrote: > On 22/06/2019 11:12, Rafael J. Wysocki wrote: > > On Fri, Jun 21, 2019 at 3:23 PM Daniel Lezcano > > wrote: > >> > >> The functions stub already exist for the condition the IS_ENABLED > >> is trying to avoid. > >> > >> Remove the IS

Re: PREEMPT_RT_FULL on x86-32 machine

2019-06-24 Thread Jan Kiszka
On 22.06.19 10:19, Pavel Machek wrote: Hi! Is full preemption supposed to work on x86-32 machines? Because it does not work for me. It crashes early in boot, no messages make it to console. Similar configuration for x86-64 boots ok. Maybe you can also tell which version(s) you tried, and in

Re: [RFC 2/5] livepatch: Basic API to track system state changes

2019-06-24 Thread Nicolai Stange
Petr Mladek writes: > --- > include/linux/livepatch.h | 15 + > kernel/livepatch/Makefile | 2 +- > kernel/livepatch/state.c | 83 > +++ > 3 files changed, 99 insertions(+), 1 deletion(-) > create mode 100644 kernel/livepatch/state.c > > di

Re: [PATCH] drm/fourcc: Add Arm 16x16 block modifier

2019-06-24 Thread Brian Starkey
Hi Daniel, On Fri, Jun 21, 2019 at 05:27:00PM +0200, Daniel Vetter wrote: > On Fri, Jun 21, 2019 at 12:21 PM Raymond Smith wrote: > > > > Add the DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED modifier to > > denote the 16x16 block u-interleaved format used in Arm Utgard and > > Midgard GPUs. > > >

Re: WARNING: ODEBUG bug in netdev_freemem (2)

2019-06-24 Thread Thomas Gleixner
On Mon, 24 Jun 2019, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:fd6b99fa Merge branch 'akpm' (patches from Andrew) > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=144de256a0 > kernel config: https://syzkaller.ap

Re: [PATCH v5 1/3] mtd: spi-nor: add support for is25wp256

2019-06-24 Thread Vignesh Raghavendra
Hi, On 21/06/19 3:58 PM, Sagar Kadam wrote: > Hello Vignesh, > > On Fri, Jun 21, 2019 at 11:33 AM Vignesh Raghavendra wrote: >> >> Hi, >> >> On 17/06/19 8:48 PM, Sagar Kadam wrote: >>> Hello Vignesh, >>> >>> Thanks for your review comments. >>> >>> On Sun, Jun 16, 2019 at 6:14 PM Vignesh Raghave

Re: [PATCH 1/2] PCI: pciehp: Do not disable interrupt twice on suspend

2019-06-24 Thread Rafael J. Wysocki
On Tuesday, June 18, 2019 2:50:50 PM CEST Mika Westerberg wrote: > We try to keep PCIe hotplug ports runtime suspended when entering system > suspend. Due to the fact that the PCIe portdrv sets NEVER_SKIP driver PM > flag the PM core always calls system suspend/resume hooks even if the > device is

Re: [PATCH v4 2/5] net: macb: add support for sgmii MAC-PHY interface

2019-06-24 Thread Russell King - ARM Linux admin
On Mon, Jun 24, 2019 at 06:35:44AM +, Parshuram Raju Thombare wrote: > > >> + if (change_interface) { > >> + if (bp->phy_interface == PHY_INTERFACE_MODE_SGMII) { > >> + gem_writel(bp, NCFGR, ~GEM_BIT(SGMIIEN) & > >> + ~GEM_BIT(PCSSEL) & >

Re: LTP hugemmap05 test case failure on arm64 with linux-next (next-20190613)

2019-06-24 Thread Will Deacon
Hi Qian Cai, On Sun, Jun 16, 2019 at 09:41:09PM -0400, Qian Cai wrote: > > On Jun 16, 2019, at 9:32 PM, Anshuman Khandual > > wrote: > > On 06/14/2019 05:45 PM, Qian Cai wrote: > >> On Fri, 2019-06-14 at 11:20 +0100, Will Deacon wrote: > >>> On Thu, Jun 13, 2019 at 05:34:01PM -0400, Qian Cai wro

Re: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro

2019-06-24 Thread Daniel Lezcano
On 24/06/2019 11:30, Rafael J. Wysocki wrote: > On Monday, June 24, 2019 11:22:19 AM CEST Daniel Lezcano wrote: >> On 22/06/2019 11:12, Rafael J. Wysocki wrote: >>> On Fri, Jun 21, 2019 at 3:23 PM Daniel Lezcano >>> wrote: The functions stub already exist for the condition the IS_ENABLED

Re: [PATCH 2/6] thermal/drivers/cpu_cooling: Unregister with the policy

2019-06-24 Thread Viresh Kumar
On 24-06-19, 09:45, Daniel Lezcano wrote: > Actually I'm asking your opinion :) > > The structure in drivers/thermal/imx_thermal.c > > struct imx_thermal_data { > struct cpufreq_policy *policy; in the thermal data ?! > [ ... ] > }; > > And then: > > #ifdef CONFIG_CPU_FREQ > /

Re: [PATCH v3 1/2] x86/vdso: Move mult and shift into struct vgtod_ts

2019-06-24 Thread Thomas Gleixner
Alexander, On Mon, 24 Jun 2019, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > On 23/06/2019 12:18, Thomas Gleixner wrote: > > The alternative solution for this is what Vincenzo has in his unified VDSO > > patch series: > > > > https://lkml.kernel.org/r/20190621095252.32307-1-vincenzo.frasc...@a

Re: [PATCH 3/5] media: vimc: stream: format comments as kernel-doc

2019-06-24 Thread Mauro Carvalho Chehab
Em Sun, 23 Jun 2019 18:27:22 -0300 André Almeida escreveu: > On 6/23/19 1:40 PM, André Almeida wrote: > > - * Calls s_stream to enable stream in all entities of the pipeline. > > + * Calls ``vimc_streamer_s_stream`` to enable stream in all entities of > ``vimc_streamer_s_stream`` could also be

Re: [PATCH 1/2] net: macb: Fix compilation on systems without COMMON_CLK

2019-06-24 Thread Nicolas.Ferre
On 24/06/2019 at 08:16, Palmer Dabbelt wrote: > External E-Mail > > > The patch to add support for the FU540-C000 added a dependency on > COMMON_CLK, but didn't express that via Kconfig. This fixes the build > failure by adding CONFIG_MACB_FU540, which depends on COMMON_CLK and > conditionally e

Re: [PATCH] mm/vmalloc: fix a compile warning in mm

2019-06-24 Thread Uladzislau Rezki
Hello, Hou. It has already been fixed. Please have a look at: https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-avoid-bogus-wmaybe-uninitialized-warning.patch https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmalloc-avoid-bogus-wmaybe-uninitialized-warning-fix.patch -- Vlad Rezki On Mon, Jun 24,

Re: [PATCH v4 3/5] net: macb: add support for c45 PHY

2019-06-24 Thread Russell King - ARM Linux admin
On Mon, Jun 24, 2019 at 06:47:48AM +, Parshuram Raju Thombare wrote: > >Which Clause 45 PHY are you using? > > I am using emulated PHY in our CSP environment. Concentrated Solar Power? Chartered Society of Physiotherapy? Center for Space Physics? Sorry, I don't know what a "CSP environment

Re: [PATCH v1 0/3] Add required-opps support to devfreq passive gov

2019-06-24 Thread Viresh Kumar
On 21-06-19, 17:34, Saravana Kannan wrote: > The devfreq passive governor scales the frequency of a "child" device > based on the current frequency of a "parent" device (not parent/child in > the sense of device hierarchy). As of today, the passive governor > requires one of the following to work c

Re: [PATCH V4 02/18] pinctrl: tegra: add suspend and resume support

2019-06-24 Thread Dmitry Osipenko
24.06.2019 6:02, Sowjanya Komatineni пишет: > This patch adds support for Tegra pinctrl driver suspend and resume. > > During suspend, context of all pinctrl registers are stored and > on resume they are all restored to have all the pinmux and pad > configuration for normal operation. > > Signed-

[PATCH 0/2] drivers/staging/rtl8192u: adjust block comments

2019-06-24 Thread Christian Müller
As per the last correspondence with Greg, he pointed out that the whole driver rtl8192u should be merged some day into drivers/net/ and thus implement different standards regarding multiline comments. Because of that, we did the exact opposite of what we did the last time, and changed comments such

[PATCH 1/2] drivers/staging/rtl8192u: adjust block comments

2019-06-24 Thread Christian Müller
As stated in coding-styles.rst multiline comments should be structured in a way, that the actual comment starts on the second line of the commented portion. E.g: /* * Multiline comments * should look like * this. */ However, there is an exception to files in drivers/net/ and net/, where multi

[PATCH 2/2] drivers/staging/rtl8192u: adjust block comments

2019-06-24 Thread Christian Müller
The coding-styles.rst states, that multiline comments should allways contain a leading "*" in each line. For multiline comments in general they /* * should look * like this. */ For multiline comments in either net/ or drivers/net/ however, they should /* omit * the first * empty line. */

Re: [PATCH 2/2] net: macb: Kconfig: Rename Atmel to Cadence

2019-06-24 Thread Nicolas.Ferre
On 24/06/2019 at 08:16, Palmer Dabbelt wrote: > External E-Mail > > > When touching the Kconfig for this driver I noticed that both the > Kconfig help text and a comment referred to this being an Atmel driver. > As far as I know, this is a Cadence driver. The fix is just Indeed: was written and

Re: [PATCH 1/2] CLONE_PIDFD: do not use the value pointed by parent_tidptr

2019-06-24 Thread Christian Brauner
On Sun, Jun 23, 2019 at 02:27:17PM +0300, Dmitry V. Levin wrote: > Userspace needs a cheap and reliable way to tell whether CLONE_PIDFD > is supported by the kernel or not. > > While older kernels without CLONE_PIDFD support just leave unchanged > the value pointed by parent_tidptr, current implem

Re: [PATCH 2/2] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-24 Thread Christian Brauner
On Sun, Jun 23, 2019 at 02:28:00PM +0300, Dmitry V. Levin wrote: > Initialize pidfd to an invalid descriptor, to fail gracefully on > those kernels that do not implement CLONE_PIDFD and leave pidfd > unchanged. > > Signed-off-by: Dmitry V. Levin Reviewed-by: Christian Brauner Thank you Dmitry,

[PATCH v8 2/2] clocksource: timer-davinci: add support for clocksource

2019-06-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Extend the davinci-timer driver to also register a clock source. Signed-off-by: Bartosz Golaszewski --- drivers/clocksource/timer-davinci.c | 85 + 1 file changed, 85 insertions(+) diff --git a/drivers/clocksource/timer-davinci.c b/driver

[PATCH v8 0/2] clocksource: davinci-timer: new driver

2019-06-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Now that we have an agreement on the driver and only minor issues are left to fix, I'm dropping the RFC tag and continuing the numbering from before RFCs. This is the davinci clocksource driver but it with a sparse warning fixed and with a small tweak to kzalloc() call.

[PATCH v8 1/2] clocksource: davinci-timer: add support for clockevents

2019-06-24 Thread Bartosz Golaszewski
From: Bartosz Golaszewski Currently the clocksource and clockevent support for davinci platforms lives in mach-davinci. It hard-codes many things, uses global variables, implements functionalities unused by any platform and has code fragments scattered across many (often unrelated) files. Implem

Re: [PATCH] arm64: defconfig: update and enable CONFIG_RANDOMIZE_BASE

2019-06-24 Thread Catalin Marinas
On Thu, Jun 20, 2019 at 08:46:58AM +0100, Will Deacon wrote: > On Wed, Jun 19, 2019 at 05:32:42PM -0700, Nick Desaulniers wrote: > > Generated via: > > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig > > $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make menuconfig > > > > $ ARCH=arm6

Re: [PATCH] samples: make pidfd-metadata fail gracefully on older kernels

2019-06-24 Thread Christian Brauner
On Sun, Jun 23, 2019 at 02:32:30PM +0300, Dmitry V. Levin wrote: > On Sat, Jun 22, 2019 at 12:13:39AM +0200, Christian Brauner wrote: > [...] > > Out of curiosity: what makes the new flag different than say > > CLONE_NEWCGROUP or any new clone flag that got introduced? > > CLONE_NEWCGROUP too would

[RFC V3 00/18] objtool: Add support for arm64

2019-06-24 Thread Raphael Gault
As of now, objtool only supports the x86_64 architecture but the groundwork has already been done in order to add support for other architectures without too much effort. This series of patches adds support for the arm64 architecture based on the Armv8.5 Architecture Reference Manual. Objtool wil

[RFC V3 01/18] objtool: Add abstraction for computation of symbols offsets

2019-06-24 Thread Raphael Gault
The jump destination and relocation offset used previously are only reliable on x86_64 architecture. We abstract these computations by calling arch-dependent implementations. Signed-off-by: Raphael Gault --- tools/objtool/arch.h| 6 ++ tools/objtool/arch/x86/decode.c | 11 ++

[RFC V3 14/18] arm64: kvm: Annotate non-standard stack frame functions

2019-06-24 Thread Raphael Gault
Both __guest_entry and __guest_exit functions do not setup a correct stack frame. Because they can be considered as callable functions, even if they are particular cases, we chose to silence the warnings given by objtool by annotating them as non-standard. Signed-off-by: Raphael Gault --- arch/a

[RFC V3 13/18] arm64: sleep: Prevent stack frame warnings from objtool

2019-06-24 Thread Raphael Gault
This code doesn't respect the Arm PCS but it is intended this way. Adapting it to respect the PCS would result in altering the behaviour. In order to suppress objtool's warnings, we setup a stack frame for __cpu_suspend_enter and annotate cpu_resume and _cpu_resume as having non-standard stack fra

[RFC V3 18/18] objtool: arm64: Enable stack validation for arm64

2019-06-24 Thread Raphael Gault
Signed-off-by: Raphael Gault --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index f5eb592b8579..c5fdfb635d3d 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -159,6 +159,7 @@ config ARM64 select HAVE_RCU_TABLE_

[RFC V3 12/18] arm64: assembler: Add macro to annotate asm function having non standard stack-frame.

2019-06-24 Thread Raphael Gault
Some functions don't have standard stack-frames but are intended this way. In order for objtool to ignore those particular cases we add a macro that enables us to annotate the cases we chose to mark as particular. Signed-off-by: Raphael Gault --- arch/arm64/include/asm/assembler.h | 13 +

[RFC V3 09/18] gcc-plugins: objtool: Add plugin to detect switch table on arm64

2019-06-24 Thread Raphael Gault
This plugins comes into play before the final 2 RTL passes of GCC and detects switch-tables that are to be outputed in the ELF and writes information in an "objtool_data" section which will be used by objtool. Signed-off-by: Raphael Gault --- scripts/Makefile.gcc-plugins | 2 +

[RFC V3 15/18] arm64: kernel: Add exception on kuser32 to prevent stack analysis

2019-06-24 Thread Raphael Gault
kuser32 being used for compatibility, it contains a32 instructions which are not recognised by objtool when trying to analyse arm64 object files. Thus, we add an exception to skip validation on this particular file. Signed-off-by: Raphael Gault --- arch/arm64/kernel/Makefile | 3 +++ 1 file chan

[RFC V3 11/18] arm64: alternative: Mark .altinstr_replacement as containing executable instructions

2019-06-24 Thread Raphael Gault
Until now, the section .altinstr_replacement wasn't marked as containing executable instructions on arm64. This patch changes that so that it is coherent with what is done on x86. Signed-off-by: Raphael Gault --- arch/arm64/include/asm/alternative.h | 2 +- 1 file changed, 1 insertion(+), 1 dele

[RFC V3 17/18] arm64: kernel: Annotate non-standard stack frame functions

2019-06-24 Thread Raphael Gault
Annotate assembler functions which are callable but do not setup a correct stack frame. Signed-off-by: Raphael Gault --- arch/arm64/kernel/hyp-stub.S | 2 ++ arch/arm64/kvm/hyp-init.S| 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-s

[RFC V3 16/18] arm64: crypto: Add exceptions for crypto object to prevent stack analysis

2019-06-24 Thread Raphael Gault
Some crypto modules contain `.word` of data in the .text section. Since objtool can't make the distinction between data and incorrect instruction, it gives a warning about the instruction beeing unknown and stops the analysis of the object file. The exception can be removed if the data are moved t

[RFC V3 03/18] objtool: Move registers and control flow to arch-dependent code

2019-06-24 Thread Raphael Gault
The control flow information and register macro definitions were based on the x86_64 architecture but should be abstract so that each architecture can define the correct values for the registers, especially the registers related to the stack frame (Frame Pointer, Stack Pointer and possibly Return A

Re: [PATCH 1/2] net: macb: Fix compilation on systems without COMMON_CLK

2019-06-24 Thread Palmer Dabbelt
On Mon, 24 Jun 2019 02:40:21 PDT (-0700), nicolas.fe...@microchip.com wrote: On 24/06/2019 at 08:16, Palmer Dabbelt wrote: External E-Mail The patch to add support for the FU540-C000 added a dependency on COMMON_CLK, but didn't express that via Kconfig. This fixes the build failure by adding

[PATCH 4.14 01/51] tracing: Silence GCC 9 array bounds warning

2019-06-24 Thread Greg Kroah-Hartman
From: Miguel Ojeda commit 0c97bf863efce63d6ab7971dad811601e6171d2f upstream. Starting with GCC 9, -Warray-bounds detects cases when memset is called starting on a member of a struct but the size to be cleared ends up writing over further members. Such a call happens in the trace code to clear,

[PATCH 4.14 10/51] Input: uinput - add compat ioctl number translation for UI_*_FF_UPLOAD

2019-06-24 Thread Greg Kroah-Hartman
From: Andrey Smirnov commit 7c7da40da1640ce6814dab1e8031b44e19e5a3f6 upstream. In the case of compat syscall ioctl numbers for UI_BEGIN_FF_UPLOAD and UI_END_FF_UPLOAD need to be adjusted before being passed on uinput_ioctl_handler() since code built with -m32 will be passing slightly different v

[PATCH 4.14 13/51] ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit ecc906a11c2a0940e1a380debd8bd5bc09faf454 ] GMAC controller on HSDK boards supports 256 Hash Table size so we need to add the multicast filter bins property. This allows for the Hash filter to work properly using stmmac driver. Cc: Joao Pinto Cc: Rob Herring Cc: Mark Rutland C

Re: [PATCH 2/2] net: macb: Kconfig: Rename Atmel to Cadence

2019-06-24 Thread Palmer Dabbelt
On Mon, 24 Jun 2019 02:49:16 PDT (-0700), nicolas.fe...@microchip.com wrote: On 24/06/2019 at 08:16, Palmer Dabbelt wrote: External E-Mail When touching the Kconfig for this driver I noticed that both the Kconfig help text and a comment referred to this being an Atmel driver. As far as I know,

[RFC V3 06/18] objtool: arm64: Adapt the stack frame checks for arm architecture

2019-06-24 Thread Raphael Gault
Since the way the initial stack frame when entering a function is different that what is done in the x86_64 architecture, we need to add some more check to support the different cases. As opposed as for x86_64, the return address is not stored by the call instruction but is instead loaded in a reg

[RFC V3 10/18] objtool: arm64: Implement functions to add switch tables alternatives

2019-06-24 Thread Raphael Gault
This patch implements the functions required to identify and add as alternatives all the possible destinations of the switch table. This implementation relies on the new plugin introduced previously which records information about the switch-table in a .objtool_data section. Signed-off-by: Raphael

[RFC V3 04/18] objtool: arm64: Add required implementation for supporting the aarch64 architecture in objtool.

2019-06-24 Thread Raphael Gault
Provide implementation for the arch-dependent functions that are called by the main check function of objtool. The ORC unwinder is not yet supported by the arm64 architecture so we only provide a dummy interface for now. The decoding of the instruction is split into classes and subclasses as descr

[RFC V3 02/18] objtool: orc: Refactor ORC API for other architectures to implement.

2019-06-24 Thread Raphael Gault
The ORC unwinder is only supported on x86 at the moment and should thus be in the x86 architecture code. In order not to break the whole structure in case another architecture decides to support the ORC unwinder via objtool we choose to let the implementation be done in the architecture dependent c

[RFC V3 07/18] objtool: Introduce INSN_UNKNOWN type

2019-06-24 Thread Raphael Gault
On arm64 some object files contain data stored in the .text section. This data is interpreted by objtool as instruction but can't be identified as a valid one. In order to keep analysing those files we introduce INSN_UNKNOWN type. The "unknown instruction" warning will thus only be raised if such i

[RFC V3 05/18] objtool: special: Adapt special section handling

2019-06-24 Thread Raphael Gault
This patch abstracts the few architecture dependent tests that are perform when handling special section and switch tables. It enables any architecture to ignore a particular CPU feature or not to handle switch tables. Signed-off-by: Raphael Gault --- tools/objtool/arch/arm64/Build

[RFC V3 08/18] objtool: Refactor switch-tables code to support other architectures

2019-06-24 Thread Raphael Gault
The way to identify switch-tables and retrieves all the data necessary to handle the different execution branches is not the same on all architecture. In order to be able to add other architecture support, this patch defines arch-dependent functions to process jump-tables. Signed-off-by: Raphael G

[PATCH 4.14 02/51] objtool: Support per-function rodata sections

2019-06-24 Thread Greg Kroah-Hartman
From: Allan Xavier commit 4a60aa05a0634241ce17f957bf9fb5ac1eed6576 upstream. Add support for processing switch jump tables in objects with multiple .rodata sections, such as those created by '-ffunction-sections' and '-fdata-sections'. Currently, objtool always looks in .rodata for jump table i

[PATCH 4.14 14/51] ARC: [plat-hsdk]: Add missing FIFO size entry in GMAC node

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 4c70850aeb2e40016722cd1abd43c679666d3ca0 ] Add the binding for RX/TX fifo size of GMAC node. Cc: Joao Pinto Cc: Rob Herring Cc: Mark Rutland Cc: Vineet Gupta Tested-by: Eugeniy Paltsev Acked-by: Alexey Brodkin Signed-off-by: Jose Abreu Signed-off-by: Vineet Gupta Signed-

[PATCH 4.14 23/51] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 62394708f3e01c9f2be6be74eb6305bae1ed924f ] When non-bridged, non-vlan'ed mv88e6xxx port is moving down, error message is logged: failed to kill vid 0081/0 for device eth_cu_1000_4 This is caused by call from __vlan_vid_del() with vin set to zero, over call chain this results in

[PATCH 4.14 19/51] IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 35164f5259a47ea756fa1deb3e463ac2a4f10dc9 ] The command 'ibv_devinfo -v' reports 0 for max_mr. Fix by assigning the query values after the mr lkey_table has been built rather than early on in the driver. Fixes: 7b1e2099adc8 ("IB/rdmavt: Move memory registration into rdmavt") Rev

[PATCH 4.14 17/51] IB/rdmavt: Fix alloc_qpn() WARN_ON()

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 2abae62a26a265129b364d8c1ef3be55e2c01309 ] The qpn allocation logic has a WARN_ON() that intends to detect the use of an index that will introduce bits in the lower order bits of the QOS bits in the QPN. Unfortunately, it has the following bugs: - it misfires when wrapping QPN a

[PATCH 4.14 25/51] mdesc: fix a missing-check bug in get_vdev_port_node_info()

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 80caf43549e7e41a695c6d1e11066286538b336f ] In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang Signed-off-by: David S. Miller Signe

[PATCH 4.14 28/51] net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 880c2d4b2fdfd580ebcd6bb7240a8027a1d34751 ] Should only enable HW RX_2BYTE_OFFSET function in the case NET_IP_ALIGN equals to 2. Signed-off-by: Mark Lee Signed-off-by: Sean Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_e

[PATCH 4.14 21/51] MIPS: uprobes: remove set but not used variable epc

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit f532beeeff0c0a3586cc15538bc52d249eb19e7c ] Fixes gcc '-Wunused-but-set-variable' warning: arch/mips/kernel/uprobes.c: In function 'arch_uprobe_pre_xol': arch/mips/kernel/uprobes.c:115:17: warning: variable 'epc' set but not used [-Wunused-but-set-variable] It's never used sinc

[PATCH 4.14 29/51] drm/arm/hdlcd: Actually validate CRTC modes

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit b96151edced4edb6a18aa89a5fa02c7066efff45 ] Rather than allowing any old mode through, then subsequently refusing unmatchable clock rates in atomic_check when it's too late to back out and pick a different mode, let's do that validation up-front where it will cause unsupported mod

[PATCH 4.14 15/51] parport: Fix mem leak in parport_register_dev_model

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 1c7ebeabc9e5ee12e42075a597de40fdb9059530 ] BUG: memory leak unreferenced object 0x8881df48cda0 (size 16): comm "syz-executor.0", pid 5077, jiffies 4295994670 (age 22.280s) hex dump (first 16 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b

[PATCH 4.14 03/51] gcc-9: silence address-of-packed-member warning

2019-06-24 Thread Greg Kroah-Hartman
From: Linus Torvalds commit 6f303d60534c46aa1a239f29c321f95c83dda748 upstream. We already did this for clang, but now gcc has that warning too. Yes, yes, the address may be unaligned. And that's kind of the point. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Makefil

[PATCH 4.14 27/51] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 9e4f56f1a7f3287718d0083b5cb85298dc05a5fd ] Should hw_feature as hardware capability flags to check if hardware LRO got support. Signed-off-by: Mark Lee Signed-off-by: Sean Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mediatek/mtk_e

[PATCH 4.14 20/51] IB/hfi1: Validate page aligned for a given virtual address

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 97736f36dbebf2cda2799db3b54717ba5b388255 ] User applications can register memory regions for TID buffers that are not aligned on page boundaries. Hfi1 is expected to pin those pages in memory and cache the pages with mmu_rb. The rb tree will fail to insert pages that are not alig

[PATCH 4.14 30/51] drm/arm/hdlcd: Allow a bit of clock tolerance

2019-06-24 Thread Greg Kroah-Hartman
[ Upstream commit 1c810739097fdeb31b393b67a0a1e3d7ffdd9f63 ] On the Arm Juno platform, the HDLCD pixel clock is constrained to 250KHz resolution in order to avoid the tiny System Control Processor spending aeons trying to calculate exact PLL coefficients. This means that modes like my oddball 1600

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