Age | Commit message (Collapse) | Author |
|
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@
|
|
it to 0 immediately after a bzero() of the entire label. Nor in
swapping endianness since nobody looks at it. Don't touch the actual
field in disklabel. Yet.
ok deraadt@ as part of larger diff that needs splitting up.
|
|
trying to build.
|
|
read and validate disklabels on GPT partitioned disks. Makes it much
more likely GPT partitioned disks with non-512-byte sectors will
work.
Part of the larger reverted GPT work.
ok deraadt@
|
|
a buf. Otherwise stale data might cause a successful I/O to be
seen as a failed I/O.
ok tedu@
|
|
Requested by deraadt@
|
|
archs and different sized disk sectors. Make MBR have higher priority
than GPT. Add many paranoia checks and associated DPRINTF's to make
further development easier. Keep everything hidden behind #ifdef
GPT.
Tested and ok doug@ mpi@. Nothing bad seen by millert@.
|
|
routines use crc32().
ok jsg@ doug@
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.
now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.
so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.
ok krw@
|
|
Diff from dlg@.
ok jsing@
|
|
disks) with taskq. Diff originally from blambert@.
ok kettenis@
|
|
|
|
by passing random stack garbage as the size to free(9).
From David Imhoff
|
|
|
|
objective: vnode.h doesn't include uvm_extern.h anymore.
followup changes: include uvm_extern.h or lock.h where necessary.
ok and help from deraadt
|
|
|
|
|
|
ok doug tedu
|