summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* regex(3): belatedly document REG_POSIX from r363734Kyle Evans2020-08-041-1/+12
| | | | | | | | My original patch included this documented, but it appears that I failed to include the manpage update. Do so now. Notes: svn path=/head/; revision=363817
* Add SOL_LOCAL symbolic constant for unix socket option level.Konstantin Belousov2020-08-031-1/+1
| | | | | | | | | | | | | The constant seems to exists on MacOS X >= 10.8. Requested by: swills Reviewed by: allanjude, kevans Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25933 Notes: svn path=/head/; revision=363813
* Allow building setmode.c on Linux/macOSAlex Richardson2020-08-031-4/+5
| | | | | | | | | | | | | | We bootstrap this file to allow compiling FreeBSD on Linux systems since some boostrap tools use setmode(). Unfortunately, glibc's sys/stat.h declares a non-static getumask() function (which is unimplemented!) and that conflicts with the local getumask() function. To work around this simply use a different name here. Reviewed By: brooks, emaste Differential Revision: https://reviews.freebsd.org/D25929 Notes: svn path=/head/; revision=363805
* libc: Provide sub fp(s|g)etmask() implementations for RISC-VKristof Provost2020-08-033-0/+96
| | | | | | | | | | | | | | | | | | | | RISC-V doesn't support floating-point exceptions. RISC-V Instruction Set Manual: Volume I: User-Level ISA, 11.2 Floating-Point Control and Status Register: "As allowed by the standard, we do not support traps on floating-point exceptions in the base ISA, but instead require explicit checks of the flags in software. We considered adding branches controlled directly by the contents of the floating-point accrued exception flags, but ultimately chose to omit these instructions to keep the ISA simple." We still need these functions, because some applications (notably Perl) call them, but we cannot provide a meaningful implementation. Sponsored by: Axiado Differential Revision: https://reviews.freebsd.org/D25740 Notes: svn path=/head/; revision=363796
* regex(3): Interpret many escaped ordinary characters as EESCAPEKyle Evans2020-07-292-18/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for any character to be escaped, but "ORD_CHAR preceded by an unescaped <backslash> character [gives undefined results]". Historically, we've interpreted an escaped ordinary character as the ordinary character itself. This becomes problematic when some extensions give special meanings to an otherwise ordinary character (e.g. GNU's \b, \s, \w), meaning we may have two different valid interpretations of the same sequence. To make this easier to deal with and given that the standard calls this undefined, we should throw an error (EESCAPE) if we run into this scenario to ease transition into a state where some escaped ordinaries are blessed with a special meaning -- it will either error out or have extended behavior, rather than have two entirely different versions of undefined behavior that leave the consumer of regex(3) guessing as to what behavior will be used or leaving them with false impressions. This change bumps the symbol version of regcomp to FBSD_1.6 and provides the old escape semantics for legacy applications, just in case one has an older application that would immediately turn into a pumpkin because of an extraneous escape that's embedded or otherwise critical to its operation. This is the final piece needed before enhancing libregex with GNU extensions and flipping the switch on bsdgrep. [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ PR: 229925 (exp-run, courtesy of antoine) Differential Revision: https://reviews.freebsd.org/D10510 Notes: svn path=/head/; revision=363679
* [skip ci] document close_range(2) as async-signal-safeAlan Somers2020-07-211-1/+2
| | | | | | | | | | Reviewed by: bcr (manpages) MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25513 Notes: svn path=/head/; revision=363398
* Revert that!Simon J. Gerraty2020-07-191-1/+1
| | | | Notes: svn path=/head/; revision=363351
* Oops missed Makefile.configSimon J. Gerraty2020-07-191-1/+1
| | | | Notes: svn path=/head/; revision=363350
* Don't imply that all action values can be OR'd.Brooks Davis2020-07-151-10/+11
| | | | | | | | | | | | | | This is neither POSIX compliant nor what the implementation does. This could be allowed by changing the value of TCSAFLUSH from 2 to 3, but that doesn't seem worthwhile after 25+ years. Reviewed by: imp MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25659 Notes: svn path=/head/; revision=363228
* Revert r351416 to let lib.libc.gen.getmntinfo_test.getmntinfo_test get more testLi-Wen Hsu2020-07-131-3/+0
| | | | | | | | | | This is supposed to be fixed by r363068 PR: 240049 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=363165
* lseek(2): Document the seek behavior better and update the POSIX complianceGordon Bergling2020-07-131-6/+35
| | | | | | | | | | | | | | | | | | | | In certain situations lseek(2) will return successful although if no seek was performed. This can happen when operating on devices that don't support seeking (older tape drives) or when operating on changeable media devices (such as DVD or Blu-ray devices) without a medium inserted. Document this within the man page and update the POSIX compliance while here. PR: 162765 Submitted by: arundel@ Reported by: arundel@ Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25646 Notes: svn path=/head/; revision=363156
* gethostname(3): Correct the reference of the undefined value HOST_NAME_MAXGordon Bergling2020-07-131-4/+4
| | | | | | | | | | | | | PR: 143472 Submitted by: bcran@ Reported by: Jeremy Huddleston <jeremyhu at apple dot com> Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25647 Notes: svn path=/head/; revision=363147
* procctl(2): consistently refer to the last agrument as 'data'Allan Jude2020-07-111-5/+6
| | | | | | | | | | | | | | Some older references called it 'arg' Also fix a syntax error that was underlining an entire sentence. PR: 247386 Reported by: Paul Floyd <paulf@free.fr>, PauAmma (research) MFC after: 2 weeks Sponsored by: Klara Inc. Notes: svn path=/head/; revision=363104
* memfd_create: turn on SHM_GROW_ON_WRITEKyle Evans2020-07-101-1/+1
| | | | | | | | | | | memfd_create fds will no longer require an ftruncate(2) to set the size; they'll grow (to the extent that it's possible) upon write(2)-like syscalls. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D25502 Notes: svn path=/head/; revision=363066
* Apply the logic from r363051 to semctl(2) and __sem_base field.Mark Johnston2020-07-091-2/+1
| | | | | | | | | | Reported by: Jeffball <jeffball@grimm-co.com> MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25600 Notes: svn path=/head/; revision=363055
* Avoid copying out kernel pointers from msgctl(IPC_STAT).Mark Johnston2020-07-091-3/+1
| | | | | | | | | | | | | | | | | While this behaviour is harmless, it is really just an artifact of the fact that the msgctl(2) implementation uses a user-visible structure as part of the internal implementation, so it is not deliberate and these pointers are not useful to userspace. Thus, NULL them out before copying out, and remove references to them from the manual page. Reported by: Jeffball <jeffball@grimm-co.com> Reviewed by: emaste, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25600 Notes: svn path=/head/; revision=363051
* Fix printf(3) output of long doubles on RISC-VMitchell Horne2020-06-291-14/+0
| | | | | | | | | | | | | | | | | | | | | | When the RISC-V port was initially committed to FreeBSD, GCC would generate 64-bit long doubles, and the definitions in _fpmath.h reflected that. This was changed to 128-bit in GCC later that year [1], but the definitions were never updated, despite the documented workaround. This causes printf(3) and friends to interpret only the low 64-bits of a long double in ldtoa, thereby printing incorrect values. Update the definitions now that both clang and GCC generate 128-bit long doubles. [1] https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0 PR: 242067 Reported by: Dennis Clarke <dclarke@blastwave.org> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25420 Notes: svn path=/head/; revision=362788
* Explain how to learn about possible recognized locale namesJoerg Wunsch2020-06-271-0/+16
| | | | | | | | | | | | | | Posix says that the interpretation of the locale string is "implementation-defined", so we ought to document what is actually recognized. Also add a cross reference to locale(1). PR: 247553 MFC after: 1 week Notes: svn path=/head/; revision=362708
* Chroot actually appeared in 7th Edition Unix.Warner Losh2020-06-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Chroot appeared during the development of 7th edition Unix. The FreeBSD jail documents, incorrectly, that Bill Joy added this to 4.2BSD on 18 March 1982. That was when Bill Joy converted from a statically coded system call glue to dynamically generated assembler. Chroot was present in 32V, 3BSD, 4.0BSD, 4.1BSD and 4.1cBSD well in advance of this. Kirk McKusick agrees with this analysis. See also: V7: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/sys/chroot.s 32V: https://minnie.tuhs.org/cgi-bin/utree.pl?file=32V/usr/src/libc/sys/chroot.s 3BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/src/libc/sys/chroot.s 4BSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4BSD/usr/src/libc/sys/chroot.s 4.1cBSD: https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/libc/sys/chroot.s The 6th and earlier editions do not have this system call, nor do they have anything named chroot in the trees available from TUHS. Reviewed by: allanjude@ Differential Revision: https://reviews.freebsd.org/D25475 Notes: svn path=/head/; revision=362664
* man page of select(2) should mention pselect(2)Pawel Biernacki2020-06-251-1/+2
| | | | | | | | | | | Reviewed by: bcr (manpages), kib, trasz Approved by: kib (mentor) MFC after: 7 days Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25169 Notes: svn path=/head/; revision=362611
* Enable long double tests on RISC-VMitchell Horne2020-06-242-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Some of the NetBSD contributed tests are gated behind the __HAVE_LONG_DOUBLE flag. This flag seems to be defined only for platforms whose long double is larger than their double. I could not find this explicitly documented anywhere, but it is implied by the definitions in NetBSD's sys/arch/${arch}/include/math.h headers, and the following assertion from the UBSAN code: #ifdef __HAVE_LONG_DOUBLE long double LD; ASSERT(sizeof(LD) > sizeof(uint64_t)); #endif RISC-V has 128-bit long doubles, so enable the tests on this platform, and update the comments to better explain the purpose of this flag. Reviewed by: ngie MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25419 Notes: svn path=/head/; revision=362576
* strtok(3): make it easier to find the RETURN VALUES sectionPiotr Pawel Stefaniak2020-06-221-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=362495
* Add include missing from my last commit.Michael Tuexen2020-06-211-0/+1
| | | | Notes: svn path=/head/; revision=362474
* Cleanup the defintion of struct sctp_getaddresses. This stuctureMichael Tuexen2020-06-211-8/+8
| | | | | | | | | | is used by the IPPROTO_SCTP level socket options SCTP_GET_PEER_ADDRESSES and SCTP_GET_LOCAL_ADDRESSES, which are used by libc to implement sctp_getladdrs() and sctp_getpaddrs(). These changes allow an old libc to work on a newer kernel. Notes: svn path=/head/; revision=362473
* Use a struct sockaddr_in pr struct sockaddr_in6 as the option valueMichael Tuexen2020-06-201-22/+13
| | | | | | | | | | | for the IPPROTO_SCTP level socket options SCTP_BINDX_ADD_ADDR and SCTP_BINDX_REM_ADDR. These socket option are intended for internal use only to implement sctp_bindx(). This is one user of struct sctp_getaddresses less. struct sctp_getaddresses is strange and will be changed shortly. Notes: svn path=/head/; revision=362451
* Fix a typo in cpuset_getdomain.2Mateusz Piotrowski2020-06-181-2/+2
| | | | | | | | | PR: 247385 Reported by: Paul Floyd <paulf free.fr> MFC after: 1 week Notes: svn path=/head/; revision=362336
* Whitespace changes, not functional change intended.Michael Tuexen2020-06-181-22/+23
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=362332
* fgetln(3): Add a Caveats SectionGordon Bergling2020-06-181-1/+31
| | | | | | | | | | | Reviewed by: yuripv, bcr (mentor) Approved by: bcr (mentror) Obtained from: OpenBSD MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D24916 Notes: svn path=/head/; revision=362326
* Fix pointer name to match the name used in the function prototypeMarc Fonvieille2020-06-161-7/+7
| | | | | | | | | above (and in termios.c). Discussed with: Rodney W. Grimes <rgrimes@FreeBSD.org> Notes: svn path=/head/; revision=362232
* libcasper(3): Document HISTORY within the manpagesGordon Bergling2020-06-167-7/+48
| | | | | | | | | | Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D24695 Notes: svn path=/head/; revision=362230
* libc manpages: various improvements from NetBSDGordon Bergling2020-06-147-7/+76
| | | | | | | | | | | | | | - Add STANDARDS and HISTORY sections within the appropriate manpages - Mention two USENIX papers within kqueue(2) and strlcpy(3) Reviewed by: bcr (mentor) Approved by: bcr (mentor) Obtained from: NetBSD MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D24650 Notes: svn path=/head/; revision=362171
* procctl(2): document PROC_KPTIKonstantin Belousov2020-06-131-1/+42
| | | | | | | | | | Reviewed by: bcr Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25258 Notes: svn path=/head/; revision=362151
* procctl(2): consistently refer to the data pointer as 'data'.Konstantin Belousov2020-06-131-6/+6
| | | | | | | | | | Reviewed by: bcr Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25258 Notes: svn path=/head/; revision=362150
* posix_spawn: fix for some custom allocator setupsKyle Evans2020-06-121-1/+11
| | | | | | | | | | | | | | | | | | | | libc cannot assume that aligned_alloc and free come from jemalloc, or that any application providing its own malloc and free is actually providing aligned_alloc. Switch back to malloc and just make sure we're passing a properly aligned stack into rfork_thread, as an application perhaps can't reasonably replace just malloc or just free without headaches. This unbreaks ksh93 after r361996, which provides malloc/free but no aligned_alloc. Reported by: freqlabs Diagnosed by: Andrew Gierth <andrew_tao173.riddles.org.uk> X-MFC-With: r361996 Notes: svn path=/head/; revision=362111
* Add pthread_getname_np() and pthread_setname_np() aliases forKonstantin Belousov2020-06-102-0/+4
| | | | | | | | | | | | | | | pthread_get_name_np() and pthread_set_name_np(). This re-applies r361770 after compatibility fixes. Reviewed by: antoine, jkim, markj Tested by: antoine (exp-run) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25117 Notes: svn path=/head/; revision=362032
* Add missing shell script from r361995Kyle Evans2020-06-101-0/+4
| | | | | | | | | Pointy hat: kevans Reported by: rpokala X-MFC-With: r361995 Notes: svn path=/head/; revision=361999
* execvPe: obviate the need for potentially large stack allocationsKyle Evans2020-06-102-21/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some environments in which execvPe may be called have a limited amount of stack available. Currently, it avoidably allocates a segment on the stack large enough to hold PATH so that it may be mutated and use strsep() for easy parsing. This logic is now rewritten to just operate on the immutable string passed in and do the necessary math to extract individual paths, since it will be copying out those segments to another buffer anyways and piecing them together with the name for a full path. Additional size is also needed for the stack in posix_spawnp(), because it may need to push all of argv to the stack and rebuild the command with sh in front of it. We'll make sure it's properly aligned for the new thread, but future work should likely make rfork_thread a little easier to use by ensuring proper alignment. Some trivial cleanup has been done with a couple of error writes, moving strings into char arrays for use with the less fragile sizeof(). Reported by: Andrew Gierth <andrew_tao173.riddles.org.uk> Reviewed by: jilles, kib, Andrew Gierth MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25038 Notes: svn path=/head/; revision=361996
* execvp: fix up the ENOEXEC fallbackKyle Evans2020-06-103-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If execve fails with ENOEXEC, execvp is expected to rebuild the command with /bin/sh instead and try again. The previous version did this, but overlooked two details: argv[0] can conceivably be NULL, in which case memp would never get terminated. We must allocate no less than three * sizeof(char *) so we can properly terminate at all times. For the non-NULL argv standard case, we count all the non-NULL elements and actually skip the first argument, so we end up capturing the NULL terminator in our bcopy(). The second detail is that the spec is actually worded such that we should have been preserving argv[0] as passed to execvp: "[...] executed command shall be as if the process invoked the sh utility using execl() as follows: execl(<shell path>, arg0, file, arg1, ..., (char *)0); where <shell path> is an unspecified pathname for the sh utility, file is the process image file, and for execvp(), where arg0, arg1, and so on correspond to the values passed to execvp() in argv[0], argv[1], and so on." So we make this change at this time as well, while we're already touching it. We decidedly can't preserve a NULL argv[0] as this would be incredibly, incredibly fragile, so we retain our legacy behavior of using "sh" for argv[] in this specific instance. Some light tests are added to try and detect some components of handling the ENOEXEC fallback; posix_spawnp_enoexec_fallback_null_argv0 is likely not 100% reliable, but it at least won't raise false-alarms and it did result in useful failures with pre-change libc on my machine. This is a secondary change in D25038. Reported by: Andrew Gierth <andrew_tao173.riddles.org.uk> Reviewed by: jilles, kib, Andrew Gierth MFC after: 1 week Notes: svn path=/head/; revision=361995
* Avoid using non-portable dd status=none flagAlex Richardson2020-06-052-2/+10
| | | | | | | | | | | | | | | | | Copying the approach chosen in r309412. This fixes building the libc tests on a macOS host since the macOS /bin/dd binary does not support status=none. As there only seem to be two uses, this commit changes the two Makefiles. If this becomes more common, we could also add a wrapper bootstrap script that ignores status= and forwards the remaining args to the real dd. Another alternative would be to remove the status flag and pipe stderr to /dev/null, but them we lose error messages. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D24785 Notes: svn path=/head/; revision=361829
* vfs: add restrictions to read(2) of a directory [2/2]Kyle Evans2020-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the priv(9) that waters down the sysctl to make it only allow read(2) of a dirfd by the system root. Jailed root is not allowed, but jail policy and superuser policy will abstain from allowing/denying it so that a MAC module can fully control the policy. Such a MAC module has been written, and can be found at: https://people.freebsd.org/~kevans/mac_read_dir-0.1.0.tar.gz It is expected that the MAC module won't be needed by many, as most only need to do such diagnostics that require this behavior as system root anyways. Interested parties are welcome to grab the MAC module above and create a port or locally integrate it, and with enough support it could see introduction to base. As noted in mac_read_dir.c, it is released under the BSD 2 clause license and allows the restrictions to be lifted for only jailed root or for all unprivileged users. PR: 246412 Reviewed by: mckusick, kib, emaste, jilles, cy, phk, imp (all previous) Reviewed by: rgrimes (latest version) Differential Revision: https://reviews.freebsd.org/D24596 Notes: svn path=/head/; revision=361799
* vfs: add restrictions to read(2) of a directory [1/2]Kyle Evans2020-06-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, we've allowed read() of a directory and some filesystems will accommodate (e.g. ufs/ffs, msdosfs). From the history department staffed by Warner: <<EOF pdp-7 unix seemed to allow reading directories, but they were weird, special things there so I'm unsure (my pdp-7 assembler sucks). 1st Edition's sources are lost, mostly. The kernel allows it. The reconstructed sources from 2nd or 3rd edition read it though. V6 to V7 changed the filesystem format, and should have been a warning, but reading directories weren't materially changed. 4.1b BSD introduced readdir because of UFS. UFS broke all directory reading programs in 1983. ls, du, find, etc all had to be rewritten. readdir() and friends were introduced here. SysVr3 picked up readdir() in 1987 for the AT&T fork of Unix. SysVr4 updated all the directory reading programs in 1988 because different filesystem types were introduced. In the 90s, these interfaces became completely ubiquitous as PDP-11s running V7 faded from view and all the folks that initially started on V7 upgraded to SysV. Linux never supported this (though I've not done the software archeology to check) because it has always had a pathological diversity of filesystems. EOF Disallowing read(2) on a directory has the side-effect of masking application bugs from relying on other implementation's behavior (e.g. Linux) of rejecting these with EISDIR across the board, but allowing it has been a vector for at least one stack disclosure bug in the past[0]. By POSIX, this is implementation-defined whether read() handles directories or not. Popular implementations have chosen to reject them, and this seems sensible: the data you're reading from a directory is not structured in some unified way across filesystem implementations like with readdir(2), so it is impossible for applications to portably rely on this. With this patch, we will reject most read(2) of a dirfd with EISDIR. Users that know what they're doing can conscientiously set bsd.security.allow_read_dir=1 to allow read(2) of directories, as it has proven useful for debugging or recovery. A future commit will further limit the sysctl to allow only the system root to read(2) directories, to make it at least relatively safe to leave on for longer periods of time. While we're adding logic pertaining to directory vnodes to vn_io_fault, an additional assertion has also been added to ensure that we're not reaching vn_io_fault with any write request on a directory vnode. Such request would be a logical error in the kernel, and must be debugged rather than allowing it to potentially silently error out. Commented out shell aliases have been placed in root's chsrc/shrc to promote awareness that grep may become noisy after this change, depending on your usage. A tentative MFC plan has been put together to try and make it as trivial as possible to identify issues and collect reports; note that this will be strongly re-evaluated. Tentatively, I will MFC this knob with the default as it is in HEAD to improve our odds of actually getting reports. The future priv(9) to further restrict the sysctl WILL NOT BE MERGED BACK, so the knob will be a faithful reversion on stable/12. We will go into the merge acknowledging that the sysctl default may be flipped back to restore historical behavior at *any* point if it's warranted. [0] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:10.ufs.asc PR: 246412 Reviewed by: mckusick, kib, emaste, jilles, cy, phk, imp (all previous) Reviewed by: rgrimes (latest version) MFC after: 1 month (note the MFC plan mentioned above) Relnotes: absolutely, but will amend previous RELNOTES entry Differential Revision: https://reviews.freebsd.org/D24596 Notes: svn path=/head/; revision=361798
* mmap.2: correct prot argument terminologyEd Maste2020-06-031-2/+2
| | | | | | | | | | | | One of the error descriptions referred to permissions; in context the meaning was probably clear, but the prot values are properly called protections. MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=361769
* Document SO_NO_OFFLOADS and SO_NO_DDP.John Baldwin2020-06-031-2/+15
| | | | | | | | | | Reviewed by: bcr, np MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25043 Notes: svn path=/head/; revision=361767
* Add an entry to Symbol.map for the rpctls_syscall added by r361599.Rick Macklem2020-05-281-0/+1
| | | | | | | | Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D24949 Notes: svn path=/head/; revision=361603
* Implement Solaris-like link_map l_refname member.Konstantin Belousov2020-05-221-1/+7
| | | | | | | | | | | The implementation is based on the public documentation, in particular dlinfo(3) from Solaris. Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=361398
* Restore the binary compatibility for link_map l_addr.Konstantin Belousov2020-05-211-5/+8
| | | | | | | | | | | | | | | | | Keep link_map l_addr binary layout compatible, rename l_addr to l_base where rtld returns map base. Provide relocbase in newly added l_addr. This effectively reverts the patch to the initial version of D24918. Reported by: antoine (portmgr) Reviewed by: jhb, markj Tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24946 Notes: svn path=/head/; revision=361349
* Change the samantic of struct link_map l_addr member.Konstantin Belousov2020-05-201-3/+5
| | | | | | | | | | | | | | | | | | | | It previously returned the object map base address, while all other ELF operating systems return load offset, i.e. the difference between map base and the link base. Explain the meaning of the field in the man page. Stop filling the mips-only l_offs member, which is apparently unused. PR: 246561 Requested by: Damjan Jovanovic <damjan.jov@gmail.com> Reviewed by: emaste, jhb, cem (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24918 Notes: svn path=/head/; revision=361303
* Fix a typo: argments -> argumentsBenedict Reuschling2020-05-191-1/+1
| | | | | | | | | PR: 243294 Submitted by: Igor Ostapenko MFC after: 5 days Notes: svn path=/head/; revision=361249
* procctl(2): correct a minor cut-n-pastoKyle Evans2020-05-161-2/+2
| | | | | | | | | | This is clearly describing PROC_PROTMAX_FORCE_DISABLE, rather than PROC_ASL_FORCE_DISABLE. Submitted by: sigsys@gmail.com Notes: svn path=/head/; revision=361105
* Implement RTLD_DEEPBIND.Konstantin Belousov2020-05-151-1/+4
| | | | | | | | | | | PR: 246462 Tested by: Martin Birgmeier <d8zNeCFG@aon.at> Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24841 Notes: svn path=/head/; revision=361073