NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/54395: earmv7hf binaries trigger kernel panic on aarch64
The following reply was made to PR kern/54395; it has been noted by GNATS.
From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/54395: earmv7hf binaries trigger kernel panic on aarch64
Date: Tue, 1 Oct 2019 15:36:58 +0300
On Mon, Jul 22, 2019 at 04:05:00 +0000, rokuyama.rk%gmail.com@localhost wrote:
> >Fix:
> As described above, this is not MD, but MI bug. uvm_findspace() assumes
> that hint is not modified by uvm_map_space_avail(). But this is not true
> when alignment is required but hint is not aligned properly.
>
> To fix this, align hint at the beginning of uvm_findspace(). Then,
> inconsistent does not occur:
>
> http://www.netbsd.org/~rin/uvm_map_20190722.patch
+#define ALIGN_VA(va, align, topdown) do { \
+ if ((align) != 0 && ((va) & ((align) - 1)) != 0) { \
+ if (topdown) \
+ (va) &= ~((align) - 1); \
Use roundown2() here?
+ else \
+ (va) = roundup(va, align); \
Use roundup2() here instead, which avoids multiplication?
We don't seem to have a convenience macro for testing power of 2
alignment to use in the test though.
-uwe
Home |
Main Index |
Thread Index |
Old Index