Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp593197imm; Fri, 8 Jun 2018 01:53:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJwd+svlnYBqdnoq/5v+mO0cK7qmaAU86Hkq0zu85FU6IkwECcYAFfh+ei2lM3DEfqJRcF7 X-Received: by 2002:a17:902:530e:: with SMTP id b14-v6mr5805662pli.316.1528448016275; Fri, 08 Jun 2018 01:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528448016; cv=none; d=google.com; s=arc-20160816; b=I0VJF6AvskgoPKLQ4w4c0QSBujMPa48ygRAVYbTHhw+3NvgtX2a0FQq/t/W0sAxuBn BsBsOE+DLTweIRUA5XxOu/0KAX5VwQRizr/6xnjhDK+feHWliznkW0SCGeRW2f2XZ0Rh 56Ib4YWLYHZzjKQOiH1mgPGUSClE0vu8PBSKZbbNs93wIJbygBC1rkmEUV/KyuRKO9q6 qNTMmG3UfWf26NSaxfbXLMwn27vyKQwI5eMiAHmezJ5pU/ZHHhKhSxOrh75M6RAuzg6m w/6H3GMqK32UOOLYa7OzosiiN0rMX2e3Bcd20qIvqmFwwOOTABqr6aoGNI+0WIwFFtUa O7Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=08XCtUPf/+VNlHvSi3Esiz3fTH5xIcIRGyOHiCHMCcA=; b=ma+2v0w9NAaO5Xw8+5YbjHeaf2C04cz5LfKhh32yiaTnU6J4gF9LqXCHULr9SyoKBV usKk2zJCuTdaLfLSrRF6DPmgslaZt6dDoKp8Oi89PW6Dugu7Yfz5MEoEDESiZNYyIzWI BvgRdbezzpUtotjQ55Ii6peF0pKc7d59ahXpcrAbAcOnyl2vRpKlLbD6rSsmIU/4iTFM BCE1FYVj6VzbGhFa+YsXjV8hmymEsDbO/vdKqOyGk9noveYGkhlZg4CahpRikdCzQyZg p0ID9Ny71+MrYyb9vwFRtTdIQMWA6V13/vZouoikqoaeJwoyBlqDPTbmzRLmr9AfuJEZ WkeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si15255826pln.349.2018.06.08.01.53.22; Fri, 08 Jun 2018 01:53:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752364AbeFHIw4 (ORCPT + 99 others); Fri, 8 Jun 2018 04:52:56 -0400 Received: from foss.arm.com ([217.140.101.70]:59758 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbeFHIwx (ORCPT ); Fri, 8 Jun 2018 04:52:53 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D69C61529; Fri, 8 Jun 2018 01:52:52 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A73C83F557; Fri, 8 Jun 2018 01:52:52 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 2406D1AE53AB; Fri, 8 Jun 2018 09:53:25 +0100 (BST) Date: Fri, 8 Jun 2018 09:53:25 +0100 From: Will Deacon To: Jia He Cc: Herbert Xu , "David S. Miller" , Catalin Marinas , Ard Biesheuvel , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jia.he@hxt-semitech.com, stable@vger.kernel.org Subject: Re: [PATCH v2] crypto: arm64/aes-blk - fix and move skcipher_walk_done out of kernel_neon_begin,_end Message-ID: <20180608085323.GB18931@arm.com> References: <1528443704-26850-1-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1528443704-26850-1-git-send-email-hejianet@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 03:41:44PM +0800, Jia He wrote: > In a arm64 server(QDF2400),I met a similar might-sleep warning as [1]: > [ 7.019116] BUG: sleeping function called from invalid context at > ./include/crypto/algapi.h:416 > [ 7.027863] in_atomic(): 1, irqs_disabled(): 0, pid: 410, name: > cryptomgr_test > [ 7.035106] 1 lock held by cryptomgr_test/410: > [ 7.039549] #0: (ptrval) (&drbg->drbg_mutex){+.+.}, at: > drbg_instantiate+0x34/0x398 > [ 7.048038] CPU: 9 PID: 410 Comm: cryptomgr_test Not tainted > 4.17.0-rc6+ #27 > [ 7.068228] dump_backtrace+0x0/0x1c0 > [ 7.071890] show_stack+0x24/0x30 > [ 7.075208] dump_stack+0xb0/0xec > [ 7.078523] ___might_sleep+0x160/0x238 > [ 7.082360] skcipher_walk_done+0x118/0x2c8 > [ 7.086545] ctr_encrypt+0x98/0x130 > [ 7.090035] simd_skcipher_encrypt+0x68/0xc0 > [ 7.094304] drbg_kcapi_sym_ctr+0xd4/0x1f8 > [ 7.098400] drbg_ctr_update+0x98/0x330 > [ 7.102236] drbg_seed+0x1b8/0x2f0 > [ 7.105637] drbg_instantiate+0x2ac/0x398 > [ 7.109646] drbg_kcapi_seed+0xbc/0x188 > [ 7.113482] crypto_rng_reset+0x4c/0xb0 > [ 7.117319] alg_test_drbg+0xec/0x330 > [ 7.120981] alg_test.part.6+0x1c8/0x3c8 > [ 7.124903] alg_test+0x58/0xa0 > [ 7.128044] cryptomgr_test+0x50/0x58 > [ 7.131708] kthread+0x134/0x138 > [ 7.134936] ret_from_fork+0x10/0x1c > > Seems there is a bug in Ard Biesheuvel's commit. > Fixes: 683381747270 ("crypto: arm64/aes-blk - move kernel mode neon > en/disable into loop") > > [1] https://www.spinics.net/lists/linux-crypto/msg33103.html > > Signed-off-by: jia.he@hxt-semitech.com > Acked-by: Ard Biesheuvel > Cc: # 4.17 > --- > v2: cc stable > --- > arch/arm64/crypto/aes-glue.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Will Deacon I'm assuming Herbert will pick this up as a fix. Cheers, Will