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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 F407DC4361B for ; Sun, 6 Dec 2020 21:41:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6312D23101 for ; Sun, 6 Dec 2020 21:41:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6312D23101 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 73BAB8D0002; Sun, 6 Dec 2020 16:40:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C4958D0001; Sun, 6 Dec 2020 16:40:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58C208D0002; Sun, 6 Dec 2020 16:40:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0179.hostedemail.com [216.40.44.179]) by kanga.kvack.org (Postfix) with ESMTP id 3EE058D0001 for ; Sun, 6 Dec 2020 16:40:59 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EECCC181AEF10 for ; Sun, 6 Dec 2020 21:40:58 +0000 (UTC) X-FDA: 77564177796.28.chalk58_191473a273d9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id C55C76D6E for ; Sun, 6 Dec 2020 21:40:58 +0000 (UTC) X-HE-Tag: chalk58_191473a273d9 X-Filterd-Recvd-Size: 4837 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Sun, 6 Dec 2020 21:40:58 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id x22so9862372wmc.5 for ; Sun, 06 Dec 2020 13:40:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/BxSizpOargIZyac2nTAqdpMqu9JUHGGbqbw7p9cqXY=; b=GzCcTnP1hykHHnk8kieyiyxzTx6xoXN6w89uNNv3N/J1qe9T2XHMBpdfcT1Bpc+IGk EaaJDdlJHbvpCu2nUPwk6beSSXutJJxeoUnHHEKj/WpIDx0DvdyJh/Tmr3REV/dcDl8F OgBVfyso+hW5mt9i/WdzTxUOAvC9QavNiaLgpjkgxzUS6nXKSQ95ftcz+BMzAjwZ9Wd2 eWdSCp7UT95HKHkWBEzbgFC7hSKYJiJ4bMgiwg/erq8kMbhh7yvk0xkAqJ6oJnKqaQ+b 871rtSreI4ZfDCp/A9FyIMsDMkv965L6cx/FDnFEhDhwMa0fKQ/AJHYhuLxZM9BKCfqx BE4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/BxSizpOargIZyac2nTAqdpMqu9JUHGGbqbw7p9cqXY=; b=PKMPwgQ0OjHEQo3n1YJIOQxEJRkC1XhBQgGTN6tKLizzHbDfoCw+zg5wlD3KCTLrYN Kg0btxCi7z1qR3BV5op7gerxnFKAfzb6zrUeavyC0sRFn7YT47FpkpesBx840o24sthn OkOTdZrfmpFUf7vHtXLvzvUi84bJWKt5I4//RLJmwsDrkOuwsbbWWQXzQVKYnrTXq5Kv 4nFJI1C/S+algOXQLbagqM7AtfdrvW3rPUHVodv07ns0SHR7se6pNu9NIHN1pSG3+Ao4 J2Hdr1zRVLBggy85EaXK3j/DOTxf6gEQ0TiMMaXQSqM2DNdCX5ttFYwfDehxxWrn4jFf n4kQ== X-Gm-Message-State: AOAM531zTRNdGzmZCWjiG9gKHrIby+evfS2ER9cfDa/mCWIf2gzbTP2a zMvGi9hPEfnFmCDl0D/WyyI= X-Google-Smtp-Source: ABdhPJzZKEbCkaETVTQleZ8rPJgbqrJ0gj7vBfgsr/S/ShhK2oE1HYMAySEm5l9TOEN0AbgN/GLHXA== X-Received: by 2002:a1c:b78a:: with SMTP id h132mr15145028wmf.141.1607290857074; Sun, 06 Dec 2020 13:40:57 -0800 (PST) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id y68sm10912421wmc.0.2020.12.06.13.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 13:40:56 -0800 (PST) Date: Sun, 6 Dec 2020 22:40:53 +0100 From: Corentin Labbe To: Thomas Gleixner Cc: herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , linux-mm@kvack.org, Andrew Morton , Julia Lawall Subject: Re: crypto: sun4i-ss: error with kmap Message-ID: <20201206214053.GA8458@Red> References: <20201202195501.GA29296@Red> <877dpzexfr.fsf@nanos.tec.linutronix.de> <20201203173846.GA16207@Red> <87r1o6bh1u.fsf@nanos.tec.linutronix.de> <20201204132631.GA25321@Red> <874kl1bod0.fsf@nanos.tec.linutronix.de> <20201204192753.GA19782@Red> <87wnxx9tle.fsf@nanos.tec.linutronix.de> <20201205184334.GA8034@Red> <87mtys8268.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mtys8268.fsf@nanos.tec.linutronix.de> 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 Sat, Dec 05, 2020 at 08:48:15PM +0100, Thomas Gleixner wrote: > Corentin, > > On Sat, Dec 05 2020 at 19:43, Corentin Labbe wrote: > > On Fri, Dec 04, 2020 at 09:58:21PM +0100, Thomas Gleixner wrote: > >> Can you please replace the debug patch with the one below and try again? > >> That stops the trace right on the condition. > > > > Hello, the result could be found at http://kernel.montjoie.ovh/130739.log > > Thanks for providing this. This is clearly showing where stuff goes > wrong. It starts here at 729.550001. I removed the uninteresting parts: > > 0d..2 147103293us : __kmap_local_page_prot <-sg_miter_next > 0d..3 147103308us :__kmap_local_pfn_prot: kmap_local_pfn: 1 ffefd000 > > 0d..3 147103311us : __kmap_local_page_prot <-sg_miter_next > 0d..4 147103325us : __kmap_local_pfn_prot: kmap_local_pfn: 3 ffefb000 > > 0d..3 147103429us : kunmap_local_indexed <-sg_miter_stop > 0d..4 147103433us : kunmap_local_indexed: kunmap_local: 3 ffefd000 > > So this maps two pages and unmaps the first one. That's all called from > sun4i_ss_opti_poll() and the bug is clearly visible there: > > sg_miter_next(&mi); > sg_miter_next(&mo); > > release_ss: > sg_miter_stop(&mi); > sg_miter_stop(&mo); > > Written by yourself :) Same issue in sun4i_ss_cipher_poll() > > Fix below. > Unfortunatly, the crash still happen with the fix. See http://kernel.montjoie.ovh/131321.log