| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Run sysctl -a during the test suite so that KASAN/KMSAN have a chance to
catch something.
Inspired by https://jprx.io/cve-2024-54507/
Reviewed by: jhb, emaste
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D48659
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
No functional change intended.
MFC after: 1 day
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
+ while here, fix alignment and tag SPDX
MFC after: 3 days
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1421
|
| |
|
|
|
|
|
| |
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
| |
Line214: combind -> combine
Reviewed by: zlai
Event: Advanced UNIX Programming Course (Fall’23) at NTHU
Request: https://github.com/freebsd/freebsd-src/pull/966
|
| |
|
|
| |
Signed-off-by: Igor Ostapenko <pm@igoro.pro>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Reviewed by: mhorne, pauamma_gundo.com, emaste
MFC after: 2 weeks
Sponsored by: Kumacom SAS
Differential Revision: https://reviews.freebsd.org/D41113
|
| |
|
|
| |
Remove /^\.\\"\s*\$FreeBSD\$$\n/
|
| |
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The function that sets test case metadata is actually named ${tc}_head
rather than ${tc}, so add the suffix.
While we're here, hook the tests up to the infrastructure so that they
do get run.
Sponsored by: Klara, Inc.
|
| |
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
MFC after: 1 week
|
| |
|
|
|
|
|
|
| |
`sysctl -a` does not print values with this flag.
Reviewed by: debdrup
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D34615
|
| |
|
|
|
|
| |
Slightly reorder to make this look better. No functional change.
Sponsored by: Netflix
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Remove parameter names from function prototype to match other
prototypes in the file.
Sponsored by: iXsystems, Inc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=367188
|
| |
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=367184
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=367009
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
Notes:
svn path=/head/; revision=367006
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=366465
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
Notes:
svn path=/head/; revision=365268
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
-n omits the name of the variable regardless of the type of information that is
requested. Rephrase to clarify this point.
PR: 242191
Submitted by: stilezy@gmail.com
Approved by: emaste@
Differential Revision: https://reviews.freebsd.org/D26149
Notes:
svn path=/head/; revision=364481
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=344494
|
| |
|
|
|
|
|
|
|
|
|
|
| |
is not implemented.
MFC after: 3 days
Submitted by: Alfonso Siciliano <alfix86@gmail.com>
Reviewed by: 0mp, imp
Differential Revision: https://reviews.freebsd.org/D19012
Notes:
svn path=/head/; revision=343930
|
| |
|
|
|
|
|
|
|
| |
Reviewed by: bcr
Approved by: re (gjb), krion (mentor)
Differential Revision: https://reviews.freebsd.org/D17147
Notes:
svn path=/head/; revision=338920
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/head/; revision=338533
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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@intel.com>
MFC after: 1 week
Approved by: re (rgrimes)
Notes:
svn path=/head/; revision=338523
|
| |
|
|
|
|
|
| |
Approved by: re (gjb)
Notes:
svn path=/head/; revision=338522
|
| |
|
|
|
|
|
|
|
|
| |
This helps with pkgbase to tag this config file as a config file.
Approved by: allanjude (mentor), will (mentor)
Differential Revision: https://reviews.freebsd.org/D16559
Notes:
svn path=/head/; revision=337624
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=330711
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=326226
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=326025
|
| |
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=325188
|
| |
|
|
|
|
|
|
|
| |
PR: 217501
Submitted by: Yavuz Tanriverdi <stemix@gmail.com>
MFC after: 1 week
Notes:
svn path=/head/; revision=323645
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=321790
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96
Notes:
svn path=/head/; revision=314436
|