History log of /openbsd-src/sys/kern/kern_prot.c (Results 1 – 25 of 83)
Revision Date Author Comments
# 56128702 08-Oct-2024 claudio <claudio@openbsd.org>

Adjust lock requirements for ps_pptr, ps_ppid and ps_oppid.

ps_pptr, ps_ppid and ps_oppid require the KERNEL_LOCK and the process mutex
to be modified. At the same time either KERNEL_LOCK or process

Adjust lock requirements for ps_pptr, ps_ppid and ps_oppid.

ps_pptr, ps_ppid and ps_oppid require the KERNEL_LOCK and the process mutex
to be modified. At the same time either KERNEL_LOCK or process mutex needs
to be taken to read the values.

This is needed to further unlock ptsignal().
OK kettenis@, mvs@

show more ...


# 574d834c 09-Jan-2023 guenther <guenther@openbsd.org>

setthrname() should return EINVAL, not ENAMETOOLONG, when the
input is too long.

ok mpi@


# cef5a146 07-Jan-2023 guenther <guenther@openbsd.org>

Add {get,set}thrname(2) for putting thread names in the kernel and
exposed in a new field returned by sysctl(KERN_PROC). Update
pthread_{get,set}_name_np(3) to use the syscalls. Show them, when
set

Add {get,set}thrname(2) for putting thread names in the kernel and
exposed in a new field returned by sysctl(KERN_PROC). Update
pthread_{get,set}_name_np(3) to use the syscalls. Show them, when
set, in ps -H and top -H output.

libc and libpthread minor bumps

ok mpi@, mvs@, deraadt@

show more ...


# 0d280c5f 14-Aug-2022 jsg <jsg@openbsd.org>

remove unneeded includes in sys/kern
ok mpi@ miod@


# a97e0511 17-Mar-2022 visa <visa@openbsd.org>

Use the refcnt API with struct ucred.

OK bluhm@


# da571ddd 24-Oct-2021 jsg <jsg@openbsd.org>

use NULL not 0 for pointer values in kern
ok semarie@


# 9e1c4ad6 17-Jan-2021 mvs <mvs@openbsd.org>

Cache parent's pid as `ps_ppid' and use it instead of `ps_pptr->ps_pid'.
This allows us to unlock getppid(2).

ok mpi@


# c05fa0b5 09-Jul-2019 bluhm <bluhm@openbsd.org>

The system calls getgroups(2) and setgroups(2) pass the number of
groups as signed int. Do not use unsigned int within the kernel
for length calculations. Now getgroups(2) fails with EINVAL if
call

The system calls getgroups(2) and setgroups(2) pass the number of
groups as signed int. Do not use unsigned int within the kernel
for length calculations. Now getgroups(2) fails with EINVAL if
called with negative length value.
from Moritz Buhl; OK millert@

show more ...


# 8a2417c3 22-Jun-2018 visa <visa@openbsd.org>

tweak comment


# 0ff991d2 21-Jun-2018 visa <visa@openbsd.org>

Use atomic operations for updating cred structure reference counts
to make crfree() and crhold() MP-safe. Make crhold() a proper function.
Put the definition into file kern_prot.c to constrain the ne

Use atomic operations for updating cred structure reference counts
to make crfree() and crhold() MP-safe. Make crhold() a proper function.
Put the definition into file kern_prot.c to constrain the need of the
<sys/atomic.h> header.

While there, adjust the IPL of ucred_pool to avoid lock order problems
with the kernel lock (pointed out by kettenis@).

OK mpi@

show more ...


# 45c2dfd4 20-Feb-2018 mpi <mpi@openbsd.org>

Introduce enternewpgrp() & enterthispgrp(), from FreeBSD via guenther@.

This code shuffling will ease the introduction of the proctree lock
in sys_setsid() and sys_setpgid().

Extracted from a large

Introduce enternewpgrp() & enterthispgrp(), from FreeBSD via guenther@.

This code shuffling will ease the introduction of the proctree lock
in sys_setsid() and sys_setpgid().

Extracted from a larger diff from guenther@, ok visa@

show more ...


# 3e676399 19-Feb-2018 mpi <mpi@openbsd.org>

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from mill

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

show more ...


# 1f6a3d24 27-Sep-2017 deraadt <deraadt@openbsd.org>

guenther sleep-commited the version without #ifdefs


# c742113d 27-Sep-2017 guenther <guenther@openbsd.org>

amd64 needs FS.base values (the TCB pointer) to be validated, as noncanonical
addresses will cause a fault on load by the kernel.

Problem observed by Maxime Villard
ok kettenis@ deraadt@


# c591d593 13-Apr-2017 guenther <guenther@openbsd.org>

Delete the getlogin59 syscall, which was last used one year, two releases,
and four libc major versions ago

ok sthen@ jsing@ deraadt@ jca@


# f5d56f6d 13-Apr-2017 guenther <guenther@openbsd.org>

Provide mips64 with kernel-facing TCB_{GET,SET} macros that store it
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB
macro can be unifdef'ed as always defined.

ok kettenis@

Provide mips64 with kernel-facing TCB_{GET,SET} macros that store it
in struct mdproc. With that, all archs have those and the __HAVE_MD_TCB
macro can be unifdef'ed as always defined.

ok kettenis@ visa@ jsing@

show more ...


# 3b7181b7 07-Nov-2016 guenther <guenther@openbsd.org>

Split PID from TID, giving processes a PID unrelated to the TID of their
initial thread

ok jsing@ kettenis@


# bb5dd46a 02-Sep-2016 tedu <tedu@openbsd.org>

add a concept of 'verified auth' to sessions. When set via ioctl,
the user and parent process are recorded. Later, this info may be tested
and used to bypass authorization requirements.
ie, doas won'

add a concept of 'verified auth' to sessions. When set via ioctl,
the user and parent process are recorded. Later, this info may be tested
and used to bypass authorization requirements.
ie, doas won't ask for your password again.
Great idea from henning.
ok deraadt guenther henning

show more ...


# 65648e5f 30-Mar-2016 guenther <guenther@openbsd.org>

Add getlogin_r syscall that checks and returns errors like userspace
getlogin_r() API; keep existing syscall as getlogin59 for temporary compat.

ok kettenis@ deraadt@


# 1c8e40bb 29-Mar-2016 guenther <guenther@openbsd.org>

In setlogin(), don't change anything on error.

ok deraadt@ krw@ zhuk@ jca@ millert@


# 96ad53f3 02-Mar-2015 guenther <guenther@openbsd.org>

Return EINVAL if the creds supplied for NFS export have a cr_ngroups less
than zero or greater than NGROUPS_MAX

Fixes panic seen by henning@


# 646fde30 17-Jan-2015 deraadt <deraadt@openbsd.org>

use NGROUPS_MAX


# 81095b76 17-Sep-2014 millert <millert@openbsd.org>

The 2nd arg of setpgid(2) should be pid_t, not int.
No functional change as pid_t is defined as int32_t.
OK miod@


# a9ddc286 18-Apr-2014 guenther <guenther@openbsd.org>

Have each thread keeps its own (counted!) reference to the process's ucreds
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks a

Have each thread keeps its own (counted!) reference to the process's ucreds
to avoid possible use-after-free references when swapping ids in threaded
processes. "Do I have the right creds?" checks are always made with the
threads creds.

Inspired by FreeBSD and NetBSD
"right time" deraadt@

show more ...


# d559b8cb 30-Mar-2014 guenther <guenther@openbsd.org>

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetB

Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred

Based on a discussion at c2k10 or so before noting that FreeBSD and
NetBSD did this too.

ok matthew@

show more ...


1234