bc: sync with OpenBSD
tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.
bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.
extern.h, Rev. 1.12
whitespace
bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability
Obtained from: OpenBSD
Do not regenerate and install liblzma.pc when only build libraries
aka do not regenerate while generating 32bits libs
Reported by: Shin-ichi Okano <s-okano__at__n08.itscom.net>
In md(4) over vnode, correct handling of the unaligned unmapped io
requests which page alignment + size is greater than MAXPHYS. Split
request up to the size of io which fits into pbuf KVA with alignment,
and retry if a part of the bio is left unprocessed.
- Keep hosts.by{name,addr} IPv4 only.
- Add comment how we handle hosts and ipnodes.
- Generate ipnodes.by{addr,name} from /etc/hosts for
compatibility with FreeBSD local name resolution.
If /var/yp/ipnodes exists, we generate them from it
for backward compatibility.
Add port for IRC over TLS/SSL, as noted in RFC 7194.
PR: 192505
Submitted by: loic.blot@unix-experience.fr
MFC r292694:
Replace all whitespaces between port name and number with tabs.
Restrict 520.pfdenied to only list rules that blocked traffic.
Before this change, the 520.pfdenied script listed all rules that
matched /^block/ in the rule. Restrict the printed output to only
those rules that result in packets being dropped.
Approved by: rpaulo (mentor)
Add missing return statement to atf/printf_test to make the example
complete and correct, and mute a compiler warning from clang
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
Add ATF_REQUIRE_FEATURE and PLAIN_REQUIRE_FEATURE macros for
testing for kernel features via the feature_present(3) libcall
The semantics are similar to the other macros in the header (skip
testcase with ATF macro; exit with appropriate exit code with the
PLAIN macro)
Sponsored by: EMC / Isilon Storage Division
Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang
because `nums[]` is an array of long doubles
Sponsored by: EMC / Isilon Storage Division
Set %esp correctly in the extended TSS.
The pcb is saved at the top of the kernel stack on x86 platforms.
The initial kenrel stack pointer is set in the TSS so that the trapframe
from user -> kernel transitions begins directly below the pcb and grows
down.
The XSAVE changes moved the FPU save area out of the pcb and into a
variable-sized area after the pcb. This required updating the expressions
to calculate the initial stack pointer from 'stacktop - sizeof(pcb)' to
'stacktop - sizeof(pcb) + FPU save area size'.
The i386_set_ioperm() system call allows user applications to access
individual I/O ports via the I/O port permission bitmap in the TSS.
On FreeBSD this requires allocating a custom per-process TSS instead of
using the shared per-CPU TSS.
The expression to initialize the initial kernel stack pointer in the
per-process TSS created for i386_set_ioperm() was not properly updated
after the XSAVE changes. Processes that used i386_set_ioperm() would
trash the trapframe during subsequent context switches resulting in
panics from memory corruption.
This changes fixes the kernel stack pointer calculation for the per-process
TSS.
Only use a power of 2 for the number of receive and transmit queues.
Using other values causes VMXNET3_CMD_ENABLE to fail. The Linux
driver also enforces this restriction.
inet6: Do not assume every interface has ip6 enabled.
Certain interfaces (e.g. pfsync0) do not have ip6 addresses (in other words,
ifp->if_afdata[AF_INET6] is NULL). Ensure we don't panic when the MTU is
updated.
pfsync interfaces will never have ip6 support, because it's explicitly disabled
in in6_domifattach().
PR: 205194
According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.
Sponsored by: The FreeBSD Foundation
amd64: allow base memory segment to start at address different than 0
Current code requires that the first physical memory segment starts at 0,
but this is not really needed. We only need to make sure the bootstrap code
and page tables for APs are allocated below 4GB.
This patch removes this requirement and allows booting a Dell R710 from
UEFI, where the first physical memory segment starts at 0x10000.
Sponsored by: Citrix Systems R&D
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D1417
If a NIS server has long entries on its database that is bigger than
1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry
loop when is requesting the information from the NIS server.
The ypmatch(1) will return an error until the command receives an
kill(1).
To avoid this problem, we check the MAX_RETRIES that is by default set
to 20 and avoid get in infinet loop at the client side.
NOTE: FreeBSD nis(8) server doesn't present this issue.
Submitted by: Ravi Pokala <rpokala at panasas.com>,
Lakshmi N. Sundararajan <lakshmi.n at msystechnologies.com>,
Lewis, Fred <flewis at panasas.com>,
Pushkar Kothavade <pushkar.kothavade at msystechnologies.com>
Add -static to CFLAGS to unbreak the tests by using a libc.a with
the xlocale private symbols exposed which aren't exposed publicly
via the DSO
PR: 191354
Sponsored by: EMC / Isilon Storage Division
resolver: automatically reload /etc/resolv.conf
On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed. If so, reload the file and reinitialize
the resolver library. However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.
This new behavior is enabled by default. Add a "reload-period" option
to disable it or change the period of the test.
Document this behavior and option in resolv.conf(5).
Polish the man page just enough to appease igor.
Relnotes: yes
Sponsored by: Dell Inc.
resolver: abuse _res a little less
In the past, _res was a global variable. Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.
Fix those callers to store the result of _res in a local variable.
Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred. Thanks to jilles
for noticing this.
Sponsored by: Dell Inc.
RFC 3493 requires ignoring the loopback address for AI_ADDRCONFIG.
Since it breaks certain jail setup, we ignore just 127.0.0.1
instead of whole loopback address range.
PR: 192014
Reviewed by: hrs
is executed.
Currently rc scripts implementing their own start_cmd do not enjoy the
benefits of rc.subr's own check for rc_pid.
This leads to around a third of ports with such a start_cmd not to check for
the process at all and two thirds of ports to re-implement this check
(sometimes wrongly).
This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed.
Submitted by: Dirk Engling
Reviewed by: feld
Relnotes: yes
Allow users override `DEBUG` on the command line via DEBUG_FLAGS="-DDEBUG" with
lib/libc/resolv by conditionalizing its definition
Reviewed by: ume, vangyzen
Differential Revision: https://reviews.freebsd.org/D4519
MFC r276764, r281781, r282291, r292106
Add support to crunchide for handling AArch64 (arm64) ELF files.
Remove local EM_* ELF definitions provided by system ELF headers
Restore local EM_AARCH64 constant for bootstrapping
Add RISC-V to supported machine types
Sponsored by: The FreeBSD Foundation