summaryrefslogtreecommitdiff
path: root/sys/compat
AgeCommit message (Collapse)Author
2023-06-20linux32_rt_sendsig: Memset zero before copyout.riastradh
Not sure if there's any padding here, but it's a pretty big structure, fairly likely, so let's be rather safe than sorry. XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-06-20compat_ossaudio: Zero-initialize idat before copyout.riastradh
Unclear if there are any paths to the copyout without initialization, but let's play it safe to keep the auditing effort low. XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-06-20compat_sunos32: Memset zero before copyout.riastradh
Unclear if this can leak anything but let's be on the safe side. XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-04-09compat_linux32: KASSERT(A && B) -> KASSERT(A); KASSERT(B)riastradh
2023-03-30atalk(4): Omit spurious satosat.riastradh
The input is already a struct sockaddr_at pointer.
2023-02-12s/strucure/structure/ and s/structues/structures/ in comments.andvar
2023-02-12fix typo in the include guard definition.andvar
2022-12-24s/reqest/request/, s/requst/request/ and s/reuqest/request/ in comments.andvar
2022-12-20Remove sys/compat/common/Makefile.*.msaitoh
These files are not used anymore. Files for compat code are listed in sys/comapt/common/files.common and sys/modules/compat_xxx/Makefile. OK'd by riastradh@ and pgoyette@.
2022-12-19Create compat_100 module infrastructure now that we have branchedpgoyette
for NetBSD-10
2022-10-26sys: Put externs for time_adjtime and time_adjusted in .h files.riastradh
time_adjtime: sys/timex.h (defined in ntp code) time_adjusted: sys/timevar.h (defined in non-ntp code) (Not really sure this is a valuable distinction to maintain; there's non-ntp code that uses time_adjtime too.)
2022-10-12fix few typos in comments.andvar
2022-10-04Fix comment. No fucntional change.msaitoh
2022-09-28Simplify sys/compat/sys/sockio.h. No functional change intended.msaitoh
- Move some definitions from sys/compat/sockio.h to compat/net/if.h. struct oif_data in sockio.h and if_data50 are the same, so remove oif_data. Do the same thing to oifdatareq, too. - u_quad_t -> uint64_t. No functional change.
2022-09-28s/u_quad_t/uint64_t/. No functional change.msaitoh
2022-09-21compat_50_quota: reject invalid quota id types.dholland
Reported-by: syzbot+ce8391eb74a16e1967ab@syzkaller.appspotmail.com
2022-09-05G/C ISSET() macro copies. It has been defined in <sys/types.h> since 2006.tsutsui
2022-09-03Remove <net/netisr.h>thorpej
2022-08-07Remove extra whitespaces added by an ancient stupid script.tsutsui
2022-08-03sys/compat/common/if_media_80.c: Add kernel rcsid.riastradh
2022-07-10tty_43: Do unsigned arithmetic to avoid shift into sign bits.riastradh
Omit input validation -- it's not a great idea for compatibility with historical kernels, since they ignored the bits instead of rejecting them if set. With unsigned arithmetic, we get the same semantics as was previously assumed (discarding bits that get shifted into the sign bit or off into oblivion) without the formal undefined behaviour. Reported-by: syzbot+e408764cdd8c0c0ff535@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=8318f0039e68187cd8d27b2c520816fff3f7266a
2022-07-07ifioctl(9): Don't touch ifconf or ifreq until command is validated.riastradh
sys_ioctl validates the data pointer according to the command's size and direction. But userland may ioctl commands other than OSIOCGIFCONF or OOSIOCGIFCONF -- and if userland passes an IOC_VOID command, the argument is passed through verbatim and may be null. Reported-by: syzbot+19b1bf83e5481273eafc@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=f4c91a7dcd31901c80d91af6ed01456faf0a7286 Reported-by: syzbot+442c033feb784d055185@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=4a3a4b92dbe9695046ff17a5474cef52aed23e0b Reported-by: syzbot+4c87d0cdf7025741ea7a@syzkaller.appspotmail.com https://syzkaller.appspot.com/bug?id=3e5f42c998e43ad42da40dec3c7873e6aae187e4
2022-07-05s/retrys/retries/ in comments.andvar
2022-05-24s/build-in/built-in/ in comments.andvar
2022-05-22fix various small typos, mainly in comments.andvar
2022-05-20s/auxillary/auxiliary/ in comments.andvar
2022-04-23Implement support for mounting UDF in compat32reinoud
Fixes PR#56801
2022-03-12compat_30: Fix thinko in previous.riastradh
Let's not go into an infinite loop of stack smashing!
2022-03-12compat_30: Avoid what might be technically undefined behaviour.riastradh
Not sure advancing a user pointer by one for the purpose of making an equality test fail later on is actually likely to be a problem, but let's just pacify the sanitizer. Reported-by: syzbot+758b18164c5c444f4249@syzkaller.appspotmail.com
2022-02-09fix various typos in comments.andvar
2021-12-22Handle the SIOCGNBRINFO ioctl for compat32.roy
arp -a works with compat32 now. Credit to simonb@ for the ndp fix from which this is cribbed.
2021-12-11remove clause 3 from all my licenses that aren't conflicting withmrg
another copyright claim line. again. (i did this in 2008 and then did not update all of my personal templates.)
2021-12-10s/occured/occurred/ in comments, log messages and man pages.andvar
2021-12-05s/sytle/style/ in comment.msaitoh
2021-12-03fix various typos in comments, log messages and documentation.andvar
2021-12-03Fixed a bug in sigreturn that sigmask was not restored.ryo
2021-12-02regenryo
2021-12-02add prlimit64(2) syscall to COMPAT_LINUX and COMPAT_LINUX32ryo
2021-12-02don't call MODULE_HOOK_SET(), if exec_sigcode_alloc() fails.ryo
2021-11-30- uname should return "aarch64" or "aarch64_be" instead of "evbarm".ryo
- define LINUX_LARGEFILE64 to use rlimit instead of orlimit.
2021-11-27regenryo
2021-11-27Add pselect6(2) system call to COMPAT_LINUX32ryo
2021-11-26The changes on compat/linux/common/linux_termios.c should alsoryo
be applied to compat/linux32/common/linux_termios.c, and reduce diff. - remove duplicate fd_putfile(). This will be done after "goto out;". - catch up from compat/linux/common/linux_termios.c r1.26 TIOCSPTLCK - catch up from compat/linux/common/linux_termios.c r1.37 (TCOOFF/TCOON) of the TCXONC - catch up from compat/linux/common/linux_termios.c r1.39 FIOCLEX and FIONCLEX
2021-11-26Remove #error, fixes the build. I don't understand why this would not workchristos
on big endian. We use this construct to convert pointers everywhere else.
2021-11-26The internal architecture name of golang is "arm" or "arm64", which hasryo
different naming conventions from netbsd's machine[] or machine_arch[] ("earmv7", "aarch64", etc.) and cannot be used as is. Instead, use define LINUX_GO_RT0_SIGNATURE_ARCH{32,64}.
2021-11-26- LINUX_GO_RT0_SIGNATURE for compat_linux is no longer enabled by default.ryo
it is now defined in each arch same as the other *_SIGNATURE definitions. - add new LINUX32_GO_RT0_SIGNATURE for compat_linux32, and is defined in amd64 and aarch64.
2021-11-26Fix anonymous memory object leak for sigcode.ryo
- Repeating "modload compat_linux && /emul/linux/bin/ls && modunload compat_linux" will reproduce this problem. - It cause in exec_sigcode_map(), anon-object for sigcode was created at first exec, but it remained even after exec_remove. - Fixed that the anon-object for sigcode is created at exec_add(), and the anon-object reference is removed at exec_remove(). - sigobject_lock is no longer needed since it is locked by exec_lock. - The compat_16 module rewrites the e_sigcode entry in emul_netbsd directly and does not use exec_add()/exec_remove(), so it needs to call sigcode_alloc()/sigcode_free() on its own.
2021-11-25add support COMPAT_LINUX32 for aarch64ryo
2021-11-25Extra arguments for AT_HWCAP and AT_PLATFORM are now passed when executing ↵ryo
linux32 binaries. AT_SYSINFO (vsyscall) feature seems to be broken, so leave it commented out.
2021-11-25The default name of the `exec_setup_stack' function for linux32 should be ↵ryo
`linux32_exec_setup_stack', and it should be defined in each arch. declaration of linux32_exec_setup_stack() in linux32/amd64 has been removed because it does not exist. NFC.