On Thu, Nov 07, 2019 at 06:08:40PM +0100, Kamil Rytarowski wrote:
> Please review:
>
> http://netbsd.org/~kamil/patch-00194-disklabel-alignment.txt
>
> This patch works for me.
Yes, I believe that it does - but why is it needed?
dlp = (void *)a->bp->b_data;
Here we can assume that b_data is properly aligned (likely even 512 byte
aligned or similar).
for (;; dlp = (void *)((char *)dlp + sizeof(uint32_t))) {
ugly as it is written, this still should ensure proper (4 byte) alignement
of all later values of dlp.
Do we have any architectures with odd LABELOFFSET?
I only found 0, 64, 128 and 516, none of those should cause alignment
issues in the code following.
So where is the problem?
Martin