Commit graph

2510 commits

Author SHA1 Message Date
Troy Martin
4335c7f001 Fix typos in initrd(7). 2018-02-04 13:39:37 +01:00
Jonas 'Sortie' Termansen
7df3f9308a The man program in the mdocml port can now handle non-installed manuals. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
eca6246684 Use portable sort in linecount target. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
0bb865a7d3 Add install(1) -d support. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
7c91ea1b19 Add restartable system calls compatibility macro. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
c8ba4b0973 Add float formating and parsing compatibility macros. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
645ab7689c Only mention tix-install destination if not the root directory. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
48e41b36a3 Support the ^[[1~ for Home and ^[[4~ for End escape sequences in sh(1). 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
ca2969b033 Remove unused directory variables in favor of DOCDIR. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
d50b85591d Refactor testcase API. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
590fd835d5 Fix hostname(1) manual page file being executable. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
e9d552867b Fix sysinstall(8) indention. 2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
46b11b4b60 Fix update-initrd(8) not erroring on missing option arguments.
Remove unimplemented --help and --version options.
2017-12-04 23:56:47 +01:00
Jonas 'Sortie' Termansen
65a960dab0 Fix trailing slashes in manifests created by the kernel. 2017-12-04 23:56:46 +01:00
Jonas 'Sortie' Termansen
568c97c77f Fix SEEK_END, file offset overflow, and read/write/mkpartition syscall bugs.
Fix SEEK_END seeking twice as far as requested. Centralize lseek handling in
one place and avoid overflow bugs. Inode lseek handlers now only need to
handle SEEK_END with offset 0. Prevent the file offset from ever going below
zero or overflowing.

Character devices are now not seekable, but lseek will pretend they are, yet
always stay at the file offset 0. pread/pwrite on character devices will now
ignore the file offset and call read/write.

This change prevents character devices from being memory mapped, notably
/dev/zero can no longer be memory mapped. None of the current ports seem
to rely on this behavior and will work with just MAP_ANONYMOUS.

Refactor read and write system calls to have a shared return statement for
both seekable and non-seekable IO.

Fix file offset overflow bugs in read and write system calls.

Fix system calls returning EPERM instead of properly returning EBADF when
the file has not been opened in the right mode.

Truncate IO counts and total vector IO length so the IO operation does not
do any IO beyond OFF_MAX. Truncate also total vector IO length for recvmsg
and sendmsg. Fail with EINVAL if total vector IO length exceeds SSIZE_MAX.

Don't stop early if the total IO length is zero, so zero length IO now block
on any locks internal to the inode.

Handle reads at the maximum file offset with an end of file condition and
handle writes of at least one byte at the maximum file offset by failing
with EFBIG.

Refactor UtilMemoryBuffer to store the file size using off_t instead of
size_t to avoid casts and keep file sizes in the off_t type. Properly
handle errors in the code, such as failing with EROFS instead of EBADF if
the backing memory is not writeable, and failing with EFBIG if writing
beyond the end of the file.

Fix mkpartition not rejecting invalid partition start offsets and lengths.
Strictly enforce partition start and length checks in the partition code.
Enforce partitions exist within regular files or block devices.

Fix a few indention issues.
2017-12-04 23:56:46 +01:00
Jonas 'Sortie' Termansen
f864c59d0d Mix in fresh randomness when writing out /boot/random.seed.
When entropy gathering is implemented, in the case of the installer and
upgrader, the system probably won't have any entropy when it begins. By the
time the system is installed, there will probably be a bit of entropy from
the user using the system and general system usage, so mix in some of that.
In the case of init, after an installed system has run for a while, a lot of
entropy will have gotten collected, but init will have its arc4random seeded
with initial boot entry, so mix in some fresh entropy, so the random seed
written on shutdown remains as entropic as possible.
2017-09-06 23:41:05 +02:00
Jonas 'Sortie' Termansen
4c2ef980b1 Refactor sysmerge(8) and sysupgrade(8) ABI and version comparisons. 2017-09-06 23:41:05 +02:00
Jonas 'Sortie' Termansen
b0496023a1 Allow AF_UNSPEC family in socketpair(2). 2017-08-26 16:49:57 +02:00
Jonas 'Sortie' Termansen
3d356af8d2 Highlight installer, upgrader and disked interactive prompts. 2017-08-26 16:43:54 +02:00
Jonas 'Sortie' Termansen
46862b797f Fix command line parsing with expr(1) failing if the parameter is 0. 2017-08-20 12:44:59 +02:00
Jonas 'Sortie' Termansen
9ee05a5afc Fix kernel/addralloc.cpp file header comment. 2017-08-20 12:44:59 +02:00
Jonas 'Sortie' Termansen
724c035c99 Fix failed fix to pstree(1) vertical line drawing character.
The commit 0def94568a switched to the box
drawing light vertical (U+2502) character, but did not fix the now wrong
assumption that the line drawing character encoded to a single byte.
2017-08-20 12:44:34 +02:00
Jonas 'Sortie' Termansen
2f61df05c2 Fix <string.h> including <sys/__/types.h> in strict C mode. 2017-08-20 12:44:34 +02:00
Jonas 'Sortie' Termansen
515d91a31b Fix <stdlib.h> using long long in C89 mode. 2017-08-20 12:44:34 +02:00
Jonas 'Sortie' Termansen
95bcd5667e Fix <locale.h> not defining NULL. 2017-08-20 12:44:34 +02:00
Jonas 'Sortie' Termansen
07e6c69097 Fix empty struct thread_rwlockattr_t. 2017-08-20 12:44:33 +02:00
Jonas 'Sortie' Termansen
c14d7fa3b8 Fix <signal.h> namespace pollution for strict C. 2017-08-20 12:44:33 +02:00
Jonas 'Sortie' Termansen
33dcd40c6d Fix system headers using C89 incompatible comments. 2017-07-10 13:37:46 +02:00
Nicholas De Nova
8b64b4bbbe Clean /tmp on boot. 2017-07-05 14:52:30 -05:00
Jonas 'Sortie' Termansen
326e43f3e9 Fix logname(1) not reseting errno before logname(3).
Thanks to ybden for spotting this bug.
2017-07-02 22:09:53 +02:00
Jonas 'Sortie' Termansen
1759f690b6 Fix chvideomode(5) usable/used typo. 2017-07-02 22:09:53 +02:00
Jonas 'Sortie' Termansen
723f8e964c Fix date format in manual pages. 2017-07-02 22:07:39 +02:00
Jonas 'Sortie' Termansen
9321f4d78e Fix initrd_get_inode return value not being checked for error. 2017-07-02 21:55:37 +02:00
Pedro Falcato
087e3b3fda
Fail with ENOSYS on bad system calls. 2017-06-14 20:00:50 +01:00
Pedro Falcato
c0a44e72a6
Clear the direction flag upon entry to the kernel. 2017-06-12 21:26:26 +01:00
Pedro Falcato
f32baac73f
Fix mountpoint typo in user-guide(7). 2017-06-04 22:59:46 +01:00
Jonas 'Sortie' Termansen
9f9f4d4e3f Print an kernel error rather than panicing if init(8) exits abnormally.
This avoids the misimpression that a kernel bug happened and it avoids
clearing the screen of potentially useful information about an init(8)
crash.
2017-05-21 23:28:12 +02:00
Jonas 'Sortie' Termansen
ceff78b6b6 Add initrdfs(1) extraction support. 2017-05-19 23:40:06 +02:00
Jonas 'Sortie' Termansen
9f1965f36e Prioritize the interrupt worker thread. 2017-05-18 22:40:46 +02:00
Jonas 'Sortie' Termansen
66e5ddcfab Fix kernel HEAP_GUARD_DEBUG support. 2017-05-15 22:11:24 +02:00
Jonas 'Sortie' Termansen
4c98e3f960 Fix pipe and unix socket iovec support. 2017-05-15 22:11:24 +02:00
Jonas 'Sortie' Termansen
8d66162301 Add -q option to tix-install(8). 2017-04-18 23:38:52 +02:00
Jonas 'Sortie' Termansen
7bc9e067ec Fix operator spacing in kernel/textbuffer.cpp. 2017-04-18 23:32:00 +02:00
Jonas 'Sortie' Termansen
0def94568a Fix pstree(1) vertical line drawing character. 2017-04-18 23:32:00 +02:00
Jonas 'Sortie' Termansen
acc32ccb49 Make interrupt work thread reliable. 2017-04-12 23:22:09 +02:00
Jonas 'Sortie' Termansen
86ac3d3725 Fix the signal dispatch handler is callable from user-space. 2017-04-12 23:22:09 +02:00
Jonas 'Sortie' Termansen
10453f0269 Fix uname(1) referencing section 4 and not section 5. 2017-04-12 23:22:09 +02:00
Nicholas De Nova
ce6ea7f553 Check architecture compatibility during sysmerge(8)/sysupgrade(8). 2017-04-12 14:05:03 -05:00
Jonas 'Sortie' Termansen
cd7a984e9f Fix select(2) buffer overflow if the fd_set is smaller than normal.
OpenSSH is allocating a fd_set of exactly the needed size, which leads to
buffer overflows in select(2) when it tries to zero out the fd_set assuming
it is the normal size.
2017-04-09 22:44:32 +02:00
Jonas 'Sortie' Termansen
d45417651f Refactor kernel command line parsing. 2017-04-08 22:20:03 +02:00