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: Paul Goyette <paul%whooppee.com@localhost>
To: Rin Okuyama <rokuyama%rk.phys.keio.ac.jp@localhost>
Cc: matthew green <mrg%eterna.com.au@localhost>, gnats-bugs%NetBSD.org@localhost, 
    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 17:09:23 +0800 (+08)

 On Fri, 12 Oct 2018, Rin Okuyama wrote:
 
 > On 2018/10/12 15:04, matthew green wrote:
 >> i also notice that BIOCGRTIMEOUT needs handling too.
 >
 > Oops, we also need BIOC[GS]ORTIMEOUT when COMPAT_50:
 >
 > https://nxr.netbsd.org/xref/src/sys/net/bpf.h#132
 >
 > Is it OK to have #ifdef COMPAT_50 (or equivalently,
 > #ifdef BIOC[GS]ORTIMEOUT) in netbsd32_ioctl.c?
 
 Oh, joy!  Here comes another conflict with the pgoyette-compat
 branch!
 
 But YES, for now it would be acceptable to have a #ifdef COMPAT_50
 block.  I will extract the conditional code and move it into
 compat/netbsd32/netbsd32_compat_50.c and provide an appropriate
 linkage/hook.
 
 (Actually, this prompted me to look at the existing code on my
 branch, and it seems I've still got some clean-up work to do here
 for compat32_50_rnd_ioctl() - the "hook" needs to use the new
 MP-safe mechanism to prevent the module code from being unloaded
 while the code is executing!)
 
 
 > Anyway, I would like to decide the way before proceeding further.
 >
 > (1) add unused "u_long cmd" argument to all netbsd32_{to,from}_foo()
 > functions in netbsd32_conv.h, and move netbsd32_{to,from}_foo() in
 > netbsd32_ioctl.c to netbsd32_conv.h
 >
 > or
 >
 > (2) leave preprocessor mess as is
 >
 > or
 >
 > (3) other
 >
 > Paul, how do you think?
 
 Neither 1 nor 2 "feels right" to me.  But I don't have any better
 choice to offer.
 
 
 +------------------+--------------------------+----------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
 +------------------+--------------------------+----------------------------+
 


Home | Main Index | Thread Index | Old Index