All of lore.kernel.org
 help / color / mirror / Atom feed
From: jamie@shareable.org (Jamie Lokier)
To: linux-arm-kernel@lists.infradead.org
Subject: Runtime code modification fails on arm
Date: Tue, 10 Nov 2009 13:17:30 +0000	[thread overview]
Message-ID: <20091110131730.GA28509@shareable.org> (raw)
In-Reply-To: <343d1bca0911100508w1b5b62d8n8242abd7eb97a0c@mail.gmail.com>

Papalagi Pakeha wrote:
> Does anyone have an idea what could be wrong here? Why does it work on
> x86 but fails to pick up the decrypted instructions on ARM? FWIW we
> use Samsung S3C2410 with kernel 2.6.27 and gcc 4.2.4 with glibc 2.3.3
> toolchain.

On ARM, you have to flush the cache whenever you modify code, or even
generate code in a new area.  There is a system call for this.

Only the cache covering the modified range needs to be flushed.  It
must clean the D-cache and flush the I-cache.

You have to do this on several other architectures too.  x86 is
unusual in not needing it.

-- Jamie
 

  reply	other threads:[~2009-11-10 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-10 13:08 Runtime code modification fails on arm Papalagi Pakeha
2009-11-10 13:17 ` Jamie Lokier [this message]
2009-11-10 13:19 ` Matthieu CASTET
2009-11-10 19:17 ` Russell King - ARM Linux
2009-11-10 23:56   ` Papalagi Pakeha
2009-11-11  1:17     ` Papalagi Pakeha

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=20091110131730.GA28509@shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.