Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbaDAXAA (ORCPT ); Tue, 1 Apr 2014 19:00:00 -0400 Received: from mail-ob0-f170.google.com ([209.85.214.170]:51186 "EHLO mail-ob0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751371AbaDAW76 (ORCPT ); Tue, 1 Apr 2014 18:59:58 -0400 MIME-Version: 1.0 In-Reply-To: <533B43B2.1020805@codeaurora.org> References: <1392339850-18686-1-git-send-email-keescook@chromium.org> <1392339850-18686-3-git-send-email-keescook@chromium.org> <20140214162257.GB2331@e103592.cambridge.arm.com> <20140217123415.GA2182@e103592.cambridge.arm.com> <532F2C48.6050509@codeaurora.org> <1395658064.3465.7.camel@linaro1.home> <533B43B2.1020805@codeaurora.org> Date: Tue, 1 Apr 2014 15:59:57 -0700 X-Google-Sender-Auth: 4nFcfWORaUXW-vcPgD6rxuJeDbQ Message-ID: Subject: Re: [PATCH 2/2] ARM: mm: keep rodata non-executable From: Kees Cook To: Laura Abbott Cc: "Jon Medhurst (Tixy)" , Catalin Marinas , Will Deacon , Larry Bassel , Stephen Rothwell , Russell King , Nicolas Pitre , Ben Dooks , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Grant Likely , Dave Martin , Jiang Liu , Christoffer Dall , Marc Zyngier , Rob Herring , Vitaly Andrianov , "linux-arm-kernel@lists.infradead.org" , Simon Baatz , Jonathan Austin , Greg Kroah-Hartman , LKML , Santosh Shilimkar , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 1, 2014 at 3:54 PM, Laura Abbott wrote: > On 4/1/2014 3:34 PM, Kees Cook wrote: >> On Mon, Mar 24, 2014 at 3:47 AM, Jon Medhurst (Tixy) wrote: >>> On Sun, 2014-03-23 at 16:21 -0600, Kees Cook wrote: >>>> For this stage, how about I make this "depends on KEXEC=n && >>>> KPROBES=n"? >>> >>> There's also ftrace (CONFIG_DYNAMIC_FTRACE I believe) which modifies >>> kernel code with a call to probe_kernel_write(), which GDB uses as well. >>> >>> And grepping for the patch_text() function also shows >>> __arch_jump_label_transform() modifies kernel code. Not sure how and >>> when that gets used. >> >> Right, so, I'm trying to fix ftrace now, and I've hit a wall. It is as >> if changes to the kernel text PMD aren't being noticed after the >> kernel is running. Does anyone know why this might be happening? >> >> Code and details here: >> https://lkml.org/lkml/2014/4/1/674 >> >> -Kees >> > > We had a flush_tlb_kernel_page after the pmd_flush in our out of tree code > which makes the text writeable in __patch_text. I tried flush_tlb_kernel_range(), which I'd expect to do the same thing. I can try with _page() too. -Kees -- Kees Cook Chrome OS Security -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/