[PATCH] RFC: clean up mmap decoding

Dmitry V. Levin ldv at altlinux.org
Wed Feb 20 23:08:16 UTC 2013

On Mon, Feb 18, 2013 at 09:27:19PM +0100, Denys Vlasenko wrote:
> mmap handling is a mess. We try to merge too many similar,
> but different ways of decoding it. For example, sys_old_mmap
> is "params in memory" API... except SH[64], where it is
> "params in regs", i.e. what *sys_mmap* ("new mmap")
> does on other arches!
> It's much simpler when mmap handlers are cleanly split
> by API (whether params are in regs or in memory,
> and whether offset is byte or page).
> Then we just insert correct function pointers into
> arch syscall tables.
> It turns out there are only three common mmap APIs over
> all architectures which exist in Linux kernel,
> and two outliers (for SH and S390).
> A number of mmap decoders were plain wrong in arch tables.
> For example, BFIN has no old_mmap. It returns ENOSYS.
> I checked kernel sources.
> There was dead code for x86_64 for old_mmap:
> x86_64 has no old_mmap.
> I will polish this change a bit more, but it is largely complete.
> However, it is not that simple. Dmitry, can you look over this patch?

From a glance it looks good, but I haven't got enough time this week to
have a good look at the patch.  As you've already merged it, I suppose it
won't harm if I do it a bit later.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20130221/aca93edc/attachment.bin>

More information about the Strace-devel mailing list