summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Note some functions that appeared in First Edition UnixWarner Losh2020-04-016-5/+37
| | | | | | | | | These functions first appeared in the First Edition of Unix (or earlier in the pdp-7 version). Just claim 1st Edition for all this. The pdp-7 code is too fragmented at this point to extend history that far back. Notes: svn path=/head/; revision=359547
* Retire procfs-based process debugging.John Baldwin2020-04-011-5/+0
| | | | | | | | | | | | | | | | | | Modern debuggers and process tracers use ptrace() rather than procfs for debugging. ptrace() has a supserset of functionality available via procfs and new debugging features are only added to ptrace(). While the two debugging services share some fields in struct proc, they each use dedicated fields and separate code. This results in extra complexity to support a feature that hasn't been enabled in the default install for several years. PR: 244939 (exp-run) Reviewed by: kib, mjg (earlier version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23837 Notes: svn path=/head/; revision=359530
* Merge release 1.14 of bsnmp.Hartmut Brandt2020-04-011-0/+2
|\ | | | | | | Notes: svn path=/head/; revision=359512
| * Import version 1.14 of bsnmp. This mainly consists of bug fixesvendor/bsnmp/1.14vendor/bsnmpHartmut Brandt2020-03-319-264/+612
| | | | | | | | | | | | | | | | | | in the ASN.1 functions and comes with a test suite for these functions. Notes: svn path=/vendor/bsnmp/dist/; revision=359490 svn path=/vendor/1.14/; revision=359491; tag=vendor/bsnmp/1.14
| * Vendor import of bsnmp-1.13.vendor/bsnmp/1.13Hartmut Brandt2018-07-2719-339/+1834
| | | | | | | | | | Notes: svn path=/vendor/bsnmp/dist/; revision=336777 svn path=/vendor/bsnmp/1.13/; revision=336778; tag=vendor/bsnmp/1.13
| * Flatten bsnmp vendor area.Hartmut Brandt2008-12-2016-0/+7871
| | | | Notes: svn path=/vendor/bsnmp/dist/; revision=186357
* Use proper mdoc(7) macros for literal text and do not use TnMateusz Piotrowski2020-04-011-5/+8
| | | | | | | | | Tn is deprecated and upsets linters. MFC after: 3 days Notes: svn path=/head/; revision=359504
* Do not claim libbearssl et al are INTERNALLIBSimon J. Gerraty2020-04-011-1/+1
| | | | | | | | | | | | | If INTERNALLIB is defined we need PIE and bsd.incs.mk is not included. PR: 245189 Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org//D24233 Notes: svn path=/head/; revision=359502
* Trim some duplicate EIO descriptions.John Baldwin2020-03-302-7/+1
| | | | | | | | | | | While here, drop an extra conjunction from the list of error conditions for the remaining EIO description in symlink(2). Discussed with: mckusick (trimming duplicates) MFC after: 2 weeks Notes: svn path=/head/; revision=359467
* Document EINTEGRITY errors for many system calls.John Baldwin2020-03-3042-42/+151
| | | | | | | | | | | | | | | | | | | EINTEGRITY was previously documented as a UFS-specific error for mount(2). This documents EINTEGRITY as a filesystem-independent error that may be reported by the backing store of a filesystem. While here, document EIO as a filesystem-independent error for both mount(2) and posix_fadvise(2). EIO was previously only documented for UFS for mount(2). Reviewed by: mckusick Suggested by: mckusick MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24168 Notes: svn path=/head/; revision=359465
* libc: unconditionalize _NLIST_DO_ELFEd Maste2020-03-301-8/+0
| | | | | | | Suggested by: brooks, imp Notes: svn path=/head/; revision=359462
* nlist: retire long-obsolete aout supportEd Maste2020-03-303-104/+0
| | | | | | | | | Reviewed by: brooks, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24229 Notes: svn path=/head/; revision=359460
* msun: swap words order instead of bits order on BIG ENDIANAlfredo Dal'Ava Junior2020-03-261-4/+5
| | | | | | | | | | | | | | | | | The "for" loop on big endian was inverting all the bits instead of just the words Issue reported by TestSuite (msun lib nan_test case) Submitted by: Renato Riolino <renato.riolino@eldorado.org.br> Submitted by: Fernando Valle <fernando.valle@eldorado.org.br> Reviewed by: pfg, alfredo Approved by: jhibbits (mentor) Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23926 Notes: svn path=/head/; revision=359342
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-03-262-5/+5
|\ | | | | | | | | | | | | | | | | | | | | llvmorg-10.0.0-0-gd32170dbd5b (aka 10.0.0 release). PR: 244251 MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=359338
* | Install expected kyua docs.Brooks Davis2020-03-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "kyua about" command assumes these files exist causing tests supplied devel/kyua to fail. Fix a bug defining the default KYUA_DOCDIR so the installed files can be found. Reported by: jenkins tests Reviewed by: lwhsu Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24187 Notes: svn path=/head/; revision=359335
* | Add HISTORY sections to log(3) man pageSergio Carlavilla Delgado2020-03-261-1/+12
| | | | | | | | | | | | | | | | | | | | | | PR: 240265 Submitted by: gbergling@gmail.com Approved by: bcr@(mentor), imp@ MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D24148 Notes: svn path=/head/; revision=359326
* | Fix pkgfs stat so it satisfies libsecurebootSimon J. Gerraty2020-03-256-30/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need a valid st_dev, st_ino and st_mtime to correctly track which files have been verified and to update our notion of time. ve_utc_set(): ignore utc if it would jump our current time by more than VE_UTC_MAX_JUMP (20 years). Allow testing of install command via userboot. Need to fix its stat implementation too. bhyveload also needs stat fixed - due to change to userboot.h Call ve_error_get() from vectx_close() when hash is wrong. Track the names of files we have hashed into pcr For the purposes of measured boot, it is important to be able to reproduce the hash reflected in loader.ve.pcr so loader.ve.hashed provides a list of names in the order they were added. Reviewed by: imp MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org//D24027 Notes: svn path=/head/; revision=359307
* | libpmc: Always add the full include path for libpmcstatEmmanuel Vadot2020-03-251-2/+2
| | | | | | | | | | | | | | Previously it was only added for aarch64, amd64 and i386 Notes: svn path=/head/; revision=359295
* | pmc: Add include path for libpmcstat as it is an internallibEmmanuel Vadot2020-03-252-2/+5
| | | | | | | | | | | | | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24173 Notes: svn path=/head/; revision=359292
* | wlandebug: Add include path for libifconfig as it is a internallibEmmanuel Vadot2020-03-251-2/+3
| | | | | | | | | | | | | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D24172 Notes: svn path=/head/; revision=359291
* | exec{l,v}{e,p} arrived in 7th Edition research Unix to support the Bourne ShellWarner Losh2020-03-242-1/+9
| | | | | | | | | | | | | | | | which introduced environment variables. Document that here. Verified by consulting the TUHS archive. Notes: svn path=/head/; revision=359284
* | pkgbase: Move telnetd and ftpd pam file to the utilities packageEmmanuel Vadot2020-03-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | Both programs are in this package so put the pam.d file in there too. Reported by: emaste Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D24161 Notes: svn path=/head/; revision=359266
* | Improve LIBADD/_DP_* for kyua libraries.Brooks Davis2020-03-236-0/+6
| | | | | | | | | | | | | | | | | | | | | | This fixes build with ld.bfd as the linker (e.g. on powerpc). This corrects a bug in D24103. Sponsored by: DARPA Notes: svn path=/head/; revision=359262
* | Import the kyua test framework.Brooks Davis2020-03-2312-0/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having kyua in the base system will simplify automated testing in CI and eliminates bootstrapping issues on new platforms. The build of kyua is controlled by WITH(OUT)_TESTS_SUPPORT. Reviewed by: emaste Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24103 Notes: svn path=/head/; revision=359260
* | Add liblutok a lightweight C++ API for lua.Brooks Davis2020-03-232-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | It is added an INTERNALLIB and not installed. It will be used by kyua. This is a preparatory commit for D24103. Reviewed by: emaste Obtained from: CheriBSD Sponsored by: DARPA Notes: svn path=/head/; revision=359255
* | Add STANDARDS and HISTORY to getcontext(3), makecontext(3), and ucontext(3).Edward Tomasz Napierala2020-03-233-3/+85
| | | | | | | | | | | | | | | | | | Obtained from: NetBSD MFC after: 2 weeks Sponsored by: DARPA Notes: svn path=/head/; revision=359248
* | Document when execl and execp entered unix.Warner Losh2020-03-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For this, things are complicated. The first mention in the manual was in the 4th edition manual (as an add on to exec(II)). The 2nd and 3rd editions didn't have these in the manual (either as a separate page, or as an add-on to exec(II)). We don't have good 1st, 2nd or 3rd edition distributions to look in. However, there's a tape labeled 'last1120c' that we do have. This tape contains the last version of the V2 edition of the C compiler on it (just after C got struct). On this tape there was a libc.sa archive that contains source for execl and execp. This source is sufficiently different from the V5 sources (which are the next ones we have sources for) and have a slightly different calling convention than later sources, suggesting that the early date for the last1120c tape is correct (in that era, the epoch changed every year, leading to a one or two year ambiguity on when the files could have been modified) and it should be though of as V2. Since this was also a time of compiler development, and the calling convetions are known to be under evolution, and since the rest of the sources in libc.sa are consistent, that's further evidence that V2 is likely. Finally, 2nd edition was the last version to fully support the 11/20 because it lacked many basic features and bell labs moved off it to the 11/45 as soon as they could afford to buy one, around this time era. The unix manuals make it sound like V3 might have supported the 11/20, but the same intro could also be read to mean it didn't, at all, and that V3 was the first rewrite for the 11/45 ahead of the rewrite in C that came with V4. Taken together, the evidence leans most heavily to V2 (90% IMHO), and slightly to V3 (8%) or possibly V4 (2%). I've not put all this in the man page, but have left it here in case someone notices in the future that V4 is the first manual page for it. Notes: svn path=/head/; revision=359246
* | fix typo in exec man pageSergio Carlavilla Delgado2020-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | PR: 240258 Submitted by: gbergling@gmail.com Reported by: kib@ Approved by: bcr@(mentor, implicit) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D24145 Notes: svn path=/head/; revision=359227
* | exec man page: Add HISTORY sectionSergio Carlavilla Delgado2020-03-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | PR: 240258 Submitted by: gbergling@gmail.com Patch by: gbergling@gmail.com Approved by: bcr@(mentor) MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D24145 Notes: svn path=/head/; revision=359210
* | MFV r359197: xz 5.2.5.Xin LI2020-03-221-4/+21
| | | | | | | | | | | | | | | | MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=359201
* | nlist(3): add elf(5) xrefEd Maste2020-03-211-1/+2
| | | | | | | | | | | | | | | | Found while looking for a.out remnants; nlist should also xref the binary format we currently use. Notes: svn path=/head/; revision=359194
* | Fix uselocale(3) to not leak a reference to the old locale.Mark Johnston2020-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In a single-threaded program pthread_getspecific() always returns NULL, so the old locale would not end up being freed. PR: 239520 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=359183
* | Remove sparc support from clang build infrastructure. Any remaining sparc filesWarner Losh2020-03-202-49/+5
| | | | | | | | | | | | | | | | | | will be mopped up in future imports. Differential Revision: https://reviews.freebsd.org/D24128 Notes: svn path=/head/; revision=359163
* | Document geli(8) loader variables conventionsMateusz Piotrowski2020-03-191-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The geli(8) manual page has an example for preloading keyfiles during boot. There is no detail though on how the lookup of these variables actually works. Let's document that the name of a device does not have to be a part of the variable. PR: 243261 Submitted by: johannes@jo-t.de Approved by: bcr (mentor) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D24114 Notes: svn path=/head/; revision=359125
* | Fix race condition in catopen(3).Xin LI2020-03-191-20/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code uses a rwlock to protect the cached list, which in turn holds a list of catentry objects, and increments reference count while holding only read lock. Fix this by converting the reference counter to use atomic operations. While I'm there, also perform some clean ups around memory operations. PR: 202636 Reported by: Henry Hu <henry.hu.sh@gmail.com> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24095 Notes: svn path=/head/; revision=359118
* | Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmpDimitry Andric2020-03-182-5/+5
|\| | | | | | | | | | | | | | | | | | | | | llvmorg-10.0.0-rc4-5-g52c365aa9ca. The actual release should follow Real Soon Now. PR: 244251 MFC after: 6 weeks Notes: svn path=/head/; revision=359082
* | Fix the workaround to ignore the #warning for GCC.John Baldwin2020-03-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | clang and gcc use different warning flags for #warning preprocessor directives. Reported by: Jenkins MFC after: 1 week Notes: svn path=/head/; revision=359054
* | Mark procfs-based process debugging as deprecated for FreeBSD 13.John Baldwin2020-03-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempting to use ioctls on /proc/<pid>/mem to control a process will trigger warnings on the console. The <sys/pioctl.h> include file will also now emit a compile-time warning when used from userland. Reviewed by: emaste MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23822 Notes: svn path=/head/; revision=359047
* | Add an internal liblua and use it in flua.Brooks Davis2020-03-173-0/+825
| | | | | | | | | | | | | | | | | | | | | | | | The new liblua will be used in a forthcoming import of kyua. Reviewed by: kevans Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24090 Notes: svn path=/head/; revision=359045
* | libssp: don't compile with -fstack-protector*Kyle Evans2020-03-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This similarly matches what we do in libc; compiling libssp with -fstack-protector* is actively harmful. For instance, if the canary ctor ends up with a stack protector then it will trivially trigger a false positive as the canary's being initialized. This was noted by the reporter as irc/ircd-hybrid started crashing at start after our libssp was MFC'd to stable/11, as its build will explicitly link in libssp. On FreeBSD, this isn't necessary as SSP bits are included in libc, but it should absolutely not trigger runtime breakage -- it does mean that the canary will get initialized twice, but as this is happening early on in application startup it should just be redundant work. Reported by: Tod McQuillin <devin@sevenlayer.studio> MFC after: 3 days Notes: svn path=/head/; revision=358993
* | sendfile() does currently not support SCTP sockets.Michael Tuexen2020-03-131-0/+9
| | | | | | | | | | | | | | | | | | | | | | Therefore, fail the call. Reviewed by: markj@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24059 Notes: svn path=/head/; revision=358965
* | libpmcstat: Try /boot/modules if module not foundRyan Moeller2020-03-121-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modules from ports/pkg are commonly installed to /boot/modules rather than to the same directory the kernel resides in. Look there if a module is not found next to the kernel. Submitted by: mmacy Reported by: Nick Principe <nap@iXsystems.com> Approved by: mmacy (mentor) MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=358923
* | ftw.3: Follow style(9) in the exampleMateusz Piotrowski2020-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | Reported by: oshogbo Approved by: bcr (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24043 Notes: svn path=/head/; revision=358916
* | Fix r358688 -- Remember to actually save r3 before processing.Brandon Bergren2020-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Crash was noticed by pkubaj building gcc9. Apparently non dword-aligned char pointers are somewhat rare in the wild. Reported by: pkubaj Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=358902
* | When mounting a UFS filesystem, return EINTEGRITY rather than EIOKirk McKusick2020-03-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | when a superblock check-hash error is detected. This change clarifies a mount that failed due to media hardware failures (EIO) from a mount that failed due to media errors (EINTEGRITY) that can be corrected by running fsck(8). Sponsored by: Netflix Notes: svn path=/head/; revision=358899
* | Temporarily skip 2 failing tests after llvm10 importLi-Wen Hsu2020-03-112-0/+6
| | | | | | | | | | | | | | | | PR: 244732 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358887
* | Remove unused cam ccb flagsWarner Losh2020-03-101-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These flags have been unused for some time. Some of them were in the CAM2 specification, but CAM has moved on a bit from that. Some were used in the old Pluto VideoSpace (and AirSpace) systems which had the video playback I/O scheduler in userspace, but have been unused since then. Reviewed by: chuck, ken Differential Revision: https://reviews.freebsd.org/D24008 Notes: svn path=/head/; revision=358863
* | Move another file in libllvm from sources required for world, to sourcesDimitry Andric2020-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | required for bootstrap, as the PowerPC builds need this. Reported by: bdragon PR: 244251 MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=358857
* | Add one additional file to libllvmminimal, to help the ppc64 bootstrap.Dimitry Andric2020-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | Reported by: bdragon PR: 244251 MFC after: 6 weeks X-MFC-With: 358851 Notes: svn path=/head/; revision=358854
* | Merge ^/head r358832 through r358848.Dimitry Andric2020-03-101-0/+7
|\ \ | | | | | | | | | Notes: svn path=/projects/clang1000-import/; revision=358849