RE: [PATCH net] hv_netvsc: Fix a warning of suspicious RCU usage

2019-08-06 Thread Dexuan Cui
> From: Jakub Kicinski > Sent: Tuesday, August 6, 2019 12:13 PM > To: Dexuan Cui > > On Tue, 6 Aug 2019 05:17:44 +, Dexuan Cui wrote: > > This fixes a warning of "suspicious rcu_dereference_check() usage" > > when nload runs. > > > > Signed-off-by: Stephen Hemminger > > Signed-off-by: Dexua

[PATCH V3 08/10] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-06 Thread Jason Wang
We used to use RCU to synchronize MMU notifier with worker. This leads calling synchronize_rcu() in invalidate_range_start(). But on a busy system, there would be many factors that may slow down the synchronize_rcu() which makes it unsuitable to be called in MMU notifier. So this patch switches us

[PATCH V3 09/10] vhost: correctly set dirty pages in MMU notifiers callback

2019-08-06 Thread Jason Wang
We need make sure there's no reference on the map before trying to mark set dirty pages. Reported-by: Michael S. Tsirkin Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 5 ++--- 1 file changed, 2 insertions(+

Re: [PATCH v4 2/4] RISC-V: Add riscv_isa reprensenting ISA features common across CPUs

2019-08-06 Thread Anup Patel
On Wed, Aug 7, 2019 at 12:21 PM Christoph Hellwig wrote: > > On Fri, Aug 02, 2019 at 09:27:21PM -0700, Atish Patra wrote: > > From: Anup Patel > > > > This patch adds riscv_isa integer to represent ISA features common > > across all CPUs. The riscv_isa is not same as elf_hwcap because > > elf_hwc

[PATCH V3 07/10] vhost: don't do synchronize_rcu() in vhost_uninit_vq_maps()

2019-08-06 Thread Jason Wang
There's no need for RCU synchronization in vhost_uninit_vq_maps() since we've already serialized with readers (memory accessors). This also avoid the possible userspace DOS through ioctl() because of the possible high latency caused by synchronize_rcu(). Reported-by: Michael S. Tsirkin Fixes: 7f4

[PATCH V3 06/10] vhost: mark dirty pages during map uninit

2019-08-06 Thread Jason Wang
We don't mark dirty pages if the map was teared down outside MMU notifier. This will lead untracked dirty pages. Fixing by marking dirty pages during map uninit. Reported-by: Michael S. Tsirkin Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Signed-off-by: Jason W

[PATCH V3 04/10] vhost: fix vhost map leak

2019-08-06 Thread Jason Wang
We don't free map during vhost_map_unprefetch(). This means it could be leaked. Fixing by free the map. Reported-by: Michael S. Tsirkin Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 4 +--- 1 file changed,

[PATCH V3 10/10] vhost: do not return -EAGAIN for non blocking invalidation too early

2019-08-06 Thread Jason Wang
Instead of returning -EAGAIN unconditionally, we'd better do that only we're sure the range is overlapped with the metadata area. Reported-by: Jason Gunthorpe Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 3

[PATCH V3 05/10] vhost: reset invalidate_count in vhost_set_vring_num_addr()

2019-08-06 Thread Jason Wang
The vhost_set_vring_num_addr() could be called in the middle of invalidate_range_start() and invalidate_range_end(). If we don't reset invalidate_count after the un-registering of MMU notifier, the invalidate_cont will run out of sync (e.g never reach zero). This will in fact disable the fast acces

[PATCH V3 01/10] vhost: disable metadata prefetch optimization

2019-08-06 Thread Jason Wang
From: "Michael S. Tsirkin" This seems to cause guest and host memory corruption. Disable for now until we get a better handle on that. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers

[PATCH V3 03/10] vhost: validate MMU notifier registration

2019-08-06 Thread Jason Wang
The return value of mmu_notifier_register() is not checked in vhost_vring_set_num_addr(). This will cause an out of sync between mm and MMU notifier thus a double free. To solve this, introduce a boolean flag to track whether MMU notifier is registered and only do unregistering when it was true. R

[PATCH V3 02/10] vhost: don't set uaddr for invalid address

2019-08-06 Thread Jason Wang
We should not setup uaddr for the invalid address, otherwise we may try to pin or prefetch mapping of wrong pages. Fixes: 7f466032dc9e ("vhost: access vq metadata through kernel virtual address") Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 3 ++- 1 file changed, 2 insertions(+), 1 dele

[PATCH V3 00/10] Fixes for metadata accelreation

2019-08-06 Thread Jason Wang
Hi all: This series try to fix several issues introduced by meta data accelreation series. Please review. Changes from V2: - use seqlck helper to synchronize MMU notifier with vhost worker Changes from V1: - try not use RCU to syncrhonize MMU notifier with vhost worker - set dirty pages after n

Re: [PATCH v4 2/4] RISC-V: Add riscv_isa reprensenting ISA features common across CPUs

2019-08-06 Thread Christoph Hellwig
On Fri, Aug 02, 2019 at 09:27:21PM -0700, Atish Patra wrote: > From: Anup Patel > > This patch adds riscv_isa integer to represent ISA features common > across all CPUs. The riscv_isa is not same as elf_hwcap because > elf_hwcap will only have ISA features relevant for user-space apps > whereas r

Re: [PATCH V2 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-06 Thread Jason Wang
On 2019/8/6 下午8:04, Jason Gunthorpe wrote: On Mon, Aug 05, 2019 at 12:20:45PM +0800, Jason Wang wrote: On 2019/8/2 下午8:46, Jason Gunthorpe wrote: On Fri, Aug 02, 2019 at 05:40:07PM +0800, Jason Wang wrote: This must be a proper barrier, like a spinlock, mutex, or synchronize_rcu. I start wi

Re: [PATCH] riscv: delay: use do_div() instead of __udivdi3()

2019-08-06 Thread Christoph Hellwig
> diff --git a/arch/riscv/lib/delay.c b/arch/riscv/lib/delay.c > index 87ff89e88f2c..8c686934e0f6 100644 > --- a/arch/riscv/lib/delay.c > +++ b/arch/riscv/lib/delay.c > @@ -81,9 +81,14 @@ EXPORT_SYMBOL(__delay); > void udelay(unsigned long usecs) > { > u64 ucycles = (u64)usecs * lpj_fine *

Re: [PATCH] riscv: kbuild: drop CONFIG_RISCV_ISA_C

2019-08-06 Thread Christoph Hellwig
On Tue, Aug 06, 2019 at 07:30:24PM -0700, Paul Walmsley wrote: > > The baseline ISA support requirement for the RISC-V Linux kernel > mandates compressed instructions, so it doesn't make sense for > compressed instruction support to be configurable. Looks good, Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 1/2] Regulator: Core: Add clock-enable to fixed-regulator

2019-08-06 Thread Philippe Schenker
On Tue, 2019-08-06 at 19:26 +0100, Mark Brown wrote: > On Tue, Aug 06, 2019 at 12:57:32PM +, Philippe Schenker wrote: > > On Mon, 2019-08-05 at 17:37 +0100, Mark Brown wrote: > > > So the capacitor on the input of the p-FET is keeping the switch > > > on? > > > When I say it's not switching wit

Re: Warnings whilst building 5.2.0+

2019-08-06 Thread John Hubbard
On 8/6/19 11:30 PM, Chris Clayton wrote: On 09/07/2019 12:39, Chris Clayton wrote: On 09/07/2019 11:37, Enrico Weigelt, metux IT consult wrote: On 09.07.19 08:06, Chris Clayton wrote: ... Can you check older versions, too ? Maybe also trying older gcc ? I see the same warnings building lin

[PATCH v5 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-08-06 Thread Jason Yan
Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy

[PATCH v5 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-08-06 Thread Jason Yan
Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerr

Re: [PATCH v21 00/28] Intel SGX foundations

2019-08-06 Thread Jethro Beekman
On 2019-07-14 07:36, Jarkko Sakkinen wrote: On Sat, Jul 13, 2019 at 08:07:36PM +0300, Jarkko Sakkinen wrote: v21: * Check on mmap() that the VMA does cover an area that does not have enclave pages. Only mapping with PROT_NONE can do that to reserve initial address space for an enclave. * C

[PATCH v5 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-08-06 Thread Jason Yan
The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun Test

[PATCH v5 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-08-06 Thread Jason Yan
One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Diana Craciun

[PATCH v5 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-06 Thread Jason Yan
This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Book-E parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 entries are not su

[PATCH v5 03/10] powerpc: introduce kimage_vaddr to store the kernel base

2019-08-06 Thread Jason Yan
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by

[PATCH v5 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-08-06 Thread Jason Yan
After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and boot. This not so much safe so additionally the bootloader may pass entropy via the /chosen/ka

Re: [PATCH 00/12] block/bio, fs: convert put_page() to put_user_page*()

2019-08-06 Thread John Hubbard
On 8/6/19 11:34 PM, Christoph Hellwig wrote: On Mon, Aug 05, 2019 at 03:54:35PM -0700, John Hubbard wrote: On 7/23/19 11:17 PM, Christoph Hellwig wrote: ... I think we can do this in a simple and better way. We have 5 ITER_* types. Of those ITER_DISCARD as the name suggests never uses pages,

[PATCH v5 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-08-06 Thread Jason Yan
When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin

linux-next: manual merge of the akpm-current tree with the arm64 tree

2019-08-06 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the akpm-current tree got a conflict in: arch/arm64/include/asm/processor.h between commit: b907b80d7ae7 ("arm64: remove pointless __KERNEL__ guards") from the arm64 tree and commit: cd6ee3f76f64 ("arm64, mm: move generic mmap layout functions to mm")

[PATCH v5 00/10] implement KASLR for powerpc/fsl_booke/32

2019-08-06 Thread Jason Yan
This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate. Freescale Boo

[PATCH v5 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-08-06 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy R

[PATCH v5 01/10] powerpc: unify definition of M_IF_NEEDED

2019-08-06 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun

Re: Bisected: Kernel 4.14 + has 3 times higher write IO latency than Kernel 4.4 with raid1

2019-08-06 Thread Jinpu Wang
On Wed, Aug 7, 2019 at 1:40 AM NeilBrown wrote: > > On Tue, Aug 06 2019, Jinpu Wang wrote: > > > On Tue, Aug 6, 2019 at 9:54 AM Jinpu Wang > > wrote: > >> > >> On Tue, Aug 6, 2019 at 1:46 AM NeilBrown wrote: > >> > > >> > On Mon, Aug 05 2019, Jinpu Wang wrote: > >> > > >> > > Hi Neil, > >> > >

Re: [PATCH] ALSA: pcm: fix a memory leak bug

2019-08-06 Thread Wenwen Wang
On Wed, Aug 7, 2019 at 2:33 AM Takashi Iwai wrote: > > On Wed, 07 Aug 2019 08:15:17 +0200, > Wenwen Wang wrote: > > > > In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later > > on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. > > However, if the initializat

Re: [PATCH] ALSA: pcm: fix a memory leak bug

2019-08-06 Thread Takashi Iwai
On Wed, 07 Aug 2019 08:15:17 +0200, Wenwen Wang wrote: > > In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later > on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. > However, if the initialization fails, 'rt' is not deallocated, leading to a > memory leak bu

Re: [PATCH v21 18/28] x86/sgx: Add swapping code to the core and SGX driver

2019-08-06 Thread Jethro Beekman
On 2019-07-13 10:07, Jarkko Sakkinen wrote: Because the kernel is untrusted, swapping pages in/out of the Enclave Page Cache (EPC) has specialized requirements: * The kernel cannot directly access EPC memory, i.e. cannot copy data to/from the EPC. * To evict a page from the EPC, the kernel mu

Re: Warnings whilst building 5.2.0+

2019-08-06 Thread Chris Clayton
On 09/07/2019 12:39, Chris Clayton wrote: > > > On 09/07/2019 11:37, Enrico Weigelt, metux IT consult wrote: >> On 09.07.19 08:06, Chris Clayton wrote: >> >> Hi, >> >>> I've pulled Linus' tree this morning and, after running 'make oldconfig', >>> tried a build. During that build I got the >>>

[PATCH] riscv: dts: sifive: Add missing "clock-frequency" to cpu0/cpu1 nodes

2019-08-06 Thread Bin Meng
Add the missing "clock-frequency" property to the cpu0/cpu1 nodes for consistency with other cpu nodes. Signed-off-by: Bin Meng --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/

[PATCH] ALSA: pcm: fix a memory leak bug

2019-08-06 Thread Wenwen Wang
In hiface_pcm_init(), 'rt' is firstly allocated through kzalloc(). Later on, hiface_pcm_init_urb() is invoked to initialize 'rt->out_urbs[i]'. However, if the initialization fails, 'rt' is not deallocated, leading to a memory leak bug. To fix the above issue, free 'rt' before returning the error.

Re: [PATCHv5 09/37] posix-clocks: Introduce CLOCK_MONOTONIC time namespace offsets

2019-08-06 Thread Thomas Gleixner
On Mon, 29 Jul 2019, Dmitry Safonov wrote: > > +static inline void timens_add_monotonic(struct timespec64 *ts) > +{ > + struct timens_offsets *ns_offsets = current->nsproxy->time_ns->offsets; > + > + if (ns_offsets) > + *ts = timespec64_add(*ts, ns_offsets->monotonic); > +} T

Re: [PATCH] ARM: dts: sun8i: a83t: Enable HDMI output on Cubietruck Plus

2019-08-06 Thread Chen-Yu Tsai
On Sun, Jul 28, 2019 at 10:59 PM Chen-Yu Tsai wrote: > > From: Chen-Yu Tsai > > The Cubietruck Plus has an HDMI connector tied to the HDMI output of the > SoC. > > Enables display output via HDMI on the Cubietruck Plus. The connector > device node is named "hdmi-connector" as there is also a disp

Re: [PATCHv5 06/37] alarmtimer: Provide get_timespec() callback

2019-08-06 Thread Thomas Gleixner
On Mon, 29 Jul 2019, Dmitry Safonov wrote: > /** > @@ -869,8 +871,10 @@ static int __init alarmtimer_init(void) > /* Initialize alarm bases */ > alarm_bases[ALARM_REALTIME].base_clockid = CLOCK_REALTIME; > alarm_bases[ALARM_REALTIME].get_ktime = &ktime_get_real; > + alarm_bas

Re: [PATCHv5 04/37] posix-clocks: Rename *_clock_get() functions into *_clock_get_timespec()

2019-08-06 Thread Thomas Gleixner
On Mon, 29 Jul 2019, Dmitry Safonov wrote: > static const struct k_clock clock_monotonic = { > .clock_getres = posix_get_hrtimer_res, > - .clock_get_timespec = posix_ktime_get_ts, > + .clock_get_timespec = posix_get_timespec, posix_get_monotonic_timespec Please.

Re: [PATCH v2 13/14] PCI/P2PDMA: No longer require no-mmu for host bridge whitelist

2019-08-06 Thread Christoph Hellwig
no-mmu sounds stange, as we use that for linux ports without paging hardware. I think an "io" got lost somewhere..

Re: [PATCH v2 11/14] PCI/P2PDMA: Store mapping method in an xarray

2019-08-06 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 10:35:42AM -0600, Logan Gunthorpe wrote: > When upstream_bridge_distance() is called store the method required > to map the DMA transfers in an xarray so that it can be looked up > efficiently on the hot path in pci_p2pdma_map_sg(). > > Signed-off-by: Logan Gunthorpe > ---

Re: [PATCH v8 13/14] KVM/x86/vPMU: check the lbr feature before entering guest

2019-08-06 Thread Wei Wang
On 08/06/2019 03:16 PM, Wei Wang wrote: The guest can access the lbr related msrs only when the vcpu's lbr event has been assigned the lbr feature. A cpu pinned lbr event (though no such event usages in the current upstream kernel) could reclaim the lbr feature from the vcpu's lbr event (task pin

Re: [PATCH v2 03/14] PCI/P2PDMA: Add constants for not-supported result upstream_bridge_distance()

2019-08-06 Thread Christoph Hellwig
On Tue, Jul 30, 2019 at 10:35:34AM -0600, Logan Gunthorpe wrote: > Add constant flags to indicate two devices are not supported or whether > the data path goes through the host bridge instead of using the negative > values -1 and -2. > > This helps annotate the code better, but the main reason is

Re: [PATCH v5 0/3] Merge m25p80 into spi-nor

2019-08-06 Thread Tudor.Ambarus
On 08/06/2019 08:10 AM, Vignesh Raghavendra wrote: > External E-Mail > > > This is repost of patch 6 and 7 split from from Boris Brezillon's X-X-X > mode support series[1] > > Background from cover letter for RFC[1]: > m25p80 is just a simple SPI NOR controller driver (a wrapper around the > S

Re: [PATCH v5 3/3] mtd: spi-nor: Rework hwcaps selection for the spi-mem case

2019-08-06 Thread Tudor.Ambarus
On 08/06/2019 08:10 AM, Vignesh Raghavendra wrote: > +static int spi_nor_spimem_check_op(struct spi_nor *nor, > +struct spi_mem_op *op) > +{ > + /* > + * First test with 4 address bytes. The opcode itself might > + * be a 3B addressing opcode but we d

Re: [PATCH 5.2 073/131] dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device

2019-08-06 Thread Christoph Hellwig
On Tue, Aug 06, 2019 at 06:04:48PM -0400, Sasha Levin wrote: > On Tue, Aug 06, 2019 at 01:57:56PM +0100, Robin Murphy wrote: >> Given that the two commits touch entirely separate files I'm not sure what >> the imagined dependency could be :/ > >> From the commit message of 3de433c5b38a ("drm/msm:

Re: [PATCH] riscv: kbuild: add virtual memory system selection

2019-08-06 Thread Christoph Hellwig
On Tue, Aug 06, 2019 at 05:02:03PM -0700, Paul Walmsley wrote: > The rationale is to encourage others to start laying the groundwork for > future Sv48 support. The immediate trigger for it was Alex's mmap > randomization support patch series, which needs to set some Kconfig > options differentl

[PATCH 3/9] remoteproc: qcom: pas: Update IMEM PIL info on load

2019-08-06 Thread Bjorn Andersson
Use the sysmon_name as identifier and store the relocated base address and size of the memory region in the PIL reloation info structure in IMEM. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_q6v5_pas.c | 15 --- 2 files changed

[PATCH 9/9] remoteproc: qcom: Introduce panic handler for PAS and ADSP

2019-08-06 Thread Bjorn Andersson
Make the PAS and ADSP/CDSP remoteproc drivers implement the panic handler that will invoke a stop to prepare the remoteprocs for post mortem debugging. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5_adsp.c | 8 drivers/remoteproc/qcom_q6v5_pas.c | 8 2 files c

[PATCH 5/9] arm64: dts: qcom: qcs404: Add IMEM and PIL info region

2019-08-06 Thread Bjorn Andersson
Add a simple-mfd representing IMEM on QCS404 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a

[PATCH 7/9] remoteproc: Introduce "panic" callback in ops

2019-08-06 Thread Bjorn Andersson
Introduce a "panic" function in the remoteproc ops table, to allow remoteproc instances to perform operations needed in order to aid in post mortem system debugging, such as flushing caches etc, when the kernel panics. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/remoteproc_core.c | 16

[PATCH 1/9] remoteproc: qcom: Introduce driver to store pil info in IMEM

2019-08-06 Thread Bjorn Andersson
A region in IMEM is used to communicate load addresses of remoteproc to post mortem debug tools. Implement a driver that can be used to store this information in order to enable these tools to process collected ramdumps. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/Kconfig | 3

[PATCH 8/9] remoteproc: qcom: q6v5: Add common panic handler

2019-08-06 Thread Bjorn Andersson
Add a common panic handler that invokes a stop request and sleep enough to let the remoteproc flush it's caches etc in order to aid post mortem debugging. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/qcom_q6v5.c | 19 +++ drivers/remoteproc/qcom_q6v5.h | 1 + 2 files ch

[PATCH 4/9] remoteproc: qcom: wcnss: Update IMEM PIL info on load

2019-08-06 Thread Bjorn Andersson
Store the relocated base address and size in the PIL relocation info structure in IMEM. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_wcnss.c | 14 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/remotepr

[PATCH 6/9] arm64: dts: qcom: sdm845: Add IMEM and PIL info region

2019-08-06 Thread Bjorn Andersson
Add a simple-mfd representing IMEM on SDM845 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Signed-off-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a

[PATCH 0/9] remoteproc: qcom: post mortem debug support

2019-08-06 Thread Bjorn Andersson
The following series introduces two components that aids in post mortem debugging of Qualcomm systems. The first part is used to store information about loaded images in IMEM, for post mortem tools to know where the kernel loaded the remoteproc firmware. The second part invokes a stop operation on

[PATCH 2/9] remoteproc: qcom: mss: Update IMEM PIL info on load

2019-08-06 Thread Bjorn Andersson
As the MPSS address is calculated during load store it, and the size, in the PIL info region structure in IMEM. Signed-off-by: Bjorn Andersson --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_q6v5_mss.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/remotepr

Re: [PATCH] ALSA: usb-midi: fix a memory leak bug

2019-08-06 Thread Wenwen Wang
On Wed, Aug 7, 2019 at 1:31 AM Takashi Iwai wrote: > > On Wed, 07 Aug 2019 05:22:09 +0200, > Wenwen Wang wrote: > > > > In __snd_usbmidi_create(), a MIDI streaming interface structure is > > allocated through kzalloc() and the pointer is saved to 'umidi'. Later on, > > the endpoint structures are

Re: [PATCH] ALSA: usb-midi: fix a memory leak bug

2019-08-06 Thread Takashi Iwai
On Wed, 07 Aug 2019 05:22:09 +0200, Wenwen Wang wrote: > > In __snd_usbmidi_create(), a MIDI streaming interface structure is > allocated through kzalloc() and the pointer is saved to 'umidi'. Later on, > the endpoint structures are created by invoking > snd_usbmidi_create_endpoints_midiman() or s

Re: [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd()

2019-08-06 Thread Pingfan Liu
On Tue, Aug 06, 2019 at 06:35:03AM -0700, Matthew Wilcox wrote: > > This needs something beyond the subject line. Maybe ... > > After these assignments, we either restart the loop with a fresh variable, > or we assign to the variable again without using the value we've assigned. > > Reviewed-by

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-08-06 Thread Luciano Coelho
On Tue, 2019-08-06 at 22:15 -0700, Nathan Chancellor wrote: > On Tue, Aug 06, 2019 at 03:37:42PM -0700, Nick Desaulniers wrote: > > On Thu, Aug 1, 2019 at 12:11 AM Johannes Berg > > wrote: > > > > > > > Luca, you said this was already fixed in your internal tree, and the fix > > > > would appear

Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static

2019-08-06 Thread Nathan Chancellor
On Tue, Aug 06, 2019 at 03:37:42PM -0700, Nick Desaulniers wrote: > On Thu, Aug 1, 2019 at 12:11 AM Johannes Berg > wrote: > > > > > > > Luca, you said this was already fixed in your internal tree, and the fix > > > would appear soon in next, but I don't see anything in linux-next? > > > > Luca i

[PATCH] arm64: mm: add missing PTE_SPECIAL in pte_mkdevmap on arm64

2019-08-06 Thread Jia He
Without this patch, the MAP_SYNC test case will cause a print_bad_pte warning on arm64 as follows: [ 25.542693] BUG: Bad page map in process mapdax333 pte:2e8000448800f53 pmd:41ff5f003 [ 25.546360] page:7e001022 refcount:1 mapcount:-1 mapping:8003e29c7440 index:0x0 [ 25.550281] ex

[PATCH] tipc: set addr_trail_end when using explicit node addresses

2019-08-06 Thread Chris Packham
When tipc uses auto-generated node addresses it goes through a duplicate address detection phase to ensure the address is unique. When using explicitly configured node names the DAD phase is skipped. However addr_trail_end was being left set to 0 which causes parts of the tipc state machine to ass

Re: [PATCH net v2] net: dsa: Check existence of .port_mdb_add callback before calling it

2019-08-06 Thread Vivien Didelot
Hi Chen-Yu, On Wed, 7 Aug 2019 11:18:28 +0800, Chen-Yu Tsai wrote: > On Wed, Aug 7, 2019 at 4:34 AM Vivien Didelot > wrote: > > > > Hi Chen-Yu, > > > > On Wed, 7 Aug 2019 01:49:37 +0800, Chen-Yu Tsai wrote: > > > On Wed, Aug 7, 2019 at 1:15 AM Vivien Didelot > > > wrote: > > > > > > > > Hi C

Re: [PATCH v2] soc: qcom: socinfo: Annotate switch cases with fall through

2019-08-06 Thread Vaishali Thakkar
On Wed, 7 Aug 2019 at 07:54, Bjorn Andersson wrote: > > Introduce fall through annotations in the switch statements of > socinfo_debugfs_init() to silence compiler warnings. Oops, I missed this. Thanks for fixing it! > Fixes: 9c84c1e78634 ("soc: qcom: socinfo: Expose custom attributes") > Report

[PATCH nvmem v2 0/2] nvmem: imx: add i.MX8QM platform support

2019-08-06 Thread fugang . duan
From: Fugang Duan The patch set is to add i.MX8QM platform support for i.MX8 SCU OCOTP driver due to i.MX8QM efuse table has some difference with i.MX8QXP platform. V2: - Add dt-bindings for the new compatible string support. Fugang Duan (2): nvmem: imx: add i.MX8QM platform support dt-bind

Re: [PATCH v4 2/4] RISC-V: Add riscv_isa reprensenting ISA features common across CPUs

2019-08-06 Thread Anup Patel
On Wed, Aug 7, 2019 at 3:24 AM Paul Walmsley wrote: > > Hi Anup, Atish, > > On Fri, 2 Aug 2019, Atish Patra wrote: > > > From: Anup Patel > > > > This patch adds riscv_isa integer to represent ISA features common > > across all CPUs. The riscv_isa is not same as elf_hwcap because > > elf_hwcap wi

[PATCH v1 1/1] i2c: iproc: Add i2c repeated start capability

2019-08-06 Thread Rayagonda Kokatanur
From: Lori Hikichi Enable handling of i2c repeated start. The current code handles a multi msg i2c transfer as separate i2c bus transactions. This change will now handle this case using the i2c repeated start protocol. The number of msgs in a transfer is limited to two, and must be a write follow

[PATCH nvmem v2 1/2] nvmem: imx: add i.MX8QM platform support

2019-08-06 Thread fugang . duan
From: Fugang Duan i.MX8QM efuse table has some difference with i.MX8QXP platform, so add i.MX8QM platform support. Signed-off-by: Fugang Duan --- drivers/nvmem/imx-ocotp-scu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvmem/imx-ocotp-scu.c b/drivers/nvmem/imx-ocotp-scu

[PATCH nvmem v2 2/2] dt-bindings: fsl: scu: add new compatible string for ocotp

2019-08-06 Thread fugang . duan
From: Fugang Duan Add new compatible string "fsl,imx8qm-scu-ocotp" into binding doc for i.MX8 SCU OCOTP driver. Signed-off-by: Fugang Duan --- Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devic

RE: [PATCH 1/3] perf: Add capability-related utilities

2019-08-06 Thread Lubashev, Igor
On Wed, July 17 at 2019 7:47 PM Arnaldo Carvalho de Melo wrote: > Em Wed, Jul 17, 2019 at 06:05:51PM -0300, Arnaldo Carvalho de Melo > escreveu: > > Em Tue, Jul 16, 2019 at 10:46:43AM +0200, Jiri Olsa escreveu: > > > On Tue, Jul 02, 2019 at 08:10:03PM -0400, Igor Lubashev wrote: > > > > Add utilit

RE: [EXT] Re: [PATCH nvmem 1/1] nvmem: imx: add i.MX8QM platform support

2019-08-06 Thread Andy Duan
From: Srinivas Kandagatla Sent: Tuesday, August 6, 2019 6:04 PM > On 04/07/2019 15:20, fugang.d...@nxp.com wrote: > > From: Fugang Duan > > > > i.MX8QM efuse table has some difference with i.MX8QXP platform, so add > > i.MX8QM platform support. > > > > Signed-off-by: Fugang Duan > > --- > > d

Re: [PATCH RFC tip/core/rcu 02/14] rcu/nocb: Add bypass callback queueing

2019-08-06 Thread Paul E. McKenney
On Tue, Aug 06, 2019 at 09:24:15PM -0400, Steven Rostedt wrote: > On Tue, 6 Aug 2019 18:17:07 -0700 > "Paul E. McKenney" wrote: > > > On Tue, Aug 06, 2019 at 08:40:55PM -0400, Steven Rostedt wrote: > > > On Tue, 6 Aug 2019 17:35:01 -0700 > > > "Paul E. McKenney" wrote: > > > > > > > > > + /

Re: Slowness forming TIPC cluster with explicit node addresses

2019-08-06 Thread Chris Packham
Hi Jon, On Wed, 2019-08-07 at 02:55 +, Jon Maloy wrote: > > > > > -Original Message- > > From: Chris Packham > > Sent: 4-Aug-19 19:05 > > To: Jon Maloy ; tipc- > > discuss...@lists.sourceforge.net > > Cc: net...@vger.kernel.org; linux-kernel@vger.kernel.org > > Subject: Re: Slowness

Re: [PATCH v7 01/20] pinctrl: tegra: Add suspend and resume support

2019-08-06 Thread Sowjanya Komatineni
On 8/6/19 2:51 PM, Sowjanya Komatineni wrote: On 8/5/19 2:20 AM, Linus Walleij wrote: On Wed, Jul 31, 2019 at 11:11 PM Sowjanya Komatineni wrote: This patch adds support for Tegra pinctrl driver suspend and resume. During suspend, context of all pinctrl registers are stored and on resume

[PATCH v2 4/4] perf: Use CAP_SYS_ADMIN instead of euid==0 with ftrace

2019-08-06 Thread Igor Lubashev
Kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs for ftrace. Make perf do the same. Signed-off-by: Igor Lubashev --- tools/perf/builtin-ftrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index

[PATCH v2 0/4] perf: Use capabilities instead of uid and euid

2019-08-06 Thread Igor Lubashev
Series v1: https://lkml.kernel.org/lkml/1562112605-6235-1-git-send-email-iluba...@akamai.com Kernel is using capabilities instead of uid and euid to restrict access to kernel pointers and tracing facilities. This patch series updates the perf to better match the security model used by the kerne

[PATCH v2 2/4] perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks

2019-08-06 Thread Igor Lubashev
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override perf_event_paranoid check. Make perf do the same. Signed-off-by: Igor Lubashev --- tools/perf/arch/arm/util/cs-etm.c| 3 ++- tools/perf/arch/arm64/util/arm-spe.c | 4 ++-- tools/perf/arch/x86/util/intel-bts.c | 3 ++- tools/per

[PATCH v2 1/4] perf: Add capability-related utilities

2019-08-06 Thread Igor Lubashev
Add utilities to help checking capabilities of the running procss. Make perf link with libcap, if it is available. If no libcap-dev[el], assume no capabilities. Signed-off-by: Igor Lubashev --- tools/build/Makefile.feature | 2 ++ tools/build/feature/Makefile | 4 tools/build/

[PATCH v2 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-06 Thread Igor Lubashev
Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when checking kptr_restrict. Make perf do the same. Also, the kernel is a more restrictive than "no restrictions" in case of kptr_restrict==0, so add the same logic to perf. Signed-off-by: Igor Lubashev --- tools/perf/util/symb

[PATCH] RDMA/hns: remove obsolete Kconfig comment

2019-08-06 Thread YueHaibing
Since commit a07fc0bb483e ("RDMA/hns: Fix build error") these kconfig comment is obsolete, so just remove it. Signed-off-by: YueHaibing --- drivers/infiniband/hw/hns/Kconfig | 8 1 file changed, 8 deletions(-) diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/

[PATCH] ALSA: usb-midi: fix a memory leak bug

2019-08-06 Thread Wenwen Wang
In __snd_usbmidi_create(), a MIDI streaming interface structure is allocated through kzalloc() and the pointer is saved to 'umidi'. Later on, the endpoint structures are created by invoking snd_usbmidi_create_endpoints_midiman() or snd_usbmidi_create_endpoints(), depending on the type of the audio

Re: [PATCH v4 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-08-06 Thread Jason Yan
On 2019/8/6 15:59, Christophe Leroy wrote: Le 05/08/2019 à 08:43, Jason Yan a écrit : One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Her

Re: [PATCH] arch/microblaze: add support for get_user() of size 8 bytes

2019-08-06 Thread Leon Romanovsky
On Tue, Aug 06, 2019 at 03:36:37PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > arch/microblaze/ is missing support for get_user() of size 8 bytes, > so add it by using __copy_from_user(). > > Fixes these build errors: >drivers/infiniband/core/uverbs_main.o: In function `ib_uverbs_write

Re: [PATCH net v2] net: dsa: Check existence of .port_mdb_add callback before calling it

2019-08-06 Thread Chen-Yu Tsai
On Wed, Aug 7, 2019 at 4:34 AM Vivien Didelot wrote: > > Hi Chen-Yu, > > On Wed, 7 Aug 2019 01:49:37 +0800, Chen-Yu Tsai wrote: > > On Wed, Aug 7, 2019 at 1:15 AM Vivien Didelot > > wrote: > > > > > > Hi Chen-Yu, > > > > > > On Tue, 6 Aug 2019 15:53:25 +0800, Chen-Yu Tsai wrote: > > > > From:

WARNING in cgroup_rstat_updated

2019-08-06 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:31cc088a Merge tag 'drm-next-2019-07-19' of git://anongit... git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=102db48c60 kernel config: https://syzkaller.appspot.com/x/.config?x=4dba67bf8b8c9ad7 da

Re: [PATCH v3] mlx5: Use refcount_t for refcount

2019-08-06 Thread Leon Romanovsky
On Tue, Aug 06, 2019 at 08:40:11PM +, Saeed Mahameed wrote: > On Tue, 2019-08-06 at 09:59 +0800, Chuhong Yuan wrote: > > Reference counters are preferred to use refcount_t instead of > > atomic_t. > > This is because the implementation of refcount_t can prevent > > overflows and detect possible

Re: [PATCH v4 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-08-06 Thread Jason Yan
On 2019/8/6 15:56, Christophe Leroy wrote: Le 05/08/2019 à 08:43, Jason Yan a écrit : After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and

[PATCH] team: Add vlan tx offload to hw_enc_features

2019-08-06 Thread YueHaibing
We should also enable bonding's vlan tx offload in hw_enc_features, pass the vlan packets to the slave devices with vlan tci, let them to handle vlan tunneling offload implementation. Fixes: 3268e5cb494d ("team: Advertise tunneling offload features") Signed-off-by: YueHaibing --- drivers/net/tea

Re: [PATCH 1/2] KEYS: Replace uid/gid/perm permissions checking with an ACL

2019-08-06 Thread Eric Biggers
On Tue, Jul 30, 2019 at 06:16:14PM -0700, Eric Biggers wrote: > On Mon, Jul 29, 2019 at 08:49:56PM -0700, Eric Biggers wrote: > > Hi David, > > > > On Tue, Jul 09, 2019 at 06:16:01PM -0700, Eric Biggers wrote: > > > On Thu, May 23, 2019 at 04:58:27PM +0100, David Howells wrote: > > > > Replace the

RE: Slowness forming TIPC cluster with explicit node addresses

2019-08-06 Thread Jon Maloy
> -Original Message- > From: Chris Packham > Sent: 4-Aug-19 19:05 > To: Jon Maloy ; tipc- > discuss...@lists.sourceforge.net > Cc: net...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: Slowness forming TIPC cluster with explicit node addresses > > On Sun, 2019-08-04 at 21:

[PATCH] xilinx_sdfec: Convert to IDA

2019-08-06 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This driver does not use the lookup abilities of the IDR, so convert it to the more space-efficient IDA. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/misc/xilinx_sdfec.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff

[PATCH v2 1/1] ixgbe: sync the first fragment unconditionally

2019-08-06 Thread Firo Yang
In Xen environment, if Xen-swiotlb is enabled, ixgbe driver could possibly allocate a page, DMA memory buffer, for the first fragment which is not suitable for Xen-swiotlb to do DMA operations. Xen-swiotlb have to internally allocate another page for doing DMA operations. It requires syncing betwee

[PATCH] libata-sff: use spin_lock_irqsave instead of spin_lock_irq in IRQ context.

2019-08-06 Thread Fuqian Huang
Function ata_sff_flush_pio_task use spin_lock_irq/spin_unlock_irq to protect shared data. spin_unlock_irq will enable interrupts. In the interrupt handler nv_swncq_interrupt (./drivers/ata/sata_nv.c), when ap->link.sactive is true, nv_swncq_host_interrupt was called. nv_swncq_hotplug is called whe

  1   2   3   4   5   6   7   8   9   10   >