- 01 Dec, 2021 8 commits
-
-
Alexander Motin authored
While it still looks like previous code worked by coincidence, this change broke things even more instead of fixing. Reported by: avg@ MFC after: 1 week
-
Michael Tuexen authored
Section 9.5 of RFC 6458 (SCTP Socket API) requires that sctp_getladdrs() returns 0 in case the socket is unbound. This is the cause of reporting 0 addresses. So don't indicate an error, just report this case as required. PR: 260117 MFC after: 1 week
-
Andrew Turner authored
This is only available in recent toolchains. Check for it so we can use it in libmd. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33166
-
Zhenlei Huang authored
Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33210
-
Michael Tuexen authored
For socket options related to local and remote addresses providing generic association ids does not make sense. Report EINVAL in this case. MFC after: 1 week
-
Michael Tuexen authored
Do not hide errno from getsockopt() called internally. MFC after: 1 week
-
Michael Tuexen authored
When calling getsockopt() with SCTP_GET_LOCAL_ADDR_SIZE, use a pointer to a 32-bit variable, since this is what the kernel expects. While there, do some cleanups. MFC after: 1 week
-
Michael Tuexen authored
MFC after: 1 week
-
- 30 Nov, 2021 4 commits
-
-
Warner Losh authored
DS_BUSY is no longer a device state. Remove it from here. Sponsored by: Netflix
-
Warner Losh authored
The vast majority of the busy/unbusy users in the tree don't acquire Giant before calling device_busy/unbusy. However, if multiple threads are opening a file, say, that causes the device to busy/unbusy, then we can race to the root marking things busy. Move to using a reference count to keep track of how many times a device_t has been made busy. Use that count to make the same decisions that we'd make with the old device state. Note: gpiopps.c uses D_TRACKCLOSE. Others do as well. However, there's a known race with closes that will be corrected for all the drivers that do this in a future commit. Sponsored by: Netflix Reviewed by: hselasky, jhb Differential Revision: https://reviews.freebsd.org/D26284
-
Warner Losh authored
This reverts commit 08e78191. Commit message was for a very old version of the patch. Will re-commit with the right one since it's so bad. There's no locked versions of it...that code was reworked to use refcnt APIs. Noticed by: jhb, jtrc27 Sponsored by: Netflix
-
Warner Losh authored
The vast majority of the busy/unbusy users in the tree don't acquire Giant before calling device_busy/unbusy. However, if multiple threads are opening a file, say, that causes the device to busy/unbusy, then we can race to the root marking things busy. Create a new device_busy_locked and device_unbusy_locked that are the current implemntations of device_busy and device_unbusy. Make device_busy and unbusy acquire Giant before calling the _locked versrions. Since we never sleep in the busy/unbusy path, Giant's single threaded semantics suffice to keep this safe. Sponsored by: Netflix Reviewed by: hselasky, jhb Differential Revision: https://reviews.freebsd.org/D26284
-
- 01 Dec, 2021 1 commit
-
-
Chuck Tuffli authored
NVMe conformance tests for the Format command failed if the backing-storage for the bhyve device was a file instead of a Zvol. The tests (and the specification) expect a Format to destroy all previously written data. The bhyve NVMe emulation implements this by trimming / deallocating all data from the backing-storage. The blockif_candelete() function indicated the file did not support deallocation (i.e. fpathconf(..., _PC_DEALLOC_PRESENT) returned FALSE) even though the kernel supported file hole punching. This occurs on builds with Capsicum enabled because blockif did not allow the fpathconf(2) right. Fix is to add CAP_FPATHCONF to the cap_rights_init(3) call. PR: 260081 Reviewed by: allanjude, markj, jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33203
-
- 30 Nov, 2021 27 commits
-
-
Warner Losh authored
As part of converting the code to a while loop, the unconditional initialization of wired to false was lost. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D33163
-
Vladimir Kondratyev authored
in sampling mode to workaround firmware bug. This fixes reboot or poweroff on frame.work laptops after first touch. Reported by: many PR: 259230 MFC after: 1 week Tested by: kevans, markj
-
Elliott Mitchell authored
This was found while looking for driver_filter_t functions which got the trap frame from the argument. This particular instance it isn't even used, so remove now lest someone else get to it first. Reviewed by: mhorne
-
Alan Somers authored
This reverts commit 2886c93d. The original commit has two problems: * It sets SO_SNDBUF to be as large as MAXLINE. But for unix domain sockets, the send buffer is bypassed. Packets go directly to the peer's receive buffer, so setting and querying SO_SNDBUF is ineffective. To ensure that the socket can accept messages of a certain size, it would be necessary to add a SO_PEERRCVBUF socket option that could query the connected peer's receive buffer size. * It sets MAXLINE to 8 kB, which is larger than the default sockbuf size of 4 kB. That's ok for the builtin syslogd, which sets its recvbuf to 80 kB, but not ok for alternative sysloggers, like rsyslogd, which use the default size. As a consequence, writing messages of more than 4 kB with syslog() as a non-root user while running rsyslogd would cause the logging application to spin indefinitely within syslog(). PR: 260126 MFC: 2 weeks Sponsored by: Axcient Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D33199
-
Stefan Eßer authored
Merge commit 'e63540ee'
-
Stefan Eßer authored
This release fixes two parse bugs when in POSIX standard mode. One of these bugs was due to a quirk of the POSIX grammar, and the other was because bc was too strict.
-
Stefan Eßer authored
This version is imported only for documentary purposes since it does not contain any changes that are relevant for the FreeBSD base system.
-
Kristof Provost authored
In in_stf_input() we grabbed a pointer to the IPv4 header and later did an m_pullup() before we look at the IPv6 header. However, m_pullup() could rearrange the mbuf chain and potentially invalidate the pointer to the IPv4 header. Avoid this issue by copying the IP header rather than getting a pointer to it. Reported by: markj, Jenkins (KASAN job) Reviewed by: markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33192
-
Mitchell Horne authored
This definition enables callers to estimate remaining space on the kstack, and take action on it. Notably, it enables optimizations in the GEOM and netgraph subsystems to directly dispatch work items when there is sufficient stack space, rather than queuing them for a worker thread. Implement it for riscv, arm, and mips. Remove the #ifdefs, so it will not go unimplemented elsewhere. PR: 259157 Reviewed by: mav, kib, markj (previous version) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32580
-
Mitchell Horne authored
We do not consider the space reserved for the pcb to be part of the total kstack size, so it should not be included in the calculation of the used stack size. MFC after: 1 week Sponsored by: The FreeBSD Foundation
-
Mitchell Horne authored
On this platform, the pcb and FPU save area are allocated from the top of each kernel stack, so they should be excluded from the calculation of the total and used stack sizes. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32581
-
Bjoern A. Zeeb authored
In case we are only embedding a single firmware image the variable "parent" gets set but never used. Add checks for the number of files for it and only print it out if we are exceeding the single file count. This fixes -Wunused-but-set-variable warnings for the majority of firmware files in the tree. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
-
Andriy Gapon authored
There are two places where we convert from a timecounter delta to a bintime delta: tc_windup and bintime_off. Both functions use the same calculations when the timecounter delta is small. But for a large delta (greater than approximately an equivalent of 1 second) the calculations were different. Both functions use approximate calculations based on th_scale that avoid division. Both produce values slightly greater than a true value, calculated with division by tc_frequency, would be. tc_windup is slightly more accurate, so its result is closer to the true value and, thus, smaller than bintime_off result. As a consequence there can be a jump back in time when time hands are switched after a long period of time (a large delta). Just before the switch the time would be calculated with a large delta from th_offset_count in bintime_off. tc_windup does the switch using its own calculations of a new th_offset using the large delta. As explained earlier, the new th_offset may end up being less than the previously produced binuptime. So, for a period of time new binuptime values may be "back in time" comparing to values just before the switch. Such a jump must never happen. All the code assumes that the uptime is monotonically nondecreasing and some code works incorrectly when that assumption is broken. For example, we have observed sleepq_timeout() ignoring a timeout when the sbinuptime value obtained by the callout code was greater than the expiration value, but the sbinuptime obtained in sleepq_timeout() was less than it. In that case the target thread would never get woken up. The unified calculations should ensure the monotonic property of the uptime. The problem is quite rare as normally tc_windup should be called HZ times per second (typically 1000 or 100). But it may happen in VMs on very busy hypervisors where a VM's virtual CPU may not get an execution time slot for a second or more. Reviewed by: kib MFC after: 2 weeks Sponsored by: Panzura LLC
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/segement/segment/ MFC after: 3 days
-
Gordon Bergling authored
- s/printting/printing/ MFC after: 3 days
-
Gordon Bergling authored
- s/sequental/sequential/ MFC after: 3 days
-
Juraj Lutter authored
Silence an error in "packages" target, like: eval: /usr/src: Permission denied on systems without subversion present. Reviewed by: emaste Approved by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33153
-
Gordon Bergling authored
- s/dependecies/dependencies/ MFC after: 3 days
-
Gordon Bergling authored
- remove a double 'a' MFC after: 3 days
-
Gordon Bergling authored
- s/entires/entries/ MFC after: 3 days
-