Subject: kern/8420: old COMPAT_43 lseek() does not work on COMPAT_AOUT environment
To: None <gnats-bugs@gnats.netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 09/16/1999 05:51:02
>Number:         8420
>Category:       kern
>Synopsis:       old COMPAT_43 lseek() does not work on COMPAT_AOUT environment
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 16 05:50:00 1999
>Last-Modified:
>Originator:     Izumi Tsutsui
>Organization:
Izumi Tsutsui	Himeji City, Japan
>Release:        NetBSD-current 19990914
>Environment:
System: NetBSD mirage 1.4K NetBSD 1.4K (MIRAGE) #82: \
Thu Sep 16 21:01:51 JST 1999

>Description:
The old COMPAT_43 lseek() in a.out binary does not work
on COMPAT_AOUT environment.

>How-To-Repeat:
Run Netscape Navigator 3.04 for BSD x86 version on NetBSD/i386 current
with a.out emulation. It can not read "history.db" properly and
links would not be updated. ktrace(1) output says:

   911 netscape CALL  compat_43_olseek(0x7,0,0,0x59d800,0xefbfbd24)
   911 netscape RET   compat_43_olseek -1 errno 22 Invalid argument
   911 netscape CALL  compat_43_olseek(0x7,0,0,0x59d800,0xefbfbd0c)
   911 netscape RET   compat_43_olseek -1 errno 22 Invalid argument

>Fix:
Fix /sys/compat/aout/syscalls.master and regen related files.

--- sys/compat/aout/syscalls.master.orig	Thu Sep 16 21:13:35 1999
+++ sys/compat/aout/syscalls.master	Thu Sep 16 21:00:55 1999
@@ -83,7 +83,7 @@
 17	NOARGS		{ int sys_obreak(char *nsize); } break
 18	NOARGS		{ int sys_getfsstat(struct statfs *buf, long bufsize, \
 			    int flags); }
-19	NOARGS		{ long sys_lseek(int fd, long offset, int whence); } \
+19	NOARGS		{ long compat_43_sys_lseek(int fd, long offset, int whence); } \
 			    olseek
 20	NOARGS		{ pid_t sys_getpid(void); }
 21	STD		{ int aout_sys_mount(const char *type, \

---
>Audit-Trail:
>Unformatted: