| Age | Commit message (Collapse) | Author |
|
The input is already a struct sockaddr_at pointer.
|
|
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@.
|
|
for NetBSD-10
|
|
- 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.
|
|
Reported-by: syzbot+ce8391eb74a16e1967ab@syzkaller.appspotmail.com
|
|
|
|
|
|
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
|
|
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
|
|
Let's not go into an infinite loop of stack smashing!
|
|
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
|
|
|
|
|
|
- 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.
|
|
|
|
newer standardized name. NFC.
|
|
Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
|
|
(thanks Trend Micro for the report)
- use do_fhstat
- consistency in argument order of compat functions
|
|
|
|
Minor KNF along the way.
|
|
belatedly re-enable inclusion of the compat_60 x86 microcode code in
the loadable module. (It was already being included in the built-in
version of the module.)
|
|
done with dogetitimer().
|
|
|
|
This should reduce loading the compat module.
|
|
Passing a negative value to these legacy compat ioctls results in
left shift on a negative value which is undefined behaviour and results
in the tty (at least, possibly other things) locking up.
The argument to the ioctl should always be > 0. Return EINVAL otherwise.
While here, adjustments to code style to match current guidelines.
Found by UBSan.
Reported-by: syzbot+39cd551a05298b222756@syzkaller.appspotmail.com
|
|
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.
- Narrow it to files that actually need it -- mostly files that need
to query whether curlwp is the pagedaemon, which should maybe be
exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
by it. We should split up uvm_extern.h but this will serve for now
to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
UVMHIST(ubchist), since ubchist is declared in uvm.h but the
reference evaporates if UVMHIST is not defined, so we reduce header
file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while
here.
ok chs@
|
|
|
|
Reported-by: syzbot+e71a77402d6668f1868d@syzkaller.appspotmail.com
|
|
|
|
via kmem_alloc()
|
|
not necessary; this removes the only places in kernel which did namei
LOOKUP with LOCKPARENT
fixes diagnostic KASSERT() in namei() code
Reported-by: syzbot+628382ecf1438e53d08d@syzkaller.appspotmail.com
|
|
This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html
Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.
Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.
Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).
|
|
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
|
|
|
|
the set-up functions will be called, so it is perfectly acceptable
for a compat code's routine to be called ahead of the code in other
parts of the kernel.
So make sure that the 2nd level sysctl node ``vfs.generic'' exists
before trying to add the 3rd level entries.
XXX Rather than creating the 2nd level node in two places, we could
XXX add the shared ``vfs.generic'' node to sysctl_init_base.c but
XXX this is left for another day.
|
|
|
|
Should fix PR kern/55025
XXX pullup-9
|
|
|
|
handled by the module infrastructure.
|
|
|
|
field of the structure, no functional change
|
|
since this syscall is privileged.
|
|
- limit size range
- fix type botch for "size"
from maxv@
|
|
single threaded case. Replace scans of p->p_lwps with lookups in the
tree. Find free LIDs for new LWPs in the tree. Replace the hashed sleep
queues for park/unpark with lookups in the tree under cover of a RW lock.
- lwp_wait(): if waiting on a specific LWP, find the LWP via tree lookup and
return EINVAL if it's detached, not ESRCH.
- Group the locks in struct proc at the end of the struct in their own cache
line.
- Add some comments.
|
|
|
|
make rump happy.
Rump doesn't have compat modules (the compat code is included in the
relevant librump*.so), so there's no module compat_50 listed in
link_set_modules, and thus ocryptodev's MODULE(...) can't "require"
it.
This fixes the problem of "built-in module compat_50 not found" when
starting up rump_allserver (or rump_server with -l rumpdev_opencrypto).
XXX This does not resolve the long-standing "crypto: unable to
XXX register devsw, error 17" message noted at line 78 of
XXX sys/rump/dev/lib/libopencrypto/opencrypto_component.c
|
|
compat_50 rather than compat_60 module.
|
|
stuff from the rest of the module. This allows loading of the
(main) compat_50 module on kernels that don't include ``options
QUOTA''.
Welcome to 9.99.40 !
Addresses PR kern/54875
|
|
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
|
|
or separately loaded). This will enable running of old vmstat(1) images
on newer kernels.
|