[PATCH v4 17/21] camss: vfe: Add interface for cropping

2017-08-08 Thread Todor Tomov
Extend selection ioctls to handle cropping configuration. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 191 - drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 1 + 2 files changed, 150 insertions(+), 42 deletions(-) diff --git a/d

[PATCH v4 14/21] camss: vfe: Support for frame padding

2017-08-08 Thread Todor Tomov
Add support for horizontal and vertical frame padding. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 85 +- .../media/platform/qcom/camss-8x16/camss-video.c | 53 ++ .../media/platform/qcom/camss-8x16/camss-video.h | 2 +

[PATCH v4 15/21] camss: vfe: Add interface for scaling

2017-08-08 Thread Todor Tomov
Add compose selection ioctls to handle scaling configuration. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 184 - drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 1 + 2 files changed, 183 insertions(+), 2 deletions(-) diff --git

[PATCH v4 01/21] v4l: Add packed Bayer raw12 pixel formats

2017-08-08 Thread Todor Tomov
From: Sakari Ailus These formats are compressed 12-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are V4L2_PIX_FMT_SBGGR12P V4L2_PIX_FMT_SGBRG12P V4L2_PIX_FMT_SGRBG12P V4L2_PIX_FMT_SRGGB

[PATCH v4 11/21] media: camss: Enable building

2017-08-08 Thread Todor Tomov
Add Makefile and update platform/Kconfig and platform/Makefile to enable building of the QCom CAMSS driver. Signed-off-by: Todor Tomov --- drivers/media/platform/Kconfig | 7 +++ drivers/media/platform/Makefile | 2 ++ drivers/media/platform/qcom/camss-8x16

[PATCH v4 13/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - PIX Interface

2017-08-08 Thread Todor Tomov
Update Qualcomm Camera Subsystem driver document for the PIX interface and format conversion support. Signed-off-by: Todor Tomov --- Documentation/media/v4l-drivers/qcom_camss.rst | 46 -- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/Documentation/media

[PATCH v4 12/21] camss: vfe: Format conversion support using PIX interface

2017-08-08 Thread Todor Tomov
Use VFE PIX input interface and do format conversion in VFE. Supported input format is UYVY (single plane YUV 4:2:2) and its different sample order variations. Supported output formats are: - NV12/NV21 (two plane YUV 4:2:0) - NV16/NV61 (two plane YUV 4:2:2) Signed-off-by: Todor Tomov --- .../m

Re: suspicious __GFP_NOMEMALLOC in selinux

2017-08-08 Thread Paul Moore
On Mon, Aug 7, 2017 at 2:58 AM, Michal Hocko wrote: > On Fri 04-08-17 13:12:04, Paul Moore wrote: >> On Fri, Aug 4, 2017 at 3:56 AM, Michal Hocko wrote: > [...] >> > Btw. Should I resend the patch or somebody will take it from this email >> > thread? >> >> No, unless your mailer mangled the patch

Re: [RFC v5 05/11] mm: fix lock dependency against mapping->i_mmap_rwsem

2017-08-08 Thread Laurent Dufour
On 08/08/2017 15:15, Peter Zijlstra wrote: > On Tue, Aug 08, 2017 at 02:20:23PM +0200, Laurent Dufour wrote: >> This is an option, but the previous one was signed by Peter, and I'd prefer >> to keep his unchanged and add this new one to fix that. >> Again this is to ease the review. > > You can al

Re: [v6 11/15] arm64/kasan: explicitly zero kasan shadow memory

2017-08-08 Thread Pasha Tatashin
On 2017-08-08 09:15, David Laight wrote: From: Pasha Tatashin Sent: 08 August 2017 12:49 Thank you for looking at this change. What you described was in my previous iterations of this project. See for example here: https://lkml.org/lkml/2017/5/5/369 I was asked to remove that flag, and only ze

Re: [PATCH v8 00/20] ILP32 for ARM64

2017-08-08 Thread Catalin Marinas
On Mon, Jul 24, 2017 at 02:26:24PM +0300, Yury Norov wrote: > This is the 4.12 and linux-next - based kernel patches: > https://github.com/norov/linux/tree/ilp32-4.12 > https://github.com/norov/linux/tree/ilp32-20170724 I published the 4.12 branch here: https://git.kernel.org/pub/scm/linux/kernel

[PATCH v4 09/21] media: camss: Add files which handle the video device nodes

2017-08-08 Thread Todor Tomov
These files handle the video device nodes of the camss driver. Signed-off-by: Todor Tomov --- .../media/platform/qcom/camss-8x16/camss-video.c | 681 + .../media/platform/qcom/camss-8x16/camss-video.h | 64 ++ 2 files changed, 745 insertions(+) create mode 100644 driver

[PATCH v4 10/21] media: camms: Add core files

2017-08-08 Thread Todor Tomov
These files implement the platform driver code. Signed-off-by: Todor Tomov --- drivers/media/platform/qcom/camss-8x16/camss.c | 699 + drivers/media/platform/qcom/camss-8x16/camss.h | 97 2 files changed, 796 insertions(+) create mode 100644 drivers/media/platform/

[PATCH v4 08/21] media: camss: Add VFE files

2017-08-08 Thread Todor Tomov
These files control the VFE module. The VFE has different input interfaces. The PIX input interface feeds the input data to an image processing pipeline. Three RDI input interfaces bypass the image processing pipeline. The VFE also contains the AXI bus interface which writes the output data to memo

[PATCH v4 03/21] MAINTAINERS: Add Qualcomm Camera subsystem driver

2017-08-08 Thread Todor Tomov
Add an entry for Qualcomm Camera subsystem driver. Signed-off-by: Todor Tomov --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bdde944..87d0c7f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10996,6 +10996,14 @@ W: http://wireless.k

[PATCH v4 06/21] media: camss: Add CSID files

2017-08-08 Thread Todor Tomov
These files control the CSID modules which handle the protocol and application layer of the CSI2 receivers. Signed-off-by: Todor Tomov --- .../media/platform/qcom/camss-8x16/camss-csid.c| 1003 .../media/platform/qcom/camss-8x16/camss-csid.h| 82 ++ 2 files changed

[PATCH v4 05/21] media: camss: Add CSIPHY files

2017-08-08 Thread Todor Tomov
These files control the CSIPHY modules which are responsible for the physical layer of the CSI2 receivers. Signed-off-by: Todor Tomov --- .../media/platform/qcom/camss-8x16/camss-csiphy.c | 823 + .../media/platform/qcom/camss-8x16/camss-csiphy.h | 77 ++ 2 files changed,

[PATCH v4 07/21] media: camss: Add ISPIF files

2017-08-08 Thread Todor Tomov
These files control the ISPIF module which handles the routing of the data streams from the CSIDs to the inputs of the VFE. Signed-off-by: Todor Tomov --- .../media/platform/qcom/camss-8x16/camss-ispif.c | 1164 .../media/platform/qcom/camss-8x16/camss-ispif.h | 85 ++

[PATCH v4 00/21] Qualcomm 8x16 Camera Subsystem driver

2017-08-08 Thread Todor Tomov
This patchset adds basic support for the Qualcomm Camera Subsystem found on Qualcomm MSM8916 and APQ8016 processors. The driver implements V4L2, Media controller and V4L2 subdev interfaces. Camera sensor using V4L2 subdev interface in the kernel is supported. The driver is implemented using as a

[PATCH v4 04/21] doc: media/v4l-drivers: Add Qualcomm Camera Subsystem driver document

2017-08-08 Thread Todor Tomov
Add a document to describe Qualcomm Camera Subsystem driver. Signed-off-by: Todor Tomov --- Documentation/media/v4l-drivers/qcom_camss.rst | 124 + 1 file changed, 124 insertions(+) create mode 100644 Documentation/media/v4l-drivers/qcom_camss.rst diff --git a/Documenta

Re: [PATCH] kbuild: Update example for ccflags-y usage

2017-08-08 Thread Jonathan Corbet
On Tue, 8 Aug 2017 14:36:02 +0200 Sedat Dilek wrote: > Will this go to Linux v4.13 or v4.14? It's queued for 4.14. jon

crypto: ccp: use dma_mapping_error to check map error

2017-08-08 Thread Pan Bian
The return value of dma_map_single() should be checked by dma_mapping_error(). However, in function ccp_init_dm_workarea(), its return value is checked against NULL, which could result in failures. Signed-off-by: Pan Bian --- drivers/crypto/ccp/ccp-ops.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] f2fs: introduce cur_reserved_blocks in sysfs

2017-08-08 Thread Yunlong Song
In this patch, we add a new sysfs interface, we can use it to gradually achieve the reserved_blocks finally, even when reserved_blocks is initially set over user_block_count - total_valid_block_count. This is very useful, especially when we upgrade kernel with new reserved_blocks value, but old dis

Re: [PATCH] MAINTAINERS: greybus: Fix typo s/LOOBACK/LOOPBACK

2017-08-08 Thread Sedat Dilek
On Tue, Jul 25, 2017 at 2:53 PM, Sedat Dilek wrote: > From: Sedat Dilek > > Fixes: f47e07bc5f1a5c48 ("Fix up MAINTAINERS file problems") > Cc: Joe Perches > Cc: Linus Torvalds > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Sedat Dilek > --- > [ dileks: v2: CC LKML (Thanks Joe Perches) ] >

Re: [PATCH 0/4] constify thermal_zone_of_device_ops structures

2017-08-08 Thread Zhang Rui
On Sat, 2017-08-05 at 22:37 +0200, Julia Lawall wrote: > The thermal_zone_of_device_ops structures are only passed as the > fourth > argument to thermal_zone_of_sensor_register, which is declared as > const. > Thus the thermal_zone_of_device_ops structures themselves can be > const. > > Done with

Re: [PATCH v4 06/19] crypto: move algif to generic async completion

2017-08-08 Thread Gilad Ben-Yossef
On Tue, Aug 8, 2017 at 4:10 PM, Stephan Mueller wrote: > Am Dienstag, 8. August 2017, 14:03:37 CEST schrieb Gilad Ben-Yossef: > > Hi Gilad, > >> algif starts several async crypto ops and waits for their completion. >> Move it over to generic code doing the same. > > Just FYI: your patch set and my

Re: [PATCH 0/4] constify thermal_zone_of_device_ops structures

2017-08-08 Thread Julia Lawall
On Tue, 8 Aug 2017, Zhang Rui wrote: > On Sat, 2017-08-05 at 22:37 +0200, Julia Lawall wrote: > > The thermal_zone_of_device_ops structures are only passed as the > > fourth > > argument to thermal_zone_of_sensor_register, which is declared as > > const. > > Thus the thermal_zone_of_device_ops s

Re: [PATCH v4] printk: Add monotonic, boottime, and realtime timestamps

2017-08-08 Thread Prarit Bhargava
On 08/07/2017 08:19 PM, Sergey Senozhatsky wrote: > On (08/07/17 11:52), Prarit Bhargava wrote: > [..] >> +if (strlen(param) == 1) { >> +/* Preserve legacy boolean settings */ >> +if (!strcmp("0", param) || !strcmp("n", param) || >> +!strcmp("N", par

[PATCHv2] bluetooth: document config options

2017-08-08 Thread Pavel Machek
Kernel config options should include useful help text; I had to look up the terms on wikipedia. Signed-off-by: Pavel Machek --- > are you planning to send a patch with updated wording for this? Sorry for the delay, it is above. I added word "wifi" to 802.11 description.

[PATCH 1/3] serial: 8250_uniphier: fix serial port index in private data

2017-08-08 Thread Masahiro Yamada
serial8250_register_8250_port() may allocate a different port index than requested. The driver needs to remember the returned value of serial8250_register_8250_port() for later use. Otherwise, the .remove hook may unregister a different port. Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniP

[PATCH 3/3] serial: 8250_uniphier: add suspend/resume support

2017-08-08 Thread Masahiro Yamada
Add suspend/resume support for UniPhier serial driver. Signed-off-by: Masahiro Yamada --- drivers/tty/serial/8250/8250_uniphier.c | 35 + 1 file changed, 35 insertions(+) diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphi

[PATCH 0/3] serial: 8250_uniphier: bug fix and suspend/resume support

2017-08-08 Thread Masahiro Yamada
1/3 is a bug-fix (the driver may unregister a different port) 2/3 and 3/3 add suspend/resume support. Masahiro Yamada (3): serial: 8250_uniphier: fix serial port index in private data serial: 8250_uniphier: use CHAR register for canary to detect power-off serial: 8250_uniphier: add su

[PATCH 2/3] serial: 8250_uniphier: use CHAR register for canary to detect power-off

2017-08-08 Thread Masahiro Yamada
The 8250 core uses the SCR as a canary to discover if the console has been powered-off. This hardware does not have SCR at offset 7, but an unused register CHAR at a different offset. As long as the character interrupt is disabled, the register access has no impact, so it is useful as an alternat

Re: [PATCH 1/2] arm64: introduce separated bits for mm_context_t flags

2017-08-08 Thread Catalin Marinas
On Sat, Aug 05, 2017 at 05:40:21PM +0300, Yury Norov wrote: > diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h > index 5468c834b072..2c57b06b2883 100644 > --- a/arch/arm64/include/asm/mmu.h > +++ b/arch/arm64/include/asm/mmu.h > @@ -16,6 +16,8 @@ > #ifndef __ASM_MMU_H > #d

Re: [PATCH] KVM: X86: expand ->arch.apic_arb_prio to u64

2017-08-08 Thread Longpeng (Mike)
On 2017/8/8 21:08, Paolo Bonzini wrote: > On 08/08/2017 13:37, Longpeng(Mike) wrote: >> Currently 'apic_arb_prio' is int32_t, it's too short for long >> time running. In our environment, it overflowed and then the >> UBSAN was angry: >> >> signed integer overflow: >> 2147483647 + 1 cannot be rep

[PATCH] hv_set_ifconfig.sh double check before setting ip

2017-08-08 Thread Eduardo Otubo
This patch fixes the behavior of the hv_set_ifconfig script when setting the interface ip. Sometimes the interface has already been configured by network daemon, in this case hv_set_ifconfig causes "RTNETLINK: file exists error"; in order to avoid this error this patch makes sure double checks the

Re: [PATCH 2/2] arm64: cleanup {COMPAT_,}SET_PERSONALITY() macro

2017-08-08 Thread Catalin Marinas
On Sat, Aug 05, 2017 at 05:40:22PM +0300, Yury Norov wrote: > Originally {COMPAT_,}SET_PERSONALITY() only sets the 32-bit flag in > thread_info > structure. But there is some work that should be done after setting the > personality. > Currently it's done in the macro, which is not the best idea.

scsi: qla2xxx: use dma_mapping_error to check map errors

2017-08-08 Thread Pan Bian
The return value of dma_map_single() should be checked by dma_mapping_error(). However, in function qla26xx_dport_diagnostics(), its return value is checked against NULL, which could result in failures. Signed-off-by: Pan Bian --- drivers/scsi/qla2xxx/qla_mbx.c | 2 +- 1 file changed, 1 insertio

Re: [RESEND PATCH v2 1/2] sched/rt: add utilization tracking

2017-08-08 Thread Vincent Guittot
On 7 August 2017 at 18:44, Peter Zijlstra wrote: > On Fri, Aug 04, 2017 at 03:40:21PM +0200, Vincent Guittot wrote: > >> There were several comments on v1: >> - As raised by Peter for v1, if IRQ time is taken into account in >> rt_avg, it will not be accounted in rq->clock_task. This means that

Re: [PATCH] KVM: X86: expand ->arch.apic_arb_prio to u64

2017-08-08 Thread Paolo Bonzini
On 08/08/2017 15:50, Longpeng (Mike) wrote: > > > On 2017/8/8 21:08, Paolo Bonzini wrote: > >> On 08/08/2017 13:37, Longpeng(Mike) wrote: >>> Currently 'apic_arb_prio' is int32_t, it's too short for long >>> time running. In our environment, it overflowed and then the >>> UBSAN was angry: >>> >>

Re: [PATCH v2 0/3] fix xen hvm guest with kaslr enabled

2017-08-08 Thread Boris Ostrovsky
On 08/08/2017 02:46 AM, Juergen Gross wrote: > On 28/07/17 12:23, Juergen Gross wrote: >> This patch series fixes a regression introduced in 4.13-rc1: A Xen >> HVM guest with KASLR enabled wouldn't boot any longer due to the usage >> of __va() before kernel_randomize_memory() was called. >> >> Chan

Re: [RESEND PATCH v2 1/2] sched/rt: add utilization tracking

2017-08-08 Thread Peter Zijlstra
On Tue, Aug 08, 2017 at 03:56:26PM +0200, Vincent Guittot wrote: > > I don't think that IRQ tracking patch is working. > update_irq_load_avg(rq->clock, cpu_of(rq), rq, 1); is called in > update_rq_clock_task() which is never called in irq context. In order > to use PELT for tracking irq and paravi

Re: [PATCHv2] bluetooth: document config options

2017-08-08 Thread Marcel Holtmann
Hi Pavel, > On Aug 8, 2017, at 15:48, Pavel Machek wrote: > > Kernel config options should include useful help text; I had to look > up the terms on wikipedia. > > Signed-off-by: Pavel Machek > > --- > >> are you planning to send a patch with updated wording for this? > > Sorry for the dela

Re: [PATCH] arm64: correct modules range of kernel virtual memory layout

2017-08-08 Thread Ard Biesheuvel
On 8 August 2017 at 14:19, Will Deacon wrote: > On Tue, Aug 08, 2017 at 01:27:25PM +0800, Miles Chen wrote: >> On Tue, 2017-08-08 at 12:44 +0800, Miles Chen wrote: >> > On Mon, 2017-08-07 at 15:01 +0100, Will Deacon wrote: >> > > On Mon, Aug 07, 2017 at 02:18:00PM +0100, Ard Biesheuvel wrote: >> >

Re: [PATCH] net: phy: Use tab for indentation in Kconfig

2017-08-08 Thread Andrew Lunn
On Tue, Aug 08, 2017 at 11:32:25AM +0200, Michal Simek wrote: > Using tabs instead of space for indentaion > > Signed-off-by: Michal Simek Reviewed-by: Andrew Lunn Andrew

RE: [PATCH 0/2] ARM: shmobile: document iWave's iW-RainboW-G22D-SODIMM RZ/G1E SODIMM development platform

2017-08-08 Thread Chris Paterson
+ linux-renesas-soc > From: Fabrizio Castro [mailto:fabrizio.cas...@bp.renesas.com] > Sent: 08 August 2017 13:28 > To: robh...@kernel.org; mark.rutl...@arm.com > > Hello, > > This series aims to add the documentation for the device tree bindings of the > iWave iW-RainboW-G22D-SODIMM RZ/G1E SODIM

RE: [PATCH 1/2] ARM: shmobile: document iW-RainboW-G22M-SM SODIMM System on Module

2017-08-08 Thread Chris Paterson
+ linux-renesas-soc > From: Fabrizio Castro [mailto:fabrizio.cas...@bp.renesas.com] > Sent: 08 August 2017 13:28 > > Document the iW-RainboW-G22M-SM SODIMM System on Module device tree > bindings. It is just a placeholder for the time being, the actual > implementation > is not available yet. >

RE: [PATCH 2/2] ARM: shmobile: document iW-RainboW-G22D SODIMM SOM Development Platform

2017-08-08 Thread Chris Paterson
+ linux-renesas-soc > From: Fabrizio Castro [mailto:fabrizio.cas...@bp.renesas.com] > Sent: 08 August 2017 13:28 > > Document the iW-RainboW-G22D device tree bindings. > It is just a placeholder for the time being, the actual implementation is not > available yet. > > Signed-off-by: Fabrizio Cas

Re: [PATCH] arm64: correct modules range of kernel virtual memory layout

2017-08-08 Thread Will Deacon
On Tue, Aug 08, 2017 at 03:04:55PM +0100, Ard Biesheuvel wrote: > On 8 August 2017 at 14:19, Will Deacon wrote: > > On Tue, Aug 08, 2017 at 01:27:25PM +0800, Miles Chen wrote: > >> On Tue, 2017-08-08 at 12:44 +0800, Miles Chen wrote: > >> > Agreed.MODULES_VADDR should be phased out. Considering th

Re: [PATCH] usb: gadget: f_uac2: calculate wMaxPacketSize before endpoint match

2017-08-08 Thread Roger Quadros
On 17/05/17 11:15, Sekhar Nori wrote: > Calculate wMaxPacketSize before endpoint matching the > descriptor is found. > > This allows audio gadget to be used with controllers > which have a shortage or unavailability of endpoints > that can handle max packet size of 1023 (FS) or 1024 > (HS). > > W

Re: [PATCH 2/2] PCI: iproc: Add optional brcm,pci-hotplug

2017-08-08 Thread Rob Herring
Please send bindings to DT list. On Mon, Aug 7, 2017 at 11:44 PM, Oza Pawandeep wrote: > Add description for optional device tree property > 'brcm,pci-hotplug' for PCI hotplug feature. > > Signed-off-by: Oza Pawandeep > Reviewed-by: Ray Jui > > diff --git a/Documentation/devicetree/bindings/pci

Re: [PATCH] arm64: correct modules range of kernel virtual memory layout

2017-08-08 Thread Ard Biesheuvel
On 8 August 2017 at 15:18, Will Deacon wrote: > On Tue, Aug 08, 2017 at 03:04:55PM +0100, Ard Biesheuvel wrote: >> On 8 August 2017 at 14:19, Will Deacon wrote: >> > On Tue, Aug 08, 2017 at 01:27:25PM +0800, Miles Chen wrote: >> >> On Tue, 2017-08-08 at 12:44 +0800, Miles Chen wrote: >> >> > Agre

Re: [PATCH] usb: gadget: f_uac2: calculate wMaxPacketSize before endpoint match

2017-08-08 Thread Sekhar Nori
On Tuesday 08 August 2017 07:50 PM, Roger Quadros wrote: > On 17/05/17 11:15, Sekhar Nori wrote: >> Calculate wMaxPacketSize before endpoint matching the >> descriptor is found. >> >> This allows audio gadget to be used with controllers >> which have a shortage or unavailability of endpoints >> tha

[PATCH 02/16] mm: Prepare for FAULT_FLAG_SPECULATIVE

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra When speculating faults (without holding mmap_sem) we need to validate that the vma against which we loaded pages is still valid when we're ready to install the new PTE. Therefore, replace the pte_offset_map_lock() calls that (re)take the PTL with pte_map_lock() which can fa

[PATCH 00/16] Speculative page faults

2017-08-08 Thread Laurent Dufour
This is a port on kernel 4.13 of the work done by Peter Zijlstra to handle page fault without holding the mm semaphore [1]. The idea is to try to handle user space page faults without holding the mmap_sem. This should allow better concurrency for massively threaded process since the page fault han

[PATCH 16/16] perf tools: Add support for SPF events

2017-08-08 Thread Laurent Dufour
Add support for the new speculative faults events. Signed-off-by: Laurent Dufour --- tools/include/uapi/linux/perf_event.h | 2 ++ tools/perf/util/evsel.c | 2 ++ tools/perf/util/parse-events.c| 8 tools/perf/util/parse-events.l| 2 ++ tools/perf/util/pytho

[PATCH 12/16] mm: Protect SPF handler against anon_vma changes

2017-08-08 Thread Laurent Dufour
The speculative page fault handler must be protected against anon_vma changes. This is because page_add_new_anon_rmap() is called during the speculative path. In addition, don't try speculative page fault if the VMA don't have an anon_vma structure allocated because its allocation should be protec

[PATCH 15/16] powerpc/mm: Add support for SPF events

2017-08-08 Thread Laurent Dufour
Add support for the new speculative page faults software events. Signed-off-by: Laurent Dufour --- arch/powerpc/mm/fault.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c index c6cd40901dd0..112c4bc9da70 100644 --- a/arc

[PATCH 14/16] x86/mm: Add support for SPF events

2017-08-08 Thread Laurent Dufour
Add support for the new speculative page faults software events. Signed-off-by: Laurent Dufour --- arch/x86/mm/fault.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 46fb9c2a832d..17985f11b9da 100644 --- a/arch/x86/mm/faul

mtd: nand: use dma_mapping_error to check map errors

2017-08-08 Thread Pan Bian
The return value of dma_map_single() should be checked by dma_mapping_error(). However, in function flctl_dma_fifo0_transfer(), its return value is checked against NULL, which could result in failures. Signed-off-by: Pan Bian --- drivers/mtd/nand/sh_flctl.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 10/16] powerpc/mm: Add speculative page fault

2017-08-08 Thread Laurent Dufour
This patch enable the speculative page fault on the PowerPC architecture. This will try a speculative page fault without holding the mmap_sem, if it returns with WM_FAULT_RETRY, the mmap_sem is acquired and the traditional page fault processing is done. Signed-off-by: Laurent Dufour --- arch/po

[PATCH 13/16] perf: Add a speculative page fault sw events

2017-08-08 Thread Laurent Dufour
Add new software events to count succeeded and failed speculative page faults. Signed-off-by: Laurent Dufour --- include/uapi/linux/perf_event.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index b1c0b187acfe..fbfb03dff33

[PATCH 11/16] mm: Introduce __page_add_new_anon_rmap()

2017-08-08 Thread Laurent Dufour
When dealing with speculative page fault handler, we may race with VMA being split or merged. In this case the vma->vm_start and vm->vm_end fields may not match the address the page fault is occurring. This can only happens when the VMA is split but in that case, the anon_vma pointer of the new VM

[PATCH 09/16] x86/mm: Add speculative pagefault handling

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra Try a speculative fault before acquiring mmap_sem, if it returns with VM_FAULT_RETRY continue with the mmap_sem acquisition and do the traditional fault. Signed-off-by: Peter Zijlstra (Intel) [Clearing of FAULT_FLAG_ALLOW_RETRY is now done in handle_speculative_fault()] [

[PATCH 07/16] mm: Provide speculative fault infrastructure

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra Provide infrastructure to do a speculative fault (not holding mmap_sem). The not holding of mmap_sem means we can race against VMA change/removal and page-table destruction. We use the SRCU VMA freeing to keep the VMA around. We use the VMA seqcount to detect change (includi

[PATCH 08/16] mm: Try spin lock in speculative path

2017-08-08 Thread Laurent Dufour
There is a deadlock when a CPU is doing a speculative page fault and another one is calling do_unmap(). The deadlock occurred because the speculative path try to spinlock the pte while the interrupt are disabled. When the other CPU in the unmap's path has locked the pte then is waiting for all the

Re: firmware: vpd: use memunmap instead of iounmap

2017-08-08 Thread Guenter Roeck
On Tue, Aug 8, 2017 at 5:45 AM, Pan Bian wrote: > In functions vpd_sections_init() and vpd_section_init(), iounmap() is > used to unmap memory. However, in these cases, memunmap() is better. > > Signed-off-by: Pan Bian The code uses memremap(), so that seems reasonable. Reviewed-by: Guenter Roe

[PATCH 06/16] mm: RCU free VMAs

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra Manage the VMAs with SRCU such that we can do a lockless VMA lookup. We put the fput(vma->vm_file) in the SRCU callback, this keeps files valid during speculative faults, this is possible due to the delayed fput work by Al Viro -- do we need srcu_barrier() in unmount somepla

[PATCH 03/16] mm: Introduce pte_spinlock for FAULT_FLAG_SPECULATIVE

2017-08-08 Thread Laurent Dufour
When handling page fault without holding the mmap_sem the fetch of the pte lock pointer and the locking will have to be done while ensuring that the VMA is not touched in our back. So move the fetch and locking operations in a dedicated function. Signed-off-by: Laurent Dufour --- mm/memory.c |

[PATCH 05/16] mm: Protect VMA modifications using VMA sequence count

2017-08-08 Thread Laurent Dufour
The VMA sequence count has been introduced to allow fast detection of VMA modification when running a page fault handler without holding the mmap_sem. This patch provides protection agains the VMA modification done in : - madvise() - mremap() - mpol_rebind_policy()

[PATCH 04/16] mm: VMA sequence count

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra Wrap the VMA modifications (vma_adjust/unmap_page_range) with sequence counts such that we can easily test if a VMA is changed. The unmap_page_range() one allows us to make assumptions about page-tables; when we find the seqcount hasn't changed we can assume page-tables are

[PATCH 01/16] mm: Dont assume page-table invariance during faults

2017-08-08 Thread Laurent Dufour
From: Peter Zijlstra One of the side effects of speculating on faults (without holding mmap_sem) is that we can race with free_pgtables() and therefore we cannot assume the page-tables will stick around. Remove the reliance on the pte pointer. Signed-off-by: Peter Zijlstra (Intel) --- mm/memo

Re: scsi: mvsas: replace kfree with scsi_host_put

2017-08-08 Thread Jinpu Wang
On Tue, Aug 8, 2017 at 2:02 PM, Pan Bian wrote: > The return value of scsi_host_alloc() should be released by > scsi_host_put(). However, in function mvs_pci_init(), kfree() > is used. This patch replaces kfree() with scsi_host_put() to avoid > possible memory leaks. > > Signed-off-by: Pan Bian >

[PATCH 0/3 v2] thermal: core: Fix some error handling code in 'thermal_zone_device_register()'

2017-08-08 Thread Christophe JAILLET
These patches fix some issue in the error handling path in 'thermal_zone_device_register()' The first patch adds some new helper function in order to ease the resource management. Maybe using devm_ variant could also be a better choise to free manage these resources. As it would be a bigger change

[PATCH 2/3 v2] thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function

2017-08-08 Thread Christophe JAILLET
Simplify code by using the new 'thermal_zone_destroy_device_groups()' helper function. Signed-off-by: Christophe JAILLET --- drivers/thermal/thermal_core.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c ind

[PATCH 1/3 v2] thermal: core: Add some new helper functions to free resources

2017-08-08 Thread Christophe JAILLET
In order to easily free resources allocated by 'thermal_zone_create_device_groups()' we need 2 new helper functions. The first one undoes 'thermal_zone_create_device_groups()'. The 2nd one undoes 'create_trip_attrs()', which is a function called by 'thermal_zone_create_device_groups()'. Signed-of

[PATCH 3/3 v2] thermal: core: Fix resources release in error paths in thermal_zone_device_register()

2017-08-08 Thread Christophe JAILLET
Reorder error handling code in order to fix some resources leaks in some cases: - 'tz' would leak if 'thermal_zone_create_device_groups()' fails - memory allocated by 'thermal_zone_create_device_groups()' would leak if 'device_register()' fails With this patch, we now have 2 error handl

Re: [PATCH v4 09/21] media: camss: Add files which handle the video device nodes

2017-08-08 Thread Sakari Ailus
Hi Todor, On Tue, Aug 08, 2017 at 04:30:06PM +0300, Todor Tomov wrote: ... > +static int video_start_streaming(struct vb2_queue *q, unsigned int count) > +{ > + struct camss_video *video = vb2_get_drv_priv(q); > + struct video_device *vdev = &video->vdev; > + struct media_entity *entit

media: mtk-mdp: use IS_ERR to check return value of of_clk_get

2017-08-08 Thread Pan Bian
Function of_clk_get() returns an ERR_PTR on failures. In file mtk_mdp_commp.c, its return value is checked against NULL. Such checks cannot prevent from accessing bad memory. This patch replaces the NULL checks with IS_ERR checks. Signed-off-by: Pan Bian --- drivers/media/platform/mtk-mdp/mtk_md

Re: [PATCH v4 00/21] Qualcomm 8x16 Camera Subsystem driver

2017-08-08 Thread Sakari Ailus
On Tue, Aug 08, 2017 at 04:29:57PM +0300, Todor Tomov wrote: > This patchset adds basic support for the Qualcomm Camera Subsystem found > on Qualcomm MSM8916 and APQ8016 processors. > > The driver implements V4L2, Media controller and V4L2 subdev interfaces. > Camera sensor using V4L2 subdev inter

Re: scsi: hisi_sas: replace kfree with scsi_host_put

2017-08-08 Thread John Garry
On 08/08/2017 12:37, Pan Bian wrote: Return value of scsi_host_alloc() should be released with scsi_host_put() rather than kfree(). Signed-off-by: Pan Bian We also have a kfree(shost) in newly added pci-based v3 driver which would need replacing for consistency. But, apart from that, we se

Re: Question about bh1770glc.ko

2017-08-08 Thread Greg KH
On Tue, Aug 08, 2017 at 03:46:18PM +0300, Anton Volkov wrote: > Hello. > > In drivers/misc/bh1770glc.c several functions have comments stating that > they must be called under lock protection, e.g. bh1770_prox_mode_control, > bh1770_lux_interrupt_control, bh1770_lux_rate, bh1770_chip_on. However t

Re: kernel BUG at kernel/futex.c:679 on v4.13-rc3-ish on arm64

2017-08-08 Thread Mark Rutland
t;) > > ... misreported as I accidentally throw away the flags in __BUG_FLAGS(). > Other than that, I believe BUG() and friends are working correctly. > > The Syzkaller log is huge (1.0M), so rather than attaching it, I've > uploaded the log, report, and kernel config to: >

Re: [RFC][PATCH] mm/slub.c: Allow poisoning to use the fast path

2017-08-08 Thread Christopher Lameter
On Mon, 7 Aug 2017, Kees Cook wrote: > > To clarify, this is desirable to kill exploitation of > exposure-after-free flaws and some classes of use-after-free flaws, > since the contents will have be wiped out after a free. (Verification > of poison is nice, but is expensive compared to the benefit

[PATCH] drm: make drm_mode_config_func const

2017-08-08 Thread Bhumika Goyal
Make these structures const as they are only stored in the funcs field of a drm_mode_config structure which is of type const. Done using Coccinelle: @match disable optional_qualifier@ identifier s; @@ static struct drm_mode_config_funcs s = {...}; @ref@ position p; identifier match.s; @@ s@p @go

[PATCH] drivers/staging/wlan-ng/p80211conv.c: fixed a potential memory leak

2017-08-08 Thread Lynn Lei
Fixed a potential memory leak inside skb_ether_to_p80211() When the wep_encrypt() fails the code return 2 directly Which causes the p80211_wep->data dangling Add a kfree statement to reclaim that memory allocated Signed-off-by: Lynn Lei --- drivers/staging/wlan-ng/p80211conv.c

Re: [PATCH 0/4] Removing full paths from DT full_name

2017-08-08 Thread Rob Herring
On Mon, Aug 7, 2017 at 9:21 PM, Michael Ellerman wrote: > Rob Herring writes: > >> On Tue, Jul 25, 2017 at 4:44 PM, Rob Herring wrote: >>> This series is the last steps to remove storing the full path for every >>> DT node. Instead, we can create full path strings dynamically as needed >>> with

Re: [PATCH v3 4/9] clk: rockchip: support more rates for cpuclk

2017-08-08 Thread Heiko Stuebner
Am Dienstag, 8. August 2017, 15:15:42 CEST schrieb Elaine Zhang: > fix up the cpuclk rates table for support more freqs. > fix up the mux_core_mask describe error. > > Signed-off-by: Elaine Zhang already applied the one from Andy's v2, so ignored this one

Re: scsi: hisi_sas: replace kfree with scsi_host_put

2017-08-08 Thread PanBian
On Tue, Aug 08, 2017 at 03:56:22PM +0100, John Garry wrote: > On 08/08/2017 12:37, Pan Bian wrote: > >Return value of scsi_host_alloc() should be released with > >scsi_host_put() rather than kfree(). > > > >Signed-off-by: Pan Bian > > We also have a kfree(shost) in newly added pci-based v3 driver

Re: [PATCH v3 5/9] clk: rockchip: fix up the pll clks error for rv1108 SoC

2017-08-08 Thread Heiko Stuebner
Am Dienstag, 8. August 2017, 15:17:55 CEST schrieb Elaine Zhang: > fix up the lock_shift describe error. > remove the ROCKCHIP_PLL_SYNC_RATE flag for gpll. > > Signed-off-by: Elaine Zhang already picked the one from Andy's v2, so ignored this one Heiko

[PATCH] drm/virtio: make drm_fb_helper_funcs const

2017-08-08 Thread Bhumika Goyal
Make these structures const as they are only passed to the function drm_fb_helper_prepare and the corresponding argument is of type const. Done using Coccinelle @match disable optional_qualifier@ identifier s; @@ static struct drm_fb_helper_funcs s = {...}; @ref@ position p; identifier match.s; @

Re: kernel BUG at kernel/futex.c:679 on v4.13-rc3-ish on arm64

2017-08-08 Thread Mark Rutland
On Tue, Aug 08, 2017 at 03:57:32PM +0100, Mark Rutland wrote: > The below test case fires for me in a few seconds on an arm64 platform, > triggering the kernel BUG at kernel/futex.c:679. If left running for longer, I > then get a stream of other BUGs that I believe are a result of the first > issu

Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK

2017-08-08 Thread Mike Kravetz
On 08/08/2017 06:15 AM, Rik van Riel wrote: > On Tue, 2017-08-08 at 11:58 +0200, Florian Weimer wrote: >> On 08/07/2017 08:23 PM, Mike Kravetz wrote: >>> If my thoughts above are correct, what about returning EINVAL if >>> one >>> attempts to set MADV_DONTFORK on mappings set up for sharing? >> >>

Re: [PATCH v2 0/2] mm,fork,security: introduce MADV_WIPEONFORK

2017-08-08 Thread Florian Weimer
On 08/08/2017 05:19 PM, Mike Kravetz wrote: > On 08/08/2017 06:15 AM, Rik van Riel wrote: >> On Tue, 2017-08-08 at 11:58 +0200, Florian Weimer wrote: >>> On 08/07/2017 08:23 PM, Mike Kravetz wrote: If my thoughts above are correct, what about returning EINVAL if one attempts to set M

Re: scsi: qla2xxx: use dma_mapping_error to check map errors

2017-08-08 Thread Madhani, Himanshu
> On Aug 8, 2017, at 6:55 AM, Pan Bian wrote: > > The return value of dma_map_single() should be checked by > dma_mapping_error(). However, in function qla26xx_dport_diagnostics(), its > return value is checked against NULL, which could result in failures. > > Signed-off-by: Pan Bian > --- > d

Re: [PATCH v4 02/19] crypto: ccm: use -EAGAIN for transient busy indication

2017-08-08 Thread Gary R Hook
On 08/08/2017 07:03 AM, Gilad Ben-Yossef wrote: Replace -EBUSY with -EAGAIN when reporting transient busy indication in the absence of backlog. Signed-off-by: Gilad Ben-Yossef Could we use "ccp" in the subject line, please? --- drivers/crypto/ccp/ccp-crypto-main.c | 8 +++- drivers/cry

Re: [PATCH v2] sched: debug: use task_pid_nr_ns in /proc/$pid/sched

2017-08-08 Thread Eric W. Biederman
Jessie Frazelle writes: > Thanks for patching this :) Guess I will find a different rabbit in a > hat to detect if running in a pid namespace ;) I want to say that stating the /proc/pid/ns/pid files ought to be an easy way. But thinking about it they permissions on those might be a bit tricky.

Re: crypto: ccp: use dma_mapping_error to check map error

2017-08-08 Thread Gary R Hook
On 08/08/2017 08:42 AM, Pan Bian wrote: The return value of dma_map_single() should be checked by dma_mapping_error(). However, in function ccp_init_dm_workarea(), its return value is checked against NULL, which could result in failures. Signed-off-by: Pan Bian Acked-by: Gary R Hook --- d

Re: kernel BUG at kernel/futex.c:679 on v4.13-rc3-ish on arm64

2017-08-08 Thread Mel Gorman
t;) > > ... misreported as I accidentally throw away the flags in __BUG_FLAGS(). > Other than that, I believe BUG() and friends are working correctly. > > The Syzkaller log is huge (1.0M), so rather than attaching it, I've > uploaded the log, report, and kernel config to: >

Re: [PATCH v4 0/2] clk: rockchip: support clk drivers for RK3126 SoC.

2017-08-08 Thread Heiko Stuebner
Am Dienstag, 1. August 2017, 09:17:02 CEST schrieb Elaine Zhang: > changed in V4: > modify the document description for rk3126 clock. > > changed in V3: > add documentation for rk3126 clock > > Elaine Zhang (2): > clk: rockchip: rk3128: modify rk3128 clk driver to support rk3126 > dt-bindings

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