summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2020-01-26Insert two nop instructions after each svc #0 instruction in userland.Mark Kettenis
The will be replaced by a speculation barrier as soon as we teach the kernel to skip over these two instructions when returning from a system call. ok patrick@, deraadt@
2020-01-24Document `kern.allowdt' button.Martin Pieuchot
sysctl.2 bits from benno@
2020-01-22delete wasteful ;;Theo de Raadt
ok tedu
2020-01-13Document how to make getopt_long(3) process arguments in order and stopStefan Sperling
at the first non-option argument. I had to read source code to figure it out.
2019-12-26It is believed that an implementation of madvise was available inJonathan Gray
SunOS 4.0 based on text from the following papers. "Two 4.2BSD system calls, madvise and mincore, remain unspecified, madvise is intended to provide information to the system to influence its management policies. Since a major rework of such policies was deferred to a future release, we decided to defer full specification and implementation of madvise until that time." R. Gingell, J. Moran, W. Shannon "Virtual Memory Architecture in SunOS" Proceedings of USENIX Summer Conference, June 1987 AUUGN Volume 8 Number 5, October 1987 "Memory management related system calls based on the original 4.2BSD specification that were implemented include mmap, munmap, mprotect, madvise, and mincore." J. Moran "SunOS Virtual Memory Implementation" Proceedings of the Spring 1988 European UNIX Users Group Conference, April 1988 AUUGN Volume 9 Number 3, June 1988 and a reference in "Global Index", Part Number: 800-1758-10, Revision A, of 9 May 1988 bitsavers pdf/sun/sunos/4.0/800-1758-10A_Global_Index_198805.pdf discussed with an ok schwarze@
2019-12-21Warn that auth_call(3) users should include a "--" argument beforeJonathan Gray
non-optional arguments to stop getopt(3) processing. ok deraadt@
2019-12-21In "4.2BSD System Manual" (/usr/doc/sysman in 4.2BSD source)Jonathan Gray
mmap(), munman(), madvise() and mprotect() are described as planned for later releases. A fully functional mmap(2) supporting shared libraries first appeared in SunOS 4.0 along with msync(2). SunOS 4.1 added madvise(3) and replaced msync(2) with mctl(2) which was was used to implement msync(3), mlock(3) and munlock(3). While some of these functions appear as empty or ifdef'd functions in 4.1cBSD and later it was not until the Mach VM was integrated with Net/2 that most of them were implemented. Though the CSRG releases never supported shared libraries or madvise(). mlock()/munlock() were not in Net/2 as they were added by hibler in 1993, but were in 4.4BSD. madvise(2) was implemented for UVM in NetBSD 1.5 and ported to OpenBSD 2.7. For now instead of trying to accurately describe when interfaces first appeared in other systems correct when they were first available in CSRG or OpenBSD releases, retaining the text in mmap(2) discussing SunOS 4.0. madvise(2) 4.4BSD -> OpenBSD 2.7 mmap2(2) 4.4BSD -> 4.3BSD Net/2 mprotect(2) 4.4BSD -> 4.3BSD Net/2 msync(2) 4.4BSD -> 4.3BSD Net/2 munmap(2) 4.1cBSD -> 4.3BSD Net/2
2019-12-20drand48(3) returns values in [0.0, 1.0).Theo Buehler
From j@bitminer.ca with input from Andras Farkas, deraadt, joerg@netbsd "fix however you feel best!" jmc
2019-12-20The mcount.po target is special cased here since mcount.c should not beTheo Buehler
compiled with pie or profiling enabled. This was missed when the independent depend target was removed. Align this target with the inference rules in bsd.lib.mk. This now creates mcount.d as it should and fixes 'make clean' which previously left mcount.po.d behind. ok guenther
2019-12-11The file passed to realpath(3) must exists, adjust man page to newAlexander Bluhm
behavior. noticed by hshoexer@; OK beck@
2019-12-10Remove includes that are no longer neeed after tedu's simplification.Todd C. Miller
OK jca@
2019-12-10The msync interface first appeared in SunOS 4.0.Jonathan Gray
2019-12-10Adjust history text.Jonathan Gray
A fully functional mmap() system call first appeared in SunOS 4.0 and has been available since 4.4BSD. wording from and ok schwarze@ input from deraadt@
2019-12-08tweak previous;Jason McIntyre
2019-12-08Make sure packet destination address matches interface address,Alexandr Nedvedicky
where such packet is bound to. This check is enforced if and only IP forwarding is disabled. Change discussed with bluhm@, claudio@, deraadt@, markus@, tobhe@ OK bluhm@, claudio@, tobhe@
2019-12-06replace links to uvm(9) to uvm_init(9); ok mpiJason McIntyre
2019-12-06Explicitly say that *permissions can be "".Ingo Schwarze
Potential for misunderstanding noticed by Chris Rawnsley <chris at puny dot agency>, wording proposed by deraadt@, patch sent by Chris Rawnsley, OK deraadt@.
2019-12-05- fix some Xr; from martinJason McIntyre
- minor tweaks while here
2019-12-05Document IP6_SOIIKEY_LENkn
OK florian jmc
2019-12-04some minor tweaks;Jason McIntyre
2019-12-04I accidentally smashed wrong contents into this file.Theo de Raadt
Repair from Martin @ academicsolutions.ch
2019-12-04libc's authentication privsep layer performed insufficient usernameTheo de Raadt
validation. Repair work mostly by markus and millert, first of all solving the primary problem, then adding some additional validation points. And then futher validation in login and su. This will be 6.5/021_libcauth.patch.sig and 6.6/010_libcauth.patch.sig Reported by Qualys
2019-12-04libc's authentication privsep layer performed insufficient usernameTheo de Raadt
validation. Repair work mostly by markus and millert, first of all solving the primary problem, then adding some additional validation points. And then futher validation in login and su. This will be 6.5/021_libcauth.patch.sig and 6.6/010_libcauth.patch.sig Reported by Qualys
2019-12-03fwide() does not unlock if error was occurred.asou
ok guenther@ and deraadt
2019-12-01comply with POSIX and make execve() return EACCES for directoriesChristian Weisgerber
ok millert@ deraadt@
2019-11-27tweak previous: add missing name after .Fn, delete stray .Pp,Ingo Schwarze
and drop NetBSD RCS tag apparently left over from copy & paste
2019-11-27Document msyscall(2): ld.so can use this (once only) to tell the kernelTheo de Raadt
where libc.so's text segment is, thereby allowing invocation of system calls from that region. An upcoming change will kill the process if a system call is invoked from addresses not explicitly permitted. ok guenther kettenis mortimer
2019-11-25gcc3, like clang and unlike our gcc4, doesn't support redirecting builtinsPhilip Guenther
like mem{set,cpy,move} or __stack_smash_handler using asm() renaming. So treat gcc3 like clang and mark such functions as protected instead. ok ayoma@
2019-11-12Now that libc.so has only five PLT entries on almost all our archs,Philip Guenther
link it with -znow ok kettenis@ deraadt@ jca@
2019-11-10Mark as 'protected' all the routines from the quad/ and softfloat/ subdirs,Philip Guenther
as well as those in arch/arm/gen/divsi3.S. This cleans up the PLTs on the 32bit archs. luna88k testing by aoyama@ "looks good" kettenis@, testing and ok deraadt@
2019-11-05MPLSCTL_MAXINKLOOP (net.mpls.maxloop_inkernel) was removed. Adjust manpage.Claudio Jeker
2019-10-29mobileip(4) is going to the atticDavid Gwynne
2019-10-27Mark the _Qp_{mul,div,add,sub} functions as 'protected' to eliminatePhilip Guenther
PLT entries and prevent overriding ok kettenis@ deraadt@
2019-10-26Stop exporting the internal _mcount symbol as that's only referencedPhilip Guenther
by the ASM stub, which is also in libc. The compiler only generates invocations of the latter. ok mpi@ deraadt@ kettenis@
2019-10-24Allow the caller of asr functions to create and use a specific context.Otto Moerbeek
Diff from eric@ and florian@, commiting on their behalf since they are absent and we want to ride the minor shlib bump.
2019-10-23Unexport __floatundidf.Mark Kettenis
ok deraadt@
2019-10-21Kill unused _wait() function.Martin Pieuchot
ok visa@
2019-10-18setting uid to -1 won't work with setresuid, so detect that conditionTed Unangst
and return an error instead. may prevent some unset/missing confusion. ok deraadt millert
2019-09-29zap trailing whitespace;Jason McIntyre
2019-09-28Xr random 4 in a better wayTheo de Raadt
2019-09-281) don't repeat the 256 / EIO commentaryTheo de Raadt
2) say that the data comes from the random(4) subsystem, so that curious people can go read up on how this works
2019-09-28correctly handle read(2) return value.Eric Faurot
fix issue reported by Mikolaj Kucharski. ok martijn@ deraadt@
2019-09-14Add comment line saying S is described vaguely on purpose.Otto Moerbeek
Prompted by guenther@
2019-09-08sbrk(2) already existed in Version 4 AT&T UNIX;Ingo Schwarze
source: https://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man2/break.2 pointed out by Sevan Janiyan <venture37 at geeklan dot co dot uk>
2019-09-07more Version 1 AT&T UNIX history:Ingo Schwarze
a few cases that weren't altogether straightforward; tweak and OK jmc@, OK sobrado@
2019-09-06More Version 1 AT&T UNIX history.Ingo Schwarze
This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
2019-09-06Correct the description of EINTR and EINVAL. This looks like a mis-mergeasou
in revision 1.30. ok deraadt@ tb@
2019-09-04gettimeofday, settimeofday(2): limit timezone supportcheloha
For gettimeofday(2), always copy out an empty timezone struct. For settimeofday(2), still copyin(9) the struct but ignore the contents. In gettimeofday(2)'s case we have not changed the original BSD semantics: the kernel only tracks UTC time without an offset for DST, so a zeroed timezone struct is the correct thing to return to the caller. Future work could move these out into libc as stubs for clock_gettime and clock_settime(2). But, definitely a "later" thing, given that we are in beta. Update the manpage to de-emphasize the timezone parameters for these syscalls. Discussed with tedu@, deraadt@, millert@, kettenis@, yasuoka@, jca@, and guenther@. Tested by job@. Ports input from jca@ and sthen@. Manpage input from jca@. ok jca@ deraadt@
2019-09-02More correction of section 3 layout. directory->opendir, fts->fts_open,Theo de Raadt
getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
2019-08-30ypclnt -> yp_bind;Jason McIntyre