From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BEABC47094 for ; Mon, 7 Jun 2021 15:53:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F1A160FE4 for ; Mon, 7 Jun 2021 15:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F1A160FE4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XYQ9FOAoThgowKntBljpYEN0CcsAln2ODIiCDBsyIzg=; b=b7LnHNbeUPfpUa d5ljDKUXvWYTDufH9t6LnbxmhKZcpfFrQVdHmoEJvXfwE11TPx2Q9vvipPdggJf2/FhDxRXACOjx9 7kL0NnBbnxArzDnDAj8inagO5k2WQQHko9tsicJlRAJQrrlQtVzgB/eOKoj4BI7BDUpao9vBTO8Xp CJjsb3hRW7/cVCZEEatD91uka4XiUclaRyTfFfE+JidpLaqB75wmPeQKbKOSGCtD5LcoW1OQ/8WtC EfsI6Q/D5P46NKKSqKABmTVcEqcscYqa5AepLYO16CXSZM0+Bp+BCdFl6tuGlq1jgbb0D/PGvGP7p eJbCN+jheftnx8rIgbmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqHXC-004KfH-HI; Mon, 07 Jun 2021 15:51:26 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqHX6-004Ke0-5x for linux-arm-kernel@lists.infradead.org; Mon, 07 Jun 2021 15:51:23 +0000 Received: from mail-oi1-f182.google.com ([209.85.167.182]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mz9pT-1lU66w28qh-00wAyo for ; Mon, 07 Jun 2021 17:51:17 +0200 Received: by mail-oi1-f182.google.com with SMTP id r17so8266564oic.7 for ; Mon, 07 Jun 2021 08:51:16 -0700 (PDT) X-Gm-Message-State: AOAM531AIfFw98y3rF+sHVPLQeb1Vk8ibj6TFTdSWTFsiz0nbn5vjXEk cz4PBRN1CQ9R55VLG6Jkh6+MZraleNHfn5e8DLU= X-Google-Smtp-Source: ABdhPJyU28MUc419KzJydOMfdzznPlQh8ffCqalDqllLyg0iivlfhCzoNCNXDd3vaH1TKdPw9LvQge+oMq5Zr+WsFPI= X-Received: by 2002:a05:6808:6c8:: with SMTP id m8mr12752528oih.11.1623081075778; Mon, 07 Jun 2021 08:51:15 -0700 (PDT) MIME-Version: 1.0 References: <4d0c8318-bad8-2be7-e292-fc8f70c198de@samsung.com> <20210602135123.GD12753@C02TD0UTHF1T.local> <130ce34f-460a-0046-f722-00144f2d5502@samsung.com> <20210604100114.GC64162@C02TD0UTHF1T.local> <0d10411d-49fe-fbca-0479-e2983af16aa8@samsung.com> <20210607120118.GC97489@C02TD0UTHF1T.local> <20210607130859.GD97489@C02TD0UTHF1T.local> <20210607133953.GB7330@willie-the-truck> <20210607151740.moncryl5zv3ahq4s@gilmour> In-Reply-To: <20210607151740.moncryl5zv3ahq4s@gilmour> From: Arnd Bergmann Date: Mon, 7 Jun 2021 17:50:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) To: Maxime Ripard Cc: Will Deacon , Mark Rutland , emma@anholt.net, Marek Szyprowski , linux-arm-kernel@lists.infradead.org, kernel-team@android.com, Catalin Marinas , Ard Biesheuvel , Vincent Whitchurch , Bartlomiej Zolnierkiewicz , dri-devel X-Provags-ID: V03:K1:DNtsQmfzxBdNZlGzA9gKxxlMflMZzobrkA5GauuBf+sYqCsG4q7 Mf0eRLG2X1Rc5xMvzrKG8Yc2skXo6hyfTJMuiVL8mBG3tW3zVvmNotfxEEILoHoJBiHo6Ky 5IbZNfneOhxPXqyBkTkogO/in35OgApfInay4adVtj81HsRuLLwxHaQB0CSzZwN4WcCR6Hy vdfV9+qXA2OLOghxLuL2Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:65Nw1haBjqY=:P0SD7DDwK5FwK/g3iSr5lS kvu586xYOVrQ6fc3m+UloaaXRLEaleBb8lQDIinUIFwtQTkPddED750qn9ooCrPNz9tnV4taX p4/Wlzv6DtIKRzXfdujQ2vUP33QyMwTWMFZiKmAewNEVsgTJDMajL4jD7ZHAYsaMBoDd3GyP4 hhjrzV4BxPTq8yqQ8C4YmyYa4j/bufYVJMAt4njwIblqxHINdqZOIzpWNu8j6+0AEZrrbty5n VqUqgrz2DN5IxS/UGMndBKvAL07qI39tm2thMgvlbsGng+IYzZs8K7nvuNVJmP6tcvCaneVee F7cbVx+vNrAkWWEwFxOXlyGreCuJH/4AOP+ifpsA6iLHqPPhL70WORMlPczPsXsfkjffQRzwe 8NATPkerWz3iuU6McZ4JWA/A6IqV+fYh7DZf6Kqbko//nL0uD6HI8RblEMq3jWC1KJFzM6vyo wEy4HTkDudgjQBXhse6pJp7MKwa1dcBT3dSOVCVMLc5cBj3HbZlPVxe4kBLfE7bMWOlwhytpD S651/sumbMjV7tAK9ighx1EikO1Cj3lUiJzWpOCDWtmH+EI2TpE9aVAe+J3TMO8JGcO2UEcRJ wV4T7KhH0A92J0Z7RUNLLv0aXvzh6c1IHZ93VZWePTLViD+cTp6pNCXltnWUOCI4dN1PvRy5y mt80= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_085120_536730_D7869D43 X-CRM114-Status: GOOD ( 22.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 7, 2021 at 5:17 PM Maxime Ripard wrote: > On Mon, Jun 07, 2021 at 03:57:41PM +0200, Arnd Bergmann wrote: > > On Mon, Jun 7, 2021 at 3:39 PM Will Deacon wrote: > > > On Mon, Jun 07, 2021 at 02:08:59PM +0100, Mark Rutland wrote: > > > > On Mon, Jun 07, 2021 at 01:01:18PM +0100, Mark Rutland wrote: > > > > > On Mon, Jun 07, 2021 at 11:58:32AM +0200, Marek Szyprowski wrote: > > I notice that it checks index 'fifos_state[channel].in_use', but then > > uses a different index 'i' for looking at the 'pending_commit' field > > beyond the end of the array. > > > > This code was introduced by Maxime Ripard in commit 9ec03d7f1ed3 > > ("drm/vc4: kms: Wait on previous FIFO users before a commit"). > > Awesome, I tried to find out that bug a few weeks ago but couldn't > reproduce the KASAN spat. You're right, it should be channel here > instead of i. Since you did the whole work, do you want to send the > patch? Marek and Mark did most of the work finding the problem, I just looked in the right place a few times (and a bit in the wrong place). I'd suggest you send that patch with the corresponding Reported-by/Analyzed-by/ Tested-by tags. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C81E0C47094 for ; Mon, 7 Jun 2021 16:04:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75A21610E5 for ; Mon, 7 Jun 2021 16:04:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75A21610E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5B876E8F9; Mon, 7 Jun 2021 16:04:00 +0000 (UTC) X-Greylist: delayed 456 seconds by postgrey-1.36 at gabe; Mon, 07 Jun 2021 16:03:59 UTC Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DD236E8F9 for ; Mon, 7 Jun 2021 16:03:59 +0000 (UTC) Received: from mail-oi1-f175.google.com ([209.85.167.175]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1M9nEJ-1ll4zp3vkb-005sdN for ; Mon, 07 Jun 2021 17:51:17 +0200 Received: by mail-oi1-f175.google.com with SMTP id x196so18115073oif.10 for ; Mon, 07 Jun 2021 08:51:16 -0700 (PDT) X-Gm-Message-State: AOAM533ElLua8uSKqRzEuX4WKtcq2qd87733TEFZUtFGhbb1gQEAKjTv clsm4BEUli8k9ET8DKug5j+W6dnBH2HAwTObNA0= X-Google-Smtp-Source: ABdhPJyU28MUc419KzJydOMfdzznPlQh8ffCqalDqllLyg0iivlfhCzoNCNXDd3vaH1TKdPw9LvQge+oMq5Zr+WsFPI= X-Received: by 2002:a05:6808:6c8:: with SMTP id m8mr12752528oih.11.1623081075778; Mon, 07 Jun 2021 08:51:15 -0700 (PDT) MIME-Version: 1.0 References: <4d0c8318-bad8-2be7-e292-fc8f70c198de@samsung.com> <20210602135123.GD12753@C02TD0UTHF1T.local> <130ce34f-460a-0046-f722-00144f2d5502@samsung.com> <20210604100114.GC64162@C02TD0UTHF1T.local> <0d10411d-49fe-fbca-0479-e2983af16aa8@samsung.com> <20210607120118.GC97489@C02TD0UTHF1T.local> <20210607130859.GD97489@C02TD0UTHF1T.local> <20210607133953.GB7330@willie-the-truck> <20210607151740.moncryl5zv3ahq4s@gilmour> In-Reply-To: <20210607151740.moncryl5zv3ahq4s@gilmour> From: Arnd Bergmann Date: Mon, 7 Jun 2021 17:50:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm64: cache: Lower ARCH_DMA_MINALIGN to 64 (L1_CACHE_BYTES) To: Maxime Ripard Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:bMipKT5hHVF/IE8Mc26vSh/TTHF4T+9C/FP9kGZVBcTOlBQTnWB 0odxtPZcb09NTsf6AvCgB2tzWqq0la9pqkJfoxMgY04MDlMyV4wFYzQCumjJBEBbQBsxnYe n/K4DvBgMgq0pM/aEqgBZ/nQTWkqeOW1xCA4X3z4Hq67SeNhGEF9LRGCGqbKErqp28LtsNp 1He2s1NPezzXuDr28OTpA== X-UI-Out-Filterresults: notjunk:1;V03:K0:UyIPmub/z3A=:CWVo3P2IoU/hl8274uzkpA jZOELICWAcjwhmRHqW5INYVRcBG6AD+Xv6H5/s4f/AZDyDfVUdIJVVKmdFRKg1t7r6tehsbX5 BfZpVOVkhhvqxO+g/UWb7POgv7t0FsMjWgwiZ32Bo0zafWxHXUzAob41Do7GnfRhalUlnZaf/ QkoxgUAlYb6neaVW227mn7DAWzP+sGcr845X+9cZ6IeRCOgOPST5QSjSw0J2hgssthvS2hCst cjBU3+Dk+cc5L6b+gsau+YhaZDnbtC/bd31wQmC409JUrPmvDYrWvvFc8u5gKcNgeSWy0y14Q yb/XIMfQ7Ln5sNXQqAmW85QXq2PGPioVpy532ZKG7QgDFfTqkU0zqKDYXhPf6b6IyS+2OJ90M Ar2QD0/zJOGWAbwI2j5BH1BwjgZZPPyyuDgKaoIEn7T0Bd6FAyYg8Xv/anbTTj2IibbqhqEpe WjlmBhXcMux0lbyaNdx7iQZ3d5kKXiSwhl9vVLC7gRZB7OuQyAGi0UTucwyFYcKESFOJx9ey1 BGFxOtrAHLTVfZTvvZkJjc= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , emma@anholt.net, Bartlomiej Zolnierkiewicz , Will Deacon , Vincent Whitchurch , dri-devel , Catalin Marinas , kernel-team@android.com, Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Jun 7, 2021 at 5:17 PM Maxime Ripard wrote: > On Mon, Jun 07, 2021 at 03:57:41PM +0200, Arnd Bergmann wrote: > > On Mon, Jun 7, 2021 at 3:39 PM Will Deacon wrote: > > > On Mon, Jun 07, 2021 at 02:08:59PM +0100, Mark Rutland wrote: > > > > On Mon, Jun 07, 2021 at 01:01:18PM +0100, Mark Rutland wrote: > > > > > On Mon, Jun 07, 2021 at 11:58:32AM +0200, Marek Szyprowski wrote: > > I notice that it checks index 'fifos_state[channel].in_use', but then > > uses a different index 'i' for looking at the 'pending_commit' field > > beyond the end of the array. > > > > This code was introduced by Maxime Ripard in commit 9ec03d7f1ed3 > > ("drm/vc4: kms: Wait on previous FIFO users before a commit"). > > Awesome, I tried to find out that bug a few weeks ago but couldn't > reproduce the KASAN spat. You're right, it should be channel here > instead of i. Since you did the whole work, do you want to send the > patch? Marek and Mark did most of the work finding the problem, I just looked in the right place a few times (and a bit in the wrong place). I'd suggest you send that patch with the corresponding Reported-by/Analyzed-by/ Tested-by tags. Arnd