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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 F1CDBC64E7A for ; Tue, 1 Dec 2020 09:22:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 329A5206C0 for ; Tue, 1 Dec 2020 09:22:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.b="OfbGM5YS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 329A5206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 49D236B0036; Tue, 1 Dec 2020 04:22:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 472586B005D; Tue, 1 Dec 2020 04:22:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AFF38D0001; Tue, 1 Dec 2020 04:22:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id 264436B0036 for ; Tue, 1 Dec 2020 04:22:15 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E74C88249980 for ; Tue, 1 Dec 2020 09:22:14 +0000 (UTC) X-FDA: 77544172188.12.work90_420992e273a9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id BFF4D1802E2B6 for ; Tue, 1 Dec 2020 09:22:14 +0000 (UTC) X-HE-Tag: work90_420992e273a9 X-Filterd-Recvd-Size: 6061 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 09:22:14 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id v21so784965plo.12 for ; Tue, 01 Dec 2020 01:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=wb51w+UCqgl6Rh3obfAP7ATnbPgDXE43SFkK4C8Azv4=; b=OfbGM5YScMkpWSgo5bcbRfWo5USISi0TOyfYjb1CChXcEZsK2h7bv2Hnv0ollA1KKW b3PZOSrXz2MslWlyIEBTYqjovFKWfyFC18mNW8vHXbZbE+Xx0Zgp/NNNF9uq8GvnRS1R TvacHgfkywihwXzPKio6FLgprNkJk1xNaqKARoNzwwsNqR/JwqMYbACwLUpEcCYrrAQY QDnPru2mOd5qptjM8RRENQiM7i8gDV0baxm1MfUjQoM9TokPi4QWeycJTBmv+c8kQTN2 Ww0exlriyrCuwIYWgsNdrzqC3L6UcEzY2sO5bbdtwK3gUFSz8Ne31JD0p63/Tsz0PUqa avnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wb51w+UCqgl6Rh3obfAP7ATnbPgDXE43SFkK4C8Azv4=; b=lPpDFSLCens/6GpIxVFuCjm4yu7ypNN3q+1QAgnQHNe/UsEO+eoe50F0iup2FgWtQs o+m53qUsTFwPj29vgov+8I9RJsV8MXzrne2KKPQvlz8akdVLYyOD/mJ9+DFvxltaIIJs sGmOnjovZYpUBbCqstGe23n/c23e9tQR8DTEECyxjevKyrl5pTFXdj9lpvVr/bcjHsHv d0i9xk95sInzUOST3KWC09PfYyOX6EIWHbN8IkKRbGwyspXE44qhwbMACZicRtaoVATy 5w+pI8czf5HvDzBCW95yYPSEnlUFjrkP3F5s02EuUkPnLFvNMvbr24oWz9BmoX6M4IE+ zwsw== X-Gm-Message-State: AOAM531SGxM4RgqUCbLI3YgcZtKWlh2NOXwT/XFX6a55rPA3dKiwYD1a HnCfUQMo5Y2q6gKorTQ+ZCptXi5E1cNmK/dEXz8uLNHaM0OJxW7W X-Google-Smtp-Source: ABdhPJzk8nYQ32DoI37/o9IauIVvInDQCL13OdGcbkD+mj+MBzl+gKvwwJZk045dG/EYVCzwJ+IR+tCRQyBPSkclrJY= X-Received: by 2002:a17:902:fe05:b029:da:7345:c773 with SMTP id g5-20020a170902fe05b02900da7345c773mr2227181plj.20.1606814532992; Tue, 01 Dec 2020 01:22:12 -0800 (PST) MIME-Version: 1.0 References: <58f66f22-fd5f-685d-e608-99c35d89c1a3@linux.alibaba.com> In-Reply-To: From: Muchun Song Date: Tue, 1 Dec 2020 17:21:36 +0800 Message-ID: Subject: Re: [External] Re: BUG: KASAN: null-ptr-deref in workingset_eviction+0xf2/0x1e0 To: Naresh Kamboju Cc: Alex Shi , inux-kernel@vger.kernel.org, linux-mm , Cgroups , Linux-Next Mailing List , lkft-triage@lists.linaro.org, Andrew Morton , Johannes Weiner , Shakeel Butt , Roman Gushchin , Stephen Rothwell , alexander.h.duyck@linux.intel.com, Yafang Shao , richard.weiyang@gmail.co, Michal Hocko , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Dec 1, 2020 at 5:09 PM Naresh Kamboju w= rote: > > Hi Alex, > > On Tue, 1 Dec 2020 at 13:14, Alex Shi wrote: > > > > > > > > =E5=9C=A8 2020/12/1 =E4=B8=8A=E5=8D=883:52, Naresh Kamboju =E5=86=99=E9= =81=93: > > > Crash log: > > > ----------- > > > ioctl_sg01.c:81: TINFO: Found SCSI device /dev/sg1 > > > [ 285.862123] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > [ 285.863025] BUG: KASAN: null-ptr-deref in workingset_eviction+0xf2= /0x1e0 > > > [ 285.863025] Read of size 4 at addr 00000000000000c8 by task kswapd= 0/245 > > > > Hi Naresh, > > > > Good to know you again. :) > > Same here :) > > > > > Would you like to use command to check whichh line cause the panic: > > > > scripts/faddr2line vmlinux workingset_eviction+0xf2/0x1e0 > > scripts/faddr2line vmlinux workingset_eviction+0xf2/0x1e0 > workingset_eviction+0xf2/0x1e0: > workingset_eviction at ??:? > > > vmlinux and system.map files available in this location, > https://builds.tuxbuild.com/1l0FDtgxYSNunuG5ERIXtvPjZ7R/ > > > > > I can't reproduce it. and my gcc version mismatch with yours. > > Please run below easy steps to reproduce. > you may install docker and tuxmake. > > Please share if you have any debug patch or proposed fix patch, > I would be happy to test. This is the fix patch. Thanks. https://lore.kernel.org/linux-mm/20201130132345.GJ17338@dhcp22.suse.cz/T/#m= 963f10e3e7f588156432131019136d53b7178bac > > Steps to reproduce: > -------------------- > # TuxMake is a command line tool and Python library that provides > # portable and repeatable Linux kernel builds across a variety of > # architectures, toolchains, kernel configurations, and make targets. > # > # TuxMake supports the concept of runtimes. > # See https://docs.tuxmake.org/runtimes/, for that to work it requires > # that you install podman or docker on your system. > # > # To install tuxmake on your system globally: > # sudo pip3 install -U tuxmake > # > # See https://docs.tuxmake.org/ for complete documentation. > > # tuxmake --runtime docker --target-arch x86_64 --toolchain gcc-9 \ > --kconfig defconfig \ > --kconfig-add https://builds.tuxbuild.com/1l0FDtgxYSNunuG5ERIXtvPjZ7R/con= fig > > # run LTP > # cd /opt/ltp > # ./runltp -s ioctl_sg01 > # you see below crash > > - Naresh --=20 Yours, Muchun