Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1157158ybl; Thu, 22 Aug 2019 10:09:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOTUYuc14N55c126xwVclcj7EJ19U0Fk8dH/MtRKe42x2BEf8rSZWhYlV+gpuuJjeab3GM X-Received: by 2002:a17:90a:800a:: with SMTP id b10mr695586pjn.23.1566493751943; Thu, 22 Aug 2019 10:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566493751; cv=none; d=google.com; s=arc-20160816; b=s+wUKRbaorlPeX10/17JbtKr2PRrgELZKBRlM1cTtnIMOcm1MbPM8Y/it9A5hz7YgX +wLSl0zHm8fLhohzISxkNlECtbCevXua0atCTMdFgzzRu4yH+QquBkMdD+JA1hB2Gg69 4xQNV3SHC6qnGNCPA67YOt6oyoeCxQaEh6PZF5gT6/7EFt0qJ2hOfGib9Odq6bx92PZj zHDMf69wvBg45Wb+IgD0xgLpUW/XgSZGlAnXRxxbk+uuSEkvjWPPmn0G8oBKJyLNnqjF Hqxfa/53m5cQZ9Z322bCZ5P7VYaXUFjwoqPyCZ6TwTC4BnGfbCKkSStOvvTayy65SXOv CI3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=0dpM6obp12sxChRYzf29DKXTgqmbSyIDxkH0t4y8z1o=; b=hAaJF/ndPZrrAAGFmDKw2I6qzm/cxnqUnCznEsfTqUQsie3kzVOAaNxnF9FDTrds6k LBslxheEptmeE08k2BoHBCgUOv7S9rOmqpH3Gif/d3j3zc6I8LzKL/zdDAsGxfOau0Bx UzDbAW/gsKlzJxued6MpvbbcepcFjl1ZDI2MEEYSDZ/7v69oAMbq2XZMXBCx40oR4+Ui eIl0sxR6LX2fbSmO9nexrzm/1+QXbECh9OYuSmKZUdQ22iVAU3/uf5WhlDGDR8w7x8w6 NeXVrYbj467fRpp+6StxXSXN8ZEcIHaNm8J4M/iRQXCDKZb2b0cfOQAYB5E7/incQC6x p5CA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h185si16839320pge.199.2019.08.22.10.08.56; Thu, 22 Aug 2019 10:09:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388979AbfHVNJO (ORCPT + 99 others); Thu, 22 Aug 2019 09:09:14 -0400 Received: from ozlabs.org ([203.11.71.1]:47655 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388965AbfHVNJM (ORCPT ); Thu, 22 Aug 2019 09:09:12 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 46DlGt49BMz9sPW; Thu, 22 Aug 2019 23:09:10 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 7ab0b7cb8951d4095d73e203759b74d41916e455 In-Reply-To: To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/32: Add warning on misaligned copy_page() or clear_page() Message-Id: <46DlGt49BMz9sPW@ozlabs.org> Date: Thu, 22 Aug 2019 23:09:10 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Erhard F. > Link: https://bugzilla.kernel.org/show_bug.cgi?id=204371 Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/7ab0b7cb8951d4095d73e203759b74d41916e455 cheers