From: Ralf Baechle <ralf@oss.sgi.com>
To: Kanoj Sarcar <kanoj@google.engr.sgi.com>
Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org,
alan@lxorguk.ukuu.org.uk, torvalds@transmeta.com
Subject: Re: flush_icache_range
Date: Sun, 23 Jul 2000 20:36:09 +0200 [thread overview]
Message-ID: <20000723203609.A903@bacchus.dhis.org> (raw)
In-Reply-To: <200007230107.SAA14200@google.engr.sgi.com>; from kanoj@google.engr.sgi.com on Sat, Jul 22, 2000 at 06:07:08PM -0700
On Sat, Jul 22, 2000 at 06:07:08PM -0700, Kanoj Sarcar wrote:
> Can anyone point out the logic of continued existance of flush_icache_range
> after the introduction of flush_icache_page()? I admit that
> flush_icache_range is still needed in the module loading code, but do we
> need it anymore in the a.out loading code? That code should be incurring
> page faults, which will do the flush_icache_page anyway. Seems like
> double work to me to do flush_icache_range again after the loading has
> been done.
binfmt_elf.c:load_aout_interp() uses file->f_op->read to read the interpreter
from disk, so actually need to use something else to flush the cache.
Similar for two of three cases in binfmt_aout.c. For these the page
fault won't sufficiently flush cashes.
> This argument to delete the flush_icache_range calls from the a.out
> loading code assumes that the f_op->read() code behaves sanely, ie does
> not do unexpected things like touch the user address (thus allocating
> the page, and doing the icache flush via the page fault handler much
> earlier) before it starts reading the a.out sections in ...
There is another MIPS specific problem with this routine. Originally
introduced for kernel modules the various incarnations of flush_icache_range
are not protected against access from userspace. Unable to handle kernel
paging request ahead ...
The other question is why we still have support for a.out ELF interpreters
in current kernels. I think it's more apropriate to create a patch which
disables support for a.out ELF interpreters for architectures which like
MIPS don't have an a.out history than fixing above problem thereby also
saving a bit of memory.
Ralf
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-07-23 18:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-23 1:07 flush_icache_range Kanoj Sarcar
2000-07-23 18:36 ` Ralf Baechle [this message]
2000-07-24 16:10 ` flush_icache_range Kanoj Sarcar
2000-07-25 0:06 ` flush_icache_range Ralf Baechle
2000-07-25 1:11 ` flush_icache_range Kanoj Sarcar
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=20000723203609.A903@bacchus.dhis.org \
--to=ralf@oss.sgi.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=kanoj@google.engr.sgi.com \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox