NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53666: tcpdump for i386 does not work with COMPAT_NETBSD32 on amd64



The following reply was made to PR kern/53666; it has been noted by GNATS.

From: Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost>
To: matthew green <mrg%eterna.com.au@localhost>, gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/53666: tcpdump for i386 does not work with COMPAT_NETBSD32
 on amd64
Date: Fri, 12 Oct 2018 14:12:01 +0900

 Hi,
 
 On 2018/10/12 13:23, matthew green wrote:
 >> +#define netbsd32_to_timeval(p, s32p, cmd) netbsd32_to_timeval(p, s32p)
 >> +#define netbsd32_from_timeval(p, s32p, cmd) netbsd32_from_timeval(p, s32p)
 > 
 > i guess we should make netbsd32_to_timeval() and
 > netbsd32_from_timeval() take an unused cmd argument.
 > then your workaround shouldn't be needed.
 > 
 > can you work on this?  thanks.
 
 Well, it should be an option. However, we have more than 40 functions
 of netbsd32_{to,from}_foo() in netbsd32_conv.h. Do you think all of
 them should take an unused cmd argument?
 
 Also, whereas majority of functions in netbsd32_conv.h have form of
 
    void netbsd_to_foo(struct netbsd32_foo *, struct foo *),
 
 some functions are not. For example, netbsd32_to_iovecin() requires
 third argument for array length and returns an integer as error:
 
    https://nxr.netbsd.org/xref/src/sys/compat/netbsd32/netbsd32_conv.h#241
 
 These functions cannot be used from netbsd32_ioctl.[ch] in the present
 form. Just add a cmd argument for now, and modify netbsd32_ioctl.[ch]
 when it becomes really necessary?
 
 If we add a cmd argument for netbsd32_conv.h, netbsd32_{to,from}_foo()
 functions in netbsd32_ioctl.c may be moved into netbsd32_conv.h.
 
 Thanks,
 rin
 


Home | Main Index | Thread Index | Old Index