Age | Commit message (Collapse) | Author |
|
|
|
|
|
Only boot-loader changes are needed. Both installboot(8) and
the kernel already do what is required to make this work.
ok kn@
Tested:
biosboot on vmm: kn, stsp
biosboot and efiboot on server hardware: stsp
|
|
The kernel source assumes the original zlib ABI. There is no reason to
stick to this local change. Pull in a fix matching ctfdump.c -r1.26.
This is hopefully the last change necessary to undo a painful hack that
was committed 19 years ago without ok. Someone owes me a lot of beer...
ok millert
|
|
|
|
on some older hardware, see https://github.com/madler/zlib/issues/613
Pointed out by tj and sthen
commit ec3df00224d4b396e2ac6586ab5d25f673caa4c2
Author: Mark Adler <madler@alumni.caltech.edu>
Date: Wed Mar 30 11:14:53 2022 -0700
Correct incorrect inputs provided to the CRC functions.
The previous releases of zlib were not sensitive to incorrect CRC
inputs with bits set above the low 32. This commit restores that
behavior, so that applications with such bugs will continue to
operate as before.
|
|
Build tests by myself for amd64 and arm64, sthen and inoguchi for i386
and gkoehler for macppc and powerpc64, thanks!
Detailed changelog is part of the committed diff.
|
|
ok mbuhl millert
|
|
Backport zlib fix for the multi line CLEAR_HASH macro. There is
an else branch where only half of the macro is executed conditionally.
Acording to upstream comment this has only little impact.
https://github.com/madler/zlib/commit/38e8ce32afbaa82f67d992b9f3056f281fe69259
ok bluhm (who had the same diff)
|
|
OK miod@
|
|
|
|
Found by LLVM scan-build.
OK millert@ deraadt@
|
|
writing to disk using the Open Firmware interfaces is buggy and causes
corruption of the disk. While it isn't entirely clear what versions
of Open Firmware are affected, but it seems to only affect IDE drives.
So if we detect an IDE drive, disable writing to it. This results in
a small lose of bootloader functionality (bsd.upgrade loop prevention
and flagging /etc/random.seed re-use) but that is better than losing
the ability to run OpenBSD at all.
Based on a diff by Ted Bullock (who did all the hard work of debugging
this and coming up with a viable fix).
ok deraadt@
|
|
to 3-term BSD license.
|
|
ok krw@, deraadt@
|
|
ok kettenis@
|
|
O_RDONLY rather using 0
ok beck
|
|
I should have used Byte (unsigned char) which led to passing twice the
correct size to free.
Found & tested by bluhm with the sys/netinet/ipsec tests on i386.
|
|
Rebased version of a diff from miod who described it as follows:
This tries to keep diffability against upstream, hence a questionable
choice of the size type for zcfree() - but all sizes should fit in 32
bits anyway.
Since all zcfree routines used in the tree cope with NULL arguments
(including the various alloc.c used by the boot blocks), I have
simplified TRY_FREE to compensate for the growth.
Reminded by and ok mpi
|
|
These library functions were added as stopgaps because GCC 4.2.1
lacks the corresponding __sync_* builtins on mips64. However,
the builtins are now provided by Clang.
|
|
option BUILDFIXED -- which is incompatible with kernel hibernate unpack since
it places side-effects into BSS, rather than inside z_streamp or using
the private allocator. While here DYNAMIC_CRC_TABLE could cause similar
problems, so disable this also.
Space savings for the media is best done with bootblock-specific libz
compile options, coming in the following commit.
ok tb mlarkin
|
|
|
|
|
|
made sense.
Tested in snaps for a few days. deraadt helped with fitting things on
floppies and jmatthew found a bug I introduced.
ok deraadt
|
|
|
|
|
|
|
|
|
|
|
|
At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks.
More daddr32_t terminations with extreme prejudice to follow.
Tested by various, in snaps for a few days.
ok deraadt@
|
|
This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12)
and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12)
to show that r11 and r12 are in use between setup and check, and to
pick registers other than r11 and r12 in some kernel functions.
ok mortimer@ deraadt@
|
|
This was in the macppc snap, but I forgot to include it in my last
commit "Retguard asm macros for powerpc libc, ld.so"
|
|
OK kettenis@
|
|
ok mortimer kettenis
|
|
Needed to build a sparc64 kernel with clang 10.
ok kettenis@
|
|
so that we can reuse them in other compiler_rt routines.
ok kettenis@
|
|
clang 10 on armv7 references these when building RAMDISK (-Oz) but not
GENERIC (-O2).
feedback and ok guenther@
|
|
this fell out of a discussion with mortimer
ok kettenis
|
|
|
|
blf_enc() takes a number of 64-bit blocks to encrypt, but using
sizeof(uint64_t) in the calculation triggers a warning from clang
10 because the actual data type is uint32_t. Pass BCRYPT_WORDS / 2
for the number of blocks like libc bcrypt(3) does. OK kettenis@
|
|
arm64/powerpc/powerpc64, making use of the count leading zeros
instruction.
powerpc testing by cwen@; ok kettenis@ deraadt@
|
|
of returning -1. With a return type of u_int16_t, -1 is not different
to a valid checksum. For incoming packets, the header lengths don't
exceed that size anyway, but for outgoing packets it's better to see
if our bootloader crafts a broken one.
Discussed with gerhard@
ok deraadt@ procter@
|
|
with odd packet lengths, which can happen when using TFTP to load
a file with an odd length. ospfd actually took dvmrpd's version
in 2006 to fix the same issue, and both daemons implementations are
the same. For the bootloader we keep the consts from the previous
version and replace the fatal with a print and return.
ok deraadt@
|
|
With this it's possible to build the kernel using clang.
Discussed with claudio@, ok deraadt@
|
|
MDFSOPT and add a missing prototype.
|
|
The macros are defined in a part of the header where a C compiler
is required. In addition, the macros expand to C code, so it looks
unnecessary to define the asserts with traditional cpp in mind.
OK cheloha@, mpi@
|
|
entry point.
ok mlarkin@, deraadt@
|
|
inspect the memory layout that the firmware has created. It is
especially useful for UEFI debugging.
OK deraadt@ kettenis@
|
|
ok kettenis@, jca@
|
|
it larger than RC4STATE. A long discussion ensued. In conclusion all
entropy inputs are either satisfactory enough, or just as shitty at 512.
|