Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp484027yba; Wed, 15 May 2019 04:59:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1M4J7uhX4UaN/e08iIARRFP+//WuOxUUmPo3I8OzJZR2yqGpiSWBvOM5DXpk+Qp1GvWWQ X-Received: by 2002:a17:902:7002:: with SMTP id y2mr44183293plk.75.1557921570358; Wed, 15 May 2019 04:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557921570; cv=none; d=google.com; s=arc-20160816; b=HqpygiU7/Z5kXz1hm9Yl4f1DlMqhQU9mVA1EQqkxGp60/DHhnoz/IN2I2lQfcd8TPc WoZAO1cTDccIo87QADXRVog6VAdr8nD7N6BtfBgggZ7aI621Vs+dHQGjIwcKXOYqVCn2 Gb2B08i4bH1uSmz+GKlfyqLamCcwhOlsrk+9R1Lq6MTme4eMH/q6rnk3kgd73aNPKAWG 7kRVGW6yglHnDA9SnNng2sT9WeuS6ljEFA60bEleABkpAYmxXDa1kyowVNsvtw58nlCY 3yObl0X5s+oIMS1zIRO7s3DKrtMFASTnnBkWKx5cJBQ576CdlBbW3zh2ZJV8WfWyM8H9 oUkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:to :subject:from:dkim-signature; bh=+73gT6NA6NW2DnlTlmM/3gPkuFToS2cIKSvZcSZ7FvQ=; b=rrPj7iE1ZOAzpL/ZgFCvLpsBHnjE1nJMxiEzTdL1s1QZUaEYuTrS/kWUrApoLL/kPW p/vQOUyIHbRJWm1eBK/DOa44Pkp5dM9ceJpwonniF6muKfxGYr0mTPp4QNM4tk6U0T11 ny8j25erX2Bjq2PN0dl9BErH+oTpVNtfUcTNu2VEZB6DF/uhx5za9sVEepZilY64vxex Ks5uB7UZECQuV6wHEufhpVG+wYvvkDFRS3hsS0B+FDcf1KK4G3d8c0KokhYKaT1on5RQ 39Kan8RBPS2caXlQtoXUVJonX91SP8Fx0cWmtjD1mzUzQXkSIPk2eh57nb5wEPO5UDz8 BvJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Xu2Fb7+V; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 d16si593277plr.408.2019.05.15.04.59.12; Wed, 15 May 2019 04:59:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Xu2Fb7+V; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728835AbfEOL6U (ORCPT + 99 others); Wed, 15 May 2019 07:58:20 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:56475 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727222AbfEOL6T (ORCPT ); Wed, 15 May 2019 07:58:19 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 453tNm5Dq2z9vDbV; Wed, 15 May 2019 13:58:16 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Xu2Fb7+V; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id MqTJTkSxMsQw; Wed, 15 May 2019 13:58:16 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 453tNm49NMz9vDbT; Wed, 15 May 2019 13:58:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1557921496; bh=+73gT6NA6NW2DnlTlmM/3gPkuFToS2cIKSvZcSZ7FvQ=; h=From:Subject:To:Cc:Date:From; b=Xu2Fb7+VYB3DeD/mZBpLLa7d/2fJklNODkR+354e8kNLVh6u9Ayy6cU2PVeLvG9l8 RwC5B0vK7T8AiWnbMKhafVMQ6LU3KVECbIJWCZmo+7dFz6tVHud9HZzqSgeZySN+pG Jg2fpJsqHEIsNASsqdml/MZMF+xs0aM/SzauTf1c= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E19048B902; Wed, 15 May 2019 13:58:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id k0XBLXGVxpgI; Wed, 15 May 2019 13:58:17 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BEEA58B8F7; Wed, 15 May 2019 13:58:17 +0200 (CEST) From: Christophe Leroy Subject: Can scatterlist elements cross page boundary ? To: Eric Biggers , Herbert Xu Cc: "linux-crypto@vger.kernel.org" Message-ID: <798a42c9-bcda-6612-088c-cb90c35a578f@c-s.fr> Date: Wed, 15 May 2019 13:58:13 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, I had understood that scatterlists where lists of buffers, each buffer being enclosed within a single memory PAGE. Isn't that right ? As far as I understand, dma_map_sg() expects each entry to be DMA mapable. But at the time being, I'm getting the following errors on the Talitos algorithmes: [ 2.382845] alg: aead: authenc-hmac-sha1-cbc-aes-talitos encryption test failed (wrong result) on test vector 0, cfg="misaligned splits crossing pages, inplace" [ 2.430178] alg: aead: authenc-hmac-sha1-cbc-aes-talitos encryption test failed (wrong result) on test vector 1, cfg="misaligned splits crossing pages, inplace" [ 2.509270] alg: aead: authenc-hmac-sha256-cbc-aes-talitos encryption test failed (wrong result) on test vector 0, cfg="uneven misaligned splits, may sleep" When comparing the expected and actual results, I see (respectively for the 3 fails above tests) : [ 2.362271] 00000000: e3 53 77 9c 10 79 ae b8 27 08 94 2d be 77 18 1a [ 2.368529] 00000010: 1b 13 cb af 89 5e e1 [ 2.372429] 00000000: e3 53 77 9c 10 79 ae b8 27 08 94 2d be 77 18 1a [ 2.378924] 00000010: fe fe fe fe fe fe fe [ 2.398908] 00000000: d2 96 cd 94 c2 cc cf 8a 3a 86 30 28 b5 e1 dc 0a [ 2.405185] 00000010: 75 86 60 2d 25 3c ff f9 1b 82 66 be a6 d6 1a b1 [ 2.411407] 00000020: ad 9b 4c [ 2.414427] 00000000: d2 96 cd 94 c2 cc cf 8a 3a 86 30 28 b5 e1 dc 0a [ 2.420926] 00000010: 75 86 60 2d 25 3c ff f9 1b 82 66 be a6 d6 1a b1 [ 2.427287] 00000020: fe fe fe [ 2.491701] 00000000: e3 53 77 9c 10 79 ae b8 27 08 94 2d be 77 18 1a [ 2.498125] 00000010: cc [ 2.500403] 00000000: e3 53 77 9c 10 79 ae b8 27 08 94 2d be 77 18 1a [ 2.507012] 00000010: fe Looking at the test manager, I understand that it builds scatterlists with buffers that are using 2 pages. Am I correct ? Then how do we expect the driver to behave ? Thanks Christophe