[Bug 233863] r345425 on PowerMac G5 may require kern.smp.disabled=1 and must set usefdt=1 which causes net interface reorder

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Apr 21 05:16:52 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233863

--- Comment #23 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to Mark Millard from comment #20)

The original rejection by a debug build that lead to
the discovery of out of bounds access was tied to the
original conversion to fdt code truncating the translation
property via:

                if (proplen > 1024) {
                        proplen = 1024;
                }

in add_node_to_fdt in stand/powerpc/ofw/ofwfdt.c .
This changed a 1040==208*5 total to a 1024==256*4
total. (1024 is not a multiple of 5.)

So the problem goes away when the truncation logic
is removed, which is part of what my patches do.

Still, the truncation did expose some coding problems in
the translation map extraction, such as out of bounds access
for such a truncated case. But it would take some forced
bad property size to see the problem again if mmu_oea64.c is
not patched.

The change to the KASSERT in my patch may well be inappropriate,
given the above context that is now known.

Having an incomplete set of translations does not seem like
an appropriate thing: so the truncation to 1024 needs to be
avoided.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ppc mailing list