History log of /src/sys/kern/sysv_msg.c (Results 1 – 25 of 441)
Revision Date Author Comments
# 26061e4e 06-Jul-2025 Konstantin Belousov <kib@FreeBSD.org>

kern: add kern_nosys() and use it instead of type-punning the sys_nosys() arg

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 8ecc4191 22-May-2024 Olivier Certner <olce@FreeBSD.org>

Internal scheduling priorities: Always use symbolic ones

Replace priorities specified by a base priority and some hardcoded
offset value by symbolic constants. Hardcoded offsets prevent changing
th

Internal scheduling priorities: Always use symbolic ones

Replace priorities specified by a base priority and some hardcoded
offset value by symbolic constants. Hardcoded offsets prevent changing
the difference between priorities without changing their relative
ordering, and is generally a dangerous practice since the resulting
priority may inadvertently belong to a different selection policy's
range.

Since RQ_PPQ is 4, differences of less than 4 are insignificant, so just
remove them. These small differences have not been changed for years,
so it is likely they have no real meaning (besides having no practical
effect). One can still consult the changes history to recover them if
ever needed.

No functional change (intended).

MFC after: 1 month
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45390

show more ...


# 8771dc95 05-Oct-2024 Konstantin Belousov <kib@FreeBSD.org>

sysv_ipc: remove sys/cdefs.h include

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46959


# 87a15652 13-May-2024 Konstantin Belousov <kib@FreeBSD.org>

SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information

PR: 278949
Reviewed by: markj
Tested by: Ricardo Branco <rbranco@suse.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 wee

SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information

PR: 278949
Reviewed by: markj
Tested by: Ricardo Branco <rbranco@suse.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D45175

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 78cfed2d 26-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Adjust function definitions in sysv_msg.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

sys/kern/sysv_msg.c:213:8: error: a function declaration without

Adjust function definitions in sysv_msg.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

sys/kern/sysv_msg.c:213:8: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msginit()
^
void
sys/kern/sysv_msg.c:316:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msgunload()
^
void

This is because msginit() and msgunload() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.

MFC after: 3 days

show more ...


# 3b0cd7e5 17-Nov-2021 Brooks Davis <brooks@FreeBSD.org>

freebsd32: rename old SysV IPC types

Move the 32 from ...32_old to ..._old32 to aid automatic generation.

Reviewed by: kevans


# f7496dca 21-Feb-2021 Jamie Gritton <jamie@FreeBSD.org>

jail: Change the locking around pr_ref and pr_uref

Require both the prison mutex and allprison_lock when pr_ref or
pr_uref go to/from zero. Adding a non-first or removing a non-last
reference remai

jail: Change the locking around pr_ref and pr_uref

Require both the prison mutex and allprison_lock when pr_ref or
pr_uref go to/from zero. Adding a non-first or removing a non-last
reference remain lock-free. This means that a shared hold on
allprison_lock is sufficient for prison_isalive() to be useful, which
removes a number of cases of lock/check/unlock on the prison mutex.

Expand the locking in kern_jail_set() to keep allprison_lock held
exclusive until the new prison is valid, thus making invalid prisons
invisible to any thread holding allprison_lock (except of course the
one creating or destroying the prison). This renders prison_isvalid()
nearly redundant, now used only in asserts.

Differential Revision: https://reviews.freebsd.org/D28419
Differential Revision: https://reviews.freebsd.org/D28458

show more ...


# 76ad42ab 18-Jan-2021 Jamie Gritton <jamie@FreeBSD.org>

jail: Add prison_isvalid() and prison_isalive()

prison_isvalid() checks if a prison record can be used at all, i.e.
pr_ref > 0. This filters out prisons that aren't fully created, and
those that ar

jail: Add prison_isvalid() and prison_isalive()

prison_isvalid() checks if a prison record can be used at all, i.e.
pr_ref > 0. This filters out prisons that aren't fully created, and
those that are either in the process of being dismantled, or will be
at the next opportunity. While the check for pr_ref > 0 is simple
enough to make without a convenience function, this prepares the way
for other measures of prison validity.

prison_isalive() checks not only validity as far as the useablity of
the prison structure, but also whether the prison is visible to user
space. It replaces a test for pr_uref > 0, which is currently only
used within kern_jail.c, and not often there.

Both of these functions also assert that either the prison mutex or
allprison_lock is held, since it's generally the case that unlocked
prisons aren't guaranteed to remain useable for any length of time.
This isn't entirely true, for example a thread can assume its own
prison is good, but most exceptions will exist inside of kern_jail.c.

show more ...


# 6fed89b1 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

kern: clean up empty lines in .c and .h files


# f4f16af1 09-Jul-2020 Mark Johnston <markj@FreeBSD.org>

Avoid copying out kernel pointers from msgctl(IPC_STAT).

While this behaviour is harmless, it is really just an artifact of the
fact that the msgctl(2) implementation uses a user-visible structure a

Avoid copying out kernel pointers from msgctl(IPC_STAT).

While this behaviour is harmless, it is really just an artifact of the
fact that the msgctl(2) implementation uses a user-visible structure as
part of the internal implementation, so it is not deliberate and these
pointers are not useful to userspace. Thus, NULL them out before
copying out, and remove references to them from the manual page.

Reported by: Jeffball <jeffball@grimm-co.com>
Reviewed by: emaste, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25600

show more ...


# 59abbffa 31-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357270 through r357349.


# 3ff65f71 30-Jan-2020 Mateusz Guzik <mjg@FreeBSD.org>

Remove duplicated empty lines from kern/*.c

No functional changes.


# 26061e4e 06-Jul-2025 Konstantin Belousov <kib@FreeBSD.org>

kern: add kern_nosys() and use it instead of type-punning the sys_nosys() arg

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 8ecc4191 22-May-2024 Olivier Certner <olce@FreeBSD.org>

Internal scheduling priorities: Always use symbolic ones

Replace priorities specified by a base priority and some hardcoded
offset value by symbolic constants. Hardcoded offsets prevent changing
th

Internal scheduling priorities: Always use symbolic ones

Replace priorities specified by a base priority and some hardcoded
offset value by symbolic constants. Hardcoded offsets prevent changing
the difference between priorities without changing their relative
ordering, and is generally a dangerous practice since the resulting
priority may inadvertently belong to a different selection policy's
range.

Since RQ_PPQ is 4, differences of less than 4 are insignificant, so just
remove them. These small differences have not been changed for years,
so it is likely they have no real meaning (besides having no practical
effect). One can still consult the changes history to recover them if
ever needed.

No functional change (intended).

MFC after: 1 month
Event: Kitchener-Waterloo Hackathon 202506
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45390

show more ...


# 8771dc95 05-Oct-2024 Konstantin Belousov <kib@FreeBSD.org>

sysv_ipc: remove sys/cdefs.h include

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D46959


# 87a15652 13-May-2024 Konstantin Belousov <kib@FreeBSD.org>

SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information

PR: 278949
Reviewed by: markj
Tested by: Ricardo Branco <rbranco@suse.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 wee

SysV IPC: provide in-kernel helpers to obtain ipcs(8)-like information

PR: 278949
Reviewed by: markj
Tested by: Ricardo Branco <rbranco@suse.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D45175

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 78cfed2d 26-Jul-2022 Dimitry Andric <dim@FreeBSD.org>

Adjust function definitions in sysv_msg.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

sys/kern/sysv_msg.c:213:8: error: a function declaration without

Adjust function definitions in sysv_msg.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

sys/kern/sysv_msg.c:213:8: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msginit()
^
void
sys/kern/sysv_msg.c:316:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
msgunload()
^
void

This is because msginit() and msgunload() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.

MFC after: 3 days

show more ...


# 3b0cd7e5 17-Nov-2021 Brooks Davis <brooks@FreeBSD.org>

freebsd32: rename old SysV IPC types

Move the 32 from ...32_old to ..._old32 to aid automatic generation.

Reviewed by: kevans


# f7496dca 21-Feb-2021 Jamie Gritton <jamie@FreeBSD.org>

jail: Change the locking around pr_ref and pr_uref

Require both the prison mutex and allprison_lock when pr_ref or
pr_uref go to/from zero. Adding a non-first or removing a non-last
reference remai

jail: Change the locking around pr_ref and pr_uref

Require both the prison mutex and allprison_lock when pr_ref or
pr_uref go to/from zero. Adding a non-first or removing a non-last
reference remain lock-free. This means that a shared hold on
allprison_lock is sufficient for prison_isalive() to be useful, which
removes a number of cases of lock/check/unlock on the prison mutex.

Expand the locking in kern_jail_set() to keep allprison_lock held
exclusive until the new prison is valid, thus making invalid prisons
invisible to any thread holding allprison_lock (except of course the
one creating or destroying the prison). This renders prison_isvalid()
nearly redundant, now used only in asserts.

Differential Revision: https://reviews.freebsd.org/D28419
Differential Revision: https://reviews.freebsd.org/D28458

show more ...


# 76ad42ab 18-Jan-2021 Jamie Gritton <jamie@FreeBSD.org>

jail: Add prison_isvalid() and prison_isalive()

prison_isvalid() checks if a prison record can be used at all, i.e.
pr_ref > 0. This filters out prisons that aren't fully created, and
those that ar

jail: Add prison_isvalid() and prison_isalive()

prison_isvalid() checks if a prison record can be used at all, i.e.
pr_ref > 0. This filters out prisons that aren't fully created, and
those that are either in the process of being dismantled, or will be
at the next opportunity. While the check for pr_ref > 0 is simple
enough to make without a convenience function, this prepares the way
for other measures of prison validity.

prison_isalive() checks not only validity as far as the useablity of
the prison structure, but also whether the prison is visible to user
space. It replaces a test for pr_uref > 0, which is currently only
used within kern_jail.c, and not often there.

Both of these functions also assert that either the prison mutex or
allprison_lock is held, since it's generally the case that unlocked
prisons aren't guaranteed to remain useable for any length of time.
This isn't entirely true, for example a thread can assume its own
prison is good, but most exceptions will exist inside of kern_jail.c.

show more ...


# 6fed89b1 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

kern: clean up empty lines in .c and .h files


12345678910>>...18