Thread (44 messages) 44 messages, 2 authors, 2019-10-11

Re: [PATCH v3 05/17] arm64, hibernate: check pgd table allocation

flat view

From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2019-09-06 15:44:24
Also in: kexec, linux-mm, lkml

On Fri, Sep 6, 2019 at 11:17 AM James Morse [off-list ref] wrote:
Hi Pavel,

On 21/08/2019 19:31, Pavel Tatashin wrote:
quoted
There is a bug in create_safe_exec_page(), when page table is allocated
it is not checked that table is allocated successfully:

But it is dereferenced in: pgd_none(READ_ONCE(*pgdp)).
If there is a bug, it shouldn't be fixed part way through a series. This makes it
difficult to backport the fix.

Please split this out as an independent patch with a 'Fixes:' tag for the commit that
introduced the bug.

quoted
Another issue,
So this patch does two things? That is rarely a good idea. Again, this makes it difficult
to backport the fix.

quoted
is that phys_to_ttbr() uses an offset in page table instead
of pgd directly.
If you were going to reuse this, that would be a bug. But because the only page that is
being mapped, is mapped to PAGE_SIZE, all the top bits will be 0. The offset calls are
boiler-plate. It doesn't look intentional, but its harmless.
Yes, it is harmless otherwise the code would not work. But it is
confusing to read, and looks broken. I will separate this change as
two patches as you suggested.

Thank you,
Pasha

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help