summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2011-08-30 14:22:22 +0000
committerbouyer <bouyer@NetBSD.org>2011-08-30 14:22:22 +0000
commit23c35c52354bfdc92b8d8be7b692cf073ea99dca (patch)
tree8db608a4280f211e8c5f7942c1dd17a3a4fd8783 /libexec
parentd5bb9cf50ec4c0871b2b9f0253ee84aae482c175 (diff)
Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted. For this, the bpf descriptor is flagged as compat32 (or not) in the open and ioctl functions (where the user process's pid is also updated in the descriptor). When the bpf buffer is filled in, the 32bits or native header is used depending on the information stored in the descriptor. This won't work if a 64bit binary does the open and ioctls, and then exec a 32bit program which will do the read. But this is very unlikely to happen in real life ... Tested on i386 and loongson; with these changes my loongson can run dhclient and tcpdump with a n32 userland.
Diffstat (limited to 'libexec')
0 files changed, 0 insertions, 0 deletions