|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0 |
|
| #
2a0d3dd3 |
| 30-Dec-2023 |
Hao-Yu Hou <[email protected]> |
sysctl(8): Fix typo in comment
Line214: combind -> combine
Reviewed by: zlei Event: Advanced UNIX Programming Course (Fall’23) at NTHU Request: https://github.com/freebsd/freebsd-src/pull/966
(ch
sysctl(8): Fix typo in comment
Line214: combind -> combine
Reviewed by: zlei Event: Advanced UNIX Programming Course (Fall’23) at NTHU Request: https://github.com/freebsd/freebsd-src/pull/966
(cherry picked from commit 2e8ad2b698498a1c380d0d6fc5792b2c56926801)
show more ...
|
|
Revision tags: release/14.0.0 |
|
| #
ced9fe05 |
| 06-Oct-2023 |
Ed Maste <[email protected]> |
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
(cherry picked from commit 75be7e30271bb192fd27698982f2c7e56831eeef)
show more ...
|
| #
1d386b48 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Revision tags: release/13.2.0 |
|
| #
f126d349 |
| 25-Dec-2022 |
Kirk McKusick <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 <[email protected]> |
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 |
|
| #
f99e7b1a |
| 24-Feb-2019 |
Vladimir Kondratyev <[email protected]> |
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 <[email protected]> Reviewed by: wulf, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18694
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
7404ab5b |
| 08-Sep-2018 |
Konstantin Belousov <[email protected]> |
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 ...
|
| #
d4bdf8ed |
| 07-Sep-2018 |
Konstantin Belousov <[email protected]> |
Teach sysctl(8) about the Persistent memory type.
Add PersistentMemory to the list of sysctl's known memory types when decoding an EFI memory map.
Submitted by: D Scott Phillips <d.scott.phillips@i
Teach sysctl(8) about the Persistent memory type.
Add PersistentMemory to the list of sysctl's known memory types when decoding an EFI memory map.
Submitted by: D Scott Phillips <[email protected]> MFC after: 1 week Approved by: re (rgrimes)
show more ...
|
| #
e1372c0e |
| 07-Sep-2018 |
Konstantin Belousov <[email protected]> |
Trim whitespace.
Approved by: re (gjb)
|
|
Revision tags: release/11.2.0 |
|
| #
2365fe56 |
| 09-Mar-2018 |
John Baldwin <[email protected]> |
Permit sysctl(8) to set an array of numeric values for a single node.
Most sysctl nodes only return a single value, but some nodes return an array of values (e.g. kern.cp_time). sysctl(8) understan
Permit sysctl(8) to set an array of numeric values for a single node.
Most sysctl nodes only return a single value, but some nodes return an array of values (e.g. kern.cp_time). sysctl(8) understand how to display the values of a node that returns multiple values (it prints out each numeric value separated by spaces). However, until now sysctl(8) has only been able to set sysctl nodes to a single value. This change allows sysctl to accept a new value for a numeric sysctl node that contains multiple values separated by either spaces or commas. sysctl(8) parses this list into an array of values and passes the array as the "new" value to sysctl(2).
Reviewed by: rpokala MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D14569
show more ...
|
| #
41c0f8d3 |
| 26-Nov-2017 |
Konstantin Belousov <[email protected]> |
Improve sysctl(8) pretty printing of some structures.
S_vmtotal: Use unsigned format to print unsigned memory counters from struct vmtotal. Remove unneeded cast, style locals declarations.
S_efi_ma
Improve sysctl(8) pretty printing of some structures.
S_vmtotal: Use unsigned format to print unsigned memory counters from struct vmtotal. Remove unneeded cast, style locals declarations.
S_efi_map: Make printing of the memory regions descriptions less MD by using uintmax_t formats.
Noted by and discussed with: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
8a16b7a1 |
| 20-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier f
General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point.
show more ...
|
|
Revision tags: release/10.4.0 |
|
| #
a18f34fe |
| 31-Jul-2017 |
Andrew Gallatin <[email protected]> |
Don't request CTLTYPE_OPAQUE if we can't print them.
The intent is to skip expensive opaque sysctls like tcp_pcblist unless they are explicitly requested. Sysctl nodes like this don't show up in sys
Don't request CTLTYPE_OPAQUE if we can't print them.
The intent is to skip expensive opaque sysctls like tcp_pcblist unless they are explicitly requested. Sysctl nodes like this don't show up in sysctl -a, but they do generate output that winds up being dropped, unless the user specifically requested binary/hex output or opaques.
This reduces the runtime of sysctl in many circumstances on a loaded system. It also reduces the likelihood that simply gathering diagnostics on a sick machine (stuck lock, etc) via sysctl -a might push it over the edge into a total lockup.
Reviewed by: jtl Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D11461
show more ...
|
|
Revision tags: release/11.1.0 |
|
| #
fbbd9655 |
| 28-Feb-2017 |
Warner Losh <[email protected]> |
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is
Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point.
Submitted by: Jan Schaumann <[email protected]> Pull Request: https://github.com/freebsd/freebsd/pull/96
show more ...
|
| #
3ddb14a5 |
| 31-Dec-2016 |
Andriy Voskoboinyk <[email protected]> |
sysctl(8): fix typename for uint32_t.
MFC after: 5 days.
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
944e0bab |
| 18-Sep-2016 |
Konstantin Belousov <[email protected]> |
Consolidate four efi_next_descriptor() definitions.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
|