All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sean MacLennan <smaclennan@pikatech.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Problem with module_init?
Date: Thu, 02 Apr 2009 15:26:02 +1100	[thread overview]
Message-ID: <1238646362.17330.186.camel@pasglop> (raw)
In-Reply-To: <20090402000803.087600da@lappy.seanm.ca>

On Thu, 2009-04-02 at 00:08 -0400, Sean MacLennan wrote:
> On Thu, 02 Apr 2009 09:24:43 +1100
> "Benjamin Herrenschmidt" <benh@kernel.crashing.org> wrote:
> 
> > I suspect I just screwed up the definition of PAGE_KERNEL_EXEC or
> > something like that.
> 
> Yup, that is exactly what you did ;) You left out _PAGE_HWEXEC. The
> following patch fixes the problem for me.

The proper fix is for PAGE_KERNEL_X to have _PAGE_HWEXEC. I'll fix that.

Cheers,
Ben.

> Cheers,
>    Sean
> 
> diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
> index d9740e8..a84f248 100644
> --- a/arch/powerpc/include/asm/pte-common.h
> +++ b/arch/powerpc/include/asm/pte-common.h
> @@ -167,7 +167,8 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
>  #endif
>  
>  /* Make modules code happy. We don't set RO yet */
> -#define PAGE_KERNEL_EXEC	PAGE_KERNEL_X
> +// #define PAGE_KERNEL_EXEC	PAGE_KERNEL_X
> +#define PAGE_KERNEL_EXEC __pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | _PAGE_HWEXEC)
>  
>  /* Advertise special mapping type for AGP */
>  #define PAGE_AGP		(PAGE_KERNEL_NC)

  reply	other threads:[~2009-04-02  4:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 18:37 Problem with module_init? Sean MacLennan
2009-04-01  3:11 ` Sean MacLennan
2009-04-01 11:27   ` Josh Boyer
2009-04-01 14:52     ` Sean MacLennan
2009-04-01 22:24     ` Benjamin Herrenschmidt
2009-04-02  4:08       ` Sean MacLennan
2009-04-02  4:26         ` Benjamin Herrenschmidt [this message]
2009-04-02  4:39           ` Sean MacLennan
2009-04-02  4:51             ` Sean MacLennan
2009-04-02  4:54               ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238646362.17330.186.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=smaclennan@pikatech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.