<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sbin/sysctl/sysctl.c, branch upstream/13.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-01-29T00:36:46Z</updated>
<entry>
<title>sbin/sysctl: Fix CTLFLAG_SKIP for adjacent nodes</title>
<updated>2021-01-29T00:36:46Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2021-01-27T19:27:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5d58f58b0d612913fd280a6acaf174019bd465ba'/>
<id>urn:sha1:5d58f58b0d612913fd280a6acaf174019bd465ba</id>
<content type='text'>
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
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D28364

(cherry picked from commit 65efb73fbddd44116fd39b03991386a67422ba6d)
</content>
</entry>
<entry>
<title>sbin/sysctl: Style fix</title>
<updated>2020-12-23T17:45:11Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-12-23T17:45:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=401f82df4879236e082e2bfce4095692c3942122'/>
<id>urn:sha1:401f82df4879236e082e2bfce4095692c3942122</id>
<content type='text'>
Remove parameter names from function prototype to match other
prototypes in the file.

Sponsored by:	iXsystems, Inc.
</content>
</entry>
<entry>
<title>sbin/sysctl: Always honor skip in sysctl_all</title>
<updated>2020-12-23T17:42:38Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-12-23T17:42:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a5ec1dd453cde12524033c7d5c68b4d68d1b2360'/>
<id>urn:sha1:a5ec1dd453cde12524033c7d5c68b4d68d1b2360</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Use a dynamic buffer for the copy of a node's new value.</title>
<updated>2020-10-30T21:13:05Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-10-30T21:13:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b64b636d4607624f18153f424e73b10d3f43d724'/>
<id>urn:sha1:b64b636d4607624f18153f424e73b10d3f43d724</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>sysctl+kern_sysctl: Honor SKIP for descendant nodes</title>
<updated>2020-10-24T16:17:07Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-10-24T16:17:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e58483c4fb697652a8e19c6cdc55a06d3af7e5d8'/>
<id>urn:sha1:e58483c4fb697652a8e19c6cdc55a06d3af7e5d8</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>sysctl: Misc code cleanup</title>
<updated>2020-10-24T16:05:37Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-10-24T16:05:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8077b9bc603ba83cd9785410043a28528a7a3b9f'/>
<id>urn:sha1:8077b9bc603ba83cd9785410043a28528a7a3b9f</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>Enable iterating all sysctls, even ones with CTLFLAG_SKIP</title>
<updated>2020-10-05T20:13:22Z</updated>
<author>
<name>Ryan Moeller</name>
<email>freqlabs@FreeBSD.org</email>
</author>
<published>2020-10-05T20:13:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=92e17803cd19bf55d07779e0b56b12e9fa50ec92'/>
<id>urn:sha1:92e17803cd19bf55d07779e0b56b12e9fa50ec92</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Add sysctl(8) formatting for hw.pagesizes.</title>
<updated>2020-09-02T18:17:08Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2020-09-02T18:17:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a0efcf6400788d856b8b89dfff7ef63007896d90'/>
<id>urn:sha1:a0efcf6400788d856b8b89dfff7ef63007896d90</id>
<content type='text'>
- 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
</content>
</entry>
<entry>
<title>evdev: export event device properties through sysctl interface</title>
<updated>2019-02-24T18:47:04Z</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2019-02-24T18:47:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f99e7b1aed7ea65ca0dbe5b182f2b9cbfdfe54db'/>
<id>urn:sha1:f99e7b1aed7ea65ca0dbe5b182f2b9cbfdfe54db</id>
<content type='text'>
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 &lt;greg@unrelenting.technology&gt;
Reviewed by:		wulf, imp
MFC after:		2 weeks
Differential Revision:	https://reviews.freebsd.org/D18694
</content>
</entry>
<entry>
<title>Improve handling of the EFI map types[] array.</title>
<updated>2018-09-08T18:57:05Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-09-08T18:57:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7404ab5ba9ddb782532766cad35c4918d465e993'/>
<id>urn:sha1:7404ab5ba9ddb782532766cad35c4918d465e993</id>
<content type='text'>
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)
</content>
</entry>
</feed>
