Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-18 Thread Benjamin Herrenschmidt
> > * Super-I/O chips at 0x2e/0x2f and 0x4e/0x4f. > > * Legacy PC hardware monitoring chips at 0x290-0x297. > > * IPMI interface at 0x0ca3 and 0x0cab (read-only). > > Please tell me which ones should be skipped on PowerPC. Skip the whole thing. I consider that on a powerpc linux port, the pla

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-18 Thread Arjan van de Ven
On Mon, 18 Feb 2008 21:58:42 +0100 Jean Delvare <[EMAIL PROTECTED]> wrote: > On Tue, 19 Feb 2008 07:42:03 +1100, Benjamin Herrenschmidt wrote: > > > > > Maybe Christian's patch can be improved to not do the check on > > > these? As long as /dev/port exists, it seems reasonable that the > > > kern

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-18 Thread Jean Delvare
On Tue, 19 Feb 2008 07:42:03 +1100, Benjamin Herrenschmidt wrote: > > > Maybe Christian's patch can be improved to not do the check on these? > > As long as /dev/port exists, it seems reasonable that the kernel should > > behave, no matter what I/O ports are accessed from user-space. > > nonsense

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-18 Thread Benjamin Herrenschmidt
> Maybe Christian's patch can be improved to not do the check on these? > As long as /dev/port exists, it seems reasonable that the kernel should > behave, no matter what I/O ports are accessed from user-space. nonsense. /dev/mem exists for example, but you are still not supposed to go bang all

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-18 Thread Jean Delvare
Hi Ben, On Thu, 14 Feb 2008 07:42:54 +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2008-02-13 at 18:35 +0100, Christian Krafft wrote: > > sensors_detect crashes kernel on PowerPC, as it pokes directly to memory. For the records, sensors-detect accesses I/O ports, not memory. > > This patch a

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-13 Thread Arnd Bergmann
On Wednesday 13 February 2008, Benjamin Herrenschmidt wrote: > On Wed, 2008-02-13 at 18:35 +0100, Christian Krafft wrote: > > sensors_detect crashes kernel on PowerPC, as it pokes directly to memory. > > This patch adds a check_legacy_ioports to read_port and write_port. > > It will now return ENXI

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-13 Thread Benjamin Herrenschmidt
On Wed, 2008-02-13 at 18:35 +0100, Christian Krafft wrote: > sensors_detect crashes kernel on PowerPC, as it pokes directly to memory. > This patch adds a check_legacy_ioports to read_port and write_port. > It will now return ENXIO, instead of oopsing. > > Signed-off-by: Christian Krafft <[EMAIL

Re: [Patch 0/2] powerpc: avoid userspace poking to legacy ioports

2008-02-13 Thread Christian Krafft
sensors_detect crashes kernel on PowerPC, as it pokes directly to memory. This patch adds a check_legacy_ioports to read_port and write_port. It will now return ENXIO, instead of oopsing. Signed-off-by: Christian Krafft <[EMAIL PROTECTED]> Index: linux.git/drivers/char/mem.c =