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,DKIMWL_WL_HIGH, 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 CA611C388F9 for ; Thu, 22 Oct 2020 14:41:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 46B7824171 for ; Thu, 22 Oct 2020 14:41:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Pobbm37H"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PxugVsee" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46B7824171 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZdxKJwNBmzkS4tFQNAncM0VhUJ20p1bCXhDQ8t/Z3E0=; b=Pobbm37HjsgArBMowaeoKOMDS ypSiyWuNiqPtipmPbMZzjwHJ/hSy23KQq3w9K/wyzYhh2NS6Vi9fJJ2rcx8vdkBLmykbZWatE03Cy j2SkHc2A2e2smxu2HZYMK10Ur9HqKzkMk8xNupi3fB0S1IpJElkFg/nAbKXJMFDEdRU7qEMvEsibc cIsBjkQJDlW6+JaJWdYbdyxtoN3ymn0ixZOdI/N2/cPn8yeSJVUglyEY38W9OM4Vvp87j4WLlXdeY DNuD1OqtrZOZlgSXVj2ghCWldz1eSJBDTuhMUAb5ZpTn4XLmqYm9Tw7Hdyv+KM9LYkBK1ijgbR/HC QMAvFnUMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVbkp-0001Tf-Mq; Thu, 22 Oct 2020 14:39:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVbkn-0001T2-3o for linux-arm-kernel@lists.infradead.org; Thu, 22 Oct 2020 14:39:46 +0000 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 276A224171; Thu, 22 Oct 2020 14:39:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603377583; bh=ma7f6ciQXaB7O32bDDp+GeQJ6WrSJ5EDDu1VyaA7rGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PxugVsee9PWrXt/gXzudeuTvI47TjXebpNxq+V4HCmVCe1sKZHLosNqAbXuuvW+/i F3Omc7qJjCGcZpsoZ0gvdBLvvwF6P71x/p/bcwNCyzTjDInFt6yyFfEubOEEK8j98S eCVIVyZ2FmbbCU8ALan3OPjQJXwF2/c6hnwwd7rg= Date: Thu, 22 Oct 2020 16:40:21 +0200 From: Greg KH To: Arnd Bergmann Subject: Re: Buggy commit tracked to: "Re: [PATCH 2/9] iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c" Message-ID: <20201022144021.GA1969554@kroah.com> References: <5fd6003b-55a6-2c3c-9a28-8fd3a575ca78@redhat.com> <20201022104805.GA1503673@kroah.com> <20201022121849.GA1664412@kroah.com> <98d9df88-b7ef-fdfb-7d90-2fa7a9d7bab5@redhat.com> <20201022125759.GA1685526@kroah.com> <20201022135036.GA1787470@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201022_103945_312734_95BD11A8 X-CRM114-Status: GOOD ( 23.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-aio@kvack.org" , David Hildenbrand , "linux-mips@vger.kernel.org" , David Howells , "linux-mm@kvack.org" , "keyrings@vger.kernel.org" , "sparclinux@vger.kernel.org" , Christoph Hellwig , "linux-arch@vger.kernel.org" , "linux-s390@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "kernel-team@android.com" , "linux-block@vger.kernel.org" , Al Viro , "io-uring@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Jens Axboe , "linux-parisc@vger.kernel.org" , "netdev@vger.kernel.org" , Nick Desaulniers , "linux-kernel@vger.kernel.org" , "linux-security-module@vger.kernel.org" , David Laight , "linux-fsdevel@vger.kernel.org" , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" 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 Thu, Oct 22, 2020 at 04:28:20PM +0200, Arnd Bergmann wrote: > On Thu, Oct 22, 2020 at 3:50 PM Greg KH wrote: > > On Thu, Oct 22, 2020 at 02:57:59PM +0200, Greg KH wrote: > > > On Thu, Oct 22, 2020 at 02:42:24PM +0200, David Hildenbrand wrote: > > > > > struct iovec *iovec_from_user(const struct iovec __user *uvec, > > > > - unsigned long nr_segs, unsigned long fast_segs, > > > > + unsigned nr_segs, unsigned fast_segs, > > > > struct iovec *fast_iov, bool compat) > > > > { > > > > struct iovec *iov = fast_iov; > > > > @@ -1738,7 +1738,7 @@ ssize_t __import_iovec(int type, const struct > > > > iovec __user *uvec, > > > > struct iov_iter *i, bool compat) > > > > { > > > > ssize_t total_len = 0; > > > > - unsigned long seg; > > > > + unsigned seg; > > > > struct iovec *iov; > > > > > > > > iov = iovec_from_user(uvec, nr_segs, fast_segs, *iovp, compat); > > > > > > > > > > Ah, I tested the other way around, making everything "unsigned long" > > > instead. Will go try this too, as other tests are still running... > > > > Ok, no, this didn't work either. > > > > Nick, I think I need some compiler help here. Any ideas? > > I don't think the patch above would reliably clear the upper bits if they > contain garbage. > > If the integer extension is the problem, the way I'd try it is to make the > function take an 'unsigned long' and then explictly mask the upper > bits with > > seg = lower_32_bits(seg); > > Can you attach the iov_iter.s files from the broken build, plus the > one with 'noinline' for comparison? Maybe something can be seen > in there. I don't know how to extract the .s files easily from the AOSP build system, I'll look into that. I'm also now testing by downgrading to an older version of clang (10 instead of 11), to see if that matters at all or not... thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel