From patchwork Tue Apr 1 10:04:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Holler X-Patchwork-Id: 3919961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D207DBF540 for ; Tue, 1 Apr 2014 10:19:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7342201BF for ; Tue, 1 Apr 2014 10:19:19 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D694B2017D for ; Tue, 1 Apr 2014 10:19:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUvmj-0001GA-Qo; Tue, 01 Apr 2014 10:19:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUvmh-0003p4-EJ; Tue, 01 Apr 2014 10:19:11 +0000 Received: from h1446028.stratoserver.net ([85.214.92.142] helo=mail.ahsoftware.de) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WUvmf-0003ns-0K for linux-arm-kernel@lists.infradead.org; Tue, 01 Apr 2014 10:19:09 +0000 Received: by mail.ahsoftware.de (Postfix, from userid 65534) id 9F373423C290; Tue, 1 Apr 2014 12:18:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from eiche.ahsoftware (p57B220DA.dip0.t-ipconnect.de [87.178.32.218]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ahsoftware.de (Postfix) with ESMTPSA id 8BD03423C270 for ; Tue, 1 Apr 2014 12:18:36 +0200 (CEST) Received: by eiche.ahsoftware (Postfix, from userid 65534) id AB71480D83; Tue, 1 Apr 2014 12:18:33 +0200 (CEST) Received: from krabat.ahsoftware (unknown [192.168.207.2]) by eiche.ahsoftware (Postfix) with ESMTP id 699C780CF1; Tue, 1 Apr 2014 10:04:20 +0000 (UTC) From: Alexander Holler To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm: don't allow CONFIG_DEBUG_SET_MODULE_RONX if CONFIG_JUMP_LABEL is enabled Date: Tue, 1 Apr 2014 12:04:17 +0200 Message-Id: <1396346657-7166-1-git-send-email-holler@ahsoftware.de> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140401_061909_151806_6ABEC071 X-CRM114-Status: GOOD ( 12.69 ) X-Spam-Score: -1.9 (-) Cc: Laura Abbott , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Russell King , Alexander Holler X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP CONFIG_DEBUG_SET_MODULE_RONX sounds like a nice security feature, but things might fail late (and unexpected) if module code is set to read-only while CONFIG_JUMP_LABEL is enabled (e.g. modprobe bridge). Avoid this. Signed-off-by: Alexander Holler --- arch/arm/Kconfig.debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0531da8..6627b9e 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1197,7 +1197,7 @@ config PID_IN_CONTEXTIDR config DEBUG_SET_MODULE_RONX bool "Set loadable kernel module data as NX and text as RO" - depends on MODULES + depends on MODULES && !JUMP_LABEL ---help--- This option helps catch unintended modifications to loadable kernel module's text and read-only data. It also prevents execution