[PATCH] powerpc/32: Add warning on misaligned copy_page() or clear_page()

Michael Ellerman patch-notifications at ellerman.id.au
Thu Aug 22 23:09:10 AEST 2019


On Fri, 2019-08-16 at 07:52:20 UTC, Christophe Leroy wrote:
> copy_page() and clear_page() expect page aligned destination, and
> use dcbz instruction to clear entire cache lines based on the
> assumption that the destination is cache aligned.
> 
> As shown during analysis of a bug in BTRFS filesystem, a misaligned
> copy_page() can create bugs that are difficult to locate (see Link).
> 
> Add an explicit WARNING when copy_page() or clear_page() are called
> with misaligned destination.
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
> Cc: Erhard F. <erhard_f at mailbox.org>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=204371

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7ab0b7cb8951d4095d73e203759b74d41916e455

cheers


More information about the Linuxppc-dev mailing list