Age | Commit message (Collapse) | Author |
|
ok schwarze@
|
|
|
|
instance would be rekeyed every 1.6MB. This makes it happen at a
random point somewhere in the 1-2MB range.
Feedback deraadt@ visa@, ok tb@ visa@
|
|
ok jmc@ schwarze@
|
|
1. Make /etc/glob history less wordy and more precise: it was already in v1.
2. Remove the incorrect statement that the Bourne shell first integrated
globbing. The PWB shell already did that in mid-1975, i.e. a least a few
months before Stephen R. Bourne started working on his shell, and the PWB
shell was publicly released with PWB/UNIX 1.0 about two years before v7.
For details, see
https://sjmulder.nl/dl/tuhs/Documentation/AUUGN/AUUGN-V06.6.pdf p. 39-40
OCR repost: https://groups.google.com/g/alt.folklore.computers/c/xW3ZgEnFoFs
From: mash@mips.UUCP (John Mashey)
Newsgroups: net.unix-wizards
Subject: Re: Shell history, true facts, but long
Date: 18 Mar 86 09:05:12 GMT
[...]
3) The "PWB Shell" first appeared in mid-1975.
[...]
4) The Bourne shell work started either in early 1976, or maybe late 1975.
[...]
In "The UNIX Shell", Stephen R. Bourne says:
"The design of the shell is based in part on the original UNIX shell
and the PWB/UNIX shell, some features having been taken from both."
3. Avoid the confusing statement that the glob() function first appeared
in 4.4BSD. Actually, the PWB shell, the Bourne shell (in v7), the first
UCB shell (in 1BSD), and the C shell (in 2BSD) all contained internal
functions either called "glob()" or at least containing "glob" as a part
of their function name.
4. Be more precise regarding when the current functions first appeared:
they were already in Reno.
Joint work with and OK jsg@.
Feedback and OK jmc@.
|
|
can be untangled.
Problem noted by tb@
|
|
data are unused and unnecessary, so delete them: rl_tabs, rl_magic,
rl_encoding, and rl_invalid_rune.
ok schwarze@
|
|
libc YP support has a couple of places where the domainname is cached, and
this results in wildly incoherent behaviour which could even be risky.
If you want to change the domainname, you will have to reboot.
ok beck miod
|
|
In the moncontrol(3) code in libc there is a fallback function,
hertz(). The idea is, if getting kern.clockrate from sysctl(2) fails,
we fall back to deriving the value of hz(9) using setitimer(2)'s
rounding behavior.
This is extremely clever, but it actually sucks. Calling setitimer(2)
quietly cancels any extant ITIMER_REAL timer, so moncontrol(3) cannot
be safely used alongside setitimer(2). This fact is not documented.
kern.clockrate is not blocked by pledge(2), so outside of stack
corruption (which we can't do anything about anyway) I don't see a way
for the sysctl(2) call to ever fail on OpenBSD. So hertz() is also
pointless.
Hence this patch: get rid of hertz().
Thread: https://marc.info/?l=openbsd-tech&m=163881542813633&w=2
ok guenther@
|
|
types used by all (== both) locales; put their implementation in one
file and make the mapping static there. The rl_wctype member of
_RuneLocale and its initialization go away at the same time.
ok schwarze@
|
|
UNIX System V mention it. Only do so in manual pages with a
pre-existing HISTORY section.
Prompted by the comparison of System V and BSD commands and interfaces
in Sun's "System V Enhancements Overview" document.
checked against manuals on bitsavers, TUHS archive and CSRG archive CDs
ok jmc@ schwarze@
|
|
The timecounting subsystem computes elapsed time by scaling (64 bits)
the difference between two counter values (32 bits at most) up into a
struct bintime (128 bits).
Under normal circumstances it is sufficient to do this with 64-bit
multiplication, like this:
struct bintime bt;
bt.sec = 0;
bt.frac = th->tc_scale * tc_delta(th);
However, if tc_delta() exceeds 1 second's worth of counter ticks, that
multiplication overflows. The result is that the monotonic clock appears
to jump backwards.
When can this happen? In practice, I have seen it when trying to
compile LLVM on an EdgeRouter Lite when using an SD card as the
backing disk. The box gets stuck in swap, the hardclock(9) is
delayed, and we appear to "lose time".
To avoid this overflow we need to compute the full 96-bit product of
the delta and the scale.
This commit adds TIMECOUNT_TO_BINTIME(), a function for computing that
full product, to sys/time.h. The patch puts the new function to use
in lib/libc/sys/microtime.c and sys/kern/kern_tc.c.
(The commit also reorganizes some of our high resolution bintime code
so that we always read the timecounter first.)
Doing the full 96-bit multiplication is between 0% and 15% slower than
doing the cheaper 64-bit multiplication on amd64. Measuring a precise
difference is extremely difficult because the computation is already
quite fast.
I would guess that the cost is slightly higher than that on 32-bit
platforms. Nobody ever volunteered to test, so this remains a guess.
Thread: https://marc.info/?l=openbsd-tech&m=163424607918042&w=2
6 month bump: https://marc.info/?l=openbsd-tech&m=165124251401342&w=2
Committed after 9 months without review.
|
|
ok deraadt@
|
|
|
|
With this sysconf(3) no longer needs the inet pledge.
The kernel has been updated for this for a while now.
OK sthen@ deraadt@
|
|
spotted by guenther
|
|
Though really, should we be splatting to stdout/stderr? The mysteries
of ancient code...
|
|
missed when sysctl(3) references were changed to sysctl(2)
|
|
|
|
|
|
rich system calls to perform YP/LDAP lookups, there is no need to access()
/var/run/ypbind.lock to "hint" to pledge that it should open up those system
calls.
ok jmatthew, miod
|
|
piece of it for the address, opening a socket, and providing the address to
the RPC clnt layer.. do all these steps with the magic system call ypconnect(2)
which performs these steps without other system calls, and provides a socket
which is not readily abuseable for other purposes.
ok jmatthew, miod
|
|
but do not export it.
|
|
|
|
been connected. In the udp case, this means to use send(), not sendto()
ok jmatthew, claudio, miod
|
|
following page(s) we've been first mquery()ing for it, mmapp()ing
w/o MAP_FIXED if available, and then munmap()ing if there was a
race. Instead, just try it directly with
mmap(MAP_FIXED | __MAP_NOREPLACE)
tested in snaps for weeks
ok deraadt@
|
|
|
|
|
|
setting the binding to global (NB == "no binding"), as clang 13 is
now warning about changing the binding from global to weak. Use
them for bcopy, brk, and sbrk.
Add the '.L' prefix to internal labels in the bcopy implementation
to remove them from the symbol table
Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h
that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files
that don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.
ok gkoehler@
|
|
|
|
|
|
symbol table
ok kettenis@ miod@
|
|
add _?ENTRY_NB to asm.h, switch libc's asm bits to the generic
DEFS.h, and use ENTRY_NB as necessary.
Also, give sizes to the htonl/htons symbols and mark them as weak.
ok kettenis@ miod@
|
|
Put .L_setjmp_magic in the correct ELF section for duplicate suppression
Rename the "botch" label to delete it from the symbol table
ok kettenis@ miod@
|
|
|
|
ok kettenis@ miod@
|
|
* add _?ENTRY_NB to arm/asm.h
* make sure ld.so's arm asm bits see the same includes as libc
* switch libc's arm bits to the generic DEFS.h
* switch arm ASM bits from ENTRY to ENTRY_NB as necessary
ok kettenis@ miod@
|
|
This refactors the commin parts of sys_truncate() and sys_ftruncate()
into dotruncate(). If the new size of the file is larger than the
RLIMIT_FSIZE limit _and_ the file is being extended, not truncated,
return EFBIG. Adapted from a diff by Piotr Durlej.
With help from and OK by deraadt@ guenther@.
|
|
This got broken when system.c was converted from signal(3) to sigaction(2).
Also add SIGINT and SIGQUIT to the set of blocked signals and unblock
them in the parent after the signal handlers are installed.
Based on a diff from Leon Fischer. OK deraadt@
|
|
calls the former with a loss of range. Mark fseek symbol as
deprecated to block accidental use in the future.
ok millert@ deraadt@
|
|
too many people to unravel correctly and place into a static function.
While here, move the flags bits into local variables, which reduces
the amount of () in the checks.
help from millert, miod, tedu
|
|
(and we all laughed a little)
|
|
|
|
Fix "left shift of 255 by 24 places cannot be represented in type 'int'"
error from UBSAN. Adapted from a FreeBSD diff via tb@. OK tb@ deraadt@
|
|
Use a temporary variable to store the number of bytes to be copied
(size_t) and also use it as the memcpy(3) length. Previously we
copied "size" bytes instead of just the necessary number.
OK claudio@ tb@
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
ok jmc@ schwarze@
|
|
Eliminate weasel words and needless parentheses, reduce "will" and
"shall" and "may", add more precision, some grammar fixes, shorten
and improve wordings, add some missing macros.
Triggered by a question from naddy@.
|
|
|
|
Specifically, describe the default behavior if the corresponding
login.conf fields are not present. OK deraadt@
|