History log of /netbsd/sys/kern/subr_disk_mbr.c (Results 1 – 25 of 58)
Revision Date Author Comments
# 9703a26e 03-Apr-2023 gutteridge <gutteridge@NetBSD.org>

Fix typos: s/trough/through/


# 4a1c505c 17-May-2021 mrg <mrg@NetBSD.org>

move bi-endian disklabel support from the kernel and libsa into libkern.

- dkcksum() and dkcksum_sized() move from subr_disk.c and from
libsa into libkern/dkcksum.c (which is missing _sized() vers

move bi-endian disklabel support from the kernel and libsa into libkern.

- dkcksum() and dkcksum_sized() move from subr_disk.c and from
libsa into libkern/dkcksum.c (which is missing _sized() version),
using the version from usr.sbin/disklabel.

- swap_disklabel() moves from subr_disk_mbr.c into libkern, now called
disklabel_swap(). (the sh3 version should be updated to use this.)

- DISKLABEL_EI becomes a first-class option with opt_disklabel.h.

- add libkern.h to libsa/disklabel.c.

this enables future work for bi-endian libsa/ufs.c (relevant for ffsv1,
ffsv2, lfsv1, and lfsv2), as well as making it possible for ports not
using subr_disk_mbr.c to include bi-endian disklabel support (which,
afaict, includes any disk on mbr-supporting platforms that do not have
an mbr as well as disklabel.)

builds successsfully on: alpha, i386, amd64, sun2, sun3, evbarm64,
evbarm64-eb, sparc, and sparc64. tested in anita on i386 and sparc,
testing in hardware on evbarm64*.

show more ...


# 38522d36 07-Nov-2019 kamil <kamil@NetBSD.org>

Revert subr_disk_mbr.c r.1.54

Requested by <christos> as there can be a better way to fix the original
problem with alignment.


# 27e7f6e2 07-Nov-2019 kamil <kamil@NetBSD.org>

Decorate check_label_magic() with __noubsan

Requested by <christos>


# 2783cd3d 07-Nov-2019 kamil <kamil@NetBSD.org>

Revert src/sys/kern/subr_disk_mbr.c r.1.52

Addressed in a better way in r. 1.53.


# eb5b07f3 07-Nov-2019 kamil <kamil@NetBSD.org>

Ensure in validate_label() that struct disklabel pointer is 8-byte aligned

The label is searched each 4 bytes and can be detected in an unaligned
location. Before any operations on it, copy it to pr

Ensure in validate_label() that struct disklabel pointer is 8-byte aligned

The label is searched each 4 bytes and can be detected in an unaligned
location. Before any operations on it, copy it to promptly aligned local
copy on the stack.

This is a missing part of the following change:

revision 1.108
date: 2011-01-18 20:52:24 +0100; author: matt; state: Exp; lines: +2 -1;
Make struct disklabel 8 byte aligned. This increases its size by 4 bytes
on IPL32 platforms so add code in sys_ioctl (and netbsd32_ioctl) to deal
with the older/smaller diskabel size. This change makes disklabel the
same for both IPL32 and LP64 platforms

OK by <martin>

show more ...


# f6f1cc40 06-Nov-2019 kamil <kamil@NetBSD.org>

Avoid unaligned pointer arithmetic in check_label_magic()

Replace the logic of calculating the address with with base + offset.

Reported by GCC8.

Reported-by: syzbot+56769dece0ec3e35731e@syzkaller

Avoid unaligned pointer arithmetic in check_label_magic()

Replace the logic of calculating the address with with base + offset.

Reported by GCC8.

Reported-by: syzbot+56769dece0ec3e35731e@syzkaller.appspotmail.com

show more ...


# 78497bf9 17-May-2019 christos <christos@NetBSD.org>

Factor out the magic checking code for the label, and make it not depend
on alignment.


# 99259f25 03-Apr-2019 christos <christos@NetBSD.org>

centralize setdisklabel(9)


# 715c191f 21-Jan-2018 christos <christos@NetBSD.org>

CID-1427768: Off by one


# 789917a9 07-Jan-2018 christos <christos@NetBSD.org>

use a fixed-size type, this code also exists in
sys/dev/dkwedge/dkwedge_bsdlabel.c


# a0bccede 19-Feb-2017 rin <rin@NetBSD.org>

PR kern/51208
Add DISKLABEL_EI (``Endian-Independent'' disklabel) kernel option to machines
that support Master Boot Record (MBR)


# 9708c4d5 26-Jun-2013 matt <matt@NetBSD.org>

If the MBR is a protective MBR, don't bother looking at it.


# 106bf8d8 03-Oct-2012 mlelstv <mlelstv@NetBSD.org>

No longer determine availability of ISO and UDF partitions, we default
to allow access to both. Only use a found ISO header to access the
correct session.


# 98b0ab2d 13-Jul-2012 christos <christos@NetBSD.org>

revert previous; the problem was off by one in the bios device comparison
in x86_autoconf.c


# f2a24f80 03-Jul-2012 christos <christos@NetBSD.org>

Don't kill the iso partition at 'a' when we have a udf raw partition.
Makes cd0a mountable again. Should be pulled up to 6 (after people
verify that it works in the broken cases)
http://mail-index.ne

Don't kill the iso partition at 'a' when we have a udf raw partition.
Makes cd0a mountable again. Should be pulled up to 6 (after people
verify that it works in the broken cases)
http://mail-index.netbsd.org/current-users/2012/06/14/msg020415.html

show more ...


# fcddf71f 30-Jun-2011 wiz <wiz@NetBSD.org>

dependant -> dependent


# b2cb120d 11-May-2010 pooka <pooka@NetBSD.org>

This not working on ews4800mips has nothing to do with rump, so:
_RUMPKERNEL -> _MACHINE != ews4800mips


# 25362a67 04-May-2010 tsutsui <tsutsui@NetBSD.org>

Don't #error on invalid LABELSECTOR or LABELOFFSET on __RUMPKERNEL build.

As mentioned in src/sys/rump/dev/lib/libdisk/Makefile,
rump(4) builds don't check if each ${MACHINE} actually supports
MBR i

Don't #error on invalid LABELSECTOR or LABELOFFSET on __RUMPKERNEL build.

As mentioned in src/sys/rump/dev/lib/libdisk/Makefile,
rump(4) builds don't check if each ${MACHINE} actually supports
MBR in MD readdisklabel(9) ops while it pulls MD <machine/disklabel.h>.

Workarounds so long broken build of ews4800mips.

show more ...


# 1ce3f76a 23-Dec-2009 mbalmer <mbalmer@NetBSD.org>

Fix typo, no code change.


# 8257134a 27-Nov-2009 pooka <pooka@NetBSD.org>

Make this work on some m68k ports which like putting the disklabel
in the third sector (or have copypasted disklabel.h from a port
which likes doing that ;).


# 09dbb89b 23-Nov-2009 pooka <pooka@NetBSD.org>

If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular ker

If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).

show more ...


# 48fb37f1 03-Jun-2009 pooka <pooka@NetBSD.org>

opt for _KERNEL_OPT


# 69f4b23b 28-Jan-2009 reinoud <reinoud@NetBSD.org>

Don't claim its an ISO partitioning scheme too early in the label. An MBR
might me there instead.


# a0d3b4c9 08-Jan-2009 reinoud <reinoud@NetBSD.org>

Fix the mess i made with the iso partitioning reading due to the fact that
disk_read_sector() wants DEV_BLKSIZE blkno's BUT sectorsize unit lengths
specified... how `logical'.

Real fixup pending on

Fix the mess i made with the iso partitioning reading due to the fact that
disk_read_sector() wants DEV_BLKSIZE blkno's BUT sectorsize unit lengths
specified... how `logical'.

Real fixup pending on discussion on tech-kern/source-changes.

show more ...


123