Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-25 Thread Andy Shevchenko
On Thu, Mar 25, 2021 at 09:46:46AM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 06:57:12PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 04:13:59PM +0100, Roger Pau Monné wrote: > > > On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: > > > > On Wed, Mar 24,

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-25 Thread Roger Pau Monné
On Wed, Mar 24, 2021 at 06:57:12PM +0200, Andy Shevchenko wrote: > On Wed, Mar 24, 2021 at 04:13:59PM +0100, Roger Pau Monné wrote: > > On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: > > > On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > > > > On Wed, Mar 24,

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 04:13:59PM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > > > On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: > > > > On Wed, Mar 24,

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Roger Pau Monné
On Wed, Mar 24, 2021 at 04:22:44PM +0200, Andy Shevchenko wrote: > On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > > On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: > > > On Wed, Mar 24, 2021 at 01:31:18PM +0100, Roger Pau Monne wrote: > > > Moreover, it seems

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 02:55:15PM +0100, Roger Pau Monné wrote: > On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: > > On Wed, Mar 24, 2021 at 01:31:18PM +0100, Roger Pau Monne wrote: ... > What could be done is check whether reading REVID returns ~0 and exit > at that point, if

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Roger Pau Monné
On Wed, Mar 24, 2021 at 02:58:07PM +0200, Andy Shevchenko wrote: > On Wed, Mar 24, 2021 at 01:31:18PM +0100, Roger Pau Monne wrote: > > When parsing the capability list make sure the offset is between the > > MMIO region mapped in 'regs', or else the kernel hits a page fault. > > > > This fault

Re: [PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Andy Shevchenko
On Wed, Mar 24, 2021 at 01:31:18PM +0100, Roger Pau Monne wrote: > When parsing the capability list make sure the offset is between the > MMIO region mapped in 'regs', or else the kernel hits a page fault. > > This fault has been seen when running as a Xen PVH dom0, which doesn't > have the MMIO

[PATCH RESEND] intel/pinctrl: check capability offset is between MMIO region

2021-03-24 Thread Roger Pau Monne
When parsing the capability list make sure the offset is between the MMIO region mapped in 'regs', or else the kernel hits a page fault. This fault has been seen when running as a Xen PVH dom0, which doesn't have the MMIO regions mapped into the domain physical memory map, despite having the