#
08aa7128 |
| 30-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
sysctl: Teach sysctl to attach and run itself in a jail
This allows the parent jail to retrieve or set kernel state when child does not have sysctl(8) installed (e.g. light weighted OCI containers o
sysctl: Teach sysctl to attach and run itself in a jail
This allows the parent jail to retrieve or set kernel state when child does not have sysctl(8) installed (e.g. light weighted OCI containers or slim jails).
This is especially useful when manipulating jail prison or vnet sysctls. For example, `sysctl -j foo -Ja` or `sysctl -j foo net.fibs=2`.
Reviewed by: dfr (previous version), markj MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D48618
show more ...
|
#
6193855f |
| 30-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
sysctl: Refactor function parsefile()
Let the caller open the file and pass in the file handler. This can benefit an upcoming change so that we will have cleaner logic.
No functional change intende
sysctl: Refactor function parsefile()
Let the caller open the file and pass in the file handler. This can benefit an upcoming change so that we will have cleaner logic.
No functional change intended.
Suggested by: markj MFC after: 1 week
show more ...
|
Revision tags: release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3 |
|
#
c294ecb2 |
| 23-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
sysctl: Sort options
No functional change intended.
MFC after: 1 day
|
#
0ee3e29e |
| 23-Jan-2025 |
Zhenlei Huang <zlei@FreeBSD.org> |
sysctl: Fix usage() and SYNOPSIS section of man page
I forgot to update the usage() and SYNOPSIS section of man page when adding the two options -J and -V.
While here, fix the options sort order in
sysctl: Fix usage() and SYNOPSIS section of man page
I forgot to update the usage() and SYNOPSIS section of man page when adding the two options -J and -V.
While here, fix the options sort order in SYNOPSIS section.
Fixes: 5ec83c660aca sysctl: Add flags to filter jail prison and vnet variables MFC after: 1 day
show more ...
|
Revision tags: release/14.2.0 |
|
#
5ec83c66 |
| 29-Oct-2024 |
Zhenlei Huang <zlei@FreeBSD.org> |
sysctl: Add flags to filter jail prison and vnet variables
So users do not have to contact the source code to tell whether a variable is a jail prison / vnet one or not.
Reviewed by: cy (previous v
sysctl: Add flags to filter jail prison and vnet variables
So users do not have to contact the source code to tell whether a variable is a jail prison / vnet one or not.
Reviewed by: cy (previous version), markj, jamie (for #jails) MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D47107
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
2e8ad2b6 |
| 30-Dec-2023 |
Hao-Yu Hou <howard.hou.fan@elsa.cs.nthu.edu.tw> |
sysctl(8): Fix typo in comment
Line214: combind -> combine
Reviewed by: zlai Event: Advanced UNIX Programming Course (Fall’23) at NTHU Request: https://github.com/freebsd/freebsd-src/pull/966
|
#
32e86a82 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remo
sbin: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
75be7e30 |
| 06-Oct-2023 |
Ed Maste <emaste@FreeBSD.org> |
sysctl: emit a newline after NULL node descriptions
Previously when printing the sysctl description (via the -d flag) we omitted the newline if the node provided no description (i.e., NULL). This co
sysctl: emit a newline after NULL node descriptions
Previously when printing the sysctl description (via the -d flag) we omitted the newline if the node provided no description (i.e., NULL). This could be observed via e.g. `sysctl -d dev`.
PR: 44034 Reviewed by: zlei Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42112
show more ...
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0 |
|
#
f126d349 |
| 25-Dec-2022 |
Kirk McKusick <mckusick@FreeBSD.org> |
Add -F option to sysctl(8) to display sysctl format.
Also add a test to ensure that it is working correctly.
Submitted by: ota_j.email.ne.jp Reviewed by: mckusick Differential Revision: https://re
Add -F option to sysctl(8) to display sysctl format.
Also add a test to ensure that it is working correctly.
Submitted by: ota_j.email.ne.jp Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D34012
show more ...
|
Revision tags: release/12.4.0, release/13.1.0 |
|
#
4de76195 |
| 06-Dec-2021 |
Warner Losh <imp@FreeBSD.org> |
sysctl: Small style fix
Slightly reorder to make this look better. No functional change.
Sponsored by: Netflix
|
Revision tags: release/12.3.0 |
|
#
f1957db4 |
| 01-May-2021 |
Andrew Turner <andrew@FreeBSD.org> |
Fix building sysctl(8) after c78ad20
In sysctl we parse an efi header on amd64. Fix this after changing the virtual memory type from a void * to a uint64_t in c78ad20.
|
Revision tags: release/13.0.0 |
|
#
65efb73f |
| 27-Jan-2021 |
Ryan Moeller <freqlabs@FreeBSD.org> |
sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes
The OID is saved when we encounter CTLFLAG_SKIP so that descendants can be skipped as well. We then must not update the skip OID until we are out of
sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes
The OID is saved when we encounter CTLFLAG_SKIP so that descendants can be skipped as well. We then must not update the skip OID until we are out of the node. This was achieved by resetting the skip OID once the prefix no longer matches, but the case where the OID we reset on has CTLFLAG_SKIP was not accounted for.
Reported by: mav Reviewed by: mav MFC after: 2 days Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D28364
show more ...
|
#
401f82df |
| 23-Dec-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
sbin/sysctl: Style fix
Remove parameter names from function prototype to match other prototypes in the file.
Sponsored by: iXsystems, Inc.
|
#
a5ec1dd4 |
| 23-Dec-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
sbin/sysctl: Always honor skip in sysctl_all
Fix broken CTLFLAG_SKIP when present on the first child of the requested node.
We don't need to ignore skip for the first node because in sysctl_all() w
sbin/sysctl: Always honor skip in sysctl_all
Fix broken CTLFLAG_SKIP when present on the first child of the requested node.
We don't need to ignore skip for the first node because in sysctl_all() we've implicitly visited the first node already when oid is specified. The first call to show_var() in here is after we have iterated to the next node. When the command line specifically requests a non-node sysctl we go straight into show_var() without calling sysctl_all().
Reported by: jhb Reviewed by: jhb Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D27674
show more ...
|
#
b64b636d |
| 30-Oct-2020 |
John Baldwin <jhb@FreeBSD.org> |
Use a dynamic buffer for the copy of a node's new value.
This permits setting a node's value to a string longer than BUFSIZ.
Reported by: Sony Arpita Das @ Chelsio Reviewed by: freqlabs MFC after:
Use a dynamic buffer for the copy of a node's new value.
This permits setting a node's value to a string longer than BUFSIZ.
Reported by: Sony Arpita Das @ Chelsio Reviewed by: freqlabs MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27027
show more ...
|
#
e58483c4 |
| 24-Oct-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
sysctl+kern_sysctl: Honor SKIP for descendant nodes
Ensure we also skip descendants of SKIP nodes when iterating through children of an explicitly specified node.
Reported by: np Reviewed by: np MF
sysctl+kern_sysctl: Honor SKIP for descendant nodes
Ensure we also skip descendants of SKIP nodes when iterating through children of an explicitly specified node.
Reported by: np Reviewed by: np MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26833
show more ...
|
#
8077b9bc |
| 24-Oct-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
sysctl: Misc code cleanup
* Use defined SYS_SYSCTL names * Use memcmp instead of explicit loop * Use NULL instead of 0 for pointer value * Use __FBSDID * Reformat, improve comments in parse()
No fu
sysctl: Misc code cleanup
* Use defined SYS_SYSCTL names * Use memcmp instead of explicit loop * Use NULL instead of 0 for pointer value * Use __FBSDID * Reformat, improve comments in parse()
No functional changes.
Reviewed by: imp MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26832
show more ...
|
Revision tags: release/12.2.0 |
|
#
92e17803 |
| 05-Oct-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
Enable iterating all sysctls, even ones with CTLFLAG_SKIP
Add an "nextnoskip" sysctl that allows for listing of sysctls intended to be normally skipped for cost reasons.
This makes it so the names/
Enable iterating all sysctls, even ones with CTLFLAG_SKIP
Add an "nextnoskip" sysctl that allows for listing of sysctls intended to be normally skipped for cost reasons.
This makes it so the names/descriptions of those sysctls can be discovered with sysctl -aN/sysctl -ad/sysctl -at.
It also makes it so children are visited when a node flagged with CTLFLAG_SKIP is explicitly requested.
The intended use case is to mark the root "kstat" node with CTLFLAG_SKIP so that the extensive and expensive stats are skipped by default but may still be easily obtained without having to know them all (which may not even be possible) and request each one-by-one.
Reviewed by: jhb MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D26560
show more ...
|
#
a0efcf64 |
| 02-Sep-2020 |
Mark Johnston <markj@FreeBSD.org> |
Add sysctl(8) formatting for hw.pagesizes.
- Change the type of hw.pagesizes to OPAQUE, since it returns an array. - Modify the handler to only truncate the returned length if the caller supplied
Add sysctl(8) formatting for hw.pagesizes.
- Change the type of hw.pagesizes to OPAQUE, since it returns an array. - Modify the handler to only truncate the returned length if the caller supplied an output buffer. This allows use of the trick of passing a NULL output buffer to fetch the output size, while preserving compatibility if MAXPAGESIZES is increased. - Add a "S,pagesize" formatter to sysctl(8).
Reviewed by: alc, kib MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26239
show more ...
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0 |
|
#
18b18078 |
| 25-Feb-2019 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead@r344527
|
#
a8fe8db4 |
| 25-Feb-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r344178 through r344512.
|
#
f99e7b1a |
| 24-Feb-2019 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
evdev: export event device properties through sysctl interface
A big security advantage of Wayland is not allowing applications to read input devices all the time. Having /dev/input/* accessible to
evdev: export event device properties through sysctl interface
A big security advantage of Wayland is not allowing applications to read input devices all the time. Having /dev/input/* accessible to the user account subverts this advantage.
libudev-devd was opening the evdev devices to detect their types (mouse, keyboard, touchpad, etc). This don't work if /dev/input/* is inaccessible. With the kernel exposing this information as sysctls (kern.evdev.input.*), we can work w/o /dev/input/* access, preserving the Wayland security model.
Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: wulf, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18694
show more ...
|
Revision tags: release/12.0.0 |
|
#
3af64f03 |
| 11-Sep-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338392 through r338594.
|
#
7404ab5b |
| 08-Sep-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Improve handling of the EFI map types[] array.
Use nitems(), do not assume EFI_MD_TYPE_ contiguous allocation, in particular, switch to use designated array initializers.
Reviewed by: jhb (previous
Improve handling of the EFI map types[] array.
Use nitems(), do not assume EFI_MD_TYPE_ contiguous allocation, in particular, switch to use designated array initializers.
Reviewed by: jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb)
show more ...
|