Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2396858lqo; Mon, 20 May 2024 04:52:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYEHHoWeToygxTTNFr2MK5mWke1bjhqFnf3MQC+W4USVOVF20CNTyUiTsa1s2QPVjYnaG1PDXtrJj9EHrlgpBxIWrcEbxTWxKKSB0TlQ== X-Google-Smtp-Source: AGHT+IFadX2q40EH/zUwcEGlSaazlsGYhqMxIUM2ZSoahv7WP3MkSKGPgN+wBTia92U6ylS5RpZC X-Received: by 2002:a50:8e07:0:b0:575:17ca:7f7b with SMTP id 4fb4d7f45d1cf-575ff379c47mr4750352a12.15.1716205958950; Mon, 20 May 2024 04:52:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716205958; cv=pass; d=google.com; s=arc-20160816; b=YLnPE71kVWwKWTfoJMzBg1QJy2WehXzNHHbUdUWpMrP0sdbZ21427jiRpADZZdfF+T uC5qY9fZzcu1Z9Q/6hYIZnhO9wSgpx9k8kJDL5eQW2OHBYdiAgVpNmrs5p6SPtpbyFVC FHOUTTjHX7J1/9ljpCqIeEQZBmRBgKi4S5U55/7aAk4AxW8An9Hl33sHEKPQOX6/06UG iUyq5xSFtSK69rTBbpbKxX0JO2jqkOCNoWBAcWHOU1PwhdMPRYEB5/sr8DkSCPPDRcqR 737u4btB0Mb8dTTOXcUc5zQoh8VFI9Xwo7FLg7PMh2oR+gddYEo3p/E2KkJufMnVgf1U jCFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=DQZYs/7Oo8Ji7S7LXPiwafMYP2oXT4pcCldsJm5zi/E=; fh=/zZaHKPWO/jXBcTJF4l40BP7mvOgN2CtSSKrXEJ86TQ=; b=xZk0nzA18uivQ6LT+bszoKuZyrls3lU8VTYlCf8oL+rUSw+8whlfEdL9YGQPEmZM/X I0+bca8RLiaLb5bMlONo8+MeuORBrAtvfn37IPrNWf724YqegTkTLCLxRpAmDFT9jmxf Bb5c9O3uN5LziHtQCJNQDOme5RUNxaMYw+Yh02D6MpuZiMbUXKuFuJMlDvJNwZYftFQz UpdORsUfxzEVt6pIg+I1KoNGHuS5UALK9jr05XbJTB9p1yvKbMoECnKVvqeH5VpsIMq0 a6Md8B3LDM4VCV5ArBRA2VZ/k5c+p3oufP/2cU9IyKh3U1KjHeTtKt01/8iyQ4NXeIe4 slCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-183672-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183672-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d48a4si12672178a12.222.2024.05.20.04.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 04:52:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183672-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-183672-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183672-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BF31C1F232F1 for ; Mon, 20 May 2024 11:44:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E6754BF6; Mon, 20 May 2024 11:44:42 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D63E5381D; Mon, 20 May 2024 11:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716205481; cv=none; b=seqpKNDtS8HxQ3yOw+xaqvzyiDz+PA8A7vCtXZ/u8gi5D5EuKWaYY5WHrpLZ5/gGto/4B2GQ5qSkqErVxm1axU3aCRLa9GOg8bae1KjcVNWFbvAPmaxvIR6PfHQ5/m8Sw3EOpgDqUhfmlF2UeAjumMlWvTf1V8ODEPUU68zeLic= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716205481; c=relaxed/simple; bh=grRLKSxy5wPv87OejPxy7I2fUauVo0L3p0GNWG3P0Jo=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=QQlD4/OpRyBVapNI/JGrTaXr6xTtbgpRxVgkjDwXByyspAGIAIIcJ3pGpBCB02FfnYJbuwYjvcDOvQ9KgpmWz15V7zp/DrxmyM6QGF1syxgOGzcZAldLTkAKmqqaO1NnVf8ZAm5UwM9IGbBkvAUVqgS01C1kAJoUF7ZVyfhP+s0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4VjbMF37HHz4f3lfn; Mon, 20 May 2024 19:44:25 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id CF7BF1A0199; Mon, 20 May 2024 19:44:35 +0800 (CST) Received: from [10.174.176.117] (unknown [10.174.176.117]) by APP3 (Coremail) with SMTP id _Ch0CgC3w5ufN0tmJ0vzMw--.3035S2; Mon, 20 May 2024 19:44:34 +0800 (CST) Subject: Re: [syzbot] [bpf?] possible deadlock in get_page_from_freelist To: Pengfei Xu , syzbot , ytcoode@gmail.com Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, eddyz87@gmail.com, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, sdf@google.com, song@kernel.org, syzkaller-bugs@googlegroups.com, yonghong.song@linux.dev, akpm@linux-foundation.org References: <000000000000c051d80616195f15@google.com> From: Hou Tao Message-ID: <554af7a5-4309-cfec-8182-93e61aadc918@huaweicloud.com> Date: Mon, 20 May 2024 19:44:31 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-CM-TRANSID:_Ch0CgC3w5ufN0tmJ0vzMw--.3035S2 X-Coremail-Antispam: 1UD129KBjvJXoWxJr15KFW8ZFWUuryxWry5XFb_yoW8tF1Dpa y8KF13Krs5trWjyFW8KF1jgw1jgrs3Gay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:28:16 -0700, syzbot wrote: >> Hello, >> >> syzbot found the following issue on: >> >> HEAD commit: 7efd0a74039f Merge tag 'ata-6.9-rc4' of git://git.kernel.o.. >> git tree: upstream >> console output: https://syzkaller.appspot.com/x/log.txt?x=1358aeed180000 >> kernel config: https://syzkaller.appspot.com/x/.config?x=285be8dd6baeb438 >> dashboard link: https://syzkaller.appspot.com/bug?extid=a7f061d2d16154538c58 >> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 >> >> Unfortunately, I don't have any reproducer for this issue yet. >> > I used syzkaller and could reproduce the similar issue "WARNING in > get_page_from_freelist" in v6.9 mainline kernel. The warning report is different with the dead-lock syzbot report. The warning is "WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1))" in rmqueue() and it is caused by "kzalloc(sizeof(struct xfs_mount), GFP_KERNEL | __GFP_NOFAIL)" in xfs_init_fs_context(). > > Bisected and found first bad commit: > " > 816d334afa85 kexec: modify the meaning of the end parameter in kimage_is_destination_range() > " > Revert above commit on top of v6.9 kernel this issue was gone. > > All detailed info: https://github.com/xupengfe/syzkaller_logs/tree/main/240517_085953_get_page_from_freelist > mount_*.gz are in above link. > Syzkaller reproduced code: https://github.com/xupengfe/syzkaller_logs/blob/main/240517_085953_get_page_from_freelist/rep.c > Syzkaller syscall repro steps: https://github.com/xupengfe/syzkaller_logs/blob/main/240517_085953_get_page_from_freelist/repro.prog > Syzkaller report: https://github.com/xupengfe/syzkaller_logs/blob/main/240517_085953_get_page_from_freelist/repro.report I think it is a false positive, because without KASAN enabled, the size of xfs_mount is about 2496 bytes and it is impossible to trigger the WARN_ON_ONCE(). However with KASAN enabled, the size of xfs_mount will be greater than 4096, so the warning will be triggered accordingly when the 8KB-slab needs to refill its slabs.