Re: [PATCH] arm64: trap illegal translations in __virt_to_phys()

2019-01-08 Thread Miles Chen
On Tue, 2019-01-08 at 12:14 +, Mark Rutland wrote: > On Tue, Jan 08, 2019 at 11:24:43AM +0800, Miles Chen wrote: > > On Mon, 2019-01-07 at 15:00 +, Mark Rutland wrote: > > > On Mon, Jan 07, 2019 at 07:21:20PM +0800, Miles Chen wrote: > > > > Current __virt_to_phys() only print warning messa

Re: [PATCH] arm64: trap illegal translations in __virt_to_phys()

2019-01-08 Thread Mark Rutland
On Tue, Jan 08, 2019 at 11:24:43AM +0800, Miles Chen wrote: > On Mon, 2019-01-07 at 15:00 +, Mark Rutland wrote: > > On Mon, Jan 07, 2019 at 07:21:20PM +0800, Miles Chen wrote: > > > Current __virt_to_phys() only print warning messages for non-linear > > > addresses. It's hard to catch all warn

Re: [PATCH] arm64: trap illegal translations in __virt_to_phys()

2019-01-07 Thread Miles Chen
On Mon, 2019-01-07 at 15:00 +, Mark Rutland wrote: > On Mon, Jan 07, 2019 at 07:21:20PM +0800, Miles Chen wrote: > > Current __virt_to_phys() only print warning messages for non-linear > > addresses. It's hard to catch all warnings by those messages. > > Why? Are you seeing a large number of w

Re: [PATCH] arm64: trap illegal translations in __virt_to_phys()

2019-01-07 Thread Mark Rutland
On Mon, Jan 07, 2019 at 07:21:20PM +0800, Miles Chen wrote: > Current __virt_to_phys() only print warning messages for non-linear > addresses. It's hard to catch all warnings by those messages. Why? Are you seeing a large number of warnings somewhere? > So add a VIRTUAL_BUG_ON() to trap all non-l

[PATCH] arm64: trap illegal translations in __virt_to_phys()

2019-01-07 Thread Miles Chen
Current __virt_to_phys() only print warning messages for non-linear addresses. It's hard to catch all warnings by those messages. So add a VIRTUAL_BUG_ON() to trap all non-linear and non-symbol addresses (e.g., stack addresses) Tested by pass stack addresses and symbol addresses to __pa(). Result: