[PATCH v2] i2c: avoid sleep in IRQ context

2019-08-07 Thread Fuqian Huang
i2c_pxa_handler -> i2c_pxa_irq_txempty -> i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave As i2c_pxa_handler is an interrupt handler, it will finally calls i2c_pxa_wait_slave which calls msleep. Add in_interrupt check before msleep to avoid sleep in IRQ context. When in interrupt

[PATCH v2 4/7] dt-bindings: mailbox: Add APSS shared for SM8150 and SC7180 SoCs

2019-08-07 Thread Sibi Sankar
Add SM8150 and SC7180 APSS shared to the list of possible bindings. Signed-off-by: Sibi Sankar --- .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt

[PATCH v2] ALSA: pcm: fix multiple memory leak bugs

2019-08-07 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]'. In hiface_pcm_init_urb(), 'rt->out_urbs[i].buffer' is allocated through kzalloc(). However, if hiface_pcm_init_urb() fails, both 'rt' and

[PATCH v2 6/7] dt-bindings: soc: qcom: aoss: Add SM8150 and SC7180 support

2019-08-07 Thread Sibi Sankar
Add SM8150 and SC7180 AOSS QMP to the list of possible bindings. Signed-off-by: Sibi Sankar --- Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt

[PATCH v2 1/7] soc: qcom: smem: Update max processor count

2019-08-07 Thread Sibi Sankar
Update max processor count to reflect the number of co-processors on SC7180 SoCs. Signed-off-by: Sibi Sankar --- drivers/soc/qcom/smem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/smem.c b/drivers/soc/qcom/smem.c index f27c00d82ae49..bef8502625f96

[PATCH v2 5/7] mailbox: qcom: Add support for Qualcomm SM8150 and SC7180 SoCs

2019-08-07 Thread Sibi Sankar
Add the corresponding APSS shared offset for SM8150 and SC7180 SoCs. Signed-off-by: Sibi Sankar --- drivers/mailbox/qcom-apcs-ipc-mailbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index

[PATCH v2 2/7] dt-bindings: firmware: scm: re-order compatible list

2019-08-07 Thread Sibi Sankar
re-order compatible list to maintain sort order. Signed-off-by: Sibi Sankar --- Documentation/devicetree/bindings/firmware/qcom,scm.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.txt

[PATCH v2 7/7] soc: qcom: aoss: Add AOSS QMP support

2019-08-07 Thread Sibi Sankar
Add AOSS QMP support for SM8150 and SC7180 SoCs. Signed-off-by: Sibi Sankar --- drivers/soc/qcom/qcom_aoss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c index 5f885196f4d0f..6ae813837b74b 100644 ---

[PATCH v2 3/7] dt-bindings: firmware: scm: Add SM8150 and SC7180 support

2019-08-07 Thread Sibi Sankar
Add compatible for SM8150 and SC7180 SoCs. Signed-off-by: Sibi Sankar --- Documentation/devicetree/bindings/firmware/qcom,scm.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/firmware/qcom,scm.txt

[PATCH v2 0/7] Add support for Qualcomm SM8150 and SC7180 SoCs

2019-08-07 Thread Sibi Sankar
This patch series adds SCM, APSS shared mailbox and QMP AOSS PD/clock support on SM8150 and SC7180 SoCs. v2: * re-arrange the compatible lists in sort order Sibi Sankar (7): soc: qcom: smem: Update max processor count dt-bindings: firmware: scm: re-order compatible list dt-bindings:

Re: [PATCH] i2c-axxia: support slave mode

2019-08-07 Thread Adamski, Krzysztof (Nokia - PL/Wroclaw)
Hi Wolfram, >Hi Krzysztof, > >> +if (fifo_status & SLV_FIFO_DV1) { >> +if (fifo_status & SLV_FIFO_STRC) { >> +dev_dbg(dev, "First data byte sent\n"); > >I think, however, these debug messages could go. They were surely >helpful during development but assuming

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

2019-08-07 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 |

[PATCH V4 3/9] vhost: fix vhost map leak

2019-08-07 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 V4 7/9] vhost: do not use RCU to synchronize MMU notifier with worker

2019-08-07 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

[PATCH V4 4/9] vhost: reset invalidate_count in vhost_set_vring_num_addr()

2019-08-07 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

[PATCH V4 1/9] vhost: don't set uaddr for invalid address

2019-08-07 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

[PATCH V4 0/9] Fixes for metadata accelreation

2019-08-07 Thread Jason Wang
Hi all: This series try to fix several issues introduced by meta data accelreation series. Please review. Changes from V3: - remove the unnecessary patch Changes from V2: - use seqlck helper to synchronize MMU notifier with vhost worker Changes from V1: - try not use RCU to syncrhonize MMU

[PATCH V4 6/9] vhost: don't do synchronize_rcu() in vhost_uninit_vq_maps()

2019-08-07 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:

[PATCH V4 2/2] cpufreq: intel_pstate: Implement QoS supported freq constraints

2019-08-07 Thread Viresh Kumar
Intel pstate driver exposes min_perf_pct and max_perf_pct sysfs files, which can be used to force a limit on the min/max P state of the driver. Though these files eventually control the min/max frequencies that the CPUs will run at, they don't make a change to policy->min/max values. When the

[PATCH V4 5/9] vhost: mark dirty pages during map uninit

2019-08-07 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

[PATCH V4 2/9] vhost: validate MMU notifier registration

2019-08-07 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.

[PATCH V4 8/9] vhost: correctly set dirty pages in MMU notifiers callback

2019-08-07 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

[PATCH V4 1/2] cpufreq: schedutil: Don't skip freq update when limits change

2019-08-07 Thread Viresh Kumar
To avoid reducing the frequency of a CPU prematurely, we skip reducing the frequency if the CPU had been busy recently. This should not be done when the limits of the policy are changed, for example due to thermal throttling. We should always get the frequency within the new limits as soon as

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

2019-08-07 Thread Jason Wang
On 2019/8/7 下午2:54, Jason Wang wrote: 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(-)

Re: [PATCH] i2c: avoid sleep in IRQ context

2019-08-07 Thread Fuqian Huang
Adamski, Krzysztof (Nokia - PL/Wroclaw) 於 2019年8月7日週三 下午2:51寫道: > > On Mon, Aug 05, 2019 at 08:31:34PM +0800, Fuqian Huang wrote: > >i2c_pxa_handler -> i2c_pxa_irq_txempty -> > >i2c_pxa_reset -> i2c_pxa_set_slave -> i2c_pxa_wait_slave > > > >As i2c_pxa_handler is an interrupt handler, it will

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

2019-08-07 Thread Alexandre Ghiti
On 8/7/19 7:42 AM, Christoph Hellwig wrote: 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

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

2019-08-07 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:

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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 > >

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

2019-08-07 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:

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

2019-08-07 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

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

2019-08-07 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-07 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 |

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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.

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

2019-08-07 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

[PATCH V3 00/10] Fixes for metadata accelreation

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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-07 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-07 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

Re: Warnings whilst building 5.2.0+

2019-08-07 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

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

2019-08-07 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-07 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

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

2019-08-07 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. *

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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-07 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

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

2019-08-07 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

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

2019-08-07 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

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

2019-08-07 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-07 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-07 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

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

2019-08-07 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

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

2019-08-07 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

Re: Warnings whilst building 5.2.0+

2019-08-07 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-07 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

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

2019-08-07 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-07 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); > +}

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

2019-08-07 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

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

2019-08-07 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 = _get_real; > +

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

2019-08-07 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-07 Thread Christoph Hellwig
no-mmu sounds stange, as we use that for linux ports without paging hardware. I think an "io" got lost somewhere..

<    4   5   6   7   8   9