[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <46DlGt49BMz9sPW@ozlabs.org>
Date: Thu, 22 Aug 2019 23:09:10 +1000 (AEST)
From: Michael Ellerman <patch-notifications@...erman.id.au>
To: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] powerpc/32: Add warning on misaligned copy_page() or clear_page()
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@....fr>
> Cc: Erhard F. <erhard_f@...lbox.org>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=204371
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/7ab0b7cb8951d4095d73e203759b74d41916e455
cheers
Powered by blists - more mailing lists