[PATCH] powerpc/kasan: KASAN is not supported on RELOCATABLE && FSL_BOOKE

2019-11-29 Thread Lexi Shao
CONFIG_RELOCATABLE and CONFIG_KASAN cannot be enabled at the same time on ppce500 fsl_booke. All functions called before kasan_early_init() should be disabled with kasan check. When CONFIG_RELOCATABLE is enabled on ppce500 fsl_booke, relocate_init() is called before kasan_early_init() which trigger

Re: [PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-29 Thread Will Deacon
On Fri, Nov 29, 2019 at 01:53:36AM +0530, Bhupesh Sharma wrote: > Changes since v4: > > - v4 can be seen here: > http://lists.infradead.org/pipermail/kexec/2019-November/023961.html > - Addressed comments from Dave and added patches for documenting > new variables appended to v

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Dmitry Vyukov
_locked(vms[area], vas[area], VM_ALLOC, > > > pcpu_get_vm_areas); > > > + } > > > + spin_unlock(&vmap_area_lock); > > > > > > + /* populate the shadow space outside of the lock */ > > >

Re: [PATCH v2 17/19] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-11-29 Thread Jan Kara
On Mon 25-11-19 15:10:33, John Hubbard wrote: > 1. Convert from get_user_pages() to pin_user_pages(). > > 2. As required by pin_user_pages(), release these pages via > put_user_page(). In this case, do so via put_user_pages_dirty_lock(). > > That has the side effect of calling set_page_dirty_lock

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Andrey Ryabinin
t;>>> >>>>> setup_vmalloc_vm_locked(vms[area], vas[area], VM_ALLOC, >>>>> pcpu_get_vm_areas); >>>>> + } >>>>> + spin_unlock(&vmap_area_lock); >>>>> >&g

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Andrey Ryabinin
;b_addr = vm_map_ram(bp->b_pages, bp->b_page_count, > > BUG: unable to handle page fault for address: f52005b8 > #PF: supervisor read access in kernel mode > #PF: error_code(0x) - not-present page > PGD 7ffcd067 P4D 7ffcd067 PUD 2cd10067 PMD 66d76067 PTE 0 > Oops: 00

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Daniel Axtens
Hi Dmitry, >> I am testing this support on next-20191129 and seeing the following warnings: >> >> BUG: sleeping function called from invalid context at mm/page_alloc.c:4681 >> in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 44, name: kworker/1:1 >> 4 locks

linux-next: Fixes tag needs some work in the powerpc tree

2019-11-29 Thread Stephen Rothwell
Hi all, Commit 6f090192f822 ("x86/efi: remove unused variables") is missing a Signed-off-by from its committer. -- Cheers, Stephen Rothwell pgpwOkerSneth.pgp Description: OpenPGP digital signature

Re: linux-next: Fixes tag needs some work in the powerpc tree

2019-11-29 Thread Stephen Rothwell
Hi all, hmm, that subject is completely wrong, sorry. On Fri, 29 Nov 2019 23:12:00 +1100 Stephen Rothwell wrote: > > Commit > > 6f090192f822 ("x86/efi: remove unused variables") > > is missing a Signed-off-by from its committer. -- Cheers, Stephen Rothwell pgpUTv7q4WJWs.pgp Description

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Daniel Axtens
e involved? Regards, Daniel > >> >> BUG: unable to handle page fault for address: f52005b8 >> #PF: supervisor read access in kernel mode >> #PF: error_code(0x) - not-present page >> PGD 7ffcd067 P4D 7ffcd067 PUD 2cd10067 PMD 66d76067 PTE 0 >> Oops: 000

Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory

2019-11-29 Thread Dmitry Vyukov
gt; > >> > >> BUG: unable to handle page fault for address: f52005b8 > >> #PF: supervisor read access in kernel mode > >> #PF: error_code(0x) - not-present page > >> PGD 7ffcd067 P4D 7ffcd067 PUD 2cd10067 PMD 66d76067 PTE 0 > >> Oops: 00

Re: [PATCH] powerpc/kasan: KASAN is not supported on RELOCATABLE && FSL_BOOKE

2019-11-29 Thread Christophe Leroy
Le 29/11/2019 à 08:46, Christophe Leroy a écrit : Le 29/11/2019 à 08:04, Lexi Shao a écrit : CONFIG_RELOCATABLE and CONFIG_KASAN cannot be enabled at the same time on ppce500 fsl_booke. All functions called before kasan_early_init() should be disabled with kasan check. When CONFIG_RELOCATAB

[PATCH] powerpc/kasan: fix boot failure with RELOCATABLE && FSL_BOOKE

2019-11-29 Thread Christophe Leroy
When enabling CONFIG_RELOCATABLE and CONFIG_KASAN on FSL_BOOKE, the kernel doesn't boot. relocate_init() requires KASAN early shadow area to be set up because it needs access to the device tree through generic functions. Call kasan_early_init() before calling relocate_init() Reported-by: Lexi Sh

Build failure on latest powerpc/merge (311ae9e159d8 io_uring: fix dead-hung for non-iter fixed rw)

2019-11-29 Thread Christophe Leroy
  CC  fs/io_uring.o fs/io_uring.c: In function ‘loop_rw_iter’: fs/io_uring.c:1628:21: error: implicit declaration of function ‘kmap’ [-Werror=implicit-function-declaration]     iovec.iov_base = kmap(iter->bvec->bv_page) ^ fs/io_uring.c:1628:19: warning: assignment makes

XFS check crash (WAS Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory)

2019-11-29 Thread Qian Cai
Daniel > >> >>> >>> BUG: unable to handle page fault for address: f52005b8 >>> #PF: supervisor read access in kernel mode >>> #PF: error_code(0x) - not-present page >>> PGD 7ffcd067 P4D 7ffcd067 PUD 2cd10067 PMD 66d76067 PTE 0 &

[RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-11-29 Thread Sebastian Andrzej Siewior
I've been looking at phandle_cache and noticed the following: The raw phandle value as generated by dtc starts at zero and is incremented by one for each phandle entry. The qemu pSeries model is using Slof (which is probably the same thing as used on real hardware) and this looks like a poiner valu

Re: XFS check crash (WAS Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory)

2019-11-29 Thread Daniel Axtens
> > Nope, it's vm_map_ram() not being handled Another suspicious one. Related to kasan/vmalloc? >>> >>> Very likely the same as with ion: >>> >>> # git grep vm_map_ram|grep xfs >>> fs/xfs/xfs_buf.c:* vm_map_ram() will allocate auxiliary >>> structures (e

Re: Build failure on latest powerpc/merge (311ae9e159d8 io_uring: fix dead-hung for non-iter fixed rw)

2019-11-29 Thread Jens Axboe
On 11/29/19 6:53 AM, Christophe Leroy wrote: CC fs/io_uring.o fs/io_uring.c: In function ‘loop_rw_iter’: fs/io_uring.c:1628:21: error: implicit declaration of function ‘kmap’ [-Werror=implicit-function-declaration] iovec.iov_base = kmap(iter->bvec->bv_page) ^

Re: Build failure on latest powerpc/merge (311ae9e159d8 io_uring: fix dead-hung for non-iter fixed rw)

2019-11-29 Thread Christophe Leroy
Le 29/11/2019 à 17:04, Jens Axboe a écrit : On 11/29/19 6:53 AM, Christophe Leroy wrote:     CC  fs/io_uring.o fs/io_uring.c: In function ‘loop_rw_iter’: fs/io_uring.c:1628:21: error: implicit declaration of function ‘kmap’ [-Werror=implicit-function-declaration]   iovec.iov_base = km

Re: Build failure on latest powerpc/merge (311ae9e159d8 io_uring: fix dead-hung for non-iter fixed rw)

2019-11-29 Thread Jens Axboe
On 11/29/19 8:14 AM, Christophe Leroy wrote: Le 29/11/2019 à 17:04, Jens Axboe a écrit : On 11/29/19 6:53 AM, Christophe Leroy wrote: CC fs/io_uring.o fs/io_uring.c: In function ‘loop_rw_iter’: fs/io_uring.c:1628:21: error: implicit declaration of function ‘kmap’ [-Werror=implicit-f

Re: [PATCH v4 2/2] powerpc/irq: inline call_do_irq() and call_do_softirq()

2019-11-29 Thread Segher Boessenkool
Hi! On Wed, Nov 27, 2019 at 04:15:15PM +0100, Christophe Leroy wrote: > Le 27/11/2019 à 15:59, Segher Boessenkool a écrit : > >On Wed, Nov 27, 2019 at 02:50:30PM +0100, Christophe Leroy wrote: > >>So what do we do ? We just drop the "r2" clobber ? > > > >You have to make sure your asm code works f

[RESEND PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-29 Thread Bhupesh Sharma
- Resending the v5 version as Will Deacon reported that the patchset was split into two seperate threads while sending out. It was an issue with my 'msmtp' settings which is now fixed. Changes since v4: - v4 can be seen here: http://lists.infradead.org/pipermail/kexec/2019-N

[RESEND PATCH v5 1/5] crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo

2019-11-29 Thread Bhupesh Sharma
Right now user-space tools like 'makedumpfile' and 'crash' need to rely on a best-guess method of determining value of 'MAX_PHYSMEM_BITS' supported by underlying kernel. This value is used in user-space code to calculate the bit-space required to store a section for SPARESMEM (similar to the exist

[RESEND PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-29 Thread Bhupesh Sharma
- Resending the v5 version as Will Deacon reported that the patchset was split into two seperate threads while sending out. It was an issue with my 'msmtp' settings which seems to be now fixed. Please ignore all previous v5 versions. Changes since v4: - v4 can be seen here:

[RESEND PATCH v5 1/5] crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo

2019-11-29 Thread Bhupesh Sharma
Right now user-space tools like 'makedumpfile' and 'crash' need to rely on a best-guess method of determining value of 'MAX_PHYSMEM_BITS' supported by underlying kernel. This value is used in user-space code to calculate the bit-space required to store a section for SPARESMEM (similar to the exist

[RESEND PATCH v5 2/5] arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo

2019-11-29 Thread Bhupesh Sharma
vabits_actual variable on arm64 indicates the actual VA space size, and allows a single binary to support both 48-bit and 52-bit VA spaces. If the ARMv8.2-LVA optional feature is present, and we are running with a 64KB page size; then it is possible to use 52-bits of address space for both userspa

[RESEND PATCH v5 3/5] Documentation/arm64: Fix a simple typo in memory.rst

2019-11-29 Thread Bhupesh Sharma
Fix a simple typo in arm64/memory.rst Cc: Jonathan Corbet Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Catalin Marinas Cc: Ard Biesheuvel Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Bhupesh S

[RESEND PATCH v5 4/5] Documentation/vmcoreinfo: Add documentation for 'MAX_PHYSMEM_BITS'

2019-11-29 Thread Bhupesh Sharma
Add documentation for 'MAX_PHYSMEM_BITS' variable being added to vmcoreinfo. 'MAX_PHYSMEM_BITS' defines the maximum supported physical address space memory. Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: James Morse Cc: Will Deacon Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benj

[RESEND PATCH v5 5/5] Documentation/vmcoreinfo: Add documentation for 'TCR_EL1.T1SZ'

2019-11-29 Thread Bhupesh Sharma
Add documentation for TCR_EL1.T1SZ variable being added to vmcoreinfo. It indicates the size offset of the memory region addressed by TTBR1_EL1 and hence can be used for determining the vabits_actual value. Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Catalin Marinas

Re: [PATCH v5 0/5] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-29 Thread Bhupesh Sharma
Hi Will, On Fri, Nov 29, 2019 at 3:54 PM Will Deacon wrote: > > On Fri, Nov 29, 2019 at 01:53:36AM +0530, Bhupesh Sharma wrote: > > Changes since v4: > > > > - v4 can be seen here: > > http://lists.infradead.org/pipermail/kexec/2019-November/023961.html > > - Addressed comments

Re: Build failure on latest powerpc/merge (311ae9e159d8 io_uring: fix dead-hung for non-iter fixed rw)

2019-11-29 Thread Jens Axboe
On 11/29/19 10:07 AM, Pavel Begunkov wrote: On 29/11/2019 20:16, Jens Axboe wrote: On 11/29/19 8:14 AM, Christophe Leroy wrote: Reverting commit 311ae9e159d8 ("io_uring: fix dead-hung for non-iter fixed rw") clears the failure. Most likely an #include is missing. Huh weird how the build bot

Re: [PATCH v2 17/19] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-11-29 Thread John Hubbard
On 11/29/19 3:23 AM, Jan Kara wrote: On Mon 25-11-19 15:10:33, John Hubbard wrote: 1. Convert from get_user_pages() to pin_user_pages(). 2. As required by pin_user_pages(), release these pages via put_user_page(). In this case, do so via put_user_pages_dirty_lock(). That has the side effect of

Re: [PATCH] ASoC: fsl_sai: add IRQF_SHARED

2019-11-29 Thread Fabio Estevam
Hi Michael, On Thu, Nov 28, 2019 at 7:38 PM Michael Walle wrote: > > The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use > IRQF_SHARED to be able to use these SAIs simultaneously. On i.MX8M SAI5 and SAI6 share the same interrupt number too: Reviewed-by: Fabio Estevam Thanks

Re: [PATCH] powerpc/kasan: KASAN is not supported on RELOCATABLE && FSL_BOOKE

2019-11-29 Thread shaolexi
>Le 29/11/2019 à 08:46, Christophe Leroy a écrit : >> >> >> Le 29/11/2019 à 08:04, Lexi Shao a écrit : >>> CONFIG_RELOCATABLE and CONFIG_KASAN cannot be enabled at the same >>> time on ppce500 fsl_booke. All functions called before >>> kasan_early_init() should be disabled with kasan check. When >>

Re: [RFC] Efficiency of the phandle_cache on ppc64/SLOF

2019-11-29 Thread Frank Rowand
On 11/29/19 9:10 AM, Sebastian Andrzej Siewior wrote: > I've been looking at phandle_cache and noticed the following: The raw > phandle value as generated by dtc starts at zero and is incremented by > one for each phandle entry. The qemu pSeries model is using Slof (which > is probably the same thi