| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Add some .Xrs to getloginclass(2).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve typing of POSIX search tree functions.
Back in 2015 when I reimplemented these functions to use an AVL tree, I
was annoyed by the weakness of the typing of these functions. Both tree
nodes and keys are represented by 'void *', meaning that things like the
documentation for these functions are an absolute train wreck.
To make things worse, users of these functions need to cast the return
value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to
access the key. Technically speaking such casts violate aliasing rules.
I've observed actual breakages as a result of this by enabling features
like LTO.
I've filed a bug report at the Austin Group. Looking at the way the bug
got resolved, they made a pretty good step in the right direction. A new
type 'posix_tnode' has been added to correspond to tree nodes. It is
still defined as 'void' for source-level compatibility, but in the very
far future it could be replaced by a proper structure type containing a
key pointer.
|
|
|
|
| |
directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and add
it to lib/libc/tests/sys/Makefile [*]
Even though make -VPACKAGE and make -n install seem to do the right thing,
the effects are a bit different, depending on the build host.
Obtained from: HardenedBSD (af602f0db) [*]
|
|
|
|
|
|
|
| |
Remove spurious newlines from atf_tc_fail calls
This changes the results from broken (incorrect) to failed (correct) on
i386
|
|
|
|
|
|
|
|
|
| |
Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo}
needlessly
This is already being done by bsd.test.mk
The other subdirectory Makefiles were intentionally left alone
|
|
|
|
|
|
| |
btree(3): don't shortcut closing if the metadata is dirty.
Obtained from: NetBSD (from krb5 tree)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r304677:
Add tftpfs support for the EFI loader
Allow netbooting on efi without having to setup any NFS server by rebuilding the
loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader
r305125:
Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi
Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)
From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)
if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.
We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.
Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.
Relnotes: yes
Sponsored by: Gandi.net
|
|
|
|
|
|
|
|
|
|
|
|
| |
pxeboot: Add nfs.read_size tunable.
Increase this tunable improves kernel loading speed.
Submitted by: Jun Su <junsu microsoft com>
Reviewed by: rpokala, wblock (previous version)
Obtained from: DragonFlyBSD
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7756
|
|
|
|
| |
Correct indent.
|
|
|
|
| |
Fill msg_len for the initial element of msgvec.
|
|
|
|
|
|
|
|
|
|
|
| |
Sync libarchive with vendor including security fixes.
Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#794: Invalid file on bsdtar command line results in internal errors (1)
PR: 213092 (1)
|
| |
|
|
|
|
| |
Export the mq_getfd_np() and timer_oshandle_np() symbols from librt.so.
|
|
|
|
|
|
|
| |
Document thr_suspend(2) and thr_wake(2).
MFC r306506:
Reword the statement.
|
|
|
|
| |
Add an article.
|
|
|
|
|
|
|
| |
Reduce size of ufs inode.
MFC r305903:
Fix libprocstat build after r305902.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new 'clear driver' command for devctl along with the accompanying
ioctl and devctl_clear_driver() library routine to reset a device to
use a wildcard devclass instead of a fixed devclass. This can be used
to undo a previous 'set driver' command. After the device's name has
been reset to permit wildcard names, it is reprobed so that it can
attach to newly-available (to it) device drivers.
Sponsored by: Chelsio Communications
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Microoptimize %p case.
2) Implememt %u for GNU compatibility.
3) Don't forget to advance buf for %w/%u.
4) Fail with incomplete week (week 0) request and no such week in the
year.
5) Fix yday formula when Sunday requested and the week started from Monday.
6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u
request.
7) Shift yday/wday to the first day of the year, if incomplete week
(week 0) requested and no %w/%u used.
8) For already non-standard %z extension implement GNU compatible formats:
+hh and -hh.
9) Check for incorrect values for %z.
PR: 212983 (case 3 only)
|
|
|
|
|
|
|
| |
Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap.
MFC r306366:
Editing fixes for r306257, documentation for trapcap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sync libarchive with vendor including important security fixes.
Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions
This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
Fix for vulnerability #2 has already been merged in r305188.
Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f
|
|
|
|
|
|
|
| |
r304626: Add support for Ed25519 keys.
r304635: Remove support for SSH1, already disabled in our OpenSSH.
Submitted by: mwlucas (r304626), vangyzen (r304635)
|
|
|
|
|
| |
Approved by: kib (mentor)
Sponsored by: Dell Technologies
|
|
|
|
|
|
| |
Fix missing fmodl() on arches with 53-bit long doubles.
PR: 199422, 211965
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r305033:
Minor Makefile simplifications for lib/atf/...
- Replace uses of `${.CURDIR:H:H:H}` with ${SRCTOP}
- Use built-in :H operator instead of ".." when enumerating paths.
r305041:
Filter certain compile-time options into -DATF_BUILD_*
Items filtered through are:
- Constant defines (-D)
- Include flags (-I)
- Linker flags (-L)
- Optimization level (-O)
- Warnings / linker flags (-W)
- Preprocessor options (-f)
This fixes the scenario hit by the Jenkins job where it's infecting
the build with --sysroot, etc options from the Jenkins build in the
tests.
Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*].
Requested by: jmmv
r305170:
Don't bake all of CC/CPP/CXX into CFLAGS
Capture executable names for CC, CPP, CXX (assumed to be the
first non-CCACHE_BIN word).
This change strips out all of the cross-compiler arguments, (-target,
-B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it
doesn't infect the build and subsequently the test.
Add comments noting why this logic is being added, and why the logic in
r305041 was necessary/what it was trying to achieve.
This is required after recent changes made to the toolchain to always
specify --sysroot, -target, -B, etc with clang in buildworld (presumably
r304681).
|
|
|
|
| |
Implement userspace gettimeofday(2) with HPET timecounter.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improvements include:
* readelf: report all relocation types in rel/rela for MIPS N64
* readelf: add ELFOSABI_ARM_AEABI
* elfdump: add ELFOSABI_ARM_AEABI and ELFOSABI_ARM
* Add recent RISC-V relocations
* elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH
MFC r305155: readelf: silence GCC 4.2.1 uninitialized variable warning
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
Sync libarchive with vendor
Vendor issues fixed:
PR #777: Multiple bugfixes for setup_acls()
This includes a bugfix for a bug that caused ACLs not to be read properly
for files and directories inside subdirectories and as a result not being
stored or being incorrectly stored in tar archives.
|
|
|
|
|
|
|
| |
Fix array size issue when using the pre-scaling feature for
ISOCHRONOUS USB transfers. Make sure enough length and buffer pointers
are allocated when setting up the libusb transfer structure to support
the maximum number of frames the kernel can handle.
|
|
|
|
|
|
|
|
| |
misc replacements of comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.
|
|
|
|
|
|
|
|
| |
libc/rpc: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.
|
|
|
|
| |
Fix error handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Fix errors handling.
2) Prevent out of bounds access to ws[-1] (passed buffer) which happens
when the first mb sequence is incomplete and there are not enougn chars in
the read buffer. ws[-1] may lead to memory faults or false results, in
case the memory here contains '\n'.
3) Fix n == 1 case. Here should be no physical read (fill buffer) attempt
(we read n - 1 chars with the room for NUL, see fgets()),
and no NULL return.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In existing implementations including FreeBSD, there is no reason to use
readdir_r() in the common case where potentially multiple threads each list
their own directory. Code using readdir() is simpler.
What's more, although readdir_r() can safely be used on FreeBSD because
NAME_MAX is forced to 255, it cannot be used safely on systems where
{NAME_MAX} is not fixed. As a concrete example, FAT/NTFS filenames can be up
to 255 UTF-16 code units long, which can be up to 765 UTF-8 bytes.
Deprecating readdir_r() in POSIX has been proposed in
http://www.austingroupbugs.net/view.php?id=696
and glibc wants to deprecate it as well.
|
|
|
|
|
| |
Since r101651 in 2002, getvfsbyname() has written *vfc using userland
memcpy(), so the [EFAULT] error no longer occurs.
|
|
|
|
|
|
|
| |
fgetwc(3) may set both __SEOF and __SERR at once (in case of incomplete
sequence near EOF), so we can't just check for
(wc == WEOF && !__sfeof(fp)) and must relay on __sferror(fp) with
__SERR clearing/restoring.
|
|
|
|
|
|
|
|
| |
'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'.
PR: 212121
Submitted by: Herbie.Robinson@stratus.com
|
|
|
|
|
| |
If error happens, don't overwrite original errno comes from __mbrtowc()
and __srefill().
|
|
|
|
| |
Remove commented out mention of ptrace.S.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not obliterate errno value in the main thread during ptrace(2) call on x86.
MFC r304931:
Follow ABI when calling __error from the ptrace(2) wrapper.
MFC r305012:
Rewrite ptrace(2) wrappers in C.
MFC r305022:
Restore the requirement of setting errno to zero before calling ptrace(2).
|
|
|
|
|
| |
Apply the same qsort() usage fix as in r304911 getaddrinfo.c
qsort() can't be stabilized with just return(-1) alone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sync libarchive with vendor including security fixes
Vendor issues fixed:
Issue #731: Reject tar entries >= INT64_MAX
Issue #744: Very long pathnames evade symlink checks
Issue #748: libarchive can compress, but cannot decompress zip some files
PR #750: ustar: fix out of bounds read on empty string ("") filename
PR #755: fix use of acl_get_flagset_np() on FreeBSD
Issue #767: Buffer overflow printing a filename
Issue #770: Zip read: be more careful about extra_length
MFC r304874:
Temporarily disable two libarchive tests that have not yet been fixed by
vendor. Tests will be re-enabled after a fix has been merged.
|
|
|
|
| |
Typesetting fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The formal behavior of qsort is unstable with regard to objects that
are equal. Unfortunately, RFC 3484 requires that otherwise equal objects
remain in the order supplied by the DNS server. The present code attempts
to deal with this by returning -1 for objects that are equal (i.e.,
returns that the first parameter is less then the second parameter).
Unfortunately, the qsort API does not state that the first parameter
passed in is in any particular position in the list.
PR: 212122
Submitted by: Herbie.Robinson@stratus.com
|
|
|
|
| |
Add fdatasync(2) man page, combined with fsync(2).
|
|
|
|
| |
The fdatasync(2) call must be cancellation point.
|
|
|
|
| |
Add a trivial implementation of fdatasync(2).
|
|
|
|
|
|
|
|
|
|
|
| |
Increase timeout from 10 minutes to 20 minutes for all tests
On particular slow networks, it can (on average) take longer to
resolve hosts to IP* addresses. 20 minutes seemed reasonable for
my work network
This will be solved in a more meaningful way (if possible) using
concurrency in the near future
|