Re: [PATCH v2] selftest/gpio: Remove duplicate header

2019-03-19 Thread Souptick Joarder
On Wed, Mar 6, 2019 at 9:45 PM Souptick Joarder wrote: > > From: Sabyasachi Gupta > > Remove duplicate header which are included twice. > > Signed-off-by: Sabyasachi Gupta > Signed-off-by: Souptick Joarder > --- > v2: Corrected format. Any comment on this patch ? > >

Re: [PATCH v2] selftest/timers: Remove duplicate header

2019-03-19 Thread Souptick Joarder
On Wed, Mar 6, 2019 at 9:48 PM Souptick Joarder wrote: > > From: Sabyasachi Gupta > > Remove duplicate header which is included twice. > > Signed-off-by: Sabyasachi Gupta > Signed-off-by: Souptick Joarder > --- > v2: Corrected format. Any comment on this patch ? > >

Re: [PATCH] mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified

2019-03-19 Thread Souptick Joarder
On Wed, Mar 20, 2019 at 12:06 AM Yang Shi wrote: > > When MPOL_MF_STRICT was specified and an existing page was already > on a node that does not follow the policy, mbind() should return -EIO. > But commit 6f4576e3687b ("mempolicy: apply page table walker on > queue_pages_range()") broke the

[PATCH v0] nvmem: core: Export nvmem cell info to userspace

2019-03-19 Thread Gaurav Kohli
From: Shiraz Hashim Existing nvmem framework export full register space as nvmem binary, but not exporting child node of nvmem which is nvmem cell. Kernel can read the specific cell by using nvmem_cell_read but userspace don't have such provision. Add framework to export nvmem cell as well, So

Re: [RESEND][PATCH 0/2] staging: sm750fb: trivial style fixes.

2019-03-19 Thread Greg Kroah-Hartman
On Mon, Mar 04, 2019 at 12:55:30AM +0800, Yifeng Li wrote: > Hello. > > >From January to February, there have been two trivial sm750fb patches > submitted to linux-fbdev, one by me, one by Jin Chen, but both without > any response. Further, it seems both maintainers, Sudip Mukherjee and > Teddy

Re: [PATCH] tools: PCI: exit with error code when test fails

2019-03-19 Thread Kishon Vijay Abraham I
On 19/03/19 9:13 PM, Lorenzo Pieralisi wrote: > On Fri, Nov 16, 2018 at 12:01:13PM +, Lorenzo Pieralisi wrote: >> On Thu, Oct 04, 2018 at 12:11:44PM +0100, Lorenzo Pieralisi wrote: >>> On Thu, Sep 20, 2018 at 05:02:53PM +0200, Jean-Jacques Hiblot wrote: This makes it easier to use

[PATCH v2 4/7] ocxl: Allow external drivers to use OpenCAPI contexts

2019-03-19 Thread Alastair D'Silva
From: Alastair D'Silva Most OpenCAPI operations require a valid context, so exposing these functions to external drivers is necessary. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- drivers/misc/ocxl/context.c | 9 +-- drivers/misc/ocxl/file.c | 2 +-

[PATCH v2 7/7] ocxl: Provide global MMIO accessors for external drivers

2019-03-19 Thread Alastair D'Silva
From: Alastair D'Silva External drivers that communicate via OpenCAPI will need to make MMIO calls to interact with the devices. Signed-off-by: Alastair D'Silva Reviewed-by: Greg Kurz --- drivers/misc/ocxl/Makefile | 2 +- drivers/misc/ocxl/mmio.c | 234

Re: [LSF/MM TOPIC] FS, MM, and stable trees

2019-03-19 Thread Greg KH
On Tue, Mar 19, 2019 at 11:46:09PM -0400, Jon Masters wrote: > On 2/13/19 2:52 PM, Greg KH wrote: > > On Wed, Feb 13, 2019 at 02:25:12PM -0500, Sasha Levin wrote: > > >> So really, it sounds like a low hanging fruit: we don't really need to > >> write much more testing code code nor do we have to

[PATCH V7 3/5] ARM: imx_v6_v7_defconfig: Add TPM PWM support by default

2019-03-19 Thread Anson Huang
Select CONFIG_PWM_IMX_TPM by default to support i.MX7ULP TPM PWM. Signed-off-by: Anson Huang --- No changes. --- arch/arm/configs/imx_v6_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index

[PATCH V7 2/5] pwm: Add i.MX TPM PWM driver support

2019-03-19 Thread Anson Huang
i.MX7ULP has TPM(Low Power Timer/Pulse Width Modulation Module) inside, it can support multiple PWM channels, all the channels share same counter and period setting, but each channel can configure its duty and polarity independently. There are several TPM modules in i.MX7ULP, the number of

[PATCH V7 5/5] ARM: dts: imx7ulp-evk: Add backlight support

2019-03-19 Thread Anson Huang
This patch adds i.MX7ULP EVK board MIPI-DSI backlight support. Signed-off-by: Anson Huang --- No changes. --- arch/arm/boot/dts/imx7ulp-evk.dts | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp-evk.dts b/arch/arm/boot/dts/imx7ulp-evk.dts index

[PATCH V7 4/5] ARM: dts: imx7ulp: Add pwm0 support

2019-03-19 Thread Anson Huang
Add i.MX7ULP EVK board PWM0 support. Signed-off-by: Anson Huang --- No changes. --- arch/arm/boot/dts/imx7ulp.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx7ulp.dtsi b/arch/arm/boot/dts/imx7ulp.dtsi index eb349fd..15d04fb 100644 ---

[PATCH V7 1/5] dt-bindings: pwm: Add i.MX TPM PWM binding

2019-03-19 Thread Anson Huang
Add i.MX TPM(Low Power Timer/Pulse Width Modulation Module) PWM binding. Signed-off-by: Anson Huang --- No changes. --- .../devicetree/bindings/pwm/imx-tpm-pwm.txt| 22 ++ 1 file changed, 22 insertions(+) create mode 100644

[PATCH V7 0/5] Add i.MX7ULP EVK PWM backlight support

2019-03-19 Thread Anson Huang
i.MX7ULP EVK board has MIPI-DSI display, its backlight is supplied by TPM PWM module, this patch set enables i.MX7ULP TPM PWM driver support and also add backlight support for MIPI-DSI display. Changes since V6: - ONLY change the pwm driver patch. Anson Huang (5): dt-bindings: pwm: Add

Re: [PATCH v2 5/5] arm64: dts: rockchip: Enable dmc and dfi nodes on gru.

2019-03-19 Thread Chanwoo Choi
Hi Gaël, On 19. 3. 20. 오전 3:13, Gaël PORTAY wrote: > From: Lin Huang > > Enable the DMC (Dynamic Memory Controller) and the DFI (DDR PHY Interface) > nodes on gru/kevin boards so we can support DDR DVFS. > > Signed-off-by: Lin Huang > Signed-off-by: Enric Balletbo i Serra > Signed-off-by:

Re: [PATCH v2] ALSA: hda/realtek: Enable headset MIC of Acer AIO with ALC286

2019-03-19 Thread Jian-Hong Pan
Takashi Iwai 於 2019年3月15日 週五 下午7:24寫道: > > On Fri, 15 Mar 2019 10:51:09 +0100, > Jian-Hong Pan wrote: > > > > Some Acer AIO desktops like Veriton Z6860G, Z4860G and Z4660G cannot > > record sound from headset MIC. This patch adds the > > ALC286_FIXUP_ACER_AIO_HEADSET_MIC quirk to fix this issue.

[PATCH] quota: code cleanup for __dquot_alloc_space()

2019-03-19 Thread Chengguang Xu
Replace (flags & DQUOT_SPACE_RESERVE) with variable reserve. Signed-off-by: Chengguang Xu --- fs/quota/dquot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index fc20e06c56ba..00de508f9d2e 100644 --- a/fs/quota/dquot.c +++

RE: [PATCH 2/2] ARM: imx: mach-imx7ulp: warn when imx_soc_device_init fail

2019-03-19 Thread Aisheng Dong
> From: Peng Fan > > > > > > Follow other i.MX6/7 machince code to check return value of > > > > > imx_soc_device_init and warn when fail. > > > > > > > > > > Also drop of_platform_default_populate, because > > > > > "arch_initcall_sync(of_platform_default_populate_init);" could > > > > > be used

[PATCH V3] cpufreq: Call transition notifier only once for each policy

2019-03-19 Thread Viresh Kumar
Currently we call these notifiers once for each CPU of the policy->cpus cpumask. It would be more optimal if the notifier can be called only once and all the relevant information be provided to it. Out of the 23 drivers that register for the transition notifiers today, only 4 of them do per-cpu

Re: [PATCH v4 1/1] mm: introduce put_user_page*(), placeholder versions

2019-03-19 Thread Jerome Glisse
On Tue, Mar 19, 2019 at 06:43:45PM -0700, John Hubbard wrote: > On 3/19/19 5:08 PM, Jerome Glisse wrote: > > On Wed, Mar 20, 2019 at 10:57:52AM +1100, Dave Chinner wrote: > >> On Tue, Mar 19, 2019 at 06:06:55PM -0400, Jerome Glisse wrote: > >>> On Wed, Mar 20, 2019 at 08:23:46AM +1100, Dave

Re: [PATCH v3] ARM: tegra: enforce PM requirement

2019-03-19 Thread Sameer Pujar
On 2/27/2019 7:01 PM, Dmitry Osipenko wrote: 27.02.2019 11:20, Sameer Pujar пишет: Currently runtime PM is enabled for Tegra HDA driver. One of the concern raised was about handling !PM case in HDA driver. In this case, there is a need to manage clocks and power explicitly in the driver and

Re: KASAN: slab-out-of-bounds Read in default_write_copy_kernel

2019-03-19 Thread syzbot
syzbot has bisected this bug to: commit 65766ee0bf7fe8b3be80e2e1c3ef54ad59b29476 Author: Takashi Iwai Date: Fri Nov 9 10:59:45 2018 + ALSA: oss: Use kvzalloc() for local buffer allocations bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11c3005d20 start commit:

Re: [LSF/MM TOPIC] FS, MM, and stable trees

2019-03-19 Thread Jon Masters
On 2/13/19 2:52 PM, Greg KH wrote: > On Wed, Feb 13, 2019 at 02:25:12PM -0500, Sasha Levin wrote: >> So really, it sounds like a low hanging fruit: we don't really need to >> write much more testing code code nor do we have to refactor existing >> test suites. We just need to make sure the right

Re: pidfd design

2019-03-19 Thread Christian Brauner
On Tue, Mar 19, 2019 at 07:42:52PM -0700, Daniel Colascione wrote: > On Tue, Mar 19, 2019 at 6:52 PM Joel Fernandes wrote: > > > > On Wed, Mar 20, 2019 at 12:10:23AM +0100, Christian Brauner wrote: > > > On Tue, Mar 19, 2019 at 03:48:32PM -0700, Daniel Colascione wrote: > > > > On Tue, Mar 19,

Re: User Stack Tracer Causes Crash

2019-03-19 Thread Steven Rostedt
On Wed, 20 Mar 2019 11:15:10 +0800 He Zhe wrote: > Hi, > > User stack tracer causes crash and hang since the following commit till > now(5.1-rc1). > > c3bc8fd637a9 ("tracing: Centralize preemptirq tracepoints and unify their > usage") Can you send me your .config. -- Steve > > echo 1 >

KASAN use after free

2019-03-19 Thread Steven Rostedt
Hi Tom, I ran the latest kernel (5.1-rc1) with full KASAN enabled, and ran the ftrace tests, and hit the following: == BUG: KASAN: use-after-free in destroy_hist_field+0x30/0x70 Read of size 8 at addr 888086df2210 by task

[PATCH] RCU: Adjust comments for force_qs_rnp

2019-03-19 Thread Zhouyi Zhou
Previously, threads blocked on offlining CPUS are migrated to root rcu_node, so there is a need to initiate RCU priority boosting on root rcu_node, Current RCU does not migrate blocked tasks even if all corresponding CPUs offline. commit d19fb8d1f3f6 ("rcu: Don't migrate blocked tasks even if

Re: [RFC PATCH nand-next 0/2] meson-nand: support for older SoCs

2019-03-19 Thread Liang Yang
Hi Martin, Thanks for your time. On 2019/3/20 4:27, Martin Blumenstingl wrote: Hello Liang, On Sat, Mar 16, 2019 at 11:55 AM Martin Blumenstingl wrote: [...] Martin, Now i am not sure whether NFC driver leads to kernel panic when calling kmem_cache_alloc_trace. thank you for confirming that

User Stack Tracer Causes Crash

2019-03-19 Thread He Zhe
Hi, User stack tracer causes crash and hang since the following commit till now(5.1-rc1). c3bc8fd637a9 ("tracing: Centralize preemptirq tracepoints and unify their usage") echo 1 > /proc/sys/kernel/stack_tracer_enabled echo userstacktrace > /sys/kernel/debug/tracing/trace_options echo 1 >

[PATCH v3] perf tools: Add missing case value

2019-03-19 Thread Solomon Tan
The following error was thrown when compiling `tools/perf` using OpenCSD v0.11.1. This patch fixes said error. ``` CC util/intel-pt-decoder/intel-pt-log.o CC util/cs-etm-decoder/cs-etm-decoder.o util/cs-etm-decoder/cs-etm-decoder.c: In function ‘cs_etm_decoder__buffer_range’:

linux-next: Tree for Mar 20

2019-03-19 Thread Stephen Rothwell
Hi all, Changes since 20190319: The amdgpu tree still had its build failure for which I reverted a commit. The selinux tree lost its build failure. The scsi tree gained a build failure for which I applied a patch. Non-merge commits (relative to Linus' tree): 1993 1658 files changed, 57917

Re: [PATCH 4/9] nvme/pci: use the NVME_CTRL_SUSPENDED state

2019-03-19 Thread Fam Zheng
On Tue, 03/19 16:41, Maxim Levitsky wrote: > When enteriing low power state, the nvme Typo: "entering". > driver will now inform the core with the NVME_CTRL_SUSPENDED state > which will allow mdev driver to act on this information [snip] Fam

Re: [PATCH v4 1/2] sh: mm: make use of new memblocks_present() helper

2019-03-19 Thread Palmer Dabbelt
On Tue, 19 Mar 2019 10:56:52 PDT (-0700), log...@deltatee.com wrote: Hey Palmer, On 2019-01-23 12:56 p.m., Palmer Dabbelt wrote: @Palmer: if you can just look at taking the second patch, I'll resubmit the first one to the appropriate list. Works for me. I'll queue the second patch into my

pidfd design

2019-03-19 Thread Daniel Colascione
On Tue, Mar 19, 2019 at 6:52 PM Joel Fernandes wrote: > > On Wed, Mar 20, 2019 at 12:10:23AM +0100, Christian Brauner wrote: > > On Tue, Mar 19, 2019 at 03:48:32PM -0700, Daniel Colascione wrote: > > > On Tue, Mar 19, 2019 at 3:14 PM Christian Brauner > > > wrote: > > > > So I dislike the idea

Re: [RFC][PATCH 03/16] sched: Wrap rq::lock access

2019-03-19 Thread Subhra Mazumdar
On 3/18/19 8:41 AM, Julien Desfossez wrote: The case where we try to acquire the lock on 2 runqueues belonging to 2 different cores requires the rq_lockp wrapper as well otherwise we frequently deadlock in there. This fixes the crash reported in

(.init.text+0x134): multiple definition of `plat_irq_setup'

2019-03-19 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: babf09c3837f3cf4b58225225609445419c338e6 commit: c97617a81a7616d49bc3700959e08c6c6f447093 ALSA: hda/ca0132 - Fix build error without CONFIG_PCI date: 6 weeks ago config: sh-allmodconfig (attached as

Re: [PATCH] net:rtlwifi:move spin_lock_bh to spin_lock in tasklet

2019-03-19 Thread Pkshih
On Tue, 2019-03-19 at 22:31 +0800, Jeff Xie wrote: > It is unnecessary to call spin_lock_bh in a tasklet. > > Signed-off-by: Jeff Xie > > --- >  drivers/net/wireless/realtek/rtlwifi/pci.c | 6 +++--- >  1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH v2 15/19] locking/lockdep: Remove __cq_empty()

2019-03-19 Thread Yuyang Du
Thanks for review. On Wed, 20 Mar 2019 at 00:54, Bart Van Assche wrote: > > This is the most important change in this patch. Using the title "Remove > __cq_empty()" > for this patch is misleading because the above patch does something else, > namely changing > the return type of __cq_dequeue()

[PATCH v3 26/28] userfaultfd: wp: declare _UFFDIO_WRITEPROTECT conditionally

2019-03-19 Thread Peter Xu
Only declare _UFFDIO_WRITEPROTECT if the user specified UFFDIO_REGISTER_MODE_WP and if all the checks passed. Then when the user registers regions with shmem/hugetlbfs we won't expose the new ioctl to them. Even with complete anonymous memory range, we'll only expose the new WP ioctl bit if the

[PATCH v3 28/28] userfaultfd: selftests: add write-protect test

2019-03-19 Thread Peter Xu
This patch adds uffd tests for write protection. Instead of introducing new tests for it, let's simply squashing uffd-wp tests into existing uffd-missing test cases. Changes are: (1) Bouncing tests We do the write-protection in two ways during the bouncing test: - By using

[PATCH v3 27/28] userfaultfd: selftests: refactor statistics

2019-03-19 Thread Peter Xu
Introduce uffd_stats structure for statistics of the self test, at the same time refactor the code to always pass in the uffd_stats for either read() or poll() typed fault handling threads instead of using two different ways to return the statistic results. No functional change. With the new

[PATCH v3 23/28] userfaultfd: wp: don't wake up when doing write protect

2019-03-19 Thread Peter Xu
It does not make sense to try to wake up any waiting thread when we're write-protecting a memory region. Only wake up when resolving a write protected page fault. Reviewed-by: Mike Rapoport Signed-off-by: Peter Xu --- fs/userfaultfd.c | 13 - 1 file changed, 8 insertions(+), 5

[PATCH v3 22/28] userfaultfd: wp: enabled write protection in userfaultfd API

2019-03-19 Thread Peter Xu
From: Shaohua Li Now it's safe to enable write protection in userfaultfd API Cc: Andrea Arcangeli Cc: Pavel Emelyanov Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli Reviewed-by:

[PATCH v3 24/28] userfaultfd: wp: UFFDIO_REGISTER_MODE_WP documentation update

2019-03-19 Thread Peter Xu
From: Martin Cracauer Adds documentation about the write protection support. Signed-off-by: Martin Cracauer Signed-off-by: Andrea Arcangeli [peterx: rewrite in rst format; fixups here and there] Reviewed-by: Jerome Glisse Signed-off-by: Peter Xu ---

[PATCH v3 25/28] userfaultfd: wp: fixup swap entries in change_pte_range

2019-03-19 Thread Peter Xu
In change_pte_range() we do nothing for uffd if the PTE is a swap entry. That can lead to data mismatch if the page that we are going to write protect is swapped out when sending the UFFDIO_WRITEPROTECT. This patch applies/removes the uffd-wp bit even for the swap entries. Signed-off-by: Peter

[PATCH v3 20/28] userfaultfd: wp: support write protection for userfault vma range

2019-03-19 Thread Peter Xu
From: Shaohua Li Add API to enable/disable writeprotect a vma range. Unlike mprotect, this doesn't split/merge vmas. Cc: Andrea Arcangeli Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli

[PATCH v3 21/28] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-03-19 Thread Peter Xu
From: Andrea Arcangeli v1: From: Shaohua Li v2: cleanups, remove a branch. [peterx writes up the commit message, as below...] This patch introduces the new uffd-wp APIs for userspace. Firstly, we'll allow to do UFFDIO_REGISTER with write protection tracking using the new

[PATCH v3 19/28] userfaultfd: introduce helper vma_find_uffd

2019-03-19 Thread Peter Xu
We've have multiple (and more coming) places that would like to find a userfault enabled VMA from a mm struct that covers a specific memory range. This patch introduce the helper for it, meanwhile apply it to the code. Suggested-by: Mike Rapoport Reviewed-by: Jerome Glisse Reviewed-by: Mike

[PATCH v3 16/28] userfaultfd: wp: add pmd_swp_*uffd_wp() helpers

2019-03-19 Thread Peter Xu
Adding these missing helpers for uffd-wp operations with pmd swap/migration entries. Reviewed-by: Jerome Glisse Reviewed-by: Mike Rapoport Signed-off-by: Peter Xu --- arch/x86/include/asm/pgtable.h | 15 +++ include/asm-generic/pgtable_uffd.h | 15 +++ 2 files

[PATCH v3 13/28] mm: export wp_page_copy()

2019-03-19 Thread Peter Xu
Export this function for usages outside page fault handlers. Reviewed-by: Jerome Glisse Signed-off-by: Peter Xu --- include/linux/mm.h | 2 ++ mm/memory.c| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index

[PATCH v3 15/28] userfaultfd: wp: drop _PAGE_UFFD_WP properly when fork

2019-03-19 Thread Peter Xu
UFFD_EVENT_FORK support for uffd-wp should be already there, except that we should clean the uffd-wp bit if uffd fork event is not enabled. Detect that to avoid _PAGE_UFFD_WP being set even if the VMA is not being tracked by VM_UFFD_WP. Do this for both small PTEs and huge PMDs. Reviewed-by:

[PATCH v3 17/28] userfaultfd: wp: support swap and page migration

2019-03-19 Thread Peter Xu
For either swap and page migration, we all use the bit 2 of the entry to identify whether this entry is uffd write-protected. It plays a similar role as the existing soft dirty bit in swap entries but only for keeping the uffd-wp tracking for a specific PTE/PMD. Something special here is that

[PATCH v3 14/28] userfaultfd: wp: handle COW properly for uffd-wp

2019-03-19 Thread Peter Xu
This allows uffd-wp to support write-protected pages for COW. For example, the uffd write-protected PTE could also be write-protected by other usages like COW or zero pages. When that happens, we can't simply set the write bit in the PTE since otherwise it'll change the content of every single

[PATCH v3 18/28] khugepaged: skip collapse if uffd-wp detected

2019-03-19 Thread Peter Xu
Don't collapse the huge PMD if there is any userfault write protected small PTEs. The problem is that the write protection is in small page granularity and there's no way to keep all these write protection information if the small pages are going to be merged into a huge PMD. The same thing

[PATCH v3 12/28] userfaultfd: wp: apply _PAGE_UFFD_WP bit

2019-03-19 Thread Peter Xu
Firstly, introduce two new flags MM_CP_UFFD_WP[_RESOLVE] for change_protection() when used with uffd-wp and make sure the two new flags are exclusively used. Then, - For MM_CP_UFFD_WP: apply the _PAGE_UFFD_WP bit and remove _PAGE_RW when a range of memory is write protected by uffd -

[PATCH v3 10/28] userfaultfd: wp: add UFFDIO_COPY_MODE_WP

2019-03-19 Thread Peter Xu
From: Andrea Arcangeli This allows UFFDIO_COPY to map pages write-protected. Signed-off-by: Andrea Arcangeli [peterx: switch to VM_WARN_ON_ONCE in mfill_atomic_pte; add brackets around "dst_vma->vm_flags & VM_WRITE"; fix wordings in comments and commit messages] Reviewed-by: Jerome Glisse

[PATCH v3 07/28] userfaultfd: wp: hook userfault handler to write protection fault

2019-03-19 Thread Peter Xu
From: Andrea Arcangeli There are several cases write protection fault happens. It could be a write to zero page, swaped page or userfault write protected page. When the fault happens, there is no way to know if userfault write protect the page before. Here we just blindly issue a userfault

[PATCH v3 06/28] userfaultfd: wp: add helper for writeprotect check

2019-03-19 Thread Peter Xu
From: Shaohua Li add helper for writeprotect check. Will use it later. Cc: Andrea Arcangeli Cc: Pavel Emelyanov Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li Signed-off-by: Andrea Arcangeli Reviewed-by: Jerome

[PATCH v3 09/28] userfaultfd: wp: userfaultfd_pte/huge_pmd_wp() helpers

2019-03-19 Thread Peter Xu
From: Andrea Arcangeli Implement helpers methods to invoke userfaultfd wp faults more selectively: not only when a wp fault triggers on a vma with vma->vm_flags VM_UFFD_WP set, but only if the _PAGE_UFFD_WP bit is set in the pagetable too. Signed-off-by: Andrea Arcangeli Reviewed-by: Jerome

[PATCH v3 11/28] mm: merge parameters for change_protection()

2019-03-19 Thread Peter Xu
change_protection() was used by either the NUMA or mprotect() code, there's one parameter for each of the callers (dirty_accountable and prot_numa). Further, these parameters are passed along the calls: - change_protection_range() - change_p4d_range() - change_pud_range() -

[PATCH v3 08/28] userfaultfd: wp: add WP pagetable tracking to x86

2019-03-19 Thread Peter Xu
From: Andrea Arcangeli Accurate userfaultfd WP tracking is possible by tracking exactly which virtual memory ranges were writeprotected by userland. We can't relay only on the RW bit of the mapped pagetable because that information is destroyed by fork() or KSM or swap. If we were to relay on

[PATCH v3 05/28] mm: gup: allow VM_FAULT_RETRY for multiple times

2019-03-19 Thread Peter Xu
This is the gup counterpart of the change that allows the VM_FAULT_RETRY to happen for more than once. Reviewed-by: Jerome Glisse Signed-off-by: Peter Xu --- mm/gup.c | 17 + mm/hugetlb.c | 6 -- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/mm/gup.c

[PATCH v3 03/28] userfaultfd: don't retake mmap_sem to emulate NOPAGE

2019-03-19 Thread Peter Xu
The idea comes from the upstream discussion between Linus and Andrea: https://lkml.org/lkml/2017/10/30/560 A summary to the issue: there was a special path in handle_userfault() in the past that we'll return a VM_FAULT_NOPAGE when we detected non-fatal signals when waiting for userfault

[PATCH v3 00/28] userfaultfd: write protection support

2019-03-19 Thread Peter Xu
This series implements initial write protection support for userfaultfd. Currently both shmem and hugetlbfs are not supported yet, but only anonymous memory. This is the 3nd version of it. The latest code can also be found at: https://github.com/xzpeter/linux/tree/uffd-wp-merged Note again

[PATCH v3 04/28] mm: allow VM_FAULT_RETRY for multiple times

2019-03-19 Thread Peter Xu
The idea comes from a discussion between Linus and Andrea [1]. Before this patch we only allow a page fault to retry once. We achieved this by clearing the FAULT_FLAG_ALLOW_RETRY flag when doing handle_mm_fault() the second time. This was majorly used to avoid unexpected starvation of the

[PATCH v3 02/28] mm: userfault: return VM_FAULT_RETRY on signals

2019-03-19 Thread Peter Xu
The idea comes from the upstream discussion between Linus and Andrea: https://lkml.org/lkml/2017/10/30/560 A summary to the issue: there was a special path in handle_userfault() in the past that we'll return a VM_FAULT_NOPAGE when we detected non-fatal signals when waiting for userfault

[PATCH v3 01/28] mm: gup: rename "nonblocking" to "locked" where proper

2019-03-19 Thread Peter Xu
There's plenty of places around __get_user_pages() that has a parameter "nonblocking" which does not really mean that "it won't block" (because it can really block) but instead it shows whether the mmap_sem is released by up_read() during the page fault handling mostly when VM_FAULT_RETRY is

Re: [PATCH] virtio-fs: fix multiple tag support

2019-03-19 Thread Liu Bo
On Tue, Mar 19, 2019 at 04:26:54PM -0400, Vivek Goyal wrote: > On Sun, Mar 17, 2019 at 08:35:21AM +0800, Liu Bo wrote: > > While doing memremap from pci_dev's system bus address to kernel virtual > > address, we assign a wrong value to the %end of pgmap.res, which ends up > > with a wrong resource

Re: [PATCH v2 19/19] locking/lockdep: Change if to else-if when checking bfs errors

2019-03-19 Thread Yuyang Du
Thanks for the review. On Wed, 20 Mar 2019 at 00:29, Bart Van Assche wrote: > > On Mon, 2019-03-18 at 16:57 +0800, Yuyang Du wrote: > > - if (ret < 0) { > > + if (unlikely(ret < 0)) { > > print_bfs_bug(ret); > > return 0; > > } > > - if

Re: [PATCH] zram: fix idle/writeback string compare

2019-03-19 Thread Sergey Senozhatsky
On (03/20/19 08:19), Minchan Kim wrote: > Cc: [5.0] > Reported-by: Makoto Wu > Signed-off-by: Minchan Kim Reviewed-by: Sergey Senozhatsky > +++ b/drivers/block/zram/zram_drv.c > @@ -290,18 +290,8 @@ static ssize_t idle_store(struct device *dev, > struct zram *zram = dev_to_zram(dev);

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-19 Thread Joel Fernandes
On Wed, Mar 20, 2019 at 12:10:23AM +0100, Christian Brauner wrote: > On Tue, Mar 19, 2019 at 03:48:32PM -0700, Daniel Colascione wrote: > > On Tue, Mar 19, 2019 at 3:14 PM Christian Brauner > > wrote: > > > So I dislike the idea of allocating new inodes from the procfs super > > > block. I would

RE: must hold the driver_input_lock in hid_debug_rdesc_show

2019-03-19 Thread He, Bo
thanks, without the patch we can reproduce with the way in 10 hours Suspend/Resume test, with the test, we can't reproduce for 30 hours. -Original Message- From: Jiri Kosina Sent: Tuesday, March 19, 2019 10:42 PM To: He, Bo Cc: benjamin.tissoi...@redhat.com;

Re: [PATCH v3] perf annotate/report: Remove hist__account_cycles from callback

2019-03-19 Thread Andi Kleen
On Wed, Mar 20, 2019 at 08:35:17AM +0800, Jin, Yao wrote: > Nobody like this patch? :) > > In my test, for a 72MB perf.data (with LBR data), the perf annotate > processing speed: > > Before: 10.2s > After: 2.2s That's great! -Andi

Re: [PATCH v4 1/1] mm: introduce put_user_page*(), placeholder versions

2019-03-19 Thread John Hubbard
On 3/19/19 5:08 PM, Jerome Glisse wrote: > On Wed, Mar 20, 2019 at 10:57:52AM +1100, Dave Chinner wrote: >> On Tue, Mar 19, 2019 at 06:06:55PM -0400, Jerome Glisse wrote: >>> On Wed, Mar 20, 2019 at 08:23:46AM +1100, Dave Chinner wrote: On Tue, Mar 19, 2019 at 10:14:16AM -0400, Jerome Glisse

Re: [v1 PATCH 4/4] RISC-V: Support nr_cpus command line option.

2019-03-19 Thread Atish Patra
On 3/19/19 4:58 PM, Damien Le Moal wrote: On 2019/03/20 8:56, Damien Le Moal wrote: On 2019/03/20 7:20, Atish Patra wrote: If nr_cpus command line option is set, maximum possible cpu should be set to that value. Signed-off-by: Atish Patra --- arch/riscv/kernel/smpboot.c | 10 +- 1

hello dear

2019-03-19 Thread mrsaishagaddafi
Assalamu Alaikum Wa Rahmatullahi Wa Barakatuh, hello dear I came across your contact during my private search. Mrs Aisha Al- Qaddafi is my name, the only daughter of late Libyan president, am a single Mother and a Widow with three Children.I have funds the sum of $27.5 million USD for

[RFT/RFC PATCH v2 4/4] RISC-V: Parse cpu topology during boot.

2019-03-19 Thread Atish Patra
Currently, there are no topology defined for RISC-V. Parse the cpu-map node from device tree and setup the cpu topology. CPU topology after applying the patch. $cat /sys/devices/system/cpu/cpu2/topology/core_siblings_list 0-3 $cat /sys/devices/system/cpu/cpu3/topology/core_siblings_list 0-3 $cat

[RFT/RFC PATCH v2 2/4] cpu-topology: Move cpu topology code to common code.

2019-03-19 Thread Atish Patra
Both RISC-V & ARM64 are using cpu-map device tree to describe their cpu topology. It's better to move the relevant code to a common place instead of duplicate code. Signed-off-by: Atish Patra Tested-by: Jeffrey Hugo --- arch/arm64/include/asm/topology.h | 23 --- arch/arm64/kernel/topology.c

[RFT/RFC PATCH v2 1/4] dt-binding: cpu-topology: Move cpu-map to a common binding.

2019-03-19 Thread Atish Patra
cpu-map binding can be used to described cpu topology for both RISC-V & ARM. It makes more sense to move the binding to document to a common place. The relevant discussion can be found here. https://lkml.org/lkml/2018/11/6/19 Signed-off-by: Atish Patra Reviewed-by: Sudeep Holla ---

Re: [PATCHv2] x86/boot/KASLR: skip the specified crashkernel reserved region

2019-03-19 Thread Chao Fan
On Wed, Mar 13, 2019 at 12:19:31PM +0800, Pingfan Liu wrote: Hi Pingfan, I wonder your test method and test case. Do you test it in the Qemu guest or real machine. Thanks, Chao Fan >crashkernel=x@y option may fail to reserve the required memory region if >KASLR puts kernel into the region. To

[RFT/RFC PATCH v2 0/4] Unify CPU topology across ARM & RISC-V

2019-03-19 Thread Atish Patra
The cpu-map DT entry in ARM can describe the CPU topology in much better way compared to other existing approaches. RISC-V can easily adopt this binding to represent its own CPU topology. Thus, both cpu-map DT binding and topology parsing code can be moved to a common location so that RISC-V or

[RFT/RFC PATCH v2 3/4] arm: Use common cpu_topology

2019-03-19 Thread Atish Patra
Currently, ARM32 and ARM64 uses different data structures to represent their cpu toplogies. Since, we are moving the ARM64 topology to common code to be used by other architectures, we can reuse that for ARM32 as well. Signed-off-by: Atish Patra --- arch/arm/include/asm/topology.h | 22

Re: [PATCH v4 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-19 Thread John Hubbard
On 3/19/19 6:09 PM, Christopher Lameter wrote: > On Tue, 19 Mar 2019, John Hubbard wrote: > >>> >>> My concerns do not affect this patchset which just marks the get/put for >>> the pagecache. The problem was that the description was making claims that >>> were a bit misleading and seemed to

Re: [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-19 Thread Aaro Koskinen
On Tue, Mar 19, 2019 at 11:37:18PM +0100, Janusz Krzysztofik wrote: > After recent modifications, only a hardcoded partition info makes > the driver device specific. Other than that, the driver uses GPIO > exclusively and can be used on any hardware. > > Drop the partition info and use MTD

Re: [PATCH] slub: remove useless kmem_cache_debug() before remove_full()

2019-03-19 Thread David Rientjes
On Thu, 14 Mar 2019, Liu Xiang wrote: > When CONFIG_SLUB_DEBUG is not enabled, remove_full() is empty. > While CONFIG_SLUB_DEBUG is enabled, remove_full() can check > s->flags by itself. So kmem_cache_debug() is useless and > can be removed. > > Signed-off-by: Liu Xiang Acked-by: David

Re: [PATCH] driver : staging : ion: optimization for decreasing memory fragmentaion

2019-03-19 Thread David Rientjes
On Thu, 14 Mar 2019, Zhaoyang Huang wrote: > From: Zhaoyang Huang > > Two action for this patch: > 1. set a batch size for system heap's shrinker, which can have it buffer > reasonable page blocks in pool for future allocation. > 2. reverse the order sequence when free page blocks, the purpose

Re: [PATCH v4 0/1] mm: introduce put_user_page*(), placeholder versions

2019-03-19 Thread Christopher Lameter
On Tue, 19 Mar 2019, John Hubbard wrote: > > > > My concerns do not affect this patchset which just marks the get/put for > > the pagecache. The problem was that the description was making claims that > > were a bit misleading and seemed to prescribe a solution. > > > > So lets get this merged.

Re: [PATCH] mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified

2019-03-19 Thread Yang Shi
On 3/19/19 5:49 PM, David Rientjes wrote: On Wed, 20 Mar 2019, Yang Shi wrote: When MPOL_MF_STRICT was specified and an existing page was already on a node that does not follow the policy, mbind() should return -EIO. But commit 6f4576e3687b ("mempolicy: apply page table walker on

[PATCH 2/2] platform/x86: intel_pmc_core: Allow to dump debug registers on S0ix failure

2019-03-19 Thread Rajat Jain
Add a module parameter which when enabled, will check on resume, if the last S0ix attempt was successful. If not, the driver would warn and provide helpful debug information (which gets latched during the failed suspend attempt) to debug the S0ix failure. This information is very useful to debug

[PATCH 1/2] platform/x86: intel_pmc_core: Convert to a platform_driver

2019-03-19 Thread Rajat Jain
Convert the intel_pmc_core driver to a platform driver. There is no functional change. Some code that tried to determine the kind of CPU, has been moved from pmc_core_probe() to pmc_core_init(). Signed-off-by: Rajat Jain --- v2: Rephrase the commit log. No code changes.

Re: [PATCH v4 1/1] mm: introduce put_user_page*(), placeholder versions

2019-03-19 Thread Christopher Lameter
On Wed, 20 Mar 2019, Dave Chinner wrote: > So the plan for GUP vs writeback so far is "break fsync()"? :) Well if its an anonymous page and not a file backed page then the semantics are preserved. Disallow GUP long term pinning (marking stuff like in this patchset may make that possible) and

Re: [PATCH] ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation

2019-03-19 Thread Aaro Koskinen
On Tue, Mar 19, 2019 at 09:19:52PM +0100, Janusz Krzysztofik wrote: > In order to request dynamic allocationn of GPIO IDs, a negative number > should be passed as a base GPIO ID via platform data. Unfortuntely, > commit 771e53c4d1a1 ("ARM: OMAP1: ams-delta: Drop board specific global > GPIO

Re: [RESEND PATCH] clk: hi3660: Mark clk_gate_ufs_subsys as critical

2019-03-19 Thread Leo Yan
On Tue, Mar 19, 2019 at 12:42:43PM -0700, Stephen Boyd wrote: > Quoting Leo Yan (2019-03-19 02:31:48) > > diff --git a/drivers/clk/hisilicon/clk-hi3660.c > > b/drivers/clk/hisilicon/clk-hi3660.c > > index f40419959656..32ba80181cc6 100644 > > --- a/drivers/clk/hisilicon/clk-hi3660.c > > +++

linux-next: build failure after merge of the scsi tree

2019-03-19 Thread Stephen Rothwell
Hi James, After merging the scsi tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: In file included from drivers/scsi/lpfc/lpfc_debugfs.c:46: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_idiag_queacc_write': drivers/scsi/lpfc/lpfc_sli4.h:1083:14: error: inlining

Re: [PATCH] infiniband:qplib_fp:move spin_lock_bh to spin_lock in tasklet

2019-03-19 Thread 谢欢
It was only called in the tasklet context. root@jeff:~/git/linux-next# git grep -in bnxt_qplib_service_nq drivers/infiniband/hw/bnxt_re/qplib_fp.c:236:static void bnxt_qplib_service_nq(unsigned long data) drivers/infiniband/hw/bnxt_re/qplib_fp.c:390: tasklet_init(>worker, bnxt_qplib_service_nq,

Re: [PATCH] mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified

2019-03-19 Thread David Rientjes
On Wed, 20 Mar 2019, Yang Shi wrote: > When MPOL_MF_STRICT was specified and an existing page was already > on a node that does not follow the policy, mbind() should return -EIO. > But commit 6f4576e3687b ("mempolicy: apply page table walker on > queue_pages_range()") broke the rule. > > And,

Re: [PATCH] vfio/spapr_tce: Make symbol 'tce_iommu_driver_ops' static

2019-03-19 Thread Alexey Kardashevskiy
On 20/03/2019 17:47, Wang Hai wrote: > Fixes the following sparse warning: > > drivers/vfio/vfio_iommu_spapr_tce.c:1401:36: warning: > symbol 'tce_iommu_driver_ops' was not declared. Should it be static? > > Fixes: 5ffd229c0273 ("powerpc/vfio: Implement IOMMU driver for VFIO") >

Re: [PATCH v3] perf annotate/report: Remove hist__account_cycles from callback

2019-03-19 Thread Jin, Yao
Nobody like this patch? :) In my test, for a 72MB perf.data (with LBR data), the perf annotate processing speed: Before: 10.2s After: 2.2s Thanks Jin Yao On 3/16/2019 5:16 AM, Jin Yao wrote: The hist__account_cycles is executed when the hist_iter__branch_callback is called. But it looks

Re: [PATCH v2 3/5] devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.

2019-03-19 Thread Matthias Kaehlcke
Hi Gaël, On Tue, Mar 19, 2019 at 02:13:21PM -0400, Gaël PORTAY wrote: > From: Enric Balletbo i Serra > > Trusted Firmware-A (TF-A) for rk3399 implements a SiP call to get the > on-die termination (ODT) and auto power down parameters from kernel, > this patch adds the functionality to do this.

  1   2   3   4   5   6   7   8   >