Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754277AbcDFV12 (ORCPT ); Wed, 6 Apr 2016 17:27:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56103 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbcDFV10 (ORCPT ); Wed, 6 Apr 2016 17:27:26 -0400 From: Al Stone To: linux-kernel@vger.kernel.org Cc: ahs3@redhat.com, Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH] arm64: CONFIG_DEVPORT should not be used when PCI is being used Date: Wed, 6 Apr 2016 15:27:20 -0600 Message-Id: <1459978040-2226-1-git-send-email-ahs3@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 41 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 ), 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 Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- 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 depends on ISA || PCI default y -- 1.8.3.1