#
b7202958 |
| 05-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freeb
sysvshm: add shmobjinfo() function to find key/seq of the segment backed by obj
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46959
show more ...
|
#
f186252e |
| 05-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object: add OBJ_SYSVSHM flag to indicate SysV shm backing object
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46959
|
#
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
|
Revision tags: release/13.4.0, release/14.1.0 |
|
#
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 ...
|
#
53725168 |
| 16-May-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
SysV SHM: move SHMSEG constants to sys/shm.h
There are planned consumers in linprocfs.
Tested by: Ricardo Branco <rbranco@suse.de> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differentia
SysV SHM: move SHMSEG constants to sys/shm.h
There are planned consumers in linprocfs.
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 ...
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
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 ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
cab496e1 |
| 15-Mar-2022 |
Andrew Turner <andrew@FreeBSD.org> |
Make SHMMAXPGS an unsigned long
This is used to calculate sizes that are then stored in unsigned long fields. Make this unsigned long so the calculations use this type and not an int that can lead t
Make SHMMAXPGS an unsigned long
This is used to calculate sizes that are then stored in unsigned long fields. Make this unsigned long so the calculations use this type and not an int that can lead to an integer overflow with a large PAGE_SIZE.
This allows building this on arm64 with PAGE_SIZE of 16k. Further work will be needed if a 32-bit architecture tries to use a similar sized page.
Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/12.3.0 |
|
#
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
|
Revision tags: release/13.0.0 |
|
#
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 ...
|
#
19647e76 |
| 03-Nov-2020 |
Brooks Davis <brooks@FreeBSD.org> |
sysvshm: pass relevant uap members as arguments
Alter shmget_allocate_segment and shmget_existing to take the values they want from struct shmget_args rather than passing the struct around. In gene
sysvshm: pass relevant uap members as arguments
Alter shmget_allocate_segment and shmget_existing to take the values they want from struct shmget_args rather than passing the struct around. In general, uap structures should only be the interface to sys_<foo> functions.
This makes on small functional change and records the allocated space rather than the requested space. If this turns out to be a problem (e.g. if software tries to find undersized segments by exact size rather than using keys), we can correct that easily.
Reviewed by: kib Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27077
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
562894f0 |
| 14-Apr-2020 |
Brooks Davis <brooks@FreeBSD.org> |
Centralize compatability translation macros.
Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates d
Centralize compatability translation macros.
Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h and replace existing definitation with includes where required. This eliminates duplicate code and allows Linux and FreeBSD compatability headers to be included in the same files.
Input from: cem, jhb Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24275
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.
|
#
63967687 |
| 20-Nov-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates reudundant complicated checks and additional locking required only for anonymous memory. Introduce vm_object_allocate_anon(
Simplify anonymous memory handling with an OBJ_ANON flag. This eliminates reudundant complicated checks and additional locking required only for anonymous memory. Introduce vm_object_allocate_anon() to create these objects. DEFAULT and SWAP objects now have the correct settings for non-anonymous consumers and so individual consumers need not modify the default flags to create super-pages and avoid ONEMAPPING/NOSPLIT.
Reviewed by: alc, dougm, kib, markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D22119
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
5408c6db |
| 04-May-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
sysv: get rid of fork/exit hooks if the code is compiled in
Sponsored by: The FreeBSD Foundation
|
#
ea7e7006 |
| 16-Jan-2019 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement shmat(2) flag SHM_REMAP.
Based on the description in Linux man page.
Reviewed by: markj, ngie (previous version) Sponsored by: Mellanox Technologies MFC after: 1 week Differential revisio
Implement shmat(2) flag SHM_REMAP.
Based on the description in Linux man page.
Reviewed by: markj, ngie (previous version) Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18837
show more ...
|
Revision tags: release/12.0.0 |
|
#
9b5cb2f6 |
| 12-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340235 through r340367.
|
#
8782eef4 |
| 11-Nov-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Remove one-use variable.
This also removes a lot of #ifdefs and cleans up a warning when the AUDIT kernel option is defined, but neither KDTRACE_HOOKS nor MAC are.
Reported and tested by: danger Sp
Remove one-use variable.
This also removes a lot of #ifdefs and cleans up a warning when the AUDIT kernel option is defined, but neither KDTRACE_HOOKS nor MAC are.
Reported and tested by: danger Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
Revision tags: release/11.2.0 |
|
#
6469bdcd |
| 06-Apr-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is close
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options.
Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures.
Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files.
Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941
show more ...
|
#
fb441a88 |
| 27-Mar-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Fix several leaks of kernel stack data through paddings.
It is random collection of fixes for issues not yet corrected, reported at https://tsyrklevi.ch/clang_analyzer/freebsd_013017/. Many issues f
Fix several leaks of kernel stack data through paddings.
It is random collection of fixes for issues not yet corrected, reported at https://tsyrklevi.ch/clang_analyzer/freebsd_013017/. Many issues from that list were already corrected. Most of them are for compat32, old compat32 or affect both primary host ABI and compat32.
The freebsd32_kldstat(), for instance, was already fixed by using malloc(M_ZERO). Patch includes correction to report the supplied version back, which is just pedantic.
Reviewed by: brooks, emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D14868
show more ...
|
#
7a095112 |
| 18-Feb-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Correct/improve the descriptions if kern.ipc.(shmsegs,sema,msqids).
The description of kern.ipc.shmsegs was wrong since 2005. I updated the others (which were more correct) to match.
PR: 225933 R
Correct/improve the descriptions if kern.ipc.(shmsegs,sema,msqids).
The description of kern.ipc.shmsegs was wrong since 2005. I updated the others (which were more correct) to match.
PR: 225933 Reviewed by: cem MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14391
show more ...
|
#
0fd25723 |
| 02-Feb-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Add kern.ipc.{msqids,semsegs,sema} sysctls for FreeBSD32.
Stop leaking kernel pointers though theses sysctls and make sure that the padding in the structures is zeroed on allocation to avoid other l
Add kern.ipc.{msqids,semsegs,sema} sysctls for FreeBSD32.
Stop leaking kernel pointers though theses sysctls and make sure that the padding in the structures is zeroed on allocation to avoid other leaks.
Reviewed by: gordon, kib Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D13459
show more ...
|