2016-04-11 08:41:02

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] char: Drop bogus dependency of DEVPORT on !M68K

According to full-history-linux commit d3794f4fa7c3edc3 ("[PATCH] M68k
update (part 25)"), port operations are allowed on m68k if CONFIG_ISA is
defined.

However, commit 153dcc54df826d2f ("[PATCH] mem driver: fix conditional
on isa i/o support") accidentally changed an "||" into an "&&",
disabling it completely on m68k. This logic was retained when
introducing the DEVPORT symbol in commit 4f911d64e04a44c4 ("Make
/dev/port conditional on config symbol").

Drop the bogus dependency on !M68K to fix this.

Fixes: 153dcc54df826d2f ("[PATCH] mem driver: fix conditional on isa i/o support")
Signed-off-by: Geert Uytterhoeven <[email protected]>
---
drivers/char/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index d3b8ddc6241cac2d..fa56bc757fe98fd1 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -585,7 +585,6 @@ config TELCLOCK

config DEVPORT
bool
- depends on !M68K
depends on ISA || PCI
default y

--
1.9.1


2016-04-20 19:43:14

by Al Stone

[permalink] [raw]
Subject: Re: [PATCH] char: Drop bogus dependency of DEVPORT on !M68K

On 04/11/2016 02:40 AM, Geert Uytterhoeven wrote:
> According to full-history-linux commit d3794f4fa7c3edc3 ("[PATCH] M68k
> update (part 25)"), port operations are allowed on m68k if CONFIG_ISA is
> defined.
>
> However, commit 153dcc54df826d2f ("[PATCH] mem driver: fix conditional
> on isa i/o support") accidentally changed an "||" into an "&&",
> disabling it completely on m68k. This logic was retained when
> introducing the DEVPORT symbol in commit 4f911d64e04a44c4 ("Make
> /dev/port conditional on config symbol").
>
> Drop the bogus dependency on !M68K to fix this.
>
> Fixes: 153dcc54df826d2f ("[PATCH] mem driver: fix conditional on isa i/o support")
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> ---
> drivers/char/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index d3b8ddc6241cac2d..fa56bc757fe98fd1 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -585,7 +585,6 @@ config TELCLOCK
>
> config DEVPORT
> bool
> - depends on !M68K
> depends on ISA || PCI
> default y
>
>

This solves the particular problem I was running into on an arm64 AMD Seattle
system. Thanks!

Tested-by: Al Stone <[email protected]>

--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
[email protected]
-----------------------------------

2016-04-21 09:15:25

by Paul Bolle

[permalink] [raw]
Subject: Re: [PATCH] char: Drop bogus dependency of DEVPORT on !M68K

On wo, 2016-04-20 at 13:43 -0600, Al Stone wrote:
> On 04/11/2016 02:40 AM, Geert Uytterhoeven wrote:
> > --- a/drivers/char/Kconfig
> > +++ b/drivers/char/Kconfig

> > config DEVPORT
> > bool
> > - depends on !M68K
> > depends on ISA || PCI
> > default y

> This solves the particular problem I was running into on an arm64 AMD Seattle
> system. Thanks!

That problem must be
lkml.kernel.org/g/[email protected] . Ie,
the fact that CONFIG_DEVPORT "cannot really be used and it allows us to
crash a kernel from user space" on arm64.

> Tested-by: Al Stone <[email protected]>

I fail to see how this patch helps your problem. And if one applies this
patch on top of v4.6-rc4 and does
make ARCH=arm64 defconfig

one gets a .config that still has
CONFIG_DEVPORT=y

So my guess is that it wasn't this patch that solved that arm64 problem.

Thanks,


Paul Bolle