Re: [PATCH V5 00/12] 52-bit kernel + user VAs

2019-08-13 Thread Geert Uytterhoeven
Hi Will, Steve,

On Fri, Aug 9, 2019 at 6:47 PM Will Deacon  wrote:
> On Wed, Aug 07, 2019 at 04:55:12PM +0100, Steve Capper wrote:
> > This patch series adds support for 52-bit kernel VAs using some of the
> > machinery already introduced by the 52-bit userspace VA code in 5.0.
>
> Cheers, I've pushed this out on a for-next/52-bit-kva branch with one
> small patch on top and Catalin's tags added.

As of commit 14c127c957c1c607 ("arm64: mm: Flip kernel VA space"), the
kernel log is spammed with

virt_to_phys used for non-linear address: (ptrval)
(__func__.6603+0x14d681/0x17fb3d)
WARNING: CPU: 0 PID: 264 at arch/arm64/mm/physaddr.c:15
__virt_to_phys+0x28/0x58
Modules linked in:
CPU: 0 PID: 264 Comm: mdev Not tainted
5.3.0-rc3-rcar3-initrd-2-g14c127c957c1c607 #38
Hardware name: Renesas Ebisu-4D board based on r8a77990 (DT)
pstate: 6005 (nZCv daif -PAN -UAO)
pc : __virt_to_phys+0x28/0x58
lr : __virt_to_phys+0x28/0x58
sp : ffc011953c80
x29: ffc011953c80 x28: ff8078790140
x27:  x26: 
x25: ffc010a539b9 x24: ffc010a86000
x23: ffc010a539ba x22: 0001
x21: 00202038 x20: 0001
x19: ffc010a539b9 x18: 000a
x17:  x16: 
x15: 000ca51d x14: 0720072007200720
x13: 0720072007200720 x12: 0720072007200720
x11: 0720072007200720 x10: 0720072007200720
x9 : 0720072007200720 x8 : 0001
x7 : 0007 x6 : ff8079824f00
x5 : 0140 x4 : 
x3 :  x2 : 
x1 : 0713abbc9281cf00 x0 : 
Call trace:
 __virt_to_phys+0x28/0x58
 __check_object_size+0xd0/0x1e0
 filldir64+0x1d8/0x2b0
 kernfs_fop_readdir+0x64/0x200
 iterate_dir+0x68/0x144
 ksys_getdents64+0x88/0x154
 __arm64_sys_getdents64+0x18/0x24
 el0_svc_common.constprop.0+0x84/0xe8
 el0_svc_compat_handler+0x18/0x20
 el0_svc_compat+0x8/0x10
---[ end trace 6980a45f636e18be ]---

as soon as userspace starts.

As this commit cannot be reverted easily, I had to revert the full branch with
"git revert -m 1 6ce0dc725177e9856c9a67f2e2cabb3f7a3d90d7".

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH V5 00/12] 52-bit kernel + user VAs

2019-08-13 Thread Will Deacon
Hi Geert,

On Tue, Aug 13, 2019 at 02:43:23PM +0200, Geert Uytterhoeven wrote:
> On Fri, Aug 9, 2019 at 6:47 PM Will Deacon  wrote:
> > On Wed, Aug 07, 2019 at 04:55:12PM +0100, Steve Capper wrote:
> > > This patch series adds support for 52-bit kernel VAs using some of the
> > > machinery already introduced by the 52-bit userspace VA code in 5.0.
> >
> > Cheers, I've pushed this out on a for-next/52-bit-kva branch with one
> > small patch on top and Catalin's tags added.
> 
> As of commit 14c127c957c1c607 ("arm64: mm: Flip kernel VA space"), the
> kernel log is spammed with
> 
> virt_to_phys used for non-linear address: (ptrval)
> (__func__.6603+0x14d681/0x17fb3d)
> WARNING: CPU: 0 PID: 264 at arch/arm64/mm/physaddr.c:15
> __virt_to_phys+0x28/0x58
> Modules linked in:
> CPU: 0 PID: 264 Comm: mdev Not tainted
> 5.3.0-rc3-rcar3-initrd-2-g14c127c957c1c607 #38
> Hardware name: Renesas Ebisu-4D board based on r8a77990 (DT)
> pstate: 6005 (nZCv daif -PAN -UAO)
> pc : __virt_to_phys+0x28/0x58
> lr : __virt_to_phys+0x28/0x58
> sp : ffc011953c80
> x29: ffc011953c80 x28: ff8078790140
> x27:  x26: 
> x25: ffc010a539b9 x24: ffc010a86000
> x23: ffc010a539ba x22: 0001
> x21: 00202038 x20: 0001
> x19: ffc010a539b9 x18: 000a
> x17:  x16: 
> x15: 000ca51d x14: 0720072007200720
> x13: 0720072007200720 x12: 0720072007200720
> x11: 0720072007200720 x10: 0720072007200720
> x9 : 0720072007200720 x8 : 0001
> x7 : 0007 x6 : ff8079824f00
> x5 : 0140 x4 : 
> x3 :  x2 : 
> x1 : 0713abbc9281cf00 x0 : 
> Call trace:
>  __virt_to_phys+0x28/0x58
>  __check_object_size+0xd0/0x1e0
>  filldir64+0x1d8/0x2b0
>  kernfs_fop_readdir+0x64/0x200
>  iterate_dir+0x68/0x144
>  ksys_getdents64+0x88/0x154
>  __arm64_sys_getdents64+0x18/0x24
>  el0_svc_common.constprop.0+0x84/0xe8
>  el0_svc_compat_handler+0x18/0x20
>  el0_svc_compat+0x8/0x10
> ---[ end trace 6980a45f636e18be ]---
> 
> as soon as userspace starts.

Can you try the hack I posted here, please?

https://lkml.org/lkml/2019/8/13/555

Also, what .config are you using?

Will


renesas-drivers-2019-08-13-v5.3-rc4

2019-08-13 Thread Geert Uytterhoeven
I have pushed renesas-drivers-2019-08-13-v5.3-rc4 to
https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git

This tree is meant to ease development of platform support and drivers
for Renesas ARM SoCs. It is created by merging (a) the for-next branches
of various subsystem trees and (b) branches with driver code submitted
or planned for submission to maintainers into the master branch of my
renesas-devel.git tree.

Today's version is based on renesas-devel-2019-08-12-v5.3-rc4.

Included branches with driver code:
  - clk-renesas
  - sh-pfc
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git#renesas/topic/sdhi-manual-calib~1

Included fixes:
  - drm/bridge: dumb-vga-dac: Fix dereferencing -ENODEV DDC channel
  - ARM: shmobile: defconfig: Update shmobile_defconfig
  - [LOCAL] arm64: defconfig: Update renesas_defconfig
  - Revert "Merge branch 'for-next/52-bit-kva' into for-next/core"

Included subsystem trees:
  - git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git#linux-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git#clk-next
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git#mtd/next
  - git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git#master
  - git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git#tty-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git#i2c/for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git#master
  - git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git#usb-next
  - git://git.freedesktop.org/git/drm/drm.git#drm-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git#next
  - git://linuxtv.org/media_tree.git#master
  - git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git#next
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git#for-next
  - git://git.linaro.org/people/daniel.lezcano/linux.git#clockevents/next
  - git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git#testing/next
  - git://git.infradead.org/users/vkoul/slave-dma.git#next
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git#staging-next
  - git://git.armlinux.org.uk/~rmk/linux-arm.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git#next
  - git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#irq/core
  - git://github.com/bzolnier/linux.git#fbdev-for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git#for-next
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git#for-next
  - git://www.linux-watchdog.org/linux-watchdog-next.git#master
  - git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git#for-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git#for-next/core
  - git://anongit.freedesktop.org/drm/drm-misc#for-linux-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git#next
  - git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git#next
  - 
git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git#next
  - git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git#for-mfd-next
  - git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git#for-next

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH V5 00/12] 52-bit kernel + user VAs

2019-08-13 Thread Geert Uytterhoeven
Hi Will,

On Tue, Aug 13, 2019 at 3:10 PM Will Deacon  wrote:
> On Tue, Aug 13, 2019 at 02:43:23PM +0200, Geert Uytterhoeven wrote:
> > On Fri, Aug 9, 2019 at 6:47 PM Will Deacon  wrote:
> > > On Wed, Aug 07, 2019 at 04:55:12PM +0100, Steve Capper wrote:
> > > > This patch series adds support for 52-bit kernel VAs using some of the
> > > > machinery already introduced by the 52-bit userspace VA code in 5.0.
> > >
> > > Cheers, I've pushed this out on a for-next/52-bit-kva branch with one
> > > small patch on top and Catalin's tags added.
> >
> > As of commit 14c127c957c1c607 ("arm64: mm: Flip kernel VA space"), the
> > kernel log is spammed with
> >
> > virt_to_phys used for non-linear address: (ptrval)
> > (__func__.6603+0x14d681/0x17fb3d)
> > WARNING: CPU: 0 PID: 264 at arch/arm64/mm/physaddr.c:15
> > __virt_to_phys+0x28/0x58
> > Modules linked in:
> > CPU: 0 PID: 264 Comm: mdev Not tainted
> > 5.3.0-rc3-rcar3-initrd-2-g14c127c957c1c607 #38
> > Hardware name: Renesas Ebisu-4D board based on r8a77990 (DT)
> > pstate: 6005 (nZCv daif -PAN -UAO)
> > pc : __virt_to_phys+0x28/0x58
> > lr : __virt_to_phys+0x28/0x58
> > sp : ffc011953c80
> > x29: ffc011953c80 x28: ff8078790140
> > x27:  x26: 
> > x25: ffc010a539b9 x24: ffc010a86000
> > x23: ffc010a539ba x22: 0001
> > x21: 00202038 x20: 0001
> > x19: ffc010a539b9 x18: 000a
> > x17:  x16: 
> > x15: 000ca51d x14: 0720072007200720
> > x13: 0720072007200720 x12: 0720072007200720
> > x11: 0720072007200720 x10: 0720072007200720
> > x9 : 0720072007200720 x8 : 0001
> > x7 : 0007 x6 : ff8079824f00
> > x5 : 0140 x4 : 
> > x3 :  x2 : 
> > x1 : 0713abbc9281cf00 x0 : 
> > Call trace:
> >  __virt_to_phys+0x28/0x58
> >  __check_object_size+0xd0/0x1e0
> >  filldir64+0x1d8/0x2b0
> >  kernfs_fop_readdir+0x64/0x200
> >  iterate_dir+0x68/0x144
> >  ksys_getdents64+0x88/0x154
> >  __arm64_sys_getdents64+0x18/0x24
> >  el0_svc_common.constprop.0+0x84/0xe8
> >  el0_svc_compat_handler+0x18/0x20
> >  el0_svc_compat+0x8/0x10
> > ---[ end trace 6980a45f636e18be ]---
> >
> > as soon as userspace starts.
>
> Can you try the hack I posted here, please?
>
> https://lkml.org/lkml/2019/8/13/555

Thanks, that seems to do the trick!

Tested-by: Geert Uytterhoeven 

> Also, what .config are you using?

Attached.

Probably CONFIG_DEBUG_VIRTUAL=y is what you're missing.


Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


ebisu-config.gz
Description: application/gzip