[2.2.13] ZMAGIC executable dumps core

Marc Lefranc (Marc.Lefranc@nordnet.fr)
22 Oct 1999 00:35:49 +0200


System : RH5.2 + 2.2 upgrades + linux-2.2.13

I have just installed 2.2.13 at home, coming from 2.2.12, and a ZMAGIC
executables of xdvi (from an old TeX distribution I still have around)
dumps core on launch. Going back to 2.2.12, everything is fine.

I have the same executable at work which runs fine with 2.2.13pre15,
and will try to see in which 2.2.13preXX this appeared.

Of course, this is not much of a problem as an upgrade of my TeX setup
is long overdue, but I mention it in case this might be a symptom of
something more important (last time I reported about this executable
being broken, it was due to a problem with a.out programs executed
over NFS :-)

The following error messages appear in /var/log/messages :

Oct 21 16:03:45 socrate kernel: fd_offset is not page aligned. Please
convert program: xdvi

Oct 21 16:03:45 socrate kernel: N_TXTOFF is not page aligned. Please
convert library: libXaw.so.3.1.0

There is also a warning about virtex, which however does not dump
core.

1042 $ locate libXaw.so.3.1.0
/usr/i486-linuxaout/lib/libXaw.so.3.1.0

Now, I understand I should do something to convert these files :-),
but what surprises me is that recent versions of the kernel handled
them fine, and I found nothing in the release notes.

The error messages seems to come from fs/binfmt_aout.c:409 :

if ((fd_offset & ~PAGE_MASK) != 0 &&
(jiffies-error_time) > 5*HZ)
{
printk(KERN_WARNING
"fd_offset is not page aligned. Please convert program: %s\n",
file->f_dentry->d_name.name
);
error_time = jiffies;
}

and from fs/binfmt_aout.c:539 :

if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) {
static unsigned long error_time;

if ((jiffies-error_time) > 5*HZ)
{
printk(KERN_WARNING
"N_TXTOFF is not page aligned. Please convert library: %s\n",
file->f_dentry->d_name.name);
error_time = jiffies;
}

Looking at the patch, I see that similar warnings (about converting
the files) were present in older versions of the kernel. However, they
were not triggered at all by this executable :

--- v2.2.12/linux/fs/binfmt_aout.c Mon May 10 13:01:21 1999
+++ linux/fs/binfmt_aout.c Tue Oct 19 17:14:01 1999
@@ -322,21 +322,6 @@

fd_offset = N_TXTOFF(ex);

-#ifdef __i386__
- if (N_MAGIC(ex) == ZMAGIC && fd_offset != BLOCK_SIZE) {
- printk(KERN_NOTICE "N_TXTOFF != BLOCK_SIZE. See a.out.h.\n");
- return -ENOEXEC;
- }
-
- if (N_MAGIC(ex) == ZMAGIC && ex.a_text &&
- bprm->dentry->d_inode->i_op &&
- bprm->dentry->d_inode->i_op->bmap &&
- (fd_offset < bprm->dentry->d_inode->i_sb->s_blocksize)) {
- printk(KERN_NOTICE "N_TXTOFF < BLOCK_SIZE. Please convert binary.\n");
- return -ENOEXEC;
- }
-#endif
-

All the best,
Marc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/