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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 89C22C432C3 for ; Fri, 29 Nov 2019 15:50:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5254A217AB for ; Fri, 29 Nov 2019 15:50:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="lUT1A0bJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfK2Put (ORCPT ); Fri, 29 Nov 2019 10:50:49 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35857 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbfK2Put (ORCPT ); Fri, 29 Nov 2019 10:50:49 -0500 Received: by mail-pf1-f194.google.com with SMTP id b19so14799060pfd.3 for ; Fri, 29 Nov 2019 07:50:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=zqzmkmsTqqNqAEU6sqwGU4uvEVY7myANFxGbhNa8Thk=; b=lUT1A0bJvuFzw968HjdP/fl9rNWARwc0PM4vYA/8yJCbJ/uaimus9hTdblQmfxlQKV Hk3pTRvXK/sBwKVtqmUD9m1Hj5DCnk2axhfyw3w3c/3Smxd9sx0XjgiViLi9GAWsZgST ImILVq57QBkrCOTfxSwjUOt8pRnJQmvRe1mYU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=zqzmkmsTqqNqAEU6sqwGU4uvEVY7myANFxGbhNa8Thk=; b=dWP3Dy32yG1ILT+ndV3XnwxwqhctCE8gnKP3S0pEeKlYqiXgT8frFPrr5wYrtFGl3G QZ2fr6tVPlc2S2UGriSbrPMnPQjEld/YoMo4jbtO/dK2Y7dkimv4Lzqu5vKONwIFJRZz X+J9l0l8Y2NacY1sM5AdVoj4sSbS1QfSt1kgFMFxc6LRHSF3xZjoldHYPIho2U11qgh0 z+UMUeASthjaJceKvvA8xIcQNEfNhXtOTBfRKdG1F5ee8JOKdLNRmHe9WimJbg1CwIAZ 3wEJ9DWE+XN+D9CzN4uJZYdzy3X9xlmXadfcFsFNv61qvkOP71K8mBxYOa4Qfx48VeWg O7FA== X-Gm-Message-State: APjAAAVQqwyWBmgb0Rvjyz4cErKFE9b4GF0H6c351aiVqtH3xYgzB9oG GYXwH+wKX5UwWuQkEpy88FgOTg== X-Google-Smtp-Source: APXvYqyyUukfPuCBk8nUZGZ0bnjEmJYzBWHD+mlTLp6d97G4LvWRCazYGdcctIJCVgDXHXDcuWz1Gg== X-Received: by 2002:aa7:93a7:: with SMTP id x7mr57797282pff.36.1575042647113; Fri, 29 Nov 2019 07:50:47 -0800 (PST) Received: from localhost (2001-44b8-111e-5c00-4092-39f5-bb9d-b59a.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:4092:39f5:bb9d:b59a]) by smtp.gmail.com with ESMTPSA id a22sm1465829pfk.108.2019.11.29.07.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2019 07:50:46 -0800 (PST) From: Daniel Axtens To: Qian Cai Cc: Andrey Ryabinin , Dmitry Vyukov , kasan-dev , Linux-MM , the arch/x86 maintainers , Alexander Potapenko , Andy Lutomirski , LKML , Mark Rutland , Christophe Leroy , linuxppc-dev , Vasily Gorbik , linux-xfs@vger.kernel.org, "Darrick J. Wong" Subject: Re: XFS check crash (WAS Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory) In-Reply-To: <27B18BF6-757C-4CA3-A852-1EE20D4D10A9@lca.pw> References: <20191031093909.9228-1-dja@axtens.net> <20191031093909.9228-2-dja@axtens.net> <1573835765.5937.130.camel@lca.pw> <871ru5hnfh.fsf@dja-thinkpad.axtens.net> <952ec26a-9492-6f71-bab1-c1def887e528@virtuozzo.com> <2297c356-0863-69ce-85b6-8608081295ed@virtuozzo.com> <56cf8aab-c61b-156c-f681-d2354aed22bb@virtuozzo.com> <871rtqg91q.fsf@dja-thinkpad.axtens.net> <27B18BF6-757C-4CA3-A852-1EE20D4D10A9@lca.pw> Date: Sat, 30 Nov 2019 02:50:43 +1100 Message-ID: <87y2vyel64.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org >>>>> >>>>> Nope, it's vm_map_ram() not being handled >>>> >>>> >>>> Another suspicious one. Related to kasan/vmalloc? >>> >>> Very likely the same as with ion: >>> >>> # git grep vm_map_ram|grep xfs >>> fs/xfs/xfs_buf.c: * vm_map_ram() will allocate auxiliary structures (e.g. >>> fs/xfs/xfs_buf.c: bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count, >> >> Aaargh, that's an embarassing miss. >> >> It's a bit intricate because kasan_vmalloc_populate function is >> currently set up to take a vm_struct not a vmap_area, but I'll see if I >> can get something simple out this evening - I'm away for the first part >> of next week. For crashes in XFS, binder etc that implicate vm_map_ram, see: https://lore.kernel.org/linux-mm/20191129154519.30964-1-dja@axtens.net/ The easiest way I found to repro the bug is sudo modprobe i915 mock_selftest=-1 For lock warns, one that goes through the percpu alloc path, the patch is already queued in mmots. For Dmitry's latest one where there's an allocation in the purge_vmap_area_lazy path that triggers a locking warning, you'll have to wait until next week, sorry. Regards, Daniel 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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 F1CB7C432C0 for ; Fri, 29 Nov 2019 15:55:07 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 982E7216F4 for ; Fri, 29 Nov 2019 15:55:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="lUT1A0bJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 982E7216F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47PfGb6bvHzDrB9 for ; Sat, 30 Nov 2019 02:55:03 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=axtens.net (client-ip=2607:f8b0:4864:20::442; helo=mail-pf1-x442.google.com; envelope-from=dja@axtens.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=axtens.net header.i=@axtens.net header.b="lUT1A0bJ"; dkim-atps=neutral Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47PfDM25zHzDr70 for ; Sat, 30 Nov 2019 02:50:50 +1100 (AEDT) Received: by mail-pf1-x442.google.com with SMTP id q13so14791568pff.2 for ; Fri, 29 Nov 2019 07:50:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=zqzmkmsTqqNqAEU6sqwGU4uvEVY7myANFxGbhNa8Thk=; b=lUT1A0bJvuFzw968HjdP/fl9rNWARwc0PM4vYA/8yJCbJ/uaimus9hTdblQmfxlQKV Hk3pTRvXK/sBwKVtqmUD9m1Hj5DCnk2axhfyw3w3c/3Smxd9sx0XjgiViLi9GAWsZgST ImILVq57QBkrCOTfxSwjUOt8pRnJQmvRe1mYU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=zqzmkmsTqqNqAEU6sqwGU4uvEVY7myANFxGbhNa8Thk=; b=KY9FCK/fCkUNXjPm1w+jaaZGRNX/CG5G+wwymb1QrWpDJV7Tp2BqlxM5nHdVZgc4Av ttKgSsS87lxhmIc9kU9mO8/qKWTpAEh/wp9LNBGvutPvls2HYRxdwLC3lX9Mf+4Zhf2K Bf55dt6ZIKLGtm+D9M5yv2fsEBt/iUEQJJcypKHBGA/NzOTE7eRY1SLCaYNiwn4kQrIs 1lrpABi2zeeEnG96kgnGPtt8bqYfsusIu+vIoO6JEicSmLh/5zECE9dhW5rdMgT9JOsm R6eGkmaG9LRufpgrUnu3wTqcmSLv7oj3MmxH6PnWYle8mR16DAPRt6+zyeHYxTkd1HA0 qqPw== X-Gm-Message-State: APjAAAUyOOrtRpyWlLE3/x4XzBf8C0RrPPG16zU3jGpwmlZZM3eyY8j/ NTKyXK3erHLo/eHuLnpKWub+bg== X-Google-Smtp-Source: APXvYqyyUukfPuCBk8nUZGZ0bnjEmJYzBWHD+mlTLp6d97G4LvWRCazYGdcctIJCVgDXHXDcuWz1Gg== X-Received: by 2002:aa7:93a7:: with SMTP id x7mr57797282pff.36.1575042647113; Fri, 29 Nov 2019 07:50:47 -0800 (PST) Received: from localhost (2001-44b8-111e-5c00-4092-39f5-bb9d-b59a.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:4092:39f5:bb9d:b59a]) by smtp.gmail.com with ESMTPSA id a22sm1465829pfk.108.2019.11.29.07.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2019 07:50:46 -0800 (PST) From: Daniel Axtens To: Qian Cai Subject: Re: XFS check crash (WAS Re: [PATCH v11 1/4] kasan: support backing vmalloc space with real shadow memory) In-Reply-To: <27B18BF6-757C-4CA3-A852-1EE20D4D10A9@lca.pw> References: <20191031093909.9228-1-dja@axtens.net> <20191031093909.9228-2-dja@axtens.net> <1573835765.5937.130.camel@lca.pw> <871ru5hnfh.fsf@dja-thinkpad.axtens.net> <952ec26a-9492-6f71-bab1-c1def887e528@virtuozzo.com> <2297c356-0863-69ce-85b6-8608081295ed@virtuozzo.com> <56cf8aab-c61b-156c-f681-d2354aed22bb@virtuozzo.com> <871rtqg91q.fsf@dja-thinkpad.axtens.net> <27B18BF6-757C-4CA3-A852-1EE20D4D10A9@lca.pw> Date: Sat, 30 Nov 2019 02:50:43 +1100 Message-ID: <87y2vyel64.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Vasily Gorbik , "Darrick J. Wong" , the arch/x86 maintainers , LKML , kasan-dev , linux-xfs@vger.kernel.org, Linux-MM , Alexander Potapenko , Andy Lutomirski , Andrey Ryabinin , linuxppc-dev , Dmitry Vyukov Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" >>>>> >>>>> Nope, it's vm_map_ram() not being handled >>>> >>>> >>>> Another suspicious one. Related to kasan/vmalloc? >>> >>> Very likely the same as with ion: >>> >>> # git grep vm_map_ram|grep xfs >>> fs/xfs/xfs_buf.c: * vm_map_ram() will allocate auxiliary structures (e.g. >>> fs/xfs/xfs_buf.c: bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count, >> >> Aaargh, that's an embarassing miss. >> >> It's a bit intricate because kasan_vmalloc_populate function is >> currently set up to take a vm_struct not a vmap_area, but I'll see if I >> can get something simple out this evening - I'm away for the first part >> of next week. For crashes in XFS, binder etc that implicate vm_map_ram, see: https://lore.kernel.org/linux-mm/20191129154519.30964-1-dja@axtens.net/ The easiest way I found to repro the bug is sudo modprobe i915 mock_selftest=-1 For lock warns, one that goes through the percpu alloc path, the patch is already queued in mmots. For Dmitry's latest one where there's an allocation in the purge_vmap_area_lazy path that triggers a locking warning, you'll have to wait until next week, sorry. Regards, Daniel