Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1964798pxu; Sun, 6 Dec 2020 13:45:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzE7q+zOSBPC+3cjMwsGt47AEYlA3US8K8DBwhTVw9SQVCEd9tzvomhSNBaBx9PqmqCyZw X-Received: by 2002:a17:907:a96:: with SMTP id by22mr15995415ejc.171.1607291136939; Sun, 06 Dec 2020 13:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607291136; cv=none; d=google.com; s=arc-20160816; b=j46B/VbJow0br7smhNC8LfBz3M1ExzWzcmKtnzyTSxzUnn9VONGpCMMvpPkvOHDiQF RjdyWrKGkVHvoGiJDoUv9N1Gqi6jC9GMltP9bnKHUPu+Ygtm8fXs+AcRhxlDKFAk56hS 5y9g60c1fq/kuGpJ6dY6lFUV3DsnbX8bhhCHvQlUrWTeIkqaa8+b7L4P0B9oAtfBCeqZ 2iUmWt5+Ga6Hdn6jvovh62jMCdrTP+WAOeZrubh/a7PPHtUzMj/TBTEIC4vD+SMWZGqh QccaF0IgSsPE8maYW5aDBdOu/bwGEnSIBXPmKud0OLIlXjs4lc8l78PHfhoZ2RnP9TdL Z7TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/BxSizpOargIZyac2nTAqdpMqu9JUHGGbqbw7p9cqXY=; b=ujSavtXk/xLbqbjzHZeYnuFZs9MuXfM2ageUmoQ1KFxe2uAwwf0wvfdejRPAUL17pS Y7QYmKRgHqTuHoVAUh40cuPOXbf06IrIQxPAjg50EHOvEo9K3tsHsh1SvCU8QczbeSPn oJjQFjQOrYkHMuh5c5vjI++BwtbuorEf/ab5cW9n9+Q9+8NAc0reC+oV6SRgjgKynzxz GTdkdDWAlJ8rcewiZC8sXcMFYvxmFSKaJ/IXXOKImDVv05U3jNqgjs/HdI2YVU+bRb2h 2Ps6gByChCWEYVaQw8MfgS0W0WS3Bn3eD2lgsMMhYI3hSl2Viof9GXNZIDvzqTwFZRGT yoAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GzCcTnP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si7046946edw.224.2020.12.06.13.45.13; Sun, 06 Dec 2020 13:45:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GzCcTnP1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728197AbgLFVlp (ORCPT + 99 others); Sun, 6 Dec 2020 16:41:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbgLFVlo (ORCPT ); Sun, 6 Dec 2020 16:41:44 -0500 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56732C0613D0; Sun, 6 Dec 2020 13:40:58 -0800 (PST) Received: by mail-wm1-x330.google.com with SMTP id 3so11878440wmg.4; 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=VNU8WDfcQzTVAyekvp6LR/43UnEx37F/yxHCW5TmrDDCFuB2LbJm1ITqm5GHRCPZwk Iy+sDvnUdl4/3oBe+lxULTFEHiuS31L8veytM8We3aVniZGGPYicQYtkNSNOIKb8Nw6M Nl0b970GtoMi8cYM25ApVfXrTMlQxfr1RmrOpDACd0lnT5PJsXzJd+lSxikI4alpDeZk JgzcMvohArbysdXBr8pG0UN+lE+5AOr8muNdvNkFx8bmAadgaAQGwbX/YzRcdE8K5Bys Noq/KOuuvDnRpvdq3Ik6oxXtJdPPLeBwa3bCr7f+Wbsm/SE9Qwl4qD65aVSDC5heav4D 26/A== X-Gm-Message-State: AOAM5337V8tLRL3xTsnppW5uA03nLc5vBPiv9b9cSJThGNYQclJE+ck/ Q3DKuu2goduB/vU5wRm0wt+3/ikAoDY= 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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