mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Al Stone <ahs3@redhat.com>
Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] arm64: CONFIG_DEVPORT should not be used when PCI is being used
Date: Wed, 6 Apr 2016 17:18:19 -0700	[thread overview]
Message-ID: <20160407001819.GB9228@kroah.com> (raw)
In-Reply-To: <1459978040-2226-1-git-send-email-ahs3@redhat.com>

On Wed, Apr 06, 2016 at 03:27:20PM -0600, Al Stone wrote:
> On arm64 systems, using /dev/port does not really make sense; this is
> historically used for other architectures to access ISA IO ports, which
> with any luck do not exist on arm64 platforms.  With the following snippet
> of perl code (from Jeff Bastian <jbastian@redhat.com>), we can reliably
> panic an arm64 system with PCI enabled:
> 
> 	#!/usr/bin/perl -w
> 	# extracted from sensors-detect from lm_sensors
> 	# to reproduce kernel crash when probing the
> 	# Super-I/O ports
> 	use Fcntl qw(:DEFAULT :seek);
> 	sysopen(IOPORTS, "/dev/port", O_RDWR);
> 	binmode(IOPORTS);
> 	sysseek(IOPORTS, 0x2e, 0);
> 	syswrite(IOPORTS, pack("C", 0x0d), 1);
> 
> So, make sure CONFIG_DEVPORT cannot be set on arm64; it cannot really be
> used and it allows us to crash a kernel from user space.
> 
> Signed-off-by: Al Stone <ahs3@redhat.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/char/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
> index b272397..c532f62 100644
> --- a/drivers/char/Kconfig
> +++ b/drivers/char/Kconfig
> @@ -587,7 +587,7 @@ config TELCLOCK
>  
>  config DEVPORT
>  	bool
> -	depends on !M68K
> +	depends on !M68K && !ARM64

Why not fix the real bug here, it's odd that only these two arches need
this disabled, don't you agree?

thanks,

greg k-h

  reply	other threads:[~2016-04-07  0:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 21:27 Al Stone
2016-04-07  0:18 ` Greg Kroah-Hartman [this message]
2016-04-07  7:26   ` Geert Uytterhoeven
2016-04-07 15:56     ` Al Stone
2016-04-09  2:21       ` Arnd Bergmann
2016-04-12  5:17       ` Jon Masters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160407001819.GB9228@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ahs3@redhat.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®