[PATCH 09/10] mm: Convert __vm_insert_mixed to vm_fault_t

2018-08-28 Thread Matthew Wilcox
Both of its callers currently convert its errno return into a vm_fault_t, so move the conversion into __vm_insert_mixed. Signed-off-by: Matthew Wilcox --- mm/memory.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/mm/memory.c b/mm/memor

[PATCH v3] mtd: spi-nor: fsl-quadspi: fix read error for flash size larger than 16MB

2018-08-28 Thread Liu Xiang
If the size of spi-nor flash is larger than 16MB, the read_opcode is set to SPINOR_OP_READ_1_1_4_4B, and fsl_qspi_get_seqid() will return -EINVAL when cmd is SPINOR_OP_READ_1_1_4_4B. This can cause read operation fail. Fixes: e46ecda764dc ("mtd: spi-nor: Add Freescale QuadSPI driver") Cc: Signed-

[PATCH 05/10] mm: Make vm_insert_pfn_prot static

2018-08-28 Thread Matthew Wilcox
Now this is no longer used outside mm/memory.c, make it static. Signed-off-by: Matthew Wilcox --- include/linux/mm.h | 2 -- mm/memory.c| 50 +++--- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/include/linux/mm.h b/include/linu

[PATCH 07/10] mm: Remove vm_insert_pfn

2018-08-28 Thread Matthew Wilcox
All callers are now converted to vmf_insert_pfn so convert vmf_insert_pfn() from being a compatibility wrapper around vm_insert_pfn() to being a compatibility wrapper around vmf_insert_pfn_prot(). Signed-off-by: Matthew Wilcox --- include/linux/mm.h | 15 + mm/memory.c| 54 ++

[PATCH 06/10] mm: Remove references to vm_insert_pfn

2018-08-28 Thread Matthew Wilcox
Documentation and comments. Signed-off-by: Matthew Wilcox --- Documentation/x86/pat.txt | 4 ++-- include/asm-generic/pgtable.h | 4 ++-- include/linux/hmm.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt

[PATCH 01/10] cramfs: Convert to use vmf_insert_mixed

2018-08-28 Thread Matthew Wilcox
cramfs is the only remaining user of vm_insert_mixed; convert it. Signed-off-by: Matthew Wilcox --- fs/cramfs/inode.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index f408994fc632..b72449c19cd1 100644 --- a/fs/cramfs/inode.c

[PATCH 04/10] x86: Convert vdso to use vm_fault_t

2018-08-28 Thread Matthew Wilcox
Return vm_fault_t codes directly from the appropriate mm routines instead of converting from errnos ourselves. Fixes a minor bug where we'd return SIGBUS instead of the correct OOM code if we ran out of memory allocating page tables. Signed-off-by: Matthew Wilcox Reviewed-by: Thomas Gleixner --

[PATCH 02/10] mm: Remove vm_insert_mixed

2018-08-28 Thread Matthew Wilcox
All callers are now converted to vmf_insert_mixed() so convert vmf_insert_mixed() from being a compatibility wrapper into the real function. Signed-off-by: Matthew Wilcox --- include/linux/mm.h | 15 +-- mm/memory.c| 14 ++ 2 files changed, 11 insertions(+), 18 de

[PATCH 00/10] Push the vm_fault_t conversion further

2018-08-28 Thread Matthew Wilcox
This patch series reaps some of the benefits of the vm_fault_t work that Souptick has been diligently plugging away at by converting insert_pfn() to return a vm_fault_t. Eventually, we'll be able to do the same thing to insert_page(), but there's more work to be done converting all current callers

Re: VirtIO console hangs

2018-08-28 Thread Matteo Croce
On Tue, Aug 28, 2018 at 2:35 PM Nicholas Piggin wrote: > > On Tue, 28 Aug 2018 12:54:08 + > Matteo Croce wrote: > > > With kernel 4.19.0-rc1 virtio_console hangs very often. > > I can always trigger the bug by pasting some characters in the > > terminal window, the console will stop receiving

Re: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes

2018-08-28 Thread Miguel Ojeda
Hi Nick, On Mon, Aug 27, 2018 at 7:43 PM, Nick Desaulniers wrote: > On Sun, Aug 26, 2018 at 10:58 AM Miguel Ojeda > wrote: >> >> Instead of using version checks per-compiler to define (or not) each >> attribute, >> use __has_attribute to test for them, following the cleanup started with >> comm

[PATCH 1/2] arm64: PCI: Remove node-local allocations when initialising host controller

2018-08-28 Thread Punit Agrawal
Memory for host controller data structures is allocated local to the node to which the controller is associated with. This has been the behaviour since support for ACPI was added in commit 0cb0786bac15 ("ARM64: PCI: Support ACPI-based PCI host controller"). Drop the node local allocation as there

[PATCH 2/2] x86/PCI: Remove node-local allocation when initialising host controller

2018-08-28 Thread Punit Agrawal
Memory for host controller data structures is allocated local to the node to which the controller is associated with. This has been the behaviour since 965cd0e4a5e5 ("x86, PCI, ACPI: Use kmalloc_node() to optimize for performance") where the node local allocation was added without additional contex

[PATCH 0/2] Drop node-local allocation during host controller initialisation

2018-08-28 Thread Punit Agrawal
Hi Bjorn, As discussed before[0], here are a couple of patches to drop node-local allocations during host contoller initialisation. This set covers both arm64 and x86. I'm posting early to give the patches time on the list as well in next in case there are issues we've missed. The patches are ba

Re: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes

2018-08-28 Thread Miguel Ojeda
Hi Nick, On Mon, Aug 27, 2018 at 7:48 PM, Nick Desaulniers wrote: > On Mon, Aug 27, 2018 at 10:43 AM Nick Desaulniers >> > + >> > +/* >> > + * Optional attributes: your compiler may or may not support them. >> > + * >> > + * To check for them, we use __has_attribute, which is supported on gcc >>

[PATCH] x86/dumpstack: don't dump kernel memory based on usermode RIP

2018-08-28 Thread Jann Horn
show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure that userspace can't trick us into dumping ke

WARNING: bad unlock balance in ucma_destroy_id

2018-08-28 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:5b394b2ddf03 Linux 4.19-rc1 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=117e0da640 kernel config: https://syzkaller.appspot.com/x/.config?x=49927b422dcf0b29 dashboard link: https://syzkaller.a

[PATCH] KVM: x86: SVM: remove unused variable dst_vaddr_end

2018-08-28 Thread Colin King
From: Colin Ian King Variable dst_vaddr_end is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'dst_vaddr_end' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- arch/x86/kvm/svm.c | 3 +-- 1 file changed

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Michal Hocko
On Fri 24-08-18 20:05:46, Zi Yan wrote: [...] > > + if (!pmd_present(pmd)) { > > + swp_entry_t entry = pmd_to_swp_entry(pmd); > > + > > + if (is_migration_entry(entry)) { > > I think you should check thp_migration_supported() here, since PMD migration > is only enabled in x8

Re: [PATCH] MAINTAINERS: Move entry for Cirrus Logic Madera codecs

2018-08-28 Thread Miguel Ojeda
Hi, On Tue, Aug 28, 2018 at 3:57 PM, Richard Fitzgerald wrote: > Reviewed-by: Richard Fitzgerald > > A maintainer for MAINTAINERS would help avoid these problems, which will > tend to happen when changes to the file go through many trees. > A year ago Linus committed 7683e9e52 ("Properly alphab

[PATCH v2 0/4] Provide core API for NMIs

2018-08-28 Thread Julien Thierry
Hi, This patch series provides a way for irqchips to define some IRQs as NMIs. For this to be possible, the irqchip must: - be a root irqchip - not require bus locking - have the NMI support flag Once these conditions are met, interrupt lines can be requested as NMIs. These lines must not be sha

[PATCH v2 1/4] genirq: Provide basic NMI management for interrupt lines

2018-08-28 Thread Julien Thierry
Add functionality to allocate interrupt lines that will deliver IRQs as Non-Maskable Interrupts. These allocations are only successful if the irqchip provides the necessary support and allows NMI delivery for the interrupt line. Interrupt lines allocated for NMI delivery must be enabled/disabled t

[PATCH v2 3/4] genirq: Provide NMI handlers

2018-08-28 Thread Julien Thierry
Provide flow handlers that are NMI safe for interrupts and percpu_devid interrupts. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Peter Zijlstra --- include/linux/irq.h | 3 +++ kernel/irq/chip.c | 54 + 2 files c

[PATCH v2 4/4] irqdesc: Add domain handler for NMIs

2018-08-28 Thread Julien Thierry
NMI handling code should be executed between calls to nmi_enter and nmi_exit. Add a separate domain handler to properly setup NMI context when handling an interrupt requested as NMI. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Will Deacon Cc: Peter Zijlstra --- in

KASAN: stack-out-of-bounds Read in __schedule

2018-08-28 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:5b394b2ddf03 Linux 4.19-rc1 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14f4d8e140 kernel config: https://syzkaller.appspot.com/x/.config?x=49927b422dcf0b29 dashboard link: https://syzkaller.a

[PATCH v2 2/4] genirq: Provide NMI management for percpu_devid interrupts

2018-08-28 Thread Julien Thierry
Add support for percpu_devid interrupts treated as NMIs. Percpu_devid NMIs need to be setup/torn down on each CPU they target. The same restrictions as for global NMIs still apply for percpu_devid NMIs. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Cc:

Re: [PATCH] memory: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Tony Lindgren
* Rob Herring [180828 01:58]: > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. ... > drivers/memory/omap-gpmc.c | 18 +++--- Looks good to me: Acked-by: Tony Lindgren

Re: VirtIO console hangs

2018-08-28 Thread Nicholas Piggin
On Tue, 28 Aug 2018 15:00:14 + Matteo Croce wrote: > On Tue, Aug 28, 2018 at 2:35 PM Nicholas Piggin wrote: > > > > On Tue, 28 Aug 2018 12:54:08 + > > Matteo Croce wrote: > > > > > With kernel 4.19.0-rc1 virtio_console hangs very often. > > > I can always trigger the bug by pasting so

Re: [PATCH] pinctrl: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Tony Lindgren
* Rob Herring [180828 01:59]: > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. ... > drivers/pinctrl/pinctrl-single.c | 32 +-- > drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 8 ++--

Re: [RESEND PATCH] x86/vdso: Handle clock_gettime(CLOCK_TAI) in vDSO

2018-08-28 Thread Matthew Rickard
Here are the before and after times with CONFIG_RETPOLINE=y always on. I don't see any regression, just the hoped-for improvement on glibc and vDSO calls of CLOCK_TAI. Before: sec Timestamp nanos clocknametzname type -- --- - --

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Jerome Glisse
On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: > On Fri 24-08-18 20:05:46, Zi Yan wrote: > [...] > > > + if (!pmd_present(pmd)) { > > > + swp_entry_t entry = pmd_to_swp_entry(pmd); > > > + > > > + if (is_migration_entry(entry)) { > > > > I think you should check thp_

Re: [PATCH v1] arm64: dts: sdm845: enable tsens thermal zones

2018-08-28 Thread Amit Kucheria
Andy, Do you have any feedback for this patch? Regards, Amit On Wed, Jul 18, 2018 at 1:19 PM, Amit Kucheria wrote: > One thermal zone per cpu is defined > > Signed-off-by: Amit Kucheria > --- > arch/arm64/boot/dts/qcom/sdm845.dtsi | 170 > +++ > 1 file changed

Re: [PATCH v2 25/40] mmc: sdhci: Add a quirk to disable card clock during tuning

2018-08-28 Thread Aapo Vienamo
On Mon, 27 Aug 2018 14:25:44 +0300 Adrian Hunter wrote: > On 10/08/18 21:08, Aapo Vienamo wrote: > > Add a quirk to disable card clock when the tuning command is sent. > > > > This has to be done to prevent the SDHCI controller from hanging on > > Tegra210. Without the quirk enabled there appear

Re: [PATCH] x86/dumpstack: don't dump kernel memory based on usermode RIP

2018-08-28 Thread Kees Cook
On Tue, Aug 28, 2018 at 8:18 AM, Jann Horn wrote: > show_opcodes() is used both for dumping kernel instructions and for dumping > user instructions. If userspace causes #PF by jumping to a kernel address, > show_opcodes() can be reached with regs->ip controlled by the user, > pointing to kernel co

[PATCH] kernel/SRCU: Fix ctags

2018-08-28 Thread Sam Protsenko
ctags indexing ("make tags" command) throws this warning: ctags: Warning: include/linux/notifier.h:125: null expansion of name pattern "\1" This is the result of DEFINE_PER_CPU() macro exapansion. Fix that by getting rid of line break. Similar fix was already done in commit 25528213fe9f

Re: [PATCH 1/3] spis: mediatek: add bindings for Mediatek MT2712 soc platform

2018-08-28 Thread Matthias Brugger
On 28/08/18 08:28, Leilk Liu wrote: > This patch adds a DT binding documentation for the MT2712 soc. > > Signed-off-by: Leilk Liu > --- > .../devicetree/bindings/spi/spi-slave-mt27xx.txt | 39 > > 1 file changed, 39 insertions(+) > create mode 100644 Documentation/d

[PATCH v2] ARM: omap: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: "BenoƮt Cousson" Cc: Paul Walmsley Cc: Tony Lindgren Cc: linux-o...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Rob Herring --- v2: -

[PATCH v2] sparc: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Rob Herring --- v2: - snprint -> snprintf typo fix arch/sparc/kernel/auxio_64.c | 4 +-- arch/spa

Re: [PATCH] xtensa: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Max Filippov
On Mon, Aug 27, 2018 at 6:52 PM, Rob Herring wrote: > In preparation to remove the node name pointer from struct device_node, > convert printf users to use the %pOFn format specifier. > > Cc: Chris Zankel > Cc: Max Filippov > Cc: linux-xte...@linux-xtensa.org > Signed-off-by: Rob Herring > ---

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Michal Hocko
On Tue 28-08-18 17:42:06, Michal Hocko wrote: > On Tue 28-08-18 11:36:59, Jerome Glisse wrote: > > On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: > > > On Fri 24-08-18 20:05:46, Zi Yan wrote: > > > [...] > > > > > + if (!pmd_present(pmd)) { > > > > > + swp_entry_t ent

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Michal Hocko
On Tue 28-08-18 11:36:59, Jerome Glisse wrote: > On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: > > On Fri 24-08-18 20:05:46, Zi Yan wrote: > > [...] > > > > + if (!pmd_present(pmd)) { > > > > + swp_entry_t entry = pmd_to_swp_entry(pmd); > > > > + > > > > +

[PATCH v2] x86/dumpstack: don't dump kernel memory based on usermode RIP

2018-08-28 Thread Jann Horn
show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure that userspace can't trick us into dumping ke

[PATCH v4 1/2]: perf util: map data buffer for preserving collected data

2018-08-28 Thread Alexey Budankov
The data buffer and accompanying AIO control block are allocated at perf_mmap object and the mapped data buffer size is equal to the kernel one. The buffer is then used to preserve profiling data ready for dumping and queue it for asynchronous writing into perf trace thru implemented record_

[PATCH v5 00/27] arm64: provide pseudo NMI with GICv3

2018-08-28 Thread Julien Thierry
Hi, This series is a continuation of the work started by Daniel [1]. The goal is to use GICv3 interrupt priorities to simulate an NMI. The patches depend on the core API for NMIs patches [2]. To achieve this, set two priorities, one for standard interrupts and another, higher priority, for NMIs.

[PATCH v5 06/27] arm64: Delay daif masking for user return

2018-08-28 Thread Julien Thierry
Masking daif flags is done very early before returning to EL0. Only toggle the interrupt masking while in the vector entry and mask daif once in kernel_exit. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: James Morse --- arch/arm64/kernel/entry.S | 4

[PATCH v5 09/27] irqchip/gic: Lower priority of GIC interrupts

2018-08-28 Thread Julien Thierry
The current value used for IRQ priorities is high among the non-secure interrupt priority values. Lower the default priority of interrupts so there is more flexibility to define higher priority interrupts. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Suggested-by: Daniel Thompson C

[PATCH v5 08/27] irqchip/gic: Unify GIC priority definitions

2018-08-28 Thread Julien Thierry
LPIs use the same priority value as other GIC interrupts. Make the GIC default priority definition visible to ITS implementation and use this same definition for LPI priorities. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier ---

[PATCH v5 12/27] arm64: Unmask PMR before going idle

2018-08-28 Thread Julien Thierry
CPU does not received signals for interrupts with a priority masked by ICC_PMR_EL1. This means the CPU might not come back from a WFI instruction. Make sure ICC_PMR_EL1 does not mask interrupts when doing a WFI. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Suggested-by: Daniel Thomp

[PATCH v5 11/27] arm64: Make PMR part of task context

2018-08-28 Thread Julien Thierry
If ICC_PMR_EL1 is used to mask interrupts, its value should be saved/restored whenever a task is context switched out/in or gets an exception. Add PMR to the registers to save in the pt_regs struct upon kernel entry, and restore it before ERET. Also, initialize it to a sane value when creating new

[PATCH v5 07/27] arm64: xen: Use existing helper to check interrupt status

2018-08-28 Thread Julien Thierry
The status of interrupts might depend on more than just pstate. Use interrupts_disabled() instead of raw_irqs_disabled_flags() to take the full context into account. Signed-off-by: Julien Thierry Cc: Stefano Stabellini Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/xen/events.

[PATCH v5 04/27] arm64: daifflags: Use irqflags functions for daifflags

2018-08-28 Thread Julien Thierry
Some of the work done in daifflags save/restore is already provided by irqflags functions. Daifflags should always be a superset of irqflags (it handles irq status + status of other flags). Modifying behaviour of irqflags should alter the behaviour of daifflags. Use irqflags_save/restore functions

[PATCH v5 10/27] arm64: cpufeature: Add cpufeature for IRQ priority masking

2018-08-28 Thread Julien Thierry
Add a cpufeature indicating whether a cpu supports masking interrupts by priority. Add command line option to disable that feature at runtime. Signed-off-by: Julien Thierry Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Suzuki K Poulose --- Documentation/admin-guide/kernel-paramet

[PATCH v5 14/27] arm64: kvm: Unmask PMR before entering guest

2018-08-28 Thread Julien Thierry
Interrupts masked by ICC_PMR_EL1 will not be signaled to the CPU. This means that hypervisor will not receive masked interrupts while running a guest. Avoid this by making sure ICC_PMR_EL1 is unmasked when we enter a guest. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Christoffe

[PATCH v5 05/27] arm64: Use daifflag_restore after bp_hardening

2018-08-28 Thread Julien Thierry
For EL0 entries requiring bp_hardening, daif status is kept at DAIF_PROCCTX_NOIRQ until after hardening has been done. Then interrupts are enabled through local_irq_enable(). Before using local_irq_* functions, daifflags should be properly restored to a state where IRQs are enabled. Enable IRQs b

[PATCH v5 01/27] arm64: cpufeature: Set SYSREG_GIC_CPUIF as a boot system feature

2018-08-28 Thread Julien Thierry
Signed-off-by: Julien Thierry Suggested-by: Daniel Thompson Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Marc Zyngier --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpuf

[PATCH v5 03/27] arm64: alternative: Apply alternatives early in boot process

2018-08-28 Thread Julien Thierry
From: Daniel Thompson Currently alternatives are applied very late in the boot process (and a long time after we enable scheduling). Some alternative sequences, such as those that alter the way CPU context is stored, must be applied much earlier in the boot sequence. Introduce apply_boot_alterna

[PATCH v5 02/27] arm64: cpufeature: Use alternatives for VHE cpu_enable

2018-08-28 Thread Julien Thierry
The cpu_enable callback for VHE feature requires all alternatives to have been applied. This prevents applying VHE alternative separately from the rest. Use an alternative depending on VHE feature to know whether VHE alternatives have already been applied. Signed-off-by: Julien Thierry Cc: Catal

[PATCH v5 13/27] arm/arm64: gic-v3: Add helper functions to manage IRQ priorities

2018-08-28 Thread Julien Thierry
Add a function to check if priority masking is supported and accessors for PMR/RPR. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier --- arch/arm/include/asm/arch_gicv3.h | 21 + arch/arm64/i

[PATCH v5 17/27] irqchip/gic-v3: Factor group0 detection into functions

2018-08-28 Thread Julien Thierry
The code to detect whether Linux has access to group0 interrupts can prove useful in other parts of the driver. Provide a separate function to do this. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-

[PATCH v5 15/27] arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking

2018-08-28 Thread Julien Thierry
Instead disabling interrupts by setting the PSR.I bit, use a priority higher than the one used for interrupts to mask them via PMR. The value chosen for PMR to enable/disable interrupts encodes the status of interrupts on a single bit. This information is stored in the irqflags values used when sa

[PATCH v5 16/27] arm64: daifflags: Include PMR in daifflags restore operations

2018-08-28 Thread Julien Thierry
The addition of PMR should not bypass the semantics of daifflags. When DA_F are set, I bit is also set as no interrupts (even of higher priority) is allowed. When DA_F are cleared, I bit is cleared and interrupt enabling/disabling goes through ICC_PMR_EL1. Signed-off-by: Julien Thierry Cc: Cata

[PATCH v5 24/27] irqchip/gic-v3: Detect current view of GIC priorities

2018-08-28 Thread Julien Thierry
The values non secure EL1 needs to use for PMR and RPR registers depends on the value of SCR_EL3.FIQ. The values non secure EL1 sees from the distributor and redistributor depend on whether security is enabled for the GIC or not. Figure out what values we are dealing with to know if the values we

[PATCH v5 22/27] arm64: Add build option for IRQ masking via priority

2018-08-28 Thread Julien Thierry
Provide a build option to enable using GICv3 priorities to enable/disable interrupts. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Suggested-by: Daniel Thompson Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/Kconfig | 15 +++ 1 file changed, 15 insertions(+) dif

[PATCH v5 23/27] arm64: Handle serror in NMI context

2018-08-28 Thread Julien Thierry
Per definition of the daifflags, Serrors can occur during any interrupt context, that includes NMI contexts. Trying to nmi_enter in an nmi context will crash. Skip nmi_enter/nmi_exit when serror occurred during an NMI. Suggested-by: James Morse Signed-off-by: Julien Thierry Cc: Catalin Marinas

[PATCH v5 21/27] arm64: Switch to PMR masking when starting CPUs

2018-08-28 Thread Julien Thierry
Once the boot CPU has been prepared or a new secondary CPU has been brought up, use ICC_PMR_EL1 to mask interrupts on that CPU and clear PSR.I bit. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Suggested-by: Daniel Thompson Cc: Catalin Marinas Cc: Will Deacon Cc: James Morse Cc: M

[PATCH v5 19/27] irqchip/gic-v3: Remove acknowledge loop

2018-08-28 Thread Julien Thierry
Multiple interrupts pending for a CPU is actually rare. Doing an acknowledge loop does not give much better performance or even can deteriorate them. Do not loop when an interrupt has been acknowledged, just return from interrupt and wait for another one to be raised. Tested-by: Daniel Thompson

[PATCH 0/4] of: Convert to using %pOFn for node name printf

2018-08-28 Thread Rob Herring
This is the DT portion of converting node name printf's to use the %pOFn format specifier rather than device_node.name. Patches for other subsystems are independent and have been sent separately. Rob Rob Herring (4): of/unittest: remove use of node name pointer in overlay high level test

[PATCH v5 25/27] irqchip/gic-v3: Add base support for pseudo-NMI

2018-08-28 Thread Julien Thierry
Provide a higher priority to be used for pseudo-NMIs. When such an interrupt is received, enter the NMI state and prevent other NMIs to be raised. When returning from a pseudo-NMI, skip preemption and tracing if the interrupted context has interrupts disabled. Signed-off-by: Julien Thierry Cc: R

[PATCH v5 18/27] irqchip/gic-v3: Do not overwrite PMR value

2018-08-28 Thread Julien Thierry
If the architecture is using ICC_PMR_EL1 to mask IRQs, do not overwrite that value. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) di

[PATCH 4/4] vsprintf: print OF node name using full_name

2018-08-28 Thread Rob Herring
In preparation to remove the node name pointer from struct device_node, convert the node name print to get the node name from the full name. Signed-off-by: Rob Herring --- lib/vsprintf.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c

[PATCH v5 27/27] irqchip/gic-v3: Allow interrupts to be set as pseudo-NMI

2018-08-28 Thread Julien Thierry
Implement NMI callbacks for GICv3 irqchip. Install NMI safe handlers when setting up interrupt line as NMI. Only SPIs and PPIs are allowed to be set up as NMI. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-v3.c | 73 ++

[PATCH v5 20/27] irqchip/gic-v3: Switch to PMR masking after IRQ acknowledge

2018-08-28 Thread Julien Thierry
After an interrupt has been acknowledged, mask the IRQ priority through PMR and clear PSR.I bit, allowing higher priority interrupts to be received during interrupt handling. Tested-by: Daniel Thompson Signed-off-by: Julien Thierry Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Thom

[PATCH 2/4] of/unittest: add printf tests for node name

2018-08-28 Thread Rob Herring
Add some printf test for printing the node name (without the unit-address). Cc: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/unittest.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 69a522e48970..9def7be9c111 100644 --- a/d

[PATCH v5 26/27] irqchip/gic: Add functions to access irq priorities

2018-08-28 Thread Julien Thierry
Add accessors to the GIC distributor/redistributors priority registers. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-common.c | 10 ++ drivers/irqchip/irq-gic-common.h | 2 ++ 2 files changed, 12 insertions(+) diff -

[PATCH 1/4] of/unittest: remove use of node name pointer in overlay high level test

2018-08-28 Thread Rob Herring
In preparation for removing the node name pointer, it needs to be removed from of_unittest_overlay_high_level. However, it's not really correct to use the node name without the unit-address and we should use the full node name. This most easily done by iterating over the child nodes with for_each_c

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Zi Yan
Hi Michal, On 28 Aug 2018, at 11:45, Michal Hocko wrote: > On Tue 28-08-18 17:42:06, Michal Hocko wrote: >> On Tue 28-08-18 11:36:59, Jerome Glisse wrote: >>> On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: On Fri 24-08-18 20:05:46, Zi Yan wrote: [...] >> +if (

[PATCH v4 2/2]: perf record: enable asynchronous trace writing

2018-08-28 Thread Alexey Budankov
Trace file offset are linearly calculated by perf_mmap__push() code for the next possible write operation, but file position is updated by the kernel only in the second lseek() syscall after the loop. The first lseek() syscall reads that file position for the next loop iterations. record__mm

Re: [PATCH v2 0/4] Provide core API for NMIs

2018-08-28 Thread Julien Thierry
On 28/08/18 16:29, Julien Thierry wrote: Hi, [...] I'll soon post a series making use of the API for Arm's GICv3. Here is the series, NMI related patches are the last 4 in the series: https://lkml.org/lkml/2018/8/28/693 -- Julien Thierry

[PATCH] binder: use standard functions to allocate fds

2018-08-28 Thread Todd Kjos
Binder uses internal fs interfaces to allocate and install fds: __alloc_fd __fd_install __close_fd get_files_struct put_files_struct These were used to support the passing of fds between processes as part of a transaction. The actual allocation and installation of the fds in the target process wa

Re: Linux 4.19-rc1

2018-08-28 Thread Guenter Roeck
On Mon, Aug 27, 2018 at 02:56:32PM -0700, Linus Torvalds wrote: > On Mon, Aug 27, 2018 at 6:45 AM Guenter Roeck wrote: > > > > Build results: > > total: 132 pass: 129 fail: 3 > > Thanks for running these. Looks like everything but the sparc thing is > under control, and the sparc thing mi

Re: [RFC PATCH v2 2/3] pstore: Add register read/write{b,w,l,q} tracing support

2018-08-28 Thread Steven Rostedt
On Tue, 28 Aug 2018 18:47:33 +0530 Sai Prakash Ranjan wrote: > On 8/27/2018 9:45 PM, Steven Rostedt wrote: > > On Sat, 25 Aug 2018 12:54:07 +0530 > > Sai Prakash Ranjan wrote: > > > > > >> Ftrace does not trace __raw{read,write}{b,l,w,q}() functions. I am not > >> sure why and how it is filt

VDSO and dcache aliasing

2018-08-28 Thread Alexandre Belloni
Hello James, A year ago, you wrote that patch: https://www.linux-mips.org/archives/linux-mips/2017-06/msg00658.html You called it a hack but it has been used since then. As you will certainly realize by now, Ocelot is one of the affected SoC so we would pretty much like to see this going upstrea

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Jerome Glisse
On Tue, Aug 28, 2018 at 11:54:33AM -0400, Zi Yan wrote: > Hi Michal, > > On 28 Aug 2018, at 11:45, Michal Hocko wrote: > > > On Tue 28-08-18 17:42:06, Michal Hocko wrote: > >> On Tue 28-08-18 11:36:59, Jerome Glisse wrote: > >>> On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: >

Waiting for

2018-08-28 Thread Ruby
We provide photoshop services to some of the companies from around the world. We have worked on tons of images ever since our team establishment in 2009. Many online retail companies use our services for retouching electronics, jewelry, apparels, furniture etc. by getting the images of their prod

Re: [PATCH 4/7] mm/hmm: properly handle migration pmd

2018-08-28 Thread Michal Hocko
On Tue 28-08-18 11:54:33, Zi Yan wrote: > Hi Michal, > > On 28 Aug 2018, at 11:45, Michal Hocko wrote: > > > On Tue 28-08-18 17:42:06, Michal Hocko wrote: > >> On Tue 28-08-18 11:36:59, Jerome Glisse wrote: > >>> On Tue, Aug 28, 2018 at 05:24:14PM +0200, Michal Hocko wrote: > On Fri 24-08-18

[PATCH] MIPS: Fix computation on entry point

2018-08-28 Thread Philippe Reynes
Since commit 27c524d17430 ("MIPS: Use the entry point from the ELF file header"), the kernel entry point is computed with a grep on "start address" on the output of objdump. It works fine when the default language is english but it may fail on other language (for example in French, the grep should

Your reply

2018-08-28 Thread Ruby
We provide photoshop services to some of the companies from around the world. We have worked on tons of images ever since our team establishment in 2009. Many online retail companies use our services for retouching electronics, jewelry, apparels, furniture etc. by getting the images of their prod

[PATCH] [v2] HID: add support for Apple Magic Trackpad 2

2018-08-28 Thread Sean O'Brien
USB device Vendor 05ac (Apple) Device 0265 (Magic Trackpad 2) Bluetooth device Vendor 004c (Apple) Device 0265 (Magic Trackpad 2) Add support for Apple Magic Trackpad 2 over USB and bluetooth, putting the device in multi-touch mode. Signed-off-by: Claudio Mettler

[ftrace/kprobes PATCH 0/3] tracing: probeevent: Fix module symbol probing

2018-08-28 Thread Masami Hiramatsu
Hi, This series is for fixing some bugs in Steve's ftrace/kprobes branch. git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git Which is based on my fetcharg improvement series. https://lkml.org/lkml/2018/4/25/601 This includes following fixes. - Fix copy_from_user() misusing

Re: [PATCH] perf: Support for Arm A32/T32 instruction sets in CoreSight trace

2018-08-28 Thread Mathieu Poirier
Hi Robert, Your patch landed in the middle of the merge window and will have to be sent again rebased on 4.19-rc1 and long with minor fix found below. Regards, Mathieu On Wed, Aug 22, 2018 at 05:03:57PM +0100, Robert Walker wrote: > This patch adds support for generating instruction samples fro

[ftrace/kprobes PATCH 2/3] tracing/kprobes: Check the probe on unloaded module correctly

2018-08-28 Thread Masami Hiramatsu
Current kprobe event doesn't checks correctly whether the given event is on unloaded module or not. It just checks the event has ":" in the name. That is not enough because if we define a probe on non-exist symbol on loaded module, it allows to define that (with warning message) To ensure it corr

[ftrace/kprobes PATCH 3/3] tracing/kprobes: Allow kprobe-events to record module symbol

2018-08-28 Thread Masami Hiramatsu
Allow kprobe-events to record module symbols. Since data symbols in a non-loaded module doesn't exist, it fails to define such symbol as an argument of kprobe-event. But if the kprobe event is defined on that module, we can defer to resolve the symbol address. Note that if given symbol is not fou

[ftrace/kprobes PATCH 1/3] tracing/uprobes: Fix to return -EFAULT if copy_from_user failed

2018-08-28 Thread Masami Hiramatsu
Fix probe_mem_read() to return -EFAULT if copy_from_user() failed. The copy_from_user() returns remaining bytes when it failed, but probe_mem_read() caller expects it returns error code like as probe_kernel_read(). Reported-by: Dan Carpenter Signed-off-by: Masami Hiramatsu --- kernel/trace/trac

Re: [PATCH] arm64: defconfig: Enable TI's AM6 SoC platform

2018-08-28 Thread Tony Lindgren
* Nishanth Menon [180828 00:50]: > Enable K3 SoC platform for TI's AM6 SoC. > > Signed-off-by: Nishanth Menon > --- > Ref: https://www.spinics.net/lists/arm-kernel/msg667805.html > > Unfortunately, Kconfig changes did'nt hit v4.19-rc1 window. > So, as promised, patch based off v4.19-rc1 tag. A

Re: [PATCH] serial: 8250_omap: Make 8250_omap driver driver depend on ARCH_K3

2018-08-28 Thread Tony Lindgren
* Nishanth Menon [180828 01:07]: > From: Lokesh Vutla > > Allow 8250 omap serial driver to be used for K3 platforms. > > Signed-off-by: Lokesh Vutla > Signed-off-by: Nishanth Menon > --- > > Now that we have the device tree support merged integrated AND we have > ARCH_K3, > Lets enable the

Re: [PATCH v2] x86/dumpstack: don't dump kernel memory based on usermode RIP

2018-08-28 Thread Borislav Petkov
On Tue, Aug 28, 2018 at 05:49:01PM +0200, Jann Horn wrote: > show_opcodes() is used both for dumping kernel instructions and for dumping > user instructions. If userspace causes #PF by jumping to a kernel address, > show_opcodes() can be reached with regs->ip controlled by the user, > pointing to k

Re: [PATCH] arm64: dts: ti: k3-am65: Change #address-cells and #size-cells of interconnect to 2

2018-08-28 Thread Tony Lindgren
* Kishon Vijay Abraham I [180828 10:31]: > AM65 has two PCIe controllers and each PCIe controller has '2' address > spaces one within the 4GB address space of the SoC and the other above > the 4GB address space of the SoC in addition to the register space. The > size of the address space above the

Re: [PATCH v2] objtool: Support multiple rodata sections.

2018-08-28 Thread Allan Xavier
Ping... are there any comments on this? On 03/08/18 19:40, Allan Xavier wrote: > This commit adds support for processing switch jump tables in objects > with multiple .rodata sections, such as those created when using > -ffunction-sections and -fdata-sections. Currently, objtool always > looks in

[PATCH] power: supply: remove unused pointer 'dev'

2018-08-28 Thread Colin King
From: Colin Ian King Pointer 'dev' is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: variable 'dev' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- drivers/power/supply/cros_usbpd-charger.c | 2 -- 1 file chan

Re: [PATCH v2] x86/dumpstack: don't dump kernel memory based on usermode RIP

2018-08-28 Thread Jann Horn
On Tue, Aug 28, 2018 at 6:25 PM Borislav Petkov wrote: > > On Tue, Aug 28, 2018 at 05:49:01PM +0200, Jann Horn wrote: > > show_opcodes() is used both for dumping kernel instructions and for dumping > > user instructions. If userspace causes #PF by jumping to a kernel address, > > show_opcodes() ca

<    1   2   3   4   5   6   7   >