Banner appeared in the 6th edition of AT&T Research unit. It was
subsequently on all the Berkeley tapes, as well as PWB, System III and
System V. The PWB/AT&T and BSD banner programs were different, and the
current FreeBSD banner program shares many elements of the 3BSD one,
though the font has changed.
Sponsored by: Netflix
vmstat dates back to 3BSD, but wasn't in 32V nor the 7th edition. It
does not seem to have been in AT&T's commercial offerings at all.
Sponsored by: Netflix
Basename(1) first appeared in the 7th edition. It was not in the 6th
edition, or PWB releases. It's on all the subsequent descendants.
Dirname(1) first appeared in System III, and was later picked up in
4.3-Reno and 8th edition research unix (though was not in 4.1BSD where
the bulk of 8th edition came from). In System III and V8 it was a shell
script, though the BSD version is in C.
Sponsored by: Netflix
And move all the nfs related commands there.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D30754
Sponsored by: Diablotin Systems
The sockstat is using password database operations to obtain
the username. Such operations are disallowed in capability mode.
For such operations Casper is required.
Reported by: olivier@
Tested by: olivier@
The get_proto_type function is used before creating the Casper function.
This is why we have to distinguish when the Casper service is allocated or not.
Reported by: olivier@
Tested by: olivier@
This results in a significant improvement in the runtime of sort(1) when
radix sort cannot be used. This comes at the expense of increased
memory usage, but this is small relative to sort's overall memory usage.
PR: 255551
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30319
Noticed while porting the recent truss compat32 changes to CheriBSD.
This also fixes i386 tracing by zero-extending user addresses instead
of sign-extending them.
Reviewed By: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D30211
Deciding whether to combine two values to a 64-bit one should be based on
the process ABI, and not dependent on whether truss is compiled for an
LP64 ABI. This is a follow-up cleanup for D27625. I found this while
looking for uses of the `__LP64__` macro (since using this is wrong for
CHERI systems).
Test Plan: truss still works. Since I tested on AMD64 and all syscalls
in the trace have their quad argument last there was no difference
in the output. Should fix output for compat32 on MIPS64 though.
Reviewed By: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D27637
Attempting to parse the output as UTF-8 exposed an out-of-bounds read
in vis(3) (see https://reviews.freebsd.org/D30771). However, I don't
think it makes much sense to decode this output at all. Additionally,
passing one byte at a time will almost certainly result in incorrect
output for multi-byte characters.
Reviewed By: brooks
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D30772
The -[AMc] flags ignore the user argument. Better if id rejects
invocations that include a user argument along with any of those flags.
PR: 256554
MFC after: 2 weeks
Reviewed by: trasz
Sponsored by: Axcient
Differential Revision: https://reviews.freebsd.org/D30734
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the
upstream release/12.x branch was created.
PR: 255570
MFC after: 6 weeks
Add fortune explaining how to use `sysctl kern.tty_info_kstacks' to
alter the output of ^T (tty info).
Reviewed by: ceri
Differential Revision: https://reviews.freebsd.org/D30388
Currently IREMOTE assumes that every value is (initially) a pointer to a
long. This is true for NUMBERs, but false for STRINGs, which are instead
pointers to pointers, though on ILP32 and LP64 systems these happen to
have the same representation, but this is still a strict aliasing
violation, and of course breaks on systems where the representations are
not the same, such as CHERI. We do not currently have any BOOLs (short,
curiously) or CHARs used with IREMOTE, though the code should not be
relying on that.
This removes the unused setaddress macro, and the now-unused address
macro due to the above issue.
Reviewed by: imp, kib
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D30697
Whilst all FreeBSD architectures have the same representation for
intptr_t and long (even if the former is int on ILP32 architectures),
this is more general and correct, and on CHERI they are not the same so
warnings are generated by default for integer-to-pointer casts that
aren't via (u)intptr_t.
Reviewed by: imp, kib
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D30696
The C++-style comment marker "//" has been added with the rewrite of
the preprocessor features. Since this character sequence occurs in
ULRS, the reminder of the URL was considered a comment and stripped
from the calendar line.
Change parsing of "//" to only start a comment at the begin of a line
or when preceeded by a white-space character.
PR: 256455
Reported by: Philippe Michel (philippe.michel7 at free.fr)
MFC after: 3 days
Drop rights we do not need. This has to be done after jail_attach.
Reviewed by: oshogbo
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D26958
Paste's man page contains an example for a reimplementation of
nl(1). This example uses the command line
sed = myfile | paste -s -d '\t\n' - -
in order to concatenate consecutive lines with an intervening tab.
However, the way the example uses the switches -s and -d and two `dash`
input files is redundant. There are in fact two equivalent but simpler
ways to achieve the desired result:
sed = myfile | paste -s -d '\t\n' -
uses the same style as the previous example, while
sed = myfile | paste - -
is arguably even simpler and illustrates the final sentence of the
DESCRIPTION.
Reviewed by: imp@
Pull Request: https://github.com/freebsd/freebsd-src/pull/163
Detect if host endian is different than target endian and swap
byte order of ELF note fields instead of failing.
Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29550
API should work as following:
- periodicaly report Lower-or-EQual bandwidth (LEQ) connections
over kernel socket, if user application registered for such
per-flow notifications
- report Grater-or-EQual (GEQ) bandwidth as soon as it reaches
specified value in configured time window
Custom implementation of callouts was removed. There is no
point of doing calout-wheel here as generic callouts are
doing exactly the same. The performance is not critical
for such reporting, so the biggest concern should be
to have a code which can be easily maintained.
This is ia preparation for locking rework which is highly inefficient.
Approved by: mw
Sponsored by: Stormshield
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D30210
While here, fix all links to older en_US.ISO8859-1 documentation
in the src/ tree.
PR: 255026
Reported by: Michael Büker <freebsd@michael-bueker.de>
Reviewed by: dbaio
Approved by: blackend (mentor), re (gjb)
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D30265
Every usage of MB_CUR_MAX results in a call to __mb_cur_max. This is
inefficient and redundant. Caching the value of MB_CUR_MAX in a global
variable removes these calls and speeds up the runtime of sort. For
numeric sorting, runtime is almost halved in some tests.
PR: 255551
PR: 255840
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30170
I accidentally dropped this in the final version of D27625, so it didn't
actually work as intended. I found this while testing the MFC to stable/13.
MFC after: immediately
Fixes: 7daca4e204 ("truss: improved support for decoding compat32 arguments")
Recover from excessive losses without reverting to a
retransmission timeout (RTO). Disabled by default, enable
with sysctl net.inet.tcp.do_lrd=1
Reviewed By: #transport, rrs, tuexen, #manpages
Sponsored by: Netapp, Inc.
Differential Revision: https://reviews.freebsd.org/D28931
-k switch causes gcore to use ptrace(PT_COREDUMP) instead of manually
reading process memory and constructing the core.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D29955
On arm64 we currently use a non-posted write for device memory, however
we should move to use posted writes. This is expected to work on most
hardware, however we will need to support a non-posted option for some
broken hardware.
Reviewed by: imp, manu, bcr (manpage)
Differential Revision: https://reviews.freebsd.org/D29722
Teach poll(2) to support Linux-style POLLRDHUP events for sockets, if
requested. Triggered when the remote peer shuts down writing or closes
its end.
Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D29757
-swap disk stat based on new size.
Display corrupts after resizing a window.
Process SIGWINCH to redraw all window.
Submitted by: Yoshihiro Ota ota@j.email.ne.jp
Differential Revision: https://reviews.freebsd.org/D29337
Stop free() even if kvm_getprocs as we can come back but set nprocs = 0.
Check nprocs in showpigs() to ensure not try displaying with kvm_getprocs failed.
Current code can have pt with non-null after kvm_getprocs() failure.
Replace to realloc for simpler operations.
Submitted by: Yoshihiro Ota ota@j.email.ne.jp
Reviewed by: mckusick@
Differential Revision: https://reviews.freebsd.org/D29303
I missed the review comment to commit the changes separately, will
reland in multiple smaller commits.
Requested By: jkim
This reverts commit bbd421cdf6.
Upstream flex has added a yynoreturn, so this diff is no longer needed.
Partially reverts r181269. Also regenerate the pre-generated files that
are used for bootstrapping.
Reviewed By: jkim
Differential Revision: https://reviews.freebsd.org/D29679
This also partially reverts r326025 (8a16b7a18f). I do not see any
point of adding SPDX tag in generated file.
MFC after: 3 days
Submitted by: Dan McGregor <dan.mcgregor@usask.ca> (initial version)
Differential Revision: https://reviews.freebsd.org/D28596