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, 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 92267C4363A for ; Thu, 22 Oct 2020 09:14:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D3AEA222E9 for ; Thu, 22 Oct 2020 09:14:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3AEA222E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 122796B007D; Thu, 22 Oct 2020 05:14:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0ABE96B007E; Thu, 22 Oct 2020 05:14:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F02CF6B0080; Thu, 22 Oct 2020 05:14:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0079.hostedemail.com [216.40.44.79]) by kanga.kvack.org (Postfix) with ESMTP id B74146B007D for ; Thu, 22 Oct 2020 05:14:57 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 38E1C180AD811 for ; Thu, 22 Oct 2020 09:14:57 +0000 (UTC) X-FDA: 77399001834.23.rain41_02029a72724f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 14AB637604; Thu, 22 Oct 2020 09:14:57 +0000 (UTC) X-HE-Tag: rain41_02029a72724f X-Filterd-Recvd-Size: 5987 Received: from mout-xforward.kundenserver.de (mout-xforward.kundenserver.de [82.165.159.5]) by imf50.hostedemail.com (Postfix) with ESMTP; Thu, 22 Oct 2020 09:14:56 +0000 (UTC) Received: from mail-qv1-f47.google.com ([209.85.219.47]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mv3Ds-1kDzna3bwu-00qz2M; Thu, 22 Oct 2020 11:14:55 +0200 Received: by mail-qv1-f47.google.com with SMTP id b11so499830qvr.9; Thu, 22 Oct 2020 02:14:54 -0700 (PDT) X-Gm-Message-State: AOAM531k2d1zGP1y76Gr1vE0Zaqg/7+mbYHQjPaEz7vgpPAzuYl7IqiD tdPKJf+evcihY/73sWG3BIHAYbx9Hb0UuI8yufo= X-Google-Smtp-Source: ABdhPJyTQBP0dRJbJWfua3xJHbrzKFctWdjW5mWFM7znxD+V4Hq2X1+XUh9kTr1iPtXJJ6khyzLRdADy4UPQw27hWss= X-Received: by 2002:ad4:4203:: with SMTP id k3mr1295968qvp.8.1603358093425; Thu, 22 Oct 2020 02:14:53 -0700 (PDT) MIME-Version: 1.0 References: <20200925045146.1283714-1-hch@lst.de> <20200925045146.1283714-3-hch@lst.de> <20201021161301.GA1196312@kroah.com> <20201021233914.GR3576660@ZenIV.linux.org.uk> <20201022082654.GA1477657@kroah.com> In-Reply-To: <20201022082654.GA1477657@kroah.com> From: Arnd Bergmann Date: Thu, 22 Oct 2020 11:14:37 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Buggy commit tracked to: "Re: [PATCH 2/9] iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c" To: Greg KH Cc: Al Viro , Nick Desaulniers , Christoph Hellwig , Android Kernel Team , Andrew Morton , Jens Axboe , David Howells , David Laight , Linux ARM , "linux-kernel@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , linux-s390 , sparclinux , linux-block , linux-scsi , Linux FS-devel Mailing List , linux-aio , io-uring@vger.kernel.org, linux-arch , Linux-MM , Networking , keyrings@vger.kernel.org, LSM List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:m7qKozcM+rYj2xhy/i48RnudCWxa3zEJIaB1T0omqvjqbTxeQnl 1tvWXUGAyTRmC2KNd7LJHyvbhVbXL7y9uQzBPBvdSubiqH14d34RqVCCPxF4Og58D/ADOPn v5W7gxuRnKbJXDD+Ltn7HAXRPquLQK1UvNaKx2PDgAvsKZPDuWjBeGy8HxIoGK73ppjIahG jfgznl+JK/eUlVHjTFMiQ== X-UI-Out-Filterresults: junk:10;V03:K0:8m7Y/QGz6gI=:WpTxXTULnGRd7QTVoqDd+cVm y1NQjTRMyBK2l7hDaRFGl88/WYc1SVrr1fsJQa7f+TsP4bnlcmsvs4kyfvmeIM/6/TRHUR9Ts SY/B5N9V555i1NWbYd4g9AImdnDdSbz3WyFDrRgbl2KcPBpczJw5Qi5RCFym1o5EIsTyrFZxC Tkj986pYbmsno0wvV+kOB/LbO1zN+KzFA6BZXOmYi7l/evZd2EeHxe32NTx1Lm5k/HNMuGIaB CaxhVEKRc82Vlk626vr0HF5uRPXMxQ1vNcE5ZAMwVLOaLPkcdfuWJVFybb3e8jDO6fpNEs3I9 vOf3ruqK5RYnycStC2rK64JJf4aVmN+ogYgSTw/S92fv1ojVmLYQbgWhDA3pUkmhaHUEfrHyN 5NCXhpGpFUi0GHyXAW0eAL7NweWV/ExX7zU292LarziSbCYULz4N/rG7vMvqglbbXwfysDmLn GsjV5XcZHBmPwWd6+moCSxdAPyxWS0ORJZpl55zaM5c1CFBqr1DBrTQRcSvdWw/JmU4oAq0r6 vamRq5pWyJLNB+6UETlQhYMQZWp97UyeCEjF3prNlScl5yHis5EogEX6puWCqLlOhQu4Uq+SU JJbNuu7w2ce3Ft1r4XK7/msd9jCenqKCnJsA1n/TvGdcq6nZ9+ogiw== 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 Thu, Oct 22, 2020 at 10:26 AM Greg KH wrote: > On Thu, Oct 22, 2020 at 12:39:14AM +0100, Al Viro wrote: > > On Wed, Oct 21, 2020 at 06:13:01PM +0200, Greg KH wrote: > > > On Fri, Sep 25, 2020 at 06:51:39AM +0200, Christoph Hellwig wrote: > > > > > > I can't really figure out what the regression is, only that this commit > > > triggers a "large Android system binary" from working properly. There's > > > no kernel log messages anywhere, and I don't have any way to strace the > > > thing in the testing framework, so any hints that people can provide > > > would be most appreciated. > > > > It's a pure move - modulo changed line breaks in the argument lists > > the functions involved are identical before and after that (just checked > > that directly, by checking out the trees before and after, extracting two > > functions in question from fs/read_write.c and lib/iov_iter.c (before and > > after, resp.) and checking the diff between those. > > > > How certain is your bisection? > > The bisection is very reproducable. > > But, this looks now to be a compiler bug. I'm using the latest version > of clang and if I put "noinline" at the front of the function, > everything works. > > Nick, any ideas here as to who I should report this to? > > I'll work on a fixup patch for the Android kernel tree to see if I can > work around it there, but others will hit this in Linus's tree sooner or > later... I see that Christoph rewrote the function again in bfdc59701d6d ("iov_iter: refactor rw_copy_check_uvector and import_iovec"), do you know if the current mainline version is also affected? Do you know if it happens across multiple architectures or might be specific to either x86 or arm64? https://bugs.llvm.org/ is obviously the place for reporting the issue if it does turn out to be a bug in clang, but that requires a specific thing going wrong in the output. One idea I have for debugging it is to sprinkle the inlined function with lots of barrier()s to prevent a lot of the optimizations. If that solves the issue, you can bisect through those until you find one barrier that makes the difference between working and broken and then look at diff of the assembler output. Arnd