| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
ok dlg@
|
|
|
|
|
|
| |
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.
|
|
|
|
|
|
|
|
| |
Logic is hard, so keep only one of two logically equivalent statements.
CID 271085
ok kettenis@, deraadt@, miod@
|
|
|
|
| |
OK cheloha bluhm
|
|
|
|
|
|
|
|
|
| |
this gets rid of the source annotation which doesn't really add
anything other than adding complexitiy. randomess is generally
good enough that the few extra bits that the source type would
add are not worth it.
ok mikeb@ deraadt@
|
|
|
|
| |
ok krw@
|
|
|
|
|
|
|
|
|
|
| |
accepted by both clang and gcc and safe given that varargs arguments are
promoted to int anyway. Using %h in the kernel is discouraged anyway according
to bluhm@.
Unbreaks the tree on gcc architectures.
ok pirofti@, bluhm@, florian@
|
|
|
|
| |
ok jca@, florian@
|
|
|
|
|
|
| |
the random subsystem as entropy. This value is pretty much unknown,
and anyways our entropy input ring does not saturate from knowns.
ok mikeb djm
|
|
|
|
| |
on amd64 and i386.
|
|
|
|
| |
ok krw@
|
|
|
|
|
|
| |
one that is not a duplicate and not a zero DUID.
ok krw@
|
|
|
|
| |
ok krw@ kettenis@
|
| |
|
|
|
|
|
|
| |
a boot disk has not been selected by its caller.
ok jsing@, millert@
|
| |
|
|
|
|
|
| |
returning 0 or 1 since only boolean checks of the result are done.
No need for EINVAL as a return value.
|
|
|
|
|
|
| |
non-static) by passing disk size as 2nd parameter instead of the
different structures holding the disk size info. The fifth copy of
gpt_chk_mbr() in fdisk is a little specialer. No functional change.
|
|
|
|
|
|
|
|
|
|
| |
field from the GPT header being checksum'd. First make sure the
size is in a valid range. In particular ensure it won't cause crc32()
to run off the end of the GPT header being checksum'd. Also check
GPT signature and version first. These checks were inadvertantly
moved after the checksumming.
This should fix the system crash reported by Ze Loff on bugs@.
|
|
|
|
|
|
|
| |
available to other areas of the kernel suffering from an overburden
of buf tweaking to read a disk sector.
ok mpi@
|
|
|
|
|
|
| |
gpt_chk_hdr() and gpt_chk_parts().
Spotted when investigating zeloff's GPT bug report.
|
|
|
|
| |
ok krw
|
|
|
|
|
| |
It's a helper function for readdoslabel(). Not something called
outside of subr_disk.c.
|
|
|
|
|
|
|
| |
really want it to do. Handle all the actual disklabel reading in
readdoslabel(). Makes the code much simpler to understand.
ok deraadt@
|
|
|
|
|
|
| |
logic a bit so that an invalid primary header/partition entries
table does not cause readgptlabel() to exit before the secondary
header is tried.
|
|
|
|
| |
get_fstype() to gpt_get_fstype() as it moves.
|
|
|
|
|
| |
of repeated lehto32() and lehtoh64() in readgptlabel() to make code
more readable.
|
|
|
|
| |
to use.
|
|
|
|
|
|
|
|
|
|
| |
tracking our discovery of the first OpenBSD partition (ourpart) and
just use the variable holding the offset of the first OpenBSD
partition (gptpartoff).
Move initialization of gptpartoff and gptpartend closer to their
use and set them when the first OpenBSD partition is found. Thus
eliminating a later 'if' statement.
|
| |
|
|
|
|
|
| |
for readgptlable() to re-check that the label d_secpercyl and
d_secsize are not 0.
|
|
|
|
| |
with MBR EFI SYSTEM partitions.
|
|
|
|
| |
function value the variable was being set to.
|
|
|
|
| |
found, as is done in MBR processing.
|
|
|
|
|
|
|
|
|
|
| |
accidentally capture disks ...
Eliminate kernel option GPT and associated #ifdef GPT/#endif. Let
everybody get on the GPT bandwagon and we'll see what wheels fly
off.
Requested by & ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Call it if and only if there is an MBR on sector 0 that contains 1
and only 1 partition; that partition is an EFI partition; and it
covers the entire disk or as much of the disk as can be covered in
an MBR partition.
Be paranoid about restoring any possible tweaks to the label being
built in the case that readgptlabel() fails, and in that case return
to the readdoslabel() code.
ok deraadt@
|
|
|
|
|
| |
found. Keep going until we spoof 8 or run out of partitions needing
spoofing.
|
|
|
|
|
|
|
| |
It has already been initialized in the MD readdisklabel() routines
when they call initdisklabel().
ok deraadt@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Cleaner, clearer and less error prone.
Tested by bmercer@ as part of a larger diff, of which this is the
last part.
reads ok to jsing@ kettenis@. ok deraadt@.
|
|
|
|
|
|
|
|
|
| |
sector containing the disklabel, eliminating an unnecessary " *
DL_BLKSPERSEC()".
Tested by bmercer@ as part of larger diff.
Idea from & reads ok to jsing@. ok kettenis@.
|
|
|
|
|
|
|
|
| |
to daddr_t counts and back again. And rename 'part_blkno' to
'sector' to mirror readdoslabel() changes and make code clearer.
Reads ok to jsing@ and kettenis@. Tested by bmercer@ as part of
larger diff.
|
|
|
|
|
|
|
|
| |
The disklabel is either 0 bytes into a 512-byte disk sector, or 512
bytes into a larger disk sector. The address of the disk sector
read is irrelevant.
Pointed out by jsing@ I think. ok deraadt@
|
|
|
|
|
|
|
|
|
| |
entries within a disk sector are always 0. i.e. both must start on a
sector boundary. So stop calculating the offset value and adding it to
b_data when pulling data out of the buf.
Part of larger refactoring, eyed by jsing@, tested by bmercer@ as
part of that larger diff.
|
|
|
|
|
|
|
| |
closer to where it is used. It isn't part of the setup and we want
to abstract the setup.
ok deraadt@
|
|
|
|
|
|
| |
some time.
ok deraadt@
|
|
|
|
|
|
| |
partition information of the in-memory disklabel remains correct.
ok deraadt@
|
|
|
|
|
|
| |
Part of GPT refactoring that was backed out at c2k15.
ok deraadt@
|