Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753783AbaDCXO4 (ORCPT ); Thu, 3 Apr 2014 19:14:56 -0400 Received: from mail-ob0-f178.google.com ([209.85.214.178]:64716 "EHLO mail-ob0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753142AbaDCXOy (ORCPT ); Thu, 3 Apr 2014 19:14:54 -0400 MIME-Version: 1.0 In-Reply-To: References: <1396346657-7166-1-git-send-email-holler@ahsoftware.de> <533AFF77.5030106@codeaurora.org> Date: Thu, 3 Apr 2014 16:14:54 -0700 X-Google-Sender-Auth: DCN9_v_5wEGYTjf77c-Rc_5Ge2o Message-ID: Subject: Re: [PATCH] arm: don't allow CONFIG_DEBUG_SET_MODULE_RONX if CONFIG_JUMP_LABEL is enabled From: Kees Cook To: Rabin Vincent Cc: Laura Abbott , Alexander Holler , "linux-arm-kernel@lists.infradead.org" , Catalin Marinas , Will Deacon , LKML , Russell King 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 4:08 PM, Rabin Vincent wrote: > 2014-04-01 20:36 GMT+02:00 Kees Cook : >> Is there something "sticky" about PMD sections that I'm not aware of? >> Even after calling set_kernel_text_rw(), any writes to kernel memory >> fault. :( > > section_update() updates init_mm, but each mm has a copy of the first > level page tables. So your updates to init_mm won't be visibile to > currently running processes. (Have a look at arch/arm/mm/ioremap.c's > vmalloc_seq stuff for some background on how section support is > handled on non-SMP; the vmalloc code doesn't use sections on SMP.) Ah-ha! This is the missing piece of information for me. :) > Here's a patch (probably whitespace damaged, hence also attached) with > which dynamic ftrace works for me on top your other paches. Tested on > a non-LPAE SMP. Thanks! I'll incorporate calls to set_all_modules_text_rw/ro and see what I can make work. -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/