Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932583AbZJEL6j (ORCPT ); Mon, 5 Oct 2009 07:58:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932389AbZJEL6j (ORCPT ); Mon, 5 Oct 2009 07:58:39 -0400 Received: from mail-bw0-f210.google.com ([209.85.218.210]:60769 "EHLO mail-bw0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932336AbZJEL6h convert rfc822-to-8bit (ORCPT ); Mon, 5 Oct 2009 07:58:37 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=A1tZvLjEDJWoe2yslveNEzxUebjdAdvozzqXINB2c09MWtTmzWZzufYPbgxGdwXyIt lftMtJ3DUe7QZjpGCo4MH3GGZRFSHnIkTv8KAeBzwxYiGRgCP/jdB9M0pJNR1BKw7J8R XO+BvxJH+jHKPEzS5ok1+ZeDz2liX7jgcRZLY= MIME-Version: 1.0 In-Reply-To: <817ecb6f0909220849t2142f6bdhdeb0180dedc646d2@mail.gmail.com> References: <817ecb6f0909101950v2fc6dc6u5cbc40cd9a9dde77@mail.gmail.com> <20090921214046.GA17243@redhat.com> <817ecb6f0909220849t2142f6bdhdeb0180dedc646d2@mail.gmail.com> Date: Mon, 5 Oct 2009 07:57:59 -0400 Message-ID: <817ecb6f0910050457v5db02550m62c742f679b26577@mail.gmail.com> Subject: Re: [PATCH v6] RO/NX protection for loadable kernel modules From: Siarhei Liakh To: Dave Jones , Siarhei Liakh , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-next@vger.kernel.org, Arjan van de Ven , James Morris , Andrew Morton , Andi Kleen , Thomas Gleixner , "H. Peter Anvin" , Ingo Molnar , Rusty Russell , Stephen Rothwell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 29 On Tue, Sep 22, 2009 at 11:49 AM, Siarhei Liakh wrote: >> Hi Siarhei, >> ?I tried out this patch on 2.6.31, and got the following trace during bootup.. >> >> ------------[ cut here ]------------ >> WARNING: at kernel/trace/ftrace.c:1003 ftrace_bug+0x198/0x27e() (Not tainted) >> Hardware name: VGN-Z540N > ... >> ---[ end trace 95b33ebf87286ae6 ]--- >> ftrace faulted on writing [] video_output_register+0x11/0x10a [output] >> >> >> I guess ftrace is trying to NOP out something in the modules which >> are marked read-only ? > > Entirely possible. I will review ftrace and make sure the patch > accounts for this. I've posted new version of the patch that also sets each module's text as RW when ftrace preps the kernel for modifications: [PATCH v7] RO/NX protection for loadable kernel modules Let me know how that works for you. Thank you. -- 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/