Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4330874imu; Mon, 7 Jan 2019 21:09:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN5oTL7M+4Q2IaNpfwIk8BDRb+pkVAmdYpPUdjipmlzURXIM1mG2CnLrmF+3y0Nezk0ojzt8 X-Received: by 2002:a63:a41:: with SMTP id z1mr286032pgk.117.1546924191155; Mon, 07 Jan 2019 21:09:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546924191; cv=none; d=google.com; s=arc-20160816; b=MWodnmQelVwjfaMaq0rJmNJam0erjOTho/XaV2GuidvFeYqzyNMfbKvFLq2EEPSzdw mWlmBttIF36ZujjN0k1BLSO9rtXsTiSO0xrO/BRI6yc3093VotIIUfE/gT/mr5dekOum HVeZB7yRkwtEppWUTfY31S6f4ihq4xQJvVCjxKX14rRqUAtdr6+tEE8xLuOzTY7u2ZHH 3OJrKZcZAIo99pX4YWM5I/TvtBQYNatdMsUb2Okd9RLKAXp9Yu5WPIKV7Xp1TYwjGy8i 4hvG6pR8ZsEykG7/8N8nFeKoxmGOl0qjZj064Ymk1h56YhMOxJx3hns9RKuk9BUINgAg BRTA== 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; bh=Zubp+PosRU2IFtL5Io9PTApwVU3M+M8csGCViVzFJLI=; b=aZUo2WeekoaiBRh3vIfWlpwohDF4NMg6Fez7welMF+Wk+ikqBf5PUoYCQzW3rddDQS ElNPWu0xfEUdf+T3MP6yyFDBnheoG67wbvbxqAz8RtmH7sGxEVU8Nc4CyaPyDqrhHnbf 9YliquWFV1n8BQPUCjwD8F2kmeQUhVgi2O+3ixhFcjjQv9LJWnivuQijLF4ggOa03wU0 fvdymnMsxxsTlFdZWGnBHIg+FqHEZ3yBfiIfehf8Yn4puGDxbHAqWw4rdOKrnUyEKbrN H1hTzTo8FuOvQdhhtfpd0j0UVFlKs0N5Sbp17yk96Us6+tNECvRQneq4JM6qS3K2Ds7+ y4kw== 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 k17si7716566pgl.62.2019.01.07.21.09.35; Mon, 07 Jan 2019 21:09:51 -0800 (PST) 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 S1727651AbfAHFBF (ORCPT + 99 others); Tue, 8 Jan 2019 00:01:05 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:54804 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbfAHFBD (ORCPT ); Tue, 8 Jan 2019 00:01:03 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1ggjVB-0000Iu-MR; Tue, 08 Jan 2019 13:00:33 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1ggjV6-000555-SU; Tue, 08 Jan 2019 13:00:28 +0800 Date: Tue, 8 Jan 2019 13:00:28 +0800 From: Herbert Xu To: Christophe Leroy Cc: "David S. Miller" , Horia Geanta , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, stable@vger.kernel.org Subject: Re: [PATCH v3] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK Message-ID: <20190108050028.mrdz727dhzmlbi7i@gondor.apana.org.au> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 08:07:52AM +0000, Christophe Leroy wrote: > [ 2.364486] WARNING: CPU: 0 PID: 60 at ./arch/powerpc/include/asm/io.h:837 dma_nommu_map_page+0x44/0xd4 > [ 2.373579] CPU: 0 PID: 60 Comm: cryptomgr_test Tainted: G W 4.20.0-rc5-00560-g6bfb52e23a00-dirty #531 > [ 2.384740] NIP: c000c540 LR: c000c584 CTR: 00000000 > [ 2.389743] REGS: c95abab0 TRAP: 0700 Tainted: G W (4.20.0-rc5-00560-g6bfb52e23a00-dirty) > [ 2.400042] MSR: 00029032 CR: 24042204 XER: 00000000 > [ 2.406669] > [ 2.406669] GPR00: c02f2244 c95abb60 c6262990 c95abd80 0000256a 00000001 00000001 00000001 > [ 2.406669] GPR08: 00000000 00002000 00000010 00000010 24042202 00000000 00000100 c95abd88 > [ 2.406669] GPR16: 00000000 c05569d4 00000001 00000010 c95abc88 c0615664 00000004 00000000 > [ 2.406669] GPR24: 00000010 c95abc88 c95abc88 00000000 c61ae210 c7ff6d40 c61ae210 00003d68 > [ 2.441559] NIP [c000c540] dma_nommu_map_page+0x44/0xd4 > [ 2.446720] LR [c000c584] dma_nommu_map_page+0x88/0xd4 > [ 2.451762] Call Trace: > [ 2.454195] [c95abb60] [82000808] 0x82000808 (unreliable) > [ 2.459572] [c95abb80] [c02f2244] talitos_edesc_alloc+0xbc/0x3c8 > [ 2.465493] [c95abbb0] [c02f2600] ablkcipher_edesc_alloc+0x4c/0x5c > [ 2.471606] [c95abbd0] [c02f4ed0] ablkcipher_encrypt+0x20/0x64 > [ 2.477389] [c95abbe0] [c02023b0] __test_skcipher+0x4bc/0xa08 > [ 2.483049] [c95abe00] [c0204b60] test_skcipher+0x2c/0xcc > [ 2.488385] [c95abe20] [c0204c48] alg_test_skcipher+0x48/0xbc > [ 2.494064] [c95abe40] [c0205cec] alg_test+0x164/0x2e8 > [ 2.499142] [c95abf00] [c0200dec] cryptomgr_test+0x48/0x50 > [ 2.504558] [c95abf10] [c0039ff4] kthread+0xe4/0x110 > [ 2.509471] [c95abf40] [c000e1d0] ret_from_kernel_thread+0x14/0x1c > [ 2.515532] Instruction dump: > [ 2.518468] 7c7e1b78 7c9d2378 7cbf2b78 41820054 3d20c076 8089c200 3d20c076 7c84e850 > [ 2.526127] 8129c204 7c842e70 7f844840 419c0008 <0fe00000> 2f9e0000 54847022 7c84fa14 > [ 2.533960] ---[ end trace bf78d94af73fe3b8 ]--- > [ 2.539123] talitos ff020000.crypto: master data transfer error > [ 2.544775] talitos ff020000.crypto: TEA error: ISR 0x20000000_00000040 > [ 2.551625] alg: skcipher: encryption failed on test 1 for ecb-aes-talitos: ret=22 > > IV cannot be on stack when CONFIG_VMAP_STACK is selected because the stack > cannot be DMA mapped anymore. > > This patch copies the IV into the extended descriptor when iv is not > a valid linear address. Please make the copy unconditional. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt