Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/kern



Module Name:    src
Committed By:   kamil
Date:           Thu Nov  7 18:30:27 UTC 2019

Modified Files:
        src/sys/kern: subr_disk_mbr.c

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/kern/subr_disk_mbr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index