| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In vmstat there is a switch statement that converts these attributes to
a string. As some values can be duplicate we have to hide these from
userspace.
Replace this switch statement with an if ... else macro that lets us
repeat values without a compiler error.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D29703
(cherry picked from commit 15221c552b3cabcbf26613246e855010b176805a)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Suggested by: brooks
Reviewed by: brooks, markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30452
(cherry picked from commit 3f2508b7f3855102abed99b846e30e728ba3d04d)
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 186ba88a7c1f2bea14eb3fb092671e8367f7187f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30170
(cherry picked from commit 71ec05a21257e159f40d54e26ad0011bb19b5134)
|
|
|
|
|
|
|
|
|
| |
PR: 255798
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30234
(cherry picked from commit fa43162c63790806d0effba5ac98a1a3c6b835e1)
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
(cherry picked from commit cd497bd40bb65b5e4603d57614eb15ca7d947a10)
|
|
|
|
| |
(cherry picked from commit 9e16b9530aab5e1c4efee2a8fe2feaf33340c764)
|
|
|
|
|
|
|
|
|
| |
PR: 223127
Reported by: Mathieu Arnold <mat at FreeBSD dot org>
Reviewed by: bcr, gbe
Differential Revision: https://reviews.freebsd.org/D30215
(cherry picked from commit 82483ea7adfe4213059f6dacf31f3bd1327b2cc0)
|
|
|
|
| |
(cherry picked from commit 9769f6f808210ddc304bc9e3c55121e6ce4d9075)
|
|
|
|
| |
(cherry picked from commit f6b6d216cafb154a85313a2d1bd34b18b9bfbba8)
|
|
|
|
|
|
|
|
|
|
| |
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: 7daca4e2043f ("truss: improved support for decoding compat32 arguments")
(cherry picked from commit 3cbad8287aa0ed72e07df1130ce2ae490642e63a)
|
|
|
|
|
|
| |
Reviewed by: jkim
(cherry picked from commit c6e66cbfbbd1c5dec215cf91a79689037255171c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently running `truss -a -e` does not decode any
argument values for freebsd32_* syscalls (open/readlink/etc.)
This change checks whether a syscall starts with freebsd{32,64}_ and if
so strips that prefix when looking up the syscall information. To ensure
that the truss logs include the real syscall name we create a copy of
the syscall information struct with the updated.
The other problem is that when reading string array values, truss
naively iterates over an array of char* and fetches the pointer value.
This will result in arguments not being loaded if the pointer is not
aligned to sizeof(void*), which can happens in the compat32 case. If it
happens to be aligned, we would end up printing every other value.
To fix this problem, this changes adds a pointer_size member to the
procabi struct and uses that to correctly read indirect arguments
as 64/32 bit addresses in the the compat32 case (and also compat64 on
CheriBSD).
The motivating use-case for this change is using truss for 64-bit
programs on a CHERI system, but most of the diff also applies to 32-bit
compat on a 64-bit system, so I'm upstreaming this instead of keeping it
as a local CheriBSD patch.
Output of `truss -aef ldd32 /usr/bin/ldd32` before:
39113: freebsd32_mmap(0x0,0x1000,0x3,0x1002,0xffffffff,0x0,0x0) = 543440896 (0x20644000)
39113: freebsd32_ioctl(0x1,0x402c7413,0xffffd2a0) = 0 (0x0)
/usr/bin/ldd32:
39113: write(1,"/usr/bin/ldd32:\n",16) = 16 (0x10)
39113: fork() = 39114 (0x98ca)
39114: <new process>
39114: freebsd32_execve(0xffffd97e,0xffffd680,0x20634000) EJUSTRETURN
39114: freebsd32_mmap(0x0,0x20000,0x3,0x1002,0xffffffff,0x0,0x0) = 541237248 (0x2042a000)
39114: freebsd32_mprotect(0x20427000,0x1000,0x1) = 0 (0x0)
39114: issetugid() = 0 (0x0)
39114: openat(AT_FDCWD,"/etc/libmap32.conf",O_RDONLY|O_CLOEXEC,00) ERR#2 'No such file or directory'
39114: openat(AT_FDCWD,"/var/run/ld-elf32.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
39114: read(3,"Ehnt\^A\0\0\0\M^@\0\0\0#\0\0\0\0"...,128) = 128 (0x80)
39114: freebsd32_fstat(0x3,0xffffbd98) = 0 (0x0)
39114: freebsd32_pread(0x3,0x2042f000,0x23,0x80,0x0) = 35 (0x23)
39114: close(3) = 0 (0x0)
39114: openat(AT_FDCWD,"/usr/lib32/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3)
39114: freebsd32_fstat(0x3,0xffffc7d0) = 0 (0x0)
39114: freebsd32_mmap(0x0,0x1000,0x1,0x40002,0x3,0x0,0x0) = 541368320 (0x2044a000)
After:
783: freebsd32_mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON|MAP_ALIGNED(12),-1,0x0) = 543543296 (0x2065d000)
783: freebsd32_ioctl(1,TIOCGETA,0xffffd7b0) = 0 (0x0)
/usr/bin/ldd32:
783: write(1,"/usr/bin/ldd32:\n",16) = 16 (0x10)
784: <new process>
783: fork() = 784 (0x310)
784: freebsd32_execve("/usr/bin/ldd32",[ "(null)" ],[ "LD_32_TRACE_LOADED_OBJECTS_PROGNAME=/usr/bin/ldd32", "LD_TRACE_LOADED_OBJECTS_PROGNAME=/usr/bin/ldd32", "LD_32_TRACE_LOADED_OBJECTS=yes", "LD_TRACE_LOADED_OBJECTS=yes", "USER=root", "LOGNAME=root", "HOME=/root", "SHELL=/bin/csh", "BLOCKSIZE=K", "MAIL=/var/mail/root", "MM_CHARSET=UTF-8", "LANG=C.UTF-8", "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin", "TERM=vt100", "HOSTTYPE=FreeBSD", "VENDOR=amd", "OSTYPE=FreeBSD", "MACHTYPE=x86_64", "SHLVL=1", "PWD=/root", "GROUP=wheel", "HOST=freebsd-amd64", "EDITOR=vi", "PAGER=less" ]) EJUSTRETURN
784: freebsd32_mmap(0x0,135168,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 541212672 (0x20424000)
784: freebsd32_mprotect(0x20421000,4096,PROT_READ) = 0 (0x0)
784: issetugid() = 0 (0x0)
784: sigfastblock(0x1,0x204234fc) = 0 (0x0)
784: open("/etc/libmap32.conf",O_RDONLY|O_CLOEXEC,00) ERR#2 'No such file or directory'
784: open("/var/run/ld-elf32.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
784: read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\v\0\0\0"...,128) = 128 (0x80)
784: freebsd32_fstat(3,{ mode=-r--r--r-- ,inode=18680,size=32768,blksize=0 }) = 0 (0x0)
784: freebsd32_pread(3,"/usr/lib32\0",11,0x80) = 11 (0xb)
Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D27625
(cherry picked from commit 7daca4e2043fa8d88658eb8c2fc195128cb5c3da)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is a refactoring cleanup to improve support for compat32
syscalls (and compat64 on CHERI systems). Each process ABI now has it's
own struct sycall instead of using one global list. The list of all
syscalls is replaced with a list of seen syscalls. Looking up the syscall
argument passing convention now interates over the fixed-size array instead
of using a link-list that's populated on startup so we no longer need the
init_syscall() function.
The actual functional changes are in D27625.
Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D27636
(cherry picked from commit 6019514b0b53c3fc151868b88357405b6d67f308)
|
|
|
|
| |
(cherry picked from commit 73e8f06ac523ee4b530e17d50cc580dc366f7ad8)
|
|
|
|
| |
(cherry picked from commit c192228b7398df72e472128605338555e5aa2db9)
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 50d31dbc6e2bc3aa6007edb8cdecbcb84e85d6c0)
less: upgrade to v581.
(cherry picked from commit 2235c7feac959bcc9ddfd6a2bc6be32102b1f84c)
|
|
|
|
|
|
|
| |
The diff_output was not bringing any values but was obfuscating
the code.
(cherry picked from commit 7a57c9cb5a4dffb0483beeae6da7cf266ea634be)
|
|
|
|
|
|
|
| |
Instead of 3 different complex case they have all been folded into a
simple on based on switch
(cherry picked from commit e43239f5140e1b80de122458a2ac037172866058)
|
|
|
|
| |
(cherry picked from commit e52546a3a75f6e4b327178f4d50a98dd99101c64)
|
|
|
|
| |
(cherry picked from commit 931ad51808a650fd28be27210f25ba05d8e71199)
|
|
|
|
|
|
| |
No functionnal changes
(cherry picked from commit 15abb23286541c17ff95bac056cd4979822c4288)
|
|
|
|
| |
(cherry picked from commit c440e7870a020546ad241848e2ff8e9cb27a3073)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"zgrep --version" is expected to print the version information in the
same way as "zgrep -V". However, the case handling the --version flag
is never reached, so "zgrep --version" prints:
zgrep: missing pattern
instead of:
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD
Reviewed by: yuripv
Approved by: yuripv (src)
Differential Revision: https://reviews.freebsd.org/D29813
(cherry picked from commit 16e0391f8e2124eb85af984204548cf841648db5)
|
|
|
|
|
|
|
|
|
|
| |
This also partially reverts r326025 (8a16b7a18f5d). I do not see any
point of adding SPDX tag in generated file.
Submitted by: Dan McGregor <dan.mcgregor@usask.ca> (initial version)
Differential Revision: https://reviews.freebsd.org/D28596
(cherry picked from commit 686cf5468c4a85c2a6385cdbab2383900876a41d)
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes running the du tests with /tmp as tmpfs (which is what we do in the
CheriBSD CI).
Obtained from: CheriBSD
Reviewed By: ngie
Differential Revision: https://reviews.freebsd.org/D28398
(cherry picked from commit 39a1f858ad735ef816a9b1fb7eeade2c6802eb98)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preserve more space for swap devise names.
Prevent line overflow with long devise name.
Don't draw a bar when swap is not used at all.
Simplify and optimize code.
Change the label to end at end of 100%.
PR: 251655
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D27496
(cherry picked from commit 8d06c3e7a40831ac139d83b85b282206229b426f)
|
|
|
|
|
|
|
|
| |
They are no longer supported by mdoc(7).
MFC after: 1 week
(cherry picked from commit fcbaf46b763a91bb41fe68afdcf59a7d210bc2f7)
|
|
|
|
|
|
|
| |
systat does not have a "-display" flag. Use Ar to indicate that
"display" is meant to be substituted with an actual display command.
(cherry picked from commit e6f59be239aa17f80b44ded4779e29f5d5352b28)
|
|
|
|
|
|
|
|
| |
This partition type can be used to boot some PowerKVM VMs. We don't
support it well because of some limitations in SLOF, but it's worth at
least have feature parity in geom and mkimg.
(cherry picked from commit f7aebfbe5c0ab63dbb3d134d143ccff2c2b278bb)
|
|
|
|
|
|
| |
Obtained from: OpenBSD
(cherry picked from commit 97fa288a663dfae192c471ec5cbfdf0d2f45367e)
|
|
|
|
|
|
| |
Obtained from: OpenBSD
(cherry picked from commit 9048d9a933f57991ee042618ab89dd49d8cbad89)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This version fixes an issue (missing pop of top-of-stack value in the
"P" command of the dc program).
This issue did not affect the bc program, since it does not use dc as
an back-end to actually perform the calculations as was the case with
the traditional bc and dc programs.
The major number has been bumped due to Windows support that has been
added to this version. It does not correspond to a major change that
might affect FreeBSD.
(cherry picked from commit b55a927bc884d7780d65a508572023b0dc2dede9)
|
|
|
|
|
|
|
|
|
|
| |
rttrash (unused but not yet delete entries) were eliminated
during routing rework. Remove reading these symbols from the kernel.
PR: 254681
Reported by: rashey@superbox.pl
(cherry picked from commit 4084b1ab0413d15dab496b1c24c3875601c71438)
|
|
|
|
|
|
|
| |
Reviewed By: jhb, imp
Differential Revision: https://reviews.freebsd.org/D29381
(cherry picked from commit 9e5aeba51b431256adfd18b087ee61b09bfd6a79)
|
|
|
|
| |
(cherry picked from commit 60a632f047cdb6e5314711f593a4d3b1f1d8dde9)
|
|
|
|
|
|
|
|
|
|
|
|
| |
A simple find command appeared in Version 1 AT&T UNIX and was removed in
Version 3 AT&T UNIX. It was rewritten for Version 5 AT&T UNIX and later
be enhanced for the Programmer's Workbench (PWB). These changes were
later incorporated in AT&T UNIX v7.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D29114
(cherry picked from commit a9275d996c229a30879baa42a6d02d24663ac43b)
|
|
|
|
|
|
|
|
|
| |
While here, change mdoc macro from Ic to Fl.
PR: 253499
Reported by: Michael Siegel <bugcounterism at malbolge.net>
(cherry picked from commit 75e6f664c469927ca73ecd7b16a8058bc292a451)
|
|
|
|
|
|
|
|
|
|
| |
When checking if the newly opened file is the same as the old one,
we need to fstat() the new file descriptor, not the old one again.
Reviewed by: glebius
Sponsored by: Netflix
(cherry picked from commit 7787e7eed9d2a43fb6eb66666040f1b495995a2f)
|
|
|
|
|
|
|
| |
MFC after: 3 days
PR: 253737
(cherry picked from commit 1df30489a8f7083c98010c94d9ce522f9e8213dc)
|
|
|
|
|
|
|
|
|
| |
This now does nothing instead of incr/decr by 10%
MFC After: 3 days
PR: 253736
(cherry picked from commit 3b005d51bd0fe4d8d19fb2df4d470b6e8baebf16)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
init(8) sets the "daemon" login class without specifying a pw
entry (so no substitutions are done on the variables). service(8)'s
use of env -L had the effect of specifying root's pw entry, with two
effects: getpwnam and getpwuid are being called, which may not be
entirely safe depending on what nsswitch is up to and what stage of
boot we are at, and substitutions would have been done.
Fix by teaching env(8) to allow -L -/classname to set the class
environment with no pw entry at all specified, and use it in
service(8).
PR: 253959
(cherry picked from commit 55deb0a5f089c8a27cfc1666655b93881c2b47ae)
(cherry picked from commit 0c1a5eaae83267365330437adb60f44e1a622a2b)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allow us to create image with the following format:
mkimg -v -o sdcard -s gpt -p efi:=esp_aarch64.img:1M -p freebsd-ufs::1G
Which will add a efi partition at a 1M offset on the image with its content
coming from the esp_aarch64.img file.
MFC after: 3 days
(cherry picked from commit 8f3c71c85e5f6a4d2bddbfead225d33b96dbd7d7)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even with an absolute offset we want to know the last block the partition
otherwise we endup with an image the size of the metadata.
This allow to create image with the ESP placed at a specific position which
is useful on arm/arm64 where u-boot have always a hard time to read the ESP
if it's not aligned on 512k.
mkimg -v -o sdcard -s gpt -p efi::54M:1M -p freebsd-ufs::1G
now works.
MFC after: 3 days
(cherry picked from commit 3b6268bb9e4aea939c4ce7f37353174aa90e6751)
|
|
|
|
| |
(cherry picked from commit 25c6318c7906f6f4e0c66ce16f81bdb830ba2e3b)
|
|
|
|
| |
(cherry picked from commit 90da2c797bfa7639005ed46ab9173feb8bd85ecd)
|
|
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit 8af54bdfcaecf922f936a14d1d9efcf84076029f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
summary of changes, or for a more thorough overview:
https://subversion.apache.org/docs/release-notes/1.14
NOTE 1: There is no need to dump and reload repositories, and the
working copy format is still the same as Subversion 1.8 through 1.13.
NOTE 2: The upstream release also contains a fix for a security issue in
mod_dav_svn (CVE-2020-17525), but since we do not build or use any
Apache modules, it is not an issue for the FreeBSD base system.
Relnotes: yes
(cherry-picked from 0ff1014944897f4f3ffa4462406cdee920b53400)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I found this when compiling all the bootstrap tools with -fsanitize=addres:
==65590==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62d000008400 at pc 0x000000473053 bp 0x7ffc1c7dd910 sp 0x7ffc1c7dd0b8
READ of size 32769 at 0x62d000008400 thread T0
#0 0x473052 in regexec (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052)
#1 0x4c9cf3 in procline /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:539:8
#2 0x4c8687 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:379:18
#3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8
0x62d000008400 is located 0 bytes to the right of 32768-byte region [0x62d000000400,0x62d000008400)
allocated by thread T0 here:
#0 0x493d5d in malloc (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x493d5d)
#1 0x4cad75 in grep_malloc /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:656:13
#2 0x4c8129 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c
#3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8
SUMMARY: AddressSanitizer: heap-buffer-overflow (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) in regexec
Reviewed By: kevans
MFC after: 1 week
(cherry picked from commit 81c3f64110bb76e24d6062eafd7206c10f676d6f)
|