Re: [PATCH] sparc: Fail userspace mmap for disabled PCI I/O and MEM BARs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* David Miller <davem@xxxxxxxxxxxxx> [161221 14:13]:
> From: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
> Date: Wed, 21 Dec 2016 13:43:38 -0500
> 
> > Check if the PCI memory starting address is disabled and return -EINVAL.
> > This will have minimal impact to performance as it is only during the
> > set up of the mmap and will avoid consequences of a failed load/store.
> > 
> > Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
> 
> Some X server or similar userland application may be depending upon
> the current behavior.
> 
> I'd rather not check, and let the user take the SIGBUS if it tries
> to access it.
> 
> Furthermore, the user can legitimately map a disabled BAR then enable
> it with PCI config accesses.
> 
> So I'm not applying this, sorry.


I appreciate you taking the time to tell me how this patch is not the
right way to fix this issue.  I will rework my solution to this issue to
behave in a more appropriate manner.

I should have mentioned that this patch isn't to remap a SIGBUS to an
-EINVAL, it's to stop the system from a panic due to a non-recoverable
error occurring when trying to read an mmap'ed resource that is not
enabled.

Thank you,
Liam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux