[PATCH RFC 16/24] userfaultfd: wp: handle COW properly for uffd-wp

2019-01-20 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 RFC 15/24] mm: export wp_page_copy()

2019-01-20 Thread Peter Xu
Export this function for usages outside page fault handlers. 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 89345b51d8bd..bf04e187fafe 100644 ---

[PATCH RFC 12/24] userfaultfd: wp: add UFFDIO_COPY_MODE_WP

2019-01-20 Thread Peter Xu
From: Andrea Arcangeli This allows UFFDIO_COPY to map pages wrprotected. Signed-off-by: Andrea Arcangeli Signed-off-by: Peter Xu --- fs/userfaultfd.c | 5 +++-- include/linux/userfaultfd_k.h| 2 +- include/uapi/linux/userfaultfd.h | 11 +- mm/userfaultfd.c

[PATCH RFC 11/24] userfaultfd: wp: userfaultfd_pte/huge_pmd_wp() helpers

2019-01-20 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 Signed-off-by: Peter

Re: [PATCH v2] driver core: move device->knode_class to device_private

2019-01-20 Thread Wei Yang
On Fri, Jan 18, 2019 at 04:55:41PM +0100, Greg KH wrote: >On Fri, Jan 18, 2019 at 10:34:59AM +0800, Wei Yang wrote: >> As the description of struct device_private says, it stores data which >> is private to driver core. And it already has similar fields like: >> knode_parent, knode_driver,

[PATCH RFC 09/24] userfaultfd: wp: enabled write protection in userfaultfd API

2019-01-20 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 Signed-off-by:

[PATCH RFC 10/24] userfaultfd: wp: add WP pagetable tracking to x86

2019-01-20 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

Re: [RFC PATCH] mm, oom: fix use-after-free in oom_kill_process

2019-01-20 Thread Shakeel Butt
On Fri, Jan 18, 2019 at 5:58 PM Roman Gushchin wrote: > > Hi Shakeel! > > > > > On looking further it seems like the process selected to be oom-killed > > has exited even before reaching read_lock(_lock) in > > oom_kill_process(). More specifically the tsk->usage is 1 which is due > > to

Re: [PATCH 1/3] PM / devfreq: fix indentation in devfreq_add_device()

2019-01-20 Thread Chanwoo Choi
Hi, On 19. 1. 20. 오전 1:04, Yangtao Li wrote: > To beautify the code format. > > Signed-off-by: Yangtao Li > --- > drivers/devfreq/devfreq.c | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index

[PATCH RFC 02/24] mm: userfault: return VM_FAULT_RETRY on signals

2019-01-20 Thread Peter Xu
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 handling. We did that by reacquiring the mmap_sem before returning. However that brings a risk in that the vmas might have changed when we

[PATCH RFC 01/24] mm: gup: rename "nonblocking" to "locked" where proper

2019-01-20 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

[PATCH RFC 05/24] userfaultfd: wp: add helper for writeprotect check

2019-01-20 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 Signed-off-by: Peter Xu

[PATCH RFC 08/24] userfaultfd: wp: hook userfault handler to write protection fault

2019-01-20 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 RFC 04/24] mm: gup: allow VM_FAULT_RETRY for multiple times

2019-01-20 Thread Peter Xu
This is the gup counterpart of the change that allows the VM_FAULT_RETRY to happen for more than once. Signed-off-by: Peter Xu --- mm/gup.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 7b1f452cc2ef..22f1d419a849 100644 ---

[PATCH RFC 07/24] userfaultfd: wp: add the writeprotect API to userfaultfd ioctl

2019-01-20 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 RFC 06/24] userfaultfd: wp: support write protection for userfault vma range

2019-01-20 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: Pavel Emelyanov Cc: Rik van Riel Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Signed-off-by: Shaohua Li

[PATCH RFC 03/24] mm: allow VM_FAULT_RETRY for multiple times

2019-01-20 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 RFC 00/24] userfaultfd: write protection support

2019-01-20 Thread Peter Xu
Hi, This series implements initial write protection support for userfaultfd. Currently both shmem and hugetlbfs are not supported yet, but only anonymous memory. To be simple, either "userfaultfd-wp" or "uffd-wp" might be used in later paragraphs. The whole series can also be found at:

Re: [PATCH] doc:it_IT: add translations in process/

2019-01-20 Thread Jonathan Corbet
On Sat, 19 Jan 2019 23:13:41 +0100 Federico Vaga wrote: > This patch adds the Italian translation for the following documents > in Documentation/process: > > - applying-patches > - submit-checklist > - submitting-drivers > - changes > - stable api nonsense > > Signed-off-by: Federico Vaga In

[PATCH net-next] hinic: Add pci device ids

2019-01-20 Thread Xue Chaojing
This patch adds PCI device IDs to support following cards: 1. Add device id 0x0205 for HINIC 100GE dual port mezz card. 2. Add device id 0x0210 for HINIC 25GE quad port mezz card. 3. Delete device id 0x0201 for HINIC 100GE dual port card, because this is used by other product. 4. Macro of device

Re: [PATCH] doc:it_IT: documentation alignment

2019-01-20 Thread Jonathan Corbet
On Sat, 19 Jan 2019 23:14:22 +0100 Federico Vaga wrote: > It aligns the italian translation with the latest changes: > > ae67ee6c5e1d docs: fix Co-Developed-by docs > 3fe5dbfef47e Documentation/process/coding-style.rst: don't use "extern" with > function prototypes > > Signed-off-by: Federico

linux-next: Tree for Jan 21

2019-01-20 Thread Stephen Rothwell
Hi all, Changes since 20190118: The vfs tree still had its build failure for which I applied a patch. The netfilter-next tree gained build failures so I used the version from next-20190118. The mali-dp tree still had its failure for which I applied a merge fix patch. The imx-drm tree lost its

[PATCH 1/3] Revert "Input: olpc_apsp - enable the SP clock"

2019-01-20 Thread Lubomir Rintel
Turns out this is not such a great idea. Once the SP clock is disabled, it's not sufficient to just enable in order to bring the SP core back up. It seems that the kernel has no business managing this clock. Just let the firmware keep it enabled. This reverts commit

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

2019-01-20 Thread Stephen Rothwell
Hi all, After merging the netfilter-next tree, today's linux-next build (powerpc ppc64_defconfig) failed like this: ERROR: ".nf_conntrack_invert_icmpv6_tuple" [net/netfilter/nf_conntrack.ko] undefined! ERROR: ".nf_conntrack_icmpv6_packet" [net/netfilter/nf_conntrack.ko] undefined! ERROR:

Re: [PATCH v3 0/8] Add IPROC I2C slave mode and NIC I2C support

2019-01-20 Thread Ray Jui
Hi Rayagonda/Wolfram, I reviewed the entire patch series and added my Reviewed-by tag on 1/8 and 2/8. The rest of the patches in this series already had my Signed-off-by tag. Thanks, Ray On 1/17/2019 10:04 PM, Rayagonda Kokatanur wrote: > Hi, > This patchset contains support for IPROC I2C

Re: [PATCH v2 11/16] block: sed-opal: ioctl for writing to shadow mbr

2019-01-20 Thread Scott Bauer
On Sun, Jan 20, 2019 at 11:27:30AM +0100, David Kozub wrote: > On Sat, 19 Jan 2019, Scott Bauer wrote: > > > On Thu, Jan 17, 2019 at 09:31:51PM +, David Kozub wrote: > > > > > +static int write_shadow_mbr(struct opal_dev *dev, void *data) > > > +{ > > > + struct opal_shadow_mbr *shadow =

[PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-20 Thread Pingfan Liu
People reported crashkernel=384M reservation failed on a high end server with KASLR enabled. In that case there is enough free memory under 896M but crashkernel reservation still fails intermittently. The situation is crashkernel reservation code only finds free region under 896 MB with 128M

Re: [PATCH] libnvdimm: Clarify nd_pfn_init() flow

2019-01-20 Thread Wei Yang
On Fri, Jan 18, 2019 at 04:47:23PM -0800, Dan Williams wrote: >In recent days, 2 engineers, including the original author of >nd_pfn_init(), overlooked the internal call to nd_pfn_validate() and the >implications to memory allocation. > >Clarify this situation to help anyone that reads through

[PATCH] MIPS: Remove function size check in get_frame_info()

2019-01-20 Thread Jun-Ru Chang
Patch (b6c7a324df37b "MIPS: Fix get_frame_info() handling of microMIPS function size.") introduces additional function size check for microMIPS by only checking insn between ip and ip + func_size. However, func_size in get_frame_info() is always 0 if KALLSYMS is not enabled. This causes

Re: [PATCH] staging: vchiq: Fix local event signalling

2019-01-20 Thread Anisse Astier
Hi Phil, On Fri, Jan 11, 2019 at 11:34:53AM +, Phil Elwell wrote: > Prior to the recent event reworking (see Fixes), thread synchronisation > was implemented using completions, the worker thread being woken with > a call to complete(). The replacement uses waitqueues, which are more > like

[PATCH 2/2] clk: mmp2: separate LCDC peripheral clk form the display clock

2019-01-20 Thread Lubomir Rintel
These are in fact two clocks, they shouldn't be exposed as one. One is required for accessing LCD controller registers (peripheral clock), while other (AXI clock) can be optionally used as a pixel clock source for the panel. LCDC can alternatively use different clocks than the Display 1 AXI clock

[PATCH 1/2] dt-bindings: marvell,mmp2: Add clock id for the LCDC clock

2019-01-20 Thread Lubomir Rintel
The peripheral clock is required for access the the LCDC registers. It is in fact separate from the "AXI clock" that is optionally used to generate the pixel clock and as such requires a separate clock id. Link: https://lists.freedesktop.org/archives/dri-devel/2019-January/203975.html

[PATCH 0/2] mmp2: separate LCDC peripheral clk form the display

2019-01-20 Thread Lubomir Rintel
Hi, this pair of patches fix how the display clocks are configured on the MMP2 platform. The dt-bindings patch assumes the SP clock is not there as it probably was a mistake to expose it (see the 'Revert "dt-bindings: marvell,mmp2: Add clock id for the SP clock' patch sent separately). Thanks,

[PATCH -next] staging: rtl8712: drop pointless static qualifier in r8712_efuse_pg_packet_write()

2019-01-20 Thread YueHaibing
There is no need to have the 'intrepeat_times' variable static since new value always be assigned before use it. Signed-off-by: YueHaibing --- drivers/staging/rtl8712/rtl8712_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c

Re: [PATCH v1 2/6] usb: phy: Workaround for USB erratum-A005728

2019-01-20 Thread Greg Kroah-Hartman
On Mon, Jan 21, 2019 at 11:13:00AM +0800, Yinbo Zhu wrote: > From: Suresh Gupta > > PHY_CLK_VALID bit for UTMI PHY in USBDR does not set even > if PHY is providing valid clock. Workaround for this > involves resetting of PHY and check PHY_CLK_VALID bit > multiple times. If PHY_CLK_VALID bit is

[RESEND PATCH V8 07/11] KVM: Add support for byte granular memory ROE

2019-01-20 Thread Ahmed Abd El Mawgood
This patch documents and implements ROE_MPROTECT_CHUNK, a part of ROE hypercall designed to protect regions of a memory page with byte granularity. This feature provides a key primitive to protect against attacks involving pages remapping. Signed-off-by: Ahmed Abd El Mawgood ---

Re: [PATCH v1 3/6] usb: host: Stops USB controller init if PLL fails to lock

2019-01-20 Thread Greg Kroah-Hartman
On Mon, Jan 21, 2019 at 11:13:01AM +0800, Yinbo Zhu wrote: > From: yinbo.zhu This should read: From: Yinbo Zhu right? > USB erratum-A006918 workaround tries to start internal PHY inside > uboot (when PLL fails to lock). However, if the workaround also > fails, then USB initialization

Re: [PATCH RFC] iw_cxgb4: drop check - dead code

2019-01-20 Thread Jason Gunthorpe
On Sun, Jan 20, 2019 at 02:27:13AM +0100, Nicholas Mc Guire wrote: > Q:This also has an interesting dependency with no effect: > Depends on:... (INFINIBAND_USER_ACCESS [=n] || !INFINIBAND_USER_ACCESS [=n]) > I assume htat INFINIBAND_USER_ACCESS=y should be required here ? This has the effect

Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr

2019-01-20 Thread Baoquan He
On 01/21/19 at 01:16pm, Pingfan Liu wrote: > People reported crashkernel=384M reservation failed on a high end server > with KASLR enabled. In that case there is enough free memory under 896M > but crashkernel reservation still fails intermittently. > > The situation is crashkernel reservation

[PATCH] vgacon: unconfuse vc_origin when using soft scrollback

2019-01-20 Thread Nicolas Pitre
When CONFIG_VGACON_SOFT_SCROLLBACK is selected, the VGA display memory index and vc_visible_origin don't change when scrollback is activated. The actual screen content is saved away and the scrollbackdata is copied over it. However the vt code, and /dev/vcs devices in particular, still expect

Re: [PATCH 1/2] ARM: dts: meson8b: odroidc1: Enable usb phy node

2019-01-20 Thread Martin Blumenstingl
Hi Anand, On Sun, Jan 20, 2019 at 7:44 PM Anand Moon wrote: > > Hi Martin, > > Thanks for your review comments. > > On Sat, 19 Jan 2019 at 03:59, Martin Blumenstingl > wrote: > > > > Hi Anand, > > > > thank you for this patch! > > > > On Sun, Jan 13, 2019 at 7:18 PM Anand Moon wrote: > > > > >

RE: [PATCH 1/1] Input: elantech: Use SMBus based on bus info

2019-01-20 Thread 廖崇榮
-Original Message- From: Kai-Heng Feng [mailto:kai.heng.f...@canonical.com] Sent: Monday, January 21, 2019 12:28 PM To: 廖崇榮 Cc: Benjamin Tissoires; Dmitry Torokhov; open list:HID CORE LAYER; lkml Subject: Re: [PATCH 1/1] Input: elantech: Use SMBus based on bus info > On Jan 18,

[PATCH] ARM: dts: n900: fix mmc1 card detect gpio polarity

2019-01-20 Thread Arthur Demchenkov
Wrong polarity of card detect GPIO pin leads to the system not booting from external mmc, if the back cover of N900 is closed. When the cover is open the system boots fine. This wasn't noticed before, because of a bug, which was fixed by commit e63201f19 (mmc: omap_hsmmc: Delete platform data

Re: [PATCH v2] driver core: move device->knode_class to device_private

2019-01-20 Thread Wei Yang
On Fri, Jan 18, 2019 at 11:06:23AM +0100, Rafael J. Wysocki wrote: >On Fri, Jan 18, 2019 at 3:35 AM Wei Yang wrote: >> >> As the description of struct device_private says, it stores data which >> is private to driver core. And it already has similar fields like: >> knode_parent, knode_driver,

Re: [PATCH v2 2/2] x86, kexec_file_load: make it work with efi=noruntime or efi=old_map

2019-01-20 Thread Chao Fan
On Fri, Jan 18, 2019 at 11:26:36AM +0100, Borislav Petkov wrote: >On Thu, Jan 17, 2019 at 03:41:13PM +0800, Kairui Song wrote: >> How about we refill the boot_params.acpi_rsdp_addr if it is not valid >> in early code, so it could be used as a reliable RSDP address source? >> That should make

[PATCH] kernel, resource: use resource_overlaps() to simplify region_intersects()

2019-01-20 Thread Wei Yang
The three checks in region_intersects() is to see whether two resources overlap. This means it could be simplified with one resource_overlaps(). Also fix two typo in related function. Signed-off-by: Wei Yang --- kernel/iomem.c| 4 ++-- kernel/resource.c | 11 +-- 2 files changed,

Re: [RFC] Provide in-kernel headers for making it easy to extend the kernel

2019-01-20 Thread Sandeep Patil
On Sun, Jan 20, 2019 at 06:49:56PM -0800, h...@zytor.com wrote: > On January 20, 2019 5:45:53 PM PST, Joel Fernandes > wrote: > >On Sun, Jan 20, 2019 at 01:58:15PM -0800, h...@zytor.com wrote: > >> On January 20, 2019 8:10:03 AM PST, Joel Fernandes > > wrote: > >> >On Sat, Jan 19, 2019 at

[PATCH 1/5] locking/qspinlock: Safely handle > 4 nesting levels

2019-01-20 Thread Waiman Long
Four queue nodes per cpu are allocated to enable up to 4 nesting levels using the per-cpu nodes. Nested NMIs are possible in some architectures. Still it is very unlikely that we will ever hit more than 4 nested levels with contention in the slowpath. When that rare condition happens, however, it

[PATCH 3/4] arm64: dts: sprd: Add SC2731 charger device

2019-01-20 Thread Baolin Wang
Add charger device node and related battery node for SC2731 PMIC. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |6 ++ arch/arm64/boot/dts/sprd/sp9860g-1h10.dts | 16 2 files changed, 22 insertions(+) diff --git

[PATCH 1/4] arm64: dts: sprd: Remove PMIC INTC irq trigger type

2019-01-20 Thread Baolin Wang
The Spreadtrum PMIC INTC controller has no registers to set trigger type, since it is always high level trigger as default. So remove its child devices' irq trigger type setting and change #interrupt-cells to 1. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi |8

[PATCH 3/3] Revert "dt-bindings: marvell,mmp2: Add clock id for the SP clock"

2019-01-20 Thread Lubomir Rintel
It seems that the kernel has no business managing this clock: once the SP clock is disabled, it's not sufficient to just enable it in order to bring the SP core back up. Pretty sure nothing ever used this and it's safe to remove. This reverts commit e8a2c779141415105825e65a4715f1130bba61b1.

Re: [PATCH] iio: light: add driver support for MAX44009

2019-01-20 Thread Robert Eshleman
On Sat, Jan 19, 2019 at 08:41:46PM +0100, Peter Meerwald-Stadler wrote: Hey Jonathon and Peter, First, thank you for the constructive and in-depth feedback. I have a question below regarding a section of code that will need to be protected against a race condition if future features are added.

[PATCH 2/3] Revert "clk: mmp2: add SP clock"

2019-01-20 Thread Lubomir Rintel
It seems that the kernel has no business managing this clock: once the SP clock is disabled, it's not sufficient to just enable in order to bring the SP core back up. Just let the firmware keep it enabled and don't expose it to drivers. This reverts commit

Re: [PATCH] doc:process: remove note from 'stable api nonsense'

2019-01-20 Thread Jonathan Corbet
On Fri, 18 Jan 2019 22:58:04 +0100 Federico Vaga wrote: > The link referred by the note can't be retrieved: this patch just > remove that old note. > > Signed-off-by: Federico Vaga > --- > Documentation/process/stable-api-nonsense.rst | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH 4/4] arm64: dts: sprd: Add SC27XX fuel gauge device

2019-01-20 Thread Baolin Wang
Add Spreadtrum SC27XX fuel gauge device node to calculate the battery capacity. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi

[PATCH 2/4] arm64: dts: sprd: Add ADC calibration support

2019-01-20 Thread Baolin Wang
This patch adds phandles to the calibration cells provided by the Efuse device, which is used to calibrate the ADC channel scales. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git

Re: [PATCH 3/3] PM / devfreq: fix mem leak in devfreq_add_device()

2019-01-20 Thread Chanwoo Choi
Hi, On 19. 1. 20. 오전 1:04, Yangtao Li wrote: > 'devfreq' is malloced in devfreq_add_device() and should be freed in > the error handling cases, otherwise it will cause memory leak. > > Signed-off-by: Yangtao Li > --- > drivers/devfreq/devfreq.c | 2 +- > 1 file changed, 1 insertion(+), 1

[PATCH 0/4] Add new device nodes for Spreadtrum SC9860 platform

2019-01-20 Thread Baolin Wang
This patch set adds charger and fuel gauge device nodes for Spreadtrum SC2731 PMIC, it also removes redundant irq trigger setting for PMIC devices and adds nvmem cells for ADC to calibrate the ADC channel scales. Baolin Wang (4): arm64: dts: sprd: Remove PMIC INTC irq trigger type arm64: dts:

[PATCH 0/3] Stop managing the SP clock

2019-01-20 Thread Lubomir Rintel
Hi, Per discussion in [1] it seems that the kernel has no business managing this clock: once the SP clock is disabled, it's not sufficient to just enable it in order to bring the SP core back up. Just let the firmware keep it enabled and don't expose it to drivers. [1]

Re: [PATCH] uprobes: convert uprobe.ref to refcount_t

2019-01-20 Thread Masami Hiramatsu
On Wed, 16 Jan 2019 08:44:52 -0500 Steven Rostedt wrote: > > [ Cc'ing Masami as he maintains uprobes (we need to add uprobes to > the MAINTAINERS file ] Thanks Steve, I think it is maintained mainly by Srikar and Oleg. Srikar, Oleg, could you update MAINTAINERS file to add UPROBES entry? And

[PATCH 4/5] locking/qspinlock_stat: Allow QUEUED_LOCK_STAT for all archs

2019-01-20 Thread Waiman Long
The QUEUED_LOCK_STAT option to report queued spinlocks statistics was previously allowed only on x86 architecture. Now queued spinlocks are used in multiple architectures, we now allow QUEUED_LOCK_STAT to be enabled for all those architectures that use queued spinlocks. This option is listed as

[PATCH 3/5] locking/qspinlock_stat: Separate out the PV specific stat counts

2019-01-20 Thread Waiman Long
Some of the statistics counts are for PV qspinlocks only and are not applicable if PARAVIRT_SPINLOCKS aren't configured. So make those counts dependent on the PARAVIRT_SPINLOCKS config option now. Signed-off-by: Waiman Long --- kernel/locking/qspinlock_stat.h | 129

[PATCH 0/3] PHY: Add support for SERDES in TI's AM654 platform

2019-01-20 Thread Kishon Vijay Abraham I
Patch series adds support for SERDES module in am654. This also modifies phy_reset API to invoke pm_runtime_get/pm_runtime_put since the reset callback can access registers. Kishon Vijay Abraham I (3): phy: core: Invoke pm_runtime_get_*/pm_runtime_put_* before invoking reset callback

[PATCH 5/5] locking/qspinlock: Add some locking debug code

2019-01-20 Thread Waiman Long
Add some optionally enabled debug code to check if more than one CPU that enter the lock critical section simultaneously. Signed-off-by: Waiman Long --- kernel/locking/qspinlock.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/kernel/locking/qspinlock.c

[PATCH 2/3] dt-bindings: phy: ti: Add dt binding documentation for SERDES in AM654x SoC

2019-01-20 Thread Kishon Vijay Abraham I
AM654x has two SERDES instances. Each instance has three input clocks (left input, externel reference clock and right input) and two output clocks (left output and right output) in addition to a PLL mux clock which the SERDES uses for Clock Multiplier Unit (CMU refclock). The PLL mux clock can

[GIT PULL] ARC updates for 5.0-rc3

2019-01-20 Thread Vineet Gupta
Hi Linus, ARC updates for 5.0-rc3 (or rc4, it is likely too late for sunday) Please pull ! Thx, -Vineet ---> The following changes since commit bfeffd155283772bbe78c6a05dec7c0128ee500c: Linux 5.0-rc1 (2019-01-06 17:08:20 -0800) are available in the git repository

[PATCH 0/5] locking/qspinlock: Safely handle > 4 nesting levels

2019-01-20 Thread Waiman Long
My first thought of making qspinlocks to handle more than 4 slowpath nesting levels to to use lock stealing when no more MCS nodes are available. That is easy for PV qspinlocks as lock stealing is supported. For native qspinlocks, we have to make setting the locked bit an atomic operation which

Re: [PATCH v4 1/3] fs: hoist EFSCORRUPTED definition into uapi header

2019-01-20 Thread Dave Chinner
On Fri, Jan 18, 2019 at 05:14:38PM +0100, Jann Horn wrote: > Multiple filesystems can already return EFSCORRUPTED errors to userspace; > however, so far, definitions of EFSCORRUPTED were in filesystem-private > headers. > > I wanted to use EUCLEAN to indicate data corruption in the VFS layer; >

[PATCH 2/5] locking/qspinlock_stat: Track the no MCS node available case

2019-01-20 Thread Waiman Long
Track the number of slowpath locking operations that are being done without any MCS node available as well renaming lock_index[123] to make them more descriptive. Using these stat counters is one way to find out if a code path is being exercised. Signed-off-by: Waiman Long ---

[PATCH 1/2] remoteproc: Add __iomem to return of rproc_da_to_va.

2019-01-20 Thread Pi-Hsun Shih
The return value of rproc_da_to_va would probably be device memory. Add __iomem annotation to it. Signed-off-by: Pi-Hsun Shih --- I feel that there might be more things that need to be changed (especially for the carveouts things). I didn't change them since I don't know how to test that part.

Re: [PATCH v4 2/3] fs: don't let getdents return bogus names

2019-01-20 Thread Dave Chinner
On Fri, Jan 18, 2019 at 05:14:39PM +0100, Jann Horn wrote: > When you e.g. run `find` on a directory for which getdents returns > "filenames" that contain slashes, `find` passes those "filenames" back to > the kernel, which then interprets them as paths. That could conceivably > cause userspace to

[PATCH 3/3] phy: ti: Add a new SERDES driver for TI's AM654x SoC

2019-01-20 Thread Kishon Vijay Abraham I
Add a new SERDES driver for TI's AM654x SoC which configures the SERDES only for PCIe. Support fo USB3 will be added later. SERDES in am654x has three input clocks (left input, externel reference clock and right input) and two output clocks (left output and right output) in addition to a PLL mux

[PATCH 1/3] phy: core: Invoke pm_runtime_get_*/pm_runtime_put_* before invoking reset callback

2019-01-20 Thread Kishon Vijay Abraham I
PHY drivers may try to access PHY registers in the ->reset() callback. Invoke phy_pm_runtime_get_sync() before invoking the ->reset() callback so that the PHY drivers don't have to enable clocks by themselves before accessing PHY registers. Signed-off-by: Kishon Vijay Abraham I ---

[PATCH 2/2] remoteproc: elf_loader: Use memset_io instead of memset.

2019-01-20 Thread Pi-Hsun Shih
Use memset_io and memcpy_toio instead of memset and memcpy in rproc_elf_load_segments, since the target ptr may be device memory. Signed-off-by: Pi-Hsun Shih --- This fix issue while trying to load ELF firmware based on https://lore.kernel.org/patchwork/patch/1033804/, that the memset(..., 0)

[GIT] Networking

2019-01-20 Thread David Miller
1) Fix endless loop in nf_tables, from Phil Sutter. 2) Fix cross namespace ip6_gre tunnel hash list corruption, from Olivier Matz. 3) Don't be too strict in phy_start_aneg() otherwise we might not allow restarting auto negotiation. From Heiner Kallweit. 4) Fix various KMSAN

Re: [RFC PATCH] mm, oom: fix use-after-free in oom_kill_process

2019-01-20 Thread Shakeel Butt
On Fri, Jan 18, 2019 at 11:09 PM Michal Hocko wrote: > > On Fri 18-01-19 16:50:22, Shakeel Butt wrote: > [...] > > On looking further it seems like the process selected to be oom-killed > > has exited even before reaching read_lock(_lock) in > > oom_kill_process(). More specifically the

[PATCH v6 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2019-01-20 Thread Paul Elder
Since "usb: gadget: uvc: enqueue uvc_request_data in setup handler for control OUT requests" it is no longer necessary for userspace to call ioctl UVCIOC_SEND_RESPONSE in response to receiving a UVC_EVENT_SETUP from the uvc function driver for a control OUT request. This change means that for

[PATCH v6 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2019-01-20 Thread Paul Elder
We now have a mechanism to signal the UDC driver to reply to a control OUT request with STALL or ACK, and we have packaged the setup stage data and the data stage data of a control OUT request into a single UVC_EVENT_DATA for userspace to consume. After telling the UDC to delay the status stage,

[PATCH v6 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-20 Thread Paul Elder
This patch series adds a mechanism to allow asynchronously validating the data stage of a control OUT request, and for stalling or suceeding the request accordingly. This mechanism is implemented for MUSB, and is used by UVC. At the same time, UVC packages the setup stage and data stage data

[PATCH v6 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-20 Thread Paul Elder
Implement the mechanism for optional explicit status stage for the MUSB driver. This allows a function driver to specify what to reply for the status stage. The functionality for an implicit status stage is retained. Signed-off-by: Paul Elder v1 Reviewed-by: Laurent Pinchart v1 Acked-by: Bin

[PATCH v6 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2019-01-20 Thread Paul Elder
Currently, for uvc class-specific control IN and OUT requests, in the setup handler a UVC_EVENT_SETUP with the setup control is enqueued to userspace. In response to this, the uvc function driver expects userspace to call ioctl UVCIOC_SEND_RESPONSE containing uvc request data. In the case of

[PATCH v6 1/6] usb: uvc: include videodev2.h in g_uvc.h

2019-01-20 Thread Paul Elder
V4L2_EVENT_PRIVATE_START is used in g_uvc.h but is defined in videodev2.h, which is not included and causes a compiler warning: linux/usb/g_uvc.h:15:28: error: ‘V4L2_EVENT_PRIVATE_START’ undeclared here (not in a function) #define UVC_EVENT_FIRST (V4L2_EVENT_PRIVATE_START + 0) Include

Re: [PATCH 1/2] ARM: dts: meson8b: odroidc1: Enable usb phy node

2019-01-20 Thread Anand Moon
Hi Martin, Thanks for you comments. On Mon, 21 Jan 2019 at 03:21, Martin Blumenstingl wrote: > > Hi Anand, > > On Sun, Jan 20, 2019 at 7:44 PM Anand Moon wrote: > > > > Hi Martin, > > > > Thanks for your review comments. > > > > On Sat, 19 Jan 2019 at 03:59, Martin Blumenstingl > > wrote: > >

Re: [RFC v2 3/6] remoteproc: move IPI interface into separate file.

2019-01-20 Thread Peter Shih
On Sat, Jan 19, 2019 at 5:04 AM Nicolas Boichat wrote: > > Hi, > > On Mon, Jan 7, 2019 at 9:26 PM Pi-Hsun Shih wrote: > > > > Move the IPI interface into a separate file mtk_scp_ipi.c, so the things > > that use the interface only can depend on the module only. > > > > Signed-off-by: Pi-Hsun

[PATCH v6 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-20 Thread Paul Elder
A usb gadget function driver may or may not want to delay the status stage of a control OUT request. An instance where it might want to is to asynchronously validate the data of a class-specific request. A function driver that wants an explicit status stage should set the newly added

Re: [PATCH v2 1/1] doc: networking: integrate scaling document into doc tree

2019-01-20 Thread Otto Sabart
On 20. Jan (Sunday) v 19:13:59 -0700 2019, Jonathan Corbet wrote: > On Fri, 18 Jan 2019 21:38:32 +0100 > Otto Sabart wrote: > > > Convert scaling document into reStructuredText and add reference to > > scaling document into main table of contents in network documentation. > > > > There are no

Re: [PATCH] perf script: fix crash when processing recorded stat data

2019-01-20 Thread Jiri Olsa
On Sun, Jan 20, 2019 at 11:14:14AM -0800, Tony Jones wrote: > While updating Perf to work with Python3 and Python2 I noticed that the > stat-cpi script was dumping core. > > $ perf stat -e cycles,instructions record -o /tmp/perf.data /bin/false > > Performance counter stats for '/bin/false':

[PATCH] [next] kvm: vmx: fix some -Wmissing-prototypes warnings

2019-01-20 Thread Yi Wang
We get some warnings when building kernel with W=1: arch/x86/kvm/vmx/vmx.c:426:5: warning: no previous prototype for ‘kvm_fill_hv_flush_list_func’ [-Wmissing-prototypes] arch/x86/kvm/vmx/nested.c:58:6: warning: no previous prototype for ‘init_vmcs_shadow_fields’ [-Wmissing-prototypes] Make them

linux-next: build warning after merge of the sound tree

2019-01-20 Thread Stephen Rothwell
Hi Takashi, After merging the sound tree, today's linux-next build (arm multi_v7_defconfig) produced this warning: sound/pci/hda/hda_codec.c: In function 'hda_codec_runtime_suspend': sound/pci/hda/hda_codec.c:2926:18: warning: unused variable 'pcm' [-Wunused-variable] struct hda_pcm *pcm;

Re: [PATCH] PM / devfreq: consistent indentation

2019-01-20 Thread Frank Lee
On Mon, Jan 21, 2019 at 10:28 AM Chanwoo Choi wrote: > > On 19. 1. 21. 오전 11:19, MyungJoo Ham wrote: > > Following up with complaints on inconsistent indentation from > > Yangtao Li, this fixes indentation inconsistency. > > > > In principle, this tries to put arguments aligned to the left > >

Re: [PATCH] perf script: fix crash when processing recorded stat data

2019-01-20 Thread Ravi Bangoria
On 1/21/19 12:44 AM, Tony Jones wrote: > While updating Perf to work with Python3 and Python2 I noticed that the > stat-cpi script was dumping core. [...] > Fixes: 1fcd03946b52 ("perf stat: Update per-thread shadow stats") > Signed-off-by: Tony Jones Tested-by: Ravi Bangoria

Re: [PATCH 0/3] iommu/arm-smmu: Add support to use Last level cache

2019-01-20 Thread Ard Biesheuvel
On Mon, 21 Jan 2019 at 06:54, Vivek Gautam wrote: > > Qualcomm SoCs have an additional level of cache called as > System cache, aka. Last level cache (LLC). This cache sits right > before the DDR, and is tightly coupled with the memory controller. > The clients using this cache request their

Re: [PATCH] mm, oom: remove 'prefer children over parent' heuristic

2019-01-20 Thread Tetsuo Handa
Shakeel Butt wrote: > + pr_err("%s: Kill process %d (%s) score %lu or sacrifice child\n", > + message, task_pid_nr(p), p->comm, oc->chosen_points); This patch is to make "or sacrifice child" false. And, the process reported by this line will become always same with the process

[PATCH v2] Input: elantech: Enable SMBus on new (2018+) systems

2019-01-20 Thread Kai-Heng Feng
There are some new HP laptops with Elantech touchpad don't support multitouch. Currently we use ETP_NEW_IC_SMBUS_HOST_NOTIFY() to check if SMBus is supported, but in addition to firmware version, the bus type also informs us if the IC can support SMBus, so also check that. In case of breaking

Re: [PATCH] HID: i2c-hid: Disable runtime PM on Goodix touchpad

2019-01-20 Thread Kai-Heng Feng
> On Jan 17, 2019, at 20:35, Benjamin Tissoires > wrote: > > On Thu, Jan 17, 2019 at 12:41 PM Kai-Heng Feng > wrote: >> >> >> >>> On Jan 17, 2019, at 16:06, Benjamin Tissoires >>> wrote: >>> >>> On Thu, Jan 17, 2019 at 6:02 AM Kai-Heng Feng >>> wrote: >> [snipped] Goodix says

Re: [PATCH v3] HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels

2019-01-20 Thread Kai-Heng Feng
> On Jan 18, 2019, at 23:50, Benjamin Tissoires > wrote: > > Hi Kai-Heng, > > On Mon, Jan 7, 2019 at 8:24 AM Kai-Heng Feng > wrote: >> >> While using Elan touchpads, the message floods: >> [ 136.138487] i2c_hid i2c-DELL08D6:00: i2c_hid_get_input: incomplete report >> (14/65535) >> >>

Re: [PATCH 1/1] Input: elantech: Use SMBus based on bus info

2019-01-20 Thread Kai-Heng Feng
> On Jan 18, 2019, at 17:29, 廖崇榮 wrote: > > > > -Original Message- > From: Kai Heng Feng [mailto:kai.heng.f...@canonical.com] > Sent: Friday, January 18, 2019 12:15 AM > To: Benjamin Tissoires > Cc: Dmitry Torokhov; 廖崇榮; open list:HID CORE LAYER; lkml > Subject: Re: [PATCH 1/1]

Re: fix int_sqrt() for very large numbers

2019-01-20 Thread Linus Torvalds
On Sun, Jan 20, 2019 at 4:15 AM Florian La Roche wrote: > > @@ -52,7 +52,7 @@ u32 int_sqrt64(u64 x) > if (x <= ULONG_MAX) > return int_sqrt((unsigned long) x); > > - m = 1ULL << (fls64(x) & ~1ULL); > + m = 1ULL << ((fls64(x) - 1) & ~1ULL); I've applied this

Re: [PATCH v2] perf scripts python: Add Python 3 support to exported-sql-viewer.py

2019-01-20 Thread Tony Jones
On 1/20/19 11:27 AM, Jonathan Corbet wrote: > On Fri, 18 Jan 2019 16:45:04 -0800 > Tony Jones wrote: > >> On 1/17/19 1:45 AM, Seeteena Thoufeek wrote: >> >>> +if sys.version_info[0] < 3: >>> +import cPickle >>> +else: >>> +import _pickle as cPickle >> >> Do you really need this? >> >>

RE: [PATCH 2/3] PM / devfreq: fix missing check of return value in devfreq_add_device()

2019-01-20 Thread MyungJoo Ham
>devm_kzalloc() could fail, so insert a check of its return value. And >if it fails, returns -ENOMEM. > >Signed-off-by: Yangtao Li >--- > drivers/devfreq/devfreq.c | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/drivers/devfreq/devfreq.c

  1   2   3   >