[PATCH] doc: Add vendor prefix for Kaohsiung

2018-04-12 Thread Lukasz Majewski
The 'kao' entry has been added to vendor-prefixes.txt to indicate products from Kaohsiung Opto-Electronics Inc. Signed-off-by: Lukasz Majewski --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-pr

Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system

2018-04-12 Thread Sinan Kaya
On 4/12/2018 10:06 AM, Bjorn Helgaas wrote: > [+cc Alex because of his interest in device reset] > > For context, here's the part of the patch we're discussing: > static void dpc_work(struct work_struct *work) { struct dpc_dev *dpc = container_of(work, struct dpc_dev, wor

Re: [PATCH 05/10] KVM/nVMX: Use kvm_vcpu_map when mapping the L1 MSR bitmap

2018-04-12 Thread Paolo Bonzini
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > ... since using kvm_vcpu_gpa_to_page() and kmap() will only work for guest > memory that has a "struct page". > > The life-cycle of the mapping also changes to avoid doing map and unmap on > every single exit (which becomes very expesive once we use m

Re: [PATCH 3/4] lan78xx: Read LED modes from Device Tree

2018-04-12 Thread Andrew Lunn
> @@ -2097,6 +2098,25 @@ static int lan78xx_phy_init(struct lan78xx_net *dev) > (void)lan78xx_set_eee(dev->net, &edata); > } > > + if (!of_property_read_u32_array(dev->udev->dev.of_node, > + "microchip,led-modes", > +

Re: [PATCHv2, RESEND] x86/mm: Do not lose cpuinfo_x86::x86_phys_bits adjustment

2018-04-12 Thread Konrad Rzeszutek Wilk
On Tue, Apr 10, 2018 at 12:27:04PM +0300, Kirill A. Shutemov wrote: > Some features (Intel MKTME, AMD SME) reduce number of effectively > available physical address bits. We adjust x86_phys_bits accordingly. > > If get_cpu_cap() got called more than one time we lose this adjustement. > > That's e

[PATCH] display: panel: Add KOE tx14d24vm1bpa display support (320x240)

2018-04-12 Thread Lukasz Majewski
This commit adds support for KOE's 5.7" display. Signed-off-by: Lukasz Majewski --- .../bindings/display/panel/koe,tx14d24vm1bpa.txt | 42 ++ drivers/gpu/drm/panel/panel-simple.c | 26 ++ 2 files changed, 68 insertions(+) create mode 100644 Docum

Re: [PATCH 05/14] ARM: OMAP2: Add functions to save and restore powerdomain context

2018-04-12 Thread Tony Lindgren
* Keerthy [180412 03:56]: > From: Russ Dill > --- a/arch/arm/mach-omap2/powerdomain.c > +++ b/arch/arm/mach-omap2/powerdomain.c > @@ -1199,3 +1199,63 @@ bool pwrdm_can_ever_lose_context(struct powerdomain > *pwrdm) > > return 0; > } > + > +/** > + * pwrdm_save_context - save powerdomain

Re: [PATCH 06/10] KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page

2018-04-12 Thread Paolo Bonzini
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > + > + if (kvm_vcpu_map(vcpu, > gpa_to_gfn(vmcs12->virtual_apic_page_addr), map)) > + vmcs_write64(VIRTUAL_APIC_PAGE_ADDR, > gfn_to_gpa(map->pfn)); This should in principle be pfn_to_hpa. However, pfn_to_hpa is unused

Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system

2018-04-12 Thread Keith Busch
On Thu, Apr 12, 2018 at 10:34:37AM -0400, Sinan Kaya wrote: > On 4/12/2018 10:06 AM, Bjorn Helgaas wrote: > > > > I think the scenario you are describing is two systems that are > > identical except that in the first, the endpoint is below a hotplug > > bridge, while in the second, it's below a no

Re: [PATCH 11/14] gpio: omap: Restore power_mode configuration at resume time

2018-04-12 Thread Tony Lindgren
* Keerthy [180412 03:56]: > From: Dave Gerlach > > Commit 2dc983c565e0 ("gpio/omap: cleanup prepare_for_idle and > resume_after_idle") introduces omap2_gpio_prepare_for_idle and > omap2_gpio_resume_after_idle to properly configure gpios that are used > as wake sources. When entering off mode, om

Re: [PATCH 07/10] KVM/nVMX: Use kvm_vcpu_map when mapping the posted interrupt descriptor table

2018-04-12 Thread Paolo Bonzini
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > ... since using kvm_vcpu_gpa_to_page() and kmap() will only work for guest > memory that has a "struct page". > > The life-cycle of the mapping also changes to avoid doing map and unmap on > every single exit (which becomes very expesive once we use m

Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES

2018-04-12 Thread Roman Gushchin
On Thu, Apr 12, 2018 at 01:52:17PM +0200, Michal Hocko wrote: > On Thu 12-04-18 08:52:52, Vlastimil Babka wrote: > > On 04/11/2018 03:56 PM, Roman Gushchin wrote: > > > On Wed, Apr 11, 2018 at 03:16:08PM +0200, Vlastimil Babka wrote: > [...] > > >> With that in mind, can we at least for now put the

[PATCH] tda998x: Check ref count before invoking drm_connector_cleanup in unbind

2018-04-12 Thread Ayan Kumar Halder
In a situation when the reference count of the drm connector is greater than 1, the unbind function should not invoke drm_connector_cleanup as this will lead to an inconsistent state where the drm_crtc_state->connector_mask still has a bitmask referring to the stale connector. Later, when drm drive

Re: [PATCH] regmap: debugfs: check pointer before access

2018-04-12 Thread Mark Brown
On Thu, Mar 29, 2018 at 08:21:54PM +0800, Peng Fan wrote: > So add check here. When the driver pointer is NULL, return -EIO. We should be providing a name if the file is there so rather than returning an error we should provide something in the file so we should either suppress creation of the fi

Re: [PATCH] mfd: mc13xxx: Add mc34708 adc support

2018-04-12 Thread Lukasz Majewski
Hi Joe, > On Wed, 2018-04-11 at 16:09 +0200, Lukasz Majewski wrote: > > From: Sascha Hauer > > > > The mc34708 has an improved adc. The older variants will always > > convert a fixed order of channels. The mc34708 can do up to eight > > conversions in arbitrary channel order. Currently this exte

Re: [PATCH 2/2] input: touchscreen mc13xxx: Add mc34708 support

2018-04-12 Thread Lukasz Majewski
On Wed, 11 Apr 2018 09:01:01 -0700 Joe Perches wrote: > On Wed, 2018-04-11 at 16:13 +0200, Lukasz Majewski wrote: > > From: Sascha Hauer > > > > The mc34708 has a different bit to enable pen detection. This > > adds the driver data and devtype necessary to probe the device > > and to distinguis

Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES

2018-04-12 Thread Michal Hocko
On Thu 12-04-18 15:38:33, Roman Gushchin wrote: > On Thu, Apr 12, 2018 at 01:52:17PM +0200, Michal Hocko wrote: > > On Thu 12-04-18 08:52:52, Vlastimil Babka wrote: > > > On 04/11/2018 03:56 PM, Roman Gushchin wrote: > > > > On Wed, Apr 11, 2018 at 03:16:08PM +0200, Vlastimil Babka wrote: > > [...]

Applied "ASoC: fsl_esai: Fix divisor calculation failure at lower ratio" to the asoc tree

2018-04-12 Thread Mark Brown
The patch ASoC: fsl_esai: Fix divisor calculation failure at lower ratio has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 h

Applied "ASoC: Intel: atom: fix ACPI/PCI Kconfig" to the asoc tree

2018-04-12 Thread Mark Brown
The patch ASoC: Intel: atom: fix ACPI/PCI Kconfig has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus

Applied "ASoC: rsnd: mark PM functions __maybe_unused" to the asoc tree

2018-04-12 Thread Mark Brown
The patch ASoC: rsnd: mark PM functions __maybe_unused has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to

Re: [PATCH 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet

2018-04-12 Thread Maxime Ripard
On Thu, Apr 12, 2018 at 01:08:51AM +0200, Paul Kocialkowski wrote: > > > + backlight: backlight { > > > + compatible = "pwm-backlight"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&backlight_enable_pin>; > > > > You don't need any of the pinctrl nodes for the GP

[PATCH] memcg: Remove memcg_cgroup::id from IDR on mem_cgroup_css_alloc() failure

2018-04-12 Thread Kirill Tkhai
In case of memcg_online_kmem() fail, memcg_cgroup::id remains hashed in mem_cgroup_idr even after memcg memory is freed. This leads to leak of ID in mem_cgroup_idr. This patch adds removing into mem_cgroup_css_alloc(), which fixes the problem. For better readability, it adds generic helper, which

[PATCH v3] selftests/livepatch: introduce tests

2018-04-12 Thread Joe Lawrence
Add a few livepatch modules and simple target modules that the included regression suite can run tests against. Signed-off-by: Joe Lawrence --- Documentation/livepatch/callbacks.txt | 487 - lib/Kconfig.debug | 12 + lib/Makefile

[PATCH v3] Add livepatch kselftests

2018-04-12 Thread Joe Lawrence
Tests run on top of Petr's v11 atomic replace feature and v2 of the shadow variable enhancement patchsets: [PATCH 0/8] livepatch: Atomic replace feature https://lkml.kernel.org/r/20180323120028.31451-1-pmla...@suse.com [PATCH v2 0/2] livepatch: Allocate and free shadow variables more safely

Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-12 Thread Maxime Ripard
On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy Zheng wrote: > From: Chen-Yu Tsai > > On the Allwinner R40 SoC, the "GMAC clock" register is in the CCU > address space; on the A64 SoC this register is in the SRAM controller > address space, and with a different offset. > > To access the regist

Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES

2018-04-12 Thread Roman Gushchin
On Thu, Apr 12, 2018 at 08:52:52AM +0200, Vlastimil Babka wrote: > On 04/11/2018 03:56 PM, Roman Gushchin wrote: > > On Wed, Apr 11, 2018 at 03:16:08PM +0200, Vlastimil Babka wrote: > >> [+CC linux-api] > >> > >> On 03/05/2018 02:37 PM, Roman Gushchin wrote: > >>> This patch introduces a concept of

[PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Colin King
From: Colin Ian King In the case where the call to dev_alloc_name fails the current exit path is via err_free_netdev and this calls free_netdev on a null priv pointer, hence causing a null pointer dereference. Fix this by instead exiting via err_release_irq. Detected by CoverityScan, CID#146784

Re: [PATCH 5/5] arm64: allwinner: a64: add SRAM controller device tree node

2018-04-12 Thread Maxime Ripard
Hi, On Wed, Apr 11, 2018 at 10:16:41PM +0800, Icenowy Zheng wrote: > Allwinner A64 has a SRAM controller, and in the device tree currently > we have a syscon node to enable EMAC driver to access the EMAC clock > register. As SRAM controller driver can now export regmap for this > register, replace

Re: [PATCH 00/10] KVM/X86: Handle guest memory that does not have a struct page

2018-04-12 Thread Paolo Bonzini
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > For the most part, KVM can handle guest memory that does not have a struct > page (i.e. not directly managed by the kernel). However, There are a few > places > in the code, specially in the nested code, that does not support that. > > Patch 1, 2, an

Re: [PATCH v4 1/2] timers: Don't wake ktimersoftd on every tick

2018-04-12 Thread Haris Okanovic
Hi Mike, I haven't tested the patch with wireshark until now. My system also hangs shortly after it starts. I'm pretty sure I hit workqueues in my earlier tests via the block driver, but it's clearly not whatever wireshark is using. I'll look at it and try to post a fix. CCing the list to avo

Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system

2018-04-12 Thread Keith Busch
On Thu, Apr 12, 2018 at 08:39:54AM -0600, Keith Busch wrote: > On Thu, Apr 12, 2018 at 10:34:37AM -0400, Sinan Kaya wrote: > > On 4/12/2018 10:06 AM, Bjorn Helgaas wrote: > > > > > > I think the scenario you are describing is two systems that are > > > identical except that in the first, the endpo

Re: [Bug]: mtd: onenand: omap2plus: kernel panic with OneNAND on OMAP3 (DM3730) device GTA04A5

2018-04-12 Thread Tony Lindgren
* H. Nikolaus Schaller [180411 07:05]: > > Am 10.04.2018 um 22:56 schrieb Ladislav Michl : > > Well, that's a shame... However, this code is in production for several > > months now, > > Well, we could have tested earlier release-candidates... I've found it's way easier to test Linux next on reg

Re: [PATCH 03/10] X86/nVMX: Update the PML table without mapping and unmapping the page

2018-04-12 Thread Paolo Bonzini
On 21/02/2018 18:47, KarimAllah Ahmed wrote: > + dst = (gpa_t)(((u64 *)vmcs12->pml_address) + > vmcs12->guest_pml_index); This is not a pointer, since it's in the guest. Please use dst = vmcs12->pml_address + sizeof(u64) * vmcs12->guest_pml_index; (It may also make sense to use k

[PATCH] rapidio: fix rio_dma_transfer error handling

2018-04-12 Thread Ioan Nicu
Some of the mport_dma_req structure members were initialized late inside the do_dma_request() function, just before submitting the request to the dma engine. But we have some error branches before that. In case of such an error, the code would return on the error path and trigger the calling of dma

Re: INFO: task hung in perf_trace_event_unreg

2018-04-12 Thread Paul E. McKenney
On Thu, Apr 12, 2018 at 11:39:42AM +0200, Dmitry Vyukov wrote: > On Wed, Apr 11, 2018 at 9:36 PM, Paul E. McKenney > wrote: > >> >> >> >> wrote: > >> >> >> >> >> >> >> >> > >> >> >> >> >> >> >> >> > Hello, > >> >> >> >> >> >> >> >> > > >> >> >> >> >> >> >> >> > syzbot hit the following crash on u

[RFC PATCH 17/35] ovl: readd fiemap

2018-04-12 Thread Miklos Szeredi
Implement stacked fiemap(). Need to split inode operations for regular file (which has fiemap) and special file (which doesn't have fiemap). Signed-off-by: Miklos Szeredi --- fs/overlayfs/inode.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/f

[RFC PATCH 33/35] Revert "fsnotify: support overlayfs"

2018-04-12 Thread Miklos Szeredi
This reverts commit f3fbbb079263bd29ae592478de6808db7e708267. Overlayfs now works correctly without adding hacks to fsnotify. Signed-off-by: Miklos Szeredi --- include/linux/fsnotify.h | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/include/linux/fsnotify.h b/

[RFC PATCH 32/35] Partially revert "locks: fix file locking on overlayfs"

2018-04-12 Thread Miklos Szeredi
This partially reverts commit c568d68341be7030f5647def68851e469b21ca11. Overlayfs files will now automatically get the correct locks, no need to hack overlay support in VFS. It is a partial revert, because it leaves the locks_inode() calls in place and defines locks_inode() to file_inode(). We c

[RFC PATCH 35/35] ovl: fix documentation of non-standard behavior

2018-04-12 Thread Miklos Szeredi
We can now drop description of the ro/rw inconsistency from the documentation. Also clarify, that now fully standard compliant behavior can be enabled with kernel/module/mount options. Signed-off-by: Miklos Szeredi --- Documentation/filesystems/overlayfs.txt | 64 ++-

Re: [PATCH] rapidio: fix rio_dma_transfer error handling

2018-04-12 Thread Alexander Sverdlin
On 12/04/18 17:06, Ioan Nicu wrote: > Some of the mport_dma_req structure members were initialized late > inside the do_dma_request() function, just before submitting the > request to the dma engine. But we have some error branches before > that. In case of such an error, the code would return on t

[RFC PATCH 34/35] vfs: simplify d_op->d_real()

2018-04-12 Thread Miklos Szeredi
The only remaining user of d_real() is file_dentry(). Simplify code related to ->d_real() by: - remove dead code from overlayfs implementation - remove the open_flags argument - expand d_real() helper into file_dentry() - remove d_real() helper, since there are no callers and makes no sense t

Re: [PATCH v2 0/3] eeprom: at24: last bits of the big refactoring

2018-04-12 Thread Peter Rosin
On 2018-04-11 16:38, Bartosz Golaszewski wrote: > This is a follow-up to the big series merged for 4.17. The patches > contain some bits and pieces that were missing in the last submission > or depend on some new features merged this merge window. > > v1 -> v2: > - dropped patch 1/4 because id_tab

[RFC PATCH 26/35] Revert "ovl: fix may_write_real() for overlayfs directories"

2018-04-12 Thread Miklos Szeredi
This reverts commit 954c736f865d6c0c68ae4263a2f3502ee7c447a3. Overlayfs no longer relies on the vfs for checking writability of files. Signed-off-by: Miklos Szeredi --- fs/namespace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 9d

[RFC PATCH 30/35] Revert "vfs: make argument of d_real_inode() const"

2018-04-12 Thread Miklos Szeredi
This reverts commit 7b1742eb06ead6d02a6cf3c44587088e5392d1aa. No user of d_real_inode() remains, so it can be removed. Signed-off-by: Miklos Szeredi --- include/linux/dcache.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/dcache.h b/include/linux/dcache.

[RFC PATCH 25/35] Revert "vfs: update ovl inode before relatime check"

2018-04-12 Thread Miklos Szeredi
This reverts commit 598e3c8f72f5b77c84d2cb26cfd936ffb3cfdbaa. Overlayfs no longer relies on the vfs correct atime handling. Signed-off-by: Miklos Szeredi --- fs/inode.c | 33 ++--- fs/internal.h | 7 --- fs/namei.c | 2 +- include/linux/fs.

[RFC PATCH 31/35] Revert "vfs: add d_real_inode() helper"

2018-04-12 Thread Miklos Szeredi
This reverts commit a118084432d642eeccb961c7c8cc61525a941fcb. No user of d_real_inode() remains, so it can be removed. Signed-off-by: Miklos Szeredi --- include/linux/dcache.h | 12 1 file changed, 12 deletions(-) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index

[RFC PATCH 29/35] Revert "vfs: do get_write_access() on upper layer of overlayfs"

2018-04-12 Thread Miklos Szeredi
This reverts commit 4d0c5ba2ff79ef9f5188998b29fd28fcb05f3667. We now get write access on both overlay and underlying layers so this patch is no longer needed for correct operation. Signed-off-by: Miklos Szeredi --- fs/locks.c | 3 +-- fs/open.c | 15 ++- 2 files changed, 3 inserti

Re: [PATCH v11 2/4] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-04-12 Thread gengdongjiu
Hi James, Thanks for the comments. 2018-04-10 22:15 GMT+08:00, James Morse : > Hi Dongjiu Geng, > > On 09/04/18 22:36, Dongjiu Geng wrote: >> This new IOCTL exports user-invisible states related to SError. >> Together with appropriate user space changes, it can inject >> SError with specified sy

[RFC PATCH 28/35] Revert "vfs: add flags to d_real()"

2018-04-12 Thread Miklos Szeredi
This reverts commit 495e642939114478a5237a7d91661ba93b76f15a. No user of "flags" argument of d_real() remain. Signed-off-by: Miklos Szeredi --- Documentation/filesystems/Locking | 2 +- Documentation/filesystems/vfs.txt | 2 +- fs/open.c | 2 +- fs/overlayfs/super.c

[PATCH 1/2] X86/KVM: Properly restore 'tsc_offset' when running an L2 guest

2018-04-12 Thread KarimAllah Ahmed
When the TSC MSR is captured while an L2 guest is running then restored, the 'tsc_offset' ends up capturing the L02 TSC_OFFSET instead of the L01 TSC_OFFSET. So ensure that this is compensated for when storing the value. Cc: Jim Mattson Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.or

Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-12 Thread Icenowy Zheng
于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard 写到: >On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy Zheng wrote: >> From: Chen-Yu Tsai >> >> On the Allwinner R40 SoC, the "GMAC clock" register is in the CCU >> address space; on the A64 SoC this register is in the SRAM controller >> address

[RFC PATCH 24/35] Revert "ovl: fix relatime for directories"

2018-04-12 Thread Miklos Szeredi
This reverts commit cd91304e7190b4c4802f8e413ab2214b233e0260. Overlayfs no longer relies on the vfs correct atime handling. Signed-off-by: Miklos Szeredi --- fs/inode.c | 21 - fs/overlayfs/super.c | 3 --- include/linux/dcache.h | 3 --- 3 files changed, 4 i

[PATCH 0/6] tracing: trace event error_log and inter-event bugfixes

2018-04-12 Thread Tom Zanussi
Hi Steve, Here are a few patches that should be applied on top of the 'Inter-event (e.g. latency) support v9' patchset. The first fixes another problem I noticed when printing flags. The rest implement the tracing/events/error_log suggested by Masami, and update the inter-event code to use it (a

[GIT PULL] KGDB/KDB fixes for 4.16

2018-04-12 Thread Jason Wessel
Linus, Please pull the kgdb tree. Summary of changes: * Fix 2032 time access issues and new compiler warnings * minor regression test cleanup * formatting fixes for end user use of kdb git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git tags/for_linus-4.16 Thanks, Jason. -

[PATCH] selftests/intel_pstate: Enhance table printing

2018-04-12 Thread Daniel Díaz
Using coreutils' pr, a nicer table is printed out with the results. Signed-off-by: Daniel Díaz --- tools/testing/selftests/intel_pstate/run.sh | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selfte

[PATCH 2/2] kvm: nVMX: Introduce KVM_CAP_STATE

2018-04-12 Thread KarimAllah Ahmed
From: Jim Mattson For nested virtualization L0 KVM is managing a bit of state for L2 guests, this state can not be captured through the currently available IOCTLs. In fact the state captured through all of these IOCTLs is usually a mix of L1 and L2 state. It is also dependent on whether the L2 gu

[PATCH 4/6] tracing: Use trace event error_log with hist triggers

2018-04-12 Thread Tom Zanussi
Replace hist_err() and hist_err_event() with event_log_err() from the new trace event error_log mechanism. Also add a couple related helper functions and remove most of the old hist_err()-related code. With this change, users no longer read the hist files for hist trigger error information, but i

[PATCH v11 2/2] fpga: lattice machxo2: Add Lattice MachXO2 support

2018-04-12 Thread Alan Tull
From: Paolo Pisati This patch adds support to the FPGA manager for programming MachXO2 device’s internal flash memory, via slave SPI. Signed-off-by: Paolo Pisati [at...@kernel.org: use existing FPGA mgr API] Signed-off-by: Alan Tull --- drivers/fpga/Kconfig | 7 + drivers/fpga/Makefil

Re: [PATCH v7] Revert "PCI: hv: Use device serial number as PCI domain"

2018-04-12 Thread Sridhar Pitchai
>> I am still not happy with this patch. >> >> - You do not explain at all the dependency on commit 0c195567a8f6 and >>you should because that's fundamental, if that patch is not present >>this revert breaks the kernel as per previous discussions[1]. >> - You are

[PATCH 6/6] selftests: ftrace: Fix extended error support testcase

2018-04-12 Thread Tom Zanussi
Hist trigger errors are now sent to tracing/events/error_log rather than the individual event hist files - have the testcase reflect that. Signed-off-by: Tom Zanussi --- .../ftrace/test.d/trigger/inter-event/trigger-extended-error-support.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v11 1/2] dt: bindings: fpga: add lattice machxo2 slave spi binding description

2018-04-12 Thread Alan Tull
From: Paolo Pisati Add dt binding documentation details for Lattice MachXO2 FPGA configuration over Slave SPI interface. Signed-off-by: Paolo Pisati Acked-by: Rob Herring Acked-by: Moritz Fischer Acked-by: Alan Tull --- .../bindings/fpga/lattice-machxo2-spi.txt | 29 +++

[PATCH 3/6] tracing: Save the last hist command's associated event name

2018-04-12 Thread Tom Zanussi
In preparation for making use of the new trace event error log, save the subsystem and event name associated with the last hist command - it will be passed as the location param in the event_log_err() calls. Signed-off-by: Tom Zanussi --- kernel/trace/trace_events_hist.c | 24 +++

[PATCH 5/6] tracing: Add field parsing trace event errors for hist triggers

2018-04-12 Thread Tom Zanussi
Log errors to the tracing/events/error_log for nonexistent fields and modifiers specified in hist triggers. Also screen out variable references, which shouldn't be looked up as fields. Signed-off-by: Tom Zanussi Reported-by: Masami Hiramatsu --- kernel/trace/trace_events_hist.c | 7 +++ 1

[PATCH v11 0/2] fpga: Lattice MachXO2 Slave SPI FPGA Manager support

2018-04-12 Thread Alan Tull
This is Paolo's v10 with a minor fixup. I had asked him to rebase his patch on a branch with a new FPGA manager API. That API change ended up not going upstream, so I've fixed it for the current API. This patch applies cleanly on the current linux-next. Paolo Pisati (2): dt: bindings: fpga: a

Re: [PATCH v2 2/2] slab: __GFP_ZERO is incompatible with a constructor

2018-04-12 Thread Christopher Lameter
On Thu, 12 Apr 2018, Matthew Wilcox wrote: > > Thus the next invocation of the fastpath will find that c->freelist is > > NULL and go to the slowpath. ... > > _ah_. I hadn't figured out that c->page was always NULL in the debugging > case too, so ___slab_alloc() always hits the 'new_slab' case.

[PATCH 2/6] tracing: Add trace event error log

2018-04-12 Thread Tom Zanussi
Introduce a new trace event file, tracing/events/error_log, for trace event commands to log non-critical errors. This is useful for allowing more complex commands such as hist trigger and kprobe_event commands to point out specifically where something may have gone wrong without forcing them to re

Re: [PATCH] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Gustavo A. R. Silva
Hi Dan, On 04/12/2018 10:08 AM, Dan Carpenter wrote: I added Colin to the Cc list. On Thu, Apr 12, 2018 at 09:30:09AM -0500, Gustavo A. R. Silva wrote: priv is being dereferenced when it is still null, hence there is an explicit null pointer dereference at line 935: free_netdev(priv->net_dev)

[PATCH 1/6] tracing: Restore proper field flag printing when displaying triggers

2018-04-12 Thread Tom Zanussi
The flag-printing code used when displaying hist triggers somehow got dropped during refactoring of the inter-event patchset. This restores it. Below are a couple examples - in the first case, .usecs wasn't being displayed properly for common_timestamps and the second illustrates the same for oth

Re: [PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Dan Carpenter
This isn't right. It introduces a leak. regards, dan carpenter

Re: [PATCH 2/4] lan78xx: Read initial EEE setting from Device Tree

2018-04-12 Thread Phil Elwell
Andrew, On 12/04/2018 15:16, Andrew Lunn wrote: > On Thu, Apr 12, 2018 at 02:55:34PM +0100, Phil Elwell wrote: >> Add two new Device Tree properties: >> * microchip,eee-enabled - a boolean to enable EEE >> * microchip,tx-lpi-timer - time in microseconds to wait after TX goes >>

[RFC PATCH 27/35] Revert "ovl: don't allow writing ioctl on lower layer"

2018-04-12 Thread Miklos Szeredi
This reverts commit 7c6893e3c9abf6a9676e060a1e35e5caca673d57. Overlayfs no longer relies on the vfs for checking writability of files. Signed-off-by: Miklos Szeredi --- fs/internal.h | 2 -- fs/namespace.c | 64 +++--- fs/open.c | 4 ++

[RFC PATCH 23/35] vfs: simplify dentry_open()

2018-04-12 Thread Miklos Szeredi
dentry_open() can now just call path_open(). Signed-off-by: Miklos Szeredi --- fs/open.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/fs/open.c b/fs/open.c index 1d1a52908b0f..442088ca30f9 100644 --- a/fs/open.c +++ b/fs/open.c @@ -891,31 +891,13 @@

[RFC PATCH 22/35] ovl: copy-up on MAP_SHARED

2018-04-12 Thread Miklos Szeredi
A corner case of a corner case is when - file opened for O_RDONLY - which is then memory mapped SHARED - file opened for O_WRONLY - contents modified - contents read back though the shared mapping Unfortunately it looks very difficult to do anything about the established shared map after the

Re: [PATCH] staging: ks7010_sdio: fix NULL pointer dereference and memory leak

2018-04-12 Thread Dan Carpenter
I added Colin to the Cc list. On Thu, Apr 12, 2018 at 09:30:09AM -0500, Gustavo A. R. Silva wrote: > priv is being dereferenced when it is still null, hence there is an > explicit null pointer dereference at line 935: free_netdev(priv->net_dev) > > Also, memory allocated for netdev at line 854: >

[RFC PATCH 16/35] ovl: readd lsattr/chattr support

2018-04-12 Thread Miklos Szeredi
Implement FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. Needs vfs_ioctl() exported to modules. Signed-off-by: Miklos Szeredi --- fs/internal.h | 1 - fs/ioctl.c | 1 + fs/overlayfs/file.c | 59 + include/linux/fs.h | 2 ++ 4 files ch

[RFC PATCH 21/35] vfs: add f_op->pre_mmap()

2018-04-12 Thread Miklos Szeredi
This is needed by overlayfs to be able to copy up a file from a read-only lower layer to a writable layer when being mapped shared. When copying up, overlayfs takes VFS locks that would violate locking order when nested inside mmap_sem. Add a new f_op->pre_mmap method, which is called before taki

[RFC PATCH 20/35] vfs: don't open real

2018-04-12 Thread Miklos Szeredi
Let overlayfs do its thing when opening a file. This enables stacking and fixes the corner case when a file is opened for read, modified through a writable open, and data is read from the read-only file. After this patch the read-only open will not return stale data even in this case. Signed-off

[RFC PATCH 19/35] ovl: readd reflink/copyfile/dedup support

2018-04-12 Thread Miklos Szeredi
Since set of arguments are so similar, handle in a common helper. Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 79 + 1 file changed, 79 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 9670e160967e..39b1b73

[RFC PATCH 18/35] ovl: readd O_DIRECT support

2018-04-12 Thread Miklos Szeredi
Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index cc004ff1b05b..9670e160967e 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -110,6 +110,9 @@ static int ovl_open(struct inode *

[RFC PATCH 14/35] ovl: readd mmap

2018-04-12 Thread Miklos Szeredi
Implement stacked mmap. Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 28 1 file changed, 28 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 4417527667ff..f1cc2fdc62c1 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@

[RFC PATCH 10/35] ovl: add helper to return real file

2018-04-12 Thread Miklos Szeredi
In the common case we can just use the real file cached in file->private_data. There are two exceptions: 1) File has been copied up since open: in this unlikely corner case just use a throwaway real file for the operation. If ever this becomes a perfomance problem (very unlikely, since overlayfs

[RFC PATCH 15/35] ovl: readd fallocate

2018-04-12 Thread Miklos Szeredi
Implement stacked fallocate. Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 24 1 file changed, 24 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index f1cc2fdc62c1..05e3e2f80b89 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @

Re: [PATCH][next] staging: ks7010: fix null pointer dereference on priv on error exit

2018-04-12 Thread Colin Ian King
On 12/04/18 16:12, Dan Carpenter wrote: > This isn't right. It introduces a leak. Yup, and I see Gustavo is working on a correct fix, I'll leave that to him. > > regards, > dan carpenter > > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a messa

RE: [PATCH 3/4] lan78xx: Read LED modes from Device Tree

2018-04-12 Thread Woojung.Huh
> > @@ -2097,6 +2098,25 @@ static int lan78xx_phy_init(struct lan78xx_net *dev) > > (void)lan78xx_set_eee(dev->net, &edata); > > } > > > > + if (!of_property_read_u32_array(dev->udev->dev.of_node, > > + "microchip,led-modes", > > +

[RFC PATCH 09/35] ovl: stack file ops

2018-04-12 Thread Miklos Szeredi
Implement file operations on a regular overlay file. The underlying file is opened separately and cached in ->private_data. It might be worth making an exception for such files when accounting in nr_file to confirm to userspace expectations. We are only adding a small overhead (248bytes for the

[RFC PATCH 11/35] ovl: readd read_iter

2018-04-12 Thread Miklos Szeredi
Implement stacked reading. Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 56 + 1 file changed, 56 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index 409b542ff30c..a19429c5965d 100644 --- a/fs/overlayfs/file.c

[RFC PATCH 12/35] ovl: readd write_iter

2018-04-12 Thread Miklos Szeredi
Implement stacked writes. Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index a19429c5965d..b98204c1c19c 100644 --- a/fs/overlayfs/file.c +++ b/fs/overla

[RFC PATCH 13/35] ovl: readd fsync

2018-04-12 Thread Miklos Szeredi
Implement stacked fsync(). Signed-off-by: Miklos Szeredi --- fs/overlayfs/file.c | 20 1 file changed, 20 insertions(+) diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c index b98204c1c19c..4417527667ff 100644 --- a/fs/overlayfs/file.c +++ b/fs/overlayfs/file.c @@ -222

Re: [PATCH 3/4] tracing: Add action comparisons when testing matching hist triggers

2018-04-12 Thread Tom Zanussi
Hi Masami, Sorry for the delay in replying - was off for a few days.. On Sat, 2018-04-07 at 21:16 +0900, Masami Hiramatsu wrote: > On Fri, 06 Apr 2018 11:47:29 -0500 > Tom Zanussi wrote: > > > > > > Can you print out the error with which event we should see? e.g. > > > > > > > > > > ERROR: V

[RFC PATCH 08/35] ovl: deal with overlay files in ovl_d_real()

2018-04-12 Thread Miklos Szeredi
Signed-off-by: Miklos Szeredi --- fs/overlayfs/super.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index e8551c97de51..ad6a5baf226b 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -97,6 +97,10 @@ static struct dentry *ovl_d_r

[RFC PATCH 05/35] ovl: copy up inode flags

2018-04-12 Thread Miklos Szeredi
On inode creation copy certain inode flags from the underlying real inode to the overlay inode. This is in preparation for moving overlay functionality out of the VFS. Signed-off-by: Miklos Szeredi --- fs/overlayfs/overlayfs.h | 7 +++ fs/overlayfs/util.c | 1 + 2 files changed, 8 inse

[RFC PATCH 07/35] ovl: copy up file size as well

2018-04-12 Thread Miklos Szeredi
Copy i_size of the underlying inode to the overlay inode in ovl_copyattr(). This is in preparation for stacking I/O operations on overlay files. This patch shouldn't have any observable effect. Signed-off-by: Miklos Szeredi --- fs/overlayfs/overlayfs.h | 2 ++ 1 file changed, 2 insertions(+)

[RFC PATCH 06/35] Revert "Revert "ovl: get_write_access() in truncate""

2018-04-12 Thread Miklos Szeredi
This reverts commit 31c3a7069593b072bd57192b63b62f9a7e994e9a. Re-add functionality dealing with i_writecount on truncate to overlayfs. This patch shouldn't have any observable effects, since we just re-assert the writecout that vfs_truncate() already got for us. This is in preparation for moving

[RFC PATCH 02/35] vfs: add path_open()

2018-04-12 Thread Miklos Szeredi
Currently opening an overlay file results in: - the real file on the underlying layer being opened - f_path being set to the overlay {mount, dentry} pair This patch adds a new helper that allows the above to be explicitly performed. I.e. it's the same as dentry_open(), except the underlying in

[PATCH v2] staging: ks7010_sdio: fix memory leak

2018-04-12 Thread Gustavo A. R. Silva
Memory allocated for netdev at line 854: netdev = alloc_etherdev(sizeof(*priv)); is not being free'd before return, hence there is a memory leak. Fix this by freeing netdev before return. Addresses-Coverity-ID: 1467844 Signed-off-by: Gustavo A. R. Silva --- Changes in v2: - Update subject and c

Re: [linux-sunxi] Re: [PATCH 3/5] net: stmmac: dwmac-sun8i: Allow getting syscon regmap from device

2018-04-12 Thread Chen-Yu Tsai
On Thu, Apr 12, 2018 at 11:11 PM, Icenowy Zheng wrote: > > > 于 2018年4月12日 GMT+08:00 下午10:56:28, Maxime Ripard > 写到: >>On Wed, Apr 11, 2018 at 10:16:39PM +0800, Icenowy Zheng wrote: >>> From: Chen-Yu Tsai >>> >>> On the Allwinner R40 SoC, the "GMAC clock" register is in the CCU >>> address space

[RFC PATCH 04/35] ovl: copy up times

2018-04-12 Thread Miklos Szeredi
Copy up mtime and ctime to overlay inode after times in real object are modified. Be careful not to dirty cachelines when not necessary. This is in preparation for moving overlay functionality out of the VFS. This patch shouldn't have any observable effect. Signed-off-by: Miklos Szeredi --- f

[PATCH] KVM: x86: VMX: hyper-v: Enlightened MSR-Bitmap support

2018-04-12 Thread Vitaly Kuznetsov
Enlightened MSR-Bitmap is a natural extension of Enlightened VMCS: Hyper-V Top Level Functional Specification states: "The L1 hypervisor may collaborate with the L0 hypervisor to make MSR accesses more efficient. It can enable enlightened MSR bitmaps by setting the corresponding field in the enlig

[RFC PATCH 00/35] overlayfs: stack file operations

2018-04-12 Thread Miklos Szeredi
Up till now overlayfs didn't stack regular file operations. Instead, when a file was opened on an overlay, the file from one of the underlying layers would be opened and any file operations performed would directly go to the underlying file on a real filesystem. This works well mostly, but variou

[RFC PATCH 03/35] vfs: optionally don't account file in nr_files

2018-04-12 Thread Miklos Szeredi
Stacking file operations in overlay will store an extra open file for each overlay file opened. The overhead is just that of "struct file" which is about 256bytes, because overlay already pins an extra dentry and inode when the file is open, which add up to a much larger overhead. For fear of bre

<    1   2   3   4   5   6   7   8   >